Commit graph

293 commits

Author SHA1 Message Date
Grant Sanderson
279f66ceaf A little refactoring and performance improvement 2020-06-28 12:14:46 -07:00
Grant Sanderson
b443c9e764 Fixed bug at a = 1 for partial_bezier 2020-06-27 12:17:41 -07:00
Grant Sanderson
54bde86c7b Some small performance improvements to VMobject 2020-06-27 12:10:22 -07:00
Grant Sanderson
10c6bfe3ad Add refresh_shader_info_id insetead of having create_shader_info_id called all the time 2020-06-27 00:01:45 -07:00
Grant Sanderson
60e1c88eb4 Slight tweaks to how shader_info id is found and stored 2020-06-26 23:05:25 -07:00
Grant Sanderson
212cdbb4d2 Speed improvements. Camera saves vbo for static mobjects, data in shader_data_info is saved and concatenated in raw form 2020-06-26 19:29:34 -07:00
Grant Sanderson
5ce8d08e0f Go back to recomputing shader id 2020-06-17 17:10:35 -07:00
Grant Sanderson
edec91e1e4 Unfactor internals of batch_by_property for easier readibility, and slight performnace improvement 2020-06-15 12:00:03 -07:00
Grant Sanderson
1e6eef89ec Have shader_info remember its own id 2020-06-15 11:59:24 -07:00
Grant Sanderson
9d772496dd Removes the need to be able to recover shader_info from shader_id 2020-06-14 19:01:04 -07:00
Grant Sanderson
222b6d1220 Push depth test decision to the mobject level, as opposed to the camera 2020-06-14 17:41:47 -07:00
Grant Sanderson
8a060dfa3f Add axis_normalized option to quaternion_from_angle_axis 2020-06-09 20:40:36 -07:00
Grant Sanderson
3e913b6649 Have make_smooth work directly from the quadratic bezier curves, without going via cubics and doubling the size of the points list 2020-06-09 16:58:16 -07:00
Grant Sanderson
c7a50ac7a5 Tried, but failed, to write a better smooth bezier function 2020-06-09 12:38:37 -07:00
Grant Sanderson
f0a36329b1 Changed get_quadratic_approximation_of_cubic 2020-06-08 20:40:39 -07:00
Grant Sanderson
bab809b9a6 Allow for passing shader uniforms from mobjects 2020-06-08 15:57:12 -07:00
Grant Sanderson
39230a805c Better handling of textures, now letting multiple get passed in to a textured surface 2020-06-08 15:06:22 -07:00
Grant Sanderson
7c1f560ae2 Change fallback unit normal to be in negative y-direction 2020-06-06 10:57:07 -07:00
Grant Sanderson
b2137f2746 Fixed z_to_vector for vectors on z-axis 2020-06-05 13:21:35 -07:00
Grant Sanderson
efe15cf2f0 normalize_along_axis 2020-06-05 11:12:11 -07:00
Grant Sanderson
e4419204cb Got stroke shaders working in 3d 2020-06-04 11:29:36 -07:00
Grant Sanderson
23bbdc63ba Fix up fill shaders to work when being viewed from different orientations, along with several other little bugs 2020-06-03 17:10:33 -07:00
Grant Sanderson
725a7e3121 Enable 3d rotations 2020-06-01 16:21:18 -07:00
Grant Sanderson
cfe72922ca Have rotate_vector return same type as input 2020-03-06 06:15:28 -08:00
Grant Sanderson
f4776626e4 Shorten name to index_labels 2020-02-27 17:16:10 +00:00
Grant Sanderson
34ae76ab7f Have restructure_list_to_exclude_certain_family_members work with the full family of to_remove 2020-02-22 13:20:59 -08:00
Grant Sanderson
f4a33c5bfb Small fix 2020-02-22 13:20:37 -08:00
Grant Sanderson
0b0dbcb5d8 Replace np.tan with math.tan...because why not 2020-02-21 12:01:39 -08:00
Grant Sanderson
fa7f340cd3 Replace np.<trig> with math.<trig> 2020-02-21 10:57:10 -08:00
Grant Sanderson
b825b36b60 Slight fix to triangulation 2020-02-20 16:50:34 -08:00
Grant Sanderson
6be41fec6d Add simple function to measure runtime 2020-02-20 16:50:13 -08:00
Grant Sanderson
ec017bd1ae Insignificant style edit 2020-02-20 15:51:26 -08:00
Grant Sanderson
c794039b9d Replacing apply_along_axis 2020-02-19 23:43:33 -08:00
Grant Sanderson
26a872be94 Replace rotation_matrix with rotation_matrix_transpose 2020-02-18 22:29:56 -08:00
Grant Sanderson
54067db386 Replace np.clip with clip 2020-02-18 22:27:28 -08:00
Grant Sanderson
34a1896ea8 Add custom clip function, since np.clip is evidently super slow 2020-02-18 22:27:13 -08:00
Grant Sanderson
67d9762773 Use quaternions to find rotation matrix 2020-02-18 22:25:54 -08:00
Grant Sanderson
9d4b16d03f Moved around where batching mobjects by shader type occurs, while also pulling out some of the shader_id helper functions 2020-02-17 12:14:40 -08:00
Grant Sanderson
ba89ad7450 Forget about using remove_list_redundancies 2020-02-14 15:29:35 -08:00
Grant Sanderson
c654ca4506 Remove usage of np.append 2020-02-13 12:03:54 -08:00
Grant Sanderson
eb89d45937 Have get_quadratic_approximation_of_cubic default to midpoint when there is no inflection 2020-02-12 12:53:21 -08:00
Grant Sanderson
5cfae1ea75 Remove unneeded import 2020-02-12 11:50:05 -08:00
Grant Sanderson
c0a29c4c74 Have partial_bezier_points return list, not numpy array 2020-02-12 11:49:16 -08:00
Grant Sanderson
052aa8afe2 Changed angle methods 2020-02-11 19:48:50 -08:00
Grant Sanderson
f98513dfc2 Remove unneeded import 2020-02-10 14:48:07 -08:00
Grant Sanderson
7ce75bdb52 Added wrapper around mapbox triangulation to make it work for polygons with holes 2020-02-10 14:47:36 -08:00
Grant Sanderson
db0029c32b Fix error in get_quadratic_approximation_of_cubic 2020-02-07 09:31:06 -08:00
Grant Sanderson
1a13d32452 Get rid of join_structured_arrays 2020-02-07 09:30:47 -08:00
Grant Sanderson
cf2d8d47e6 Fixed get_quadratic_approximation_of_cubic to account for cubics with an inflection point between 0 and 1 2020-02-06 10:01:19 -08:00
Grant Sanderson
7685fd03c6 Whoops, let an accidental deletion slip through 2020-02-06 10:00:55 -08:00