Commit graph

72 commits

Author SHA1 Message Date
Grant Sanderson
602809758e
Video work (#1739)
* Enable setting points to a null list, and adding one point at a time.

* Add refresh_locked_data

* Add presenter mode to scenes with -p option

* Allow for an embed by hitting e during interaction

* Add set_min_height, etc.

* Make sure null parametric curve has at least one point

* Account for edge case where \{ is used in Tex

* Allow for logging notes in wait calls, useful for presenter mode

* Simplify choose, and add gen_choose for fractional amounts

* Default to no top on axes

* Allow match_x, match_y, etc. to take in a point

* Allow wait calls to ignore presenter mode

* Just use math.combo, no caching with choose(n, r)

* Use generator instead of list in bezier

* Bubble init_colors should override

* Account for "px" values read in from an svg

* Stop displaying when writing is happening

* Update the way Bubble override SVG colors
2022-02-13 15:16:16 -08:00
Elisha Hollander
f9351536e4
minor fixes (#1737) 2022-02-13 11:12:41 +08:00
YishiMichael
67f5b10626
Attempt to refactor SVGMobject with svgelements (#1731)
* Some small refactors

* Refactor MTex

* Implement TransformMatchingMTex

* Some refactors

* Some refactors

* Some small refactors

* Strip strings before matching

* Implement get_submob_tex

* Use RGB color mode

* Some small refactors

* Try refactoring SVGMobject with svglib

* Refactor SVGMobject using svgelements

* Refactor SVGMobject using svgelements

* Use functions instead of func names as dict values

* style: modify import order to conform to PEP8

* Set default values to None

* modify import order

* Remove unused import

Co-authored-by: TonyCrane <tonycrane@foxmail.com>
2022-02-11 07:53:21 -08:00
TonyCrane
aa135280ac
support <line> tag in SVG 2022-01-27 17:23:58 +08:00
TonyCrane
f0160822ba
fix bug of ref map 2022-01-27 17:17:19 +08:00
TonyCrane
48e07d1817
parse style attribute using tinycss 2022-01-27 17:16:52 +08:00
TonyCrane
3ef5899a24
some cleanups 2022-01-27 16:43:45 +08:00
TonyCrane
f895455264
add parser for <style> tag of SVG 2022-01-27 16:37:51 +08:00
Grant Sanderson
ecb729850a Small style fixes 2022-01-26 08:20:45 -08:00
TonyCrane
19778e405a
some cleanups 2022-01-26 19:55:47 +08:00
TonyCrane
833e40c2d4
fix default style 2022-01-26 19:50:27 +08:00
TonyCrane
9df53b8a18
fix the bug of M command with more than 2 args 2022-01-26 14:05:01 +08:00
TonyCrane
ff86b0e378
fix the bug of outdated relative_point after command Z 2022-01-26 13:56:42 +08:00
TonyCrane
92adcd75d4
add style support to svg 2022-01-26 13:53:53 +08:00
TonyCrane
6c8dd14adc
some clean 2022-01-26 11:00:57 +08:00
TonyCrane
8db1164ece
some refactors 2022-01-25 21:48:04 +08:00
TonyCrane
790bf0a104
fix typo 2022-01-25 20:25:30 +08:00
TonyCrane
8205edcc4c
fix a small bug 2022-01-25 20:13:20 +08:00
TonyCrane
05b3c9852e
fix add_smooth_cubic_curve_to when have only one point 2022-01-25 20:06:00 +08:00
TonyCrane
925f2e123f
add comments 2022-01-25 19:54:19 +08:00
TonyCrane
565763a2ff
reconstruct path parser 2022-01-25 19:44:42 +08:00
TonyCrane
6a74c241b8
fix bug of node which is not an element 2022-01-25 16:28:23 +08:00
TonyCrane
416cc8e6d5
add warning for unsupported element type 2022-01-25 14:41:11 +08:00
TonyCrane
d694aed452
add support for skewX and skewY transform 2022-01-25 14:40:02 +08:00
TonyCrane
11379283aa
add support for rotate transform 2022-01-25 14:29:47 +08:00
TonyCrane
dd13559b11
replace warnings.warn with log.warning 2022-01-25 14:09:05 +08:00
TonyCrane
f4eb2724c5
refactor SVGMobject.handle_transforms 2022-01-25 14:04:35 +08:00
TonyCrane
33f720c73a
fix typo 2022-01-25 13:15:53 +08:00
TonyCrane
bbb4fa155c
fix the depth of svg tag 2022-01-25 13:14:19 +08:00
Michael W
b6f9da87d0
Refactor command handling in svg_mobject.py 2021-10-24 22:30:18 +08:00
Grant Sanderson
54ad3550ef Fix bug with SVG rectangles 2021-10-01 12:32:04 -07:00
Grant Sanderson
ca9b70e218 Make sure triangulation is remembered correctly 2021-08-19 09:19:02 -07:00
Michael W
ec620fa849
Support the elliptical arc command for SVGMobject 2021-08-08 20:53:50 +08:00
Grant Sanderson
88f0c24c69 Decompose ellipse manipulations 2021-03-24 14:00:46 -07:00
Grant Sanderson
729dae1376 Fix triangulation issue for polygons with many holes 2021-02-02 15:35:03 -08:00
Grant Sanderson
5fb06e77b5 Don't save triangulations to file, as this introduces unwanted errors 2021-01-30 22:51:15 -08:00
Grant Sanderson
b353c4f21c Change comment 2021-01-30 17:51:14 -08:00
Grant Sanderson
baab9ddf02 Included fix for Text(%), though the underlying bug for rending these persists. 2021-01-28 12:01:49 -08:00
Grant Sanderson
ad60b903d0 Allow configuration of VMobjectFromSVGPathstring from SVGMobject 2021-01-13 00:09:36 -10:00
Grant Sanderson
d1b888958b Save triangulation along with points 2021-01-11 16:37:01 -10:00
Grant Sanderson
9314dfd933 Reframe Mobject, VMobject and SurfaceMobject with a data map 2021-01-11 10:57:23 -10:00
Grant Sanderson
b3335c65fb Partial progress 2021-01-10 18:51:47 -08:00
Grant Sanderson
592432611b Remove all configuration from constants.py, and clean up the many files affected by this move 2021-01-02 20:47:51 -08:00
Grant Sanderson
1237ecc8f0 More percent sign exceptions 2020-12-17 15:59:14 -08:00
Grant Sanderson
af0948ea15 Address percent bug a better way, but still witha patch that shouldn't be permanent 2020-12-04 08:25:23 -08:00
Grant Sanderson
33d4dd7729 Fix svg polygon command 2020-08-12 13:24:16 -07:00
Grant Sanderson
9a2b2ecd9e Small repositioning 2020-06-26 21:53:26 -07:00
Grant Sanderson
1f6308577b Only remove null curves for tex mobjects 2020-06-23 14:26:02 -07:00
Grant Sanderson
a4d4ae9b47 Don't get rid of null curves each frame, instead do it once for SVG mobjects. 2020-06-09 20:39:32 -07:00
Grant Sanderson
bafc8c88d5 subdivide_sharp_curves -> should_subdivide_sharp_curves 2020-02-20 16:49:56 -08:00