@redwilly/anima 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/cli/SceneLoader.d.ts +22 -0
  2. package/dist/cli/SceneLoader.js +47 -0
  3. package/dist/cli/commands/export-frame.d.ts +13 -0
  4. package/dist/cli/commands/export-frame.js +60 -0
  5. package/dist/cli/commands/list-scenes.d.ts +5 -0
  6. package/dist/cli/commands/list-scenes.js +22 -0
  7. package/dist/cli/commands/preview.d.ts +5 -0
  8. package/dist/cli/commands/preview.js +11 -0
  9. package/dist/cli/commands/render.d.ts +16 -0
  10. package/dist/cli/commands/render.js +76 -0
  11. package/dist/cli/index.d.ts +2 -0
  12. package/dist/cli/index.js +63 -0
  13. package/dist/core/animations/Animation.d.ts +41 -0
  14. package/dist/core/animations/Animation.js +76 -0
  15. package/dist/core/animations/camera/Follow.d.ts +70 -0
  16. package/dist/core/animations/camera/Follow.js +69 -0
  17. package/dist/core/animations/camera/Shake.d.ts +90 -0
  18. package/dist/core/animations/camera/Shake.js +87 -0
  19. package/dist/core/animations/camera/index.d.ts +2 -0
  20. package/dist/core/animations/camera/index.js +2 -0
  21. package/dist/core/animations/categories/ExitAnimation.d.ts +17 -0
  22. package/dist/core/animations/categories/ExitAnimation.js +15 -0
  23. package/dist/core/animations/categories/IntroductoryAnimation.d.ts +16 -0
  24. package/dist/core/animations/categories/IntroductoryAnimation.js +14 -0
  25. package/dist/core/animations/categories/TransformativeAnimation.d.ts +25 -0
  26. package/dist/core/animations/categories/TransformativeAnimation.js +25 -0
  27. package/dist/core/animations/categories/index.d.ts +3 -0
  28. package/dist/core/animations/categories/index.js +3 -0
  29. package/dist/core/animations/composition/Parallel.d.ts +37 -0
  30. package/dist/core/animations/composition/Parallel.js +79 -0
  31. package/dist/core/animations/composition/Sequence.d.ts +41 -0
  32. package/dist/core/animations/composition/Sequence.js +95 -0
  33. package/dist/core/animations/composition/index.d.ts +2 -0
  34. package/dist/core/animations/composition/index.js +3 -0
  35. package/dist/core/animations/draw/Draw.d.ts +30 -0
  36. package/dist/core/animations/draw/Draw.js +122 -0
  37. package/dist/core/animations/draw/Unwrite.d.ts +30 -0
  38. package/dist/core/animations/draw/Unwrite.js +120 -0
  39. package/dist/core/animations/draw/Write.d.ts +35 -0
  40. package/dist/core/animations/draw/Write.js +119 -0
  41. package/dist/core/animations/draw/index.d.ts +3 -0
  42. package/dist/core/animations/draw/index.js +3 -0
  43. package/dist/core/animations/draw/partialPath.d.ts +6 -0
  44. package/dist/core/animations/draw/partialPath.js +138 -0
  45. package/dist/core/animations/easing/bounce.d.ts +13 -0
  46. package/dist/core/animations/easing/bounce.js +37 -0
  47. package/dist/core/animations/easing/index.d.ts +7 -0
  48. package/dist/core/animations/easing/index.js +11 -0
  49. package/dist/core/animations/easing/manim.d.ts +46 -0
  50. package/dist/core/animations/easing/manim.js +102 -0
  51. package/dist/core/animations/easing/registry.d.ts +8 -0
  52. package/dist/core/animations/easing/registry.js +25 -0
  53. package/dist/core/animations/easing/standard.d.ts +113 -0
  54. package/dist/core/animations/easing/standard.js +151 -0
  55. package/dist/core/animations/easing/types.d.ts +6 -0
  56. package/dist/core/animations/easing/types.js +0 -0
  57. package/dist/core/animations/fade/FadeIn.d.ts +17 -0
  58. package/dist/core/animations/fade/FadeIn.js +22 -0
  59. package/dist/core/animations/fade/FadeOut.d.ts +17 -0
  60. package/dist/core/animations/fade/FadeOut.js +23 -0
  61. package/dist/core/animations/fade/index.d.ts +2 -0
  62. package/dist/core/animations/fade/index.js +2 -0
  63. package/dist/core/animations/index.d.ts +11 -0
  64. package/dist/core/animations/index.js +17 -0
  65. package/dist/core/animations/keyframes/KeyframeAnimation.d.ts +33 -0
  66. package/dist/core/animations/keyframes/KeyframeAnimation.js +40 -0
  67. package/dist/core/animations/keyframes/KeyframeTrack.d.ts +31 -0
  68. package/dist/core/animations/keyframes/KeyframeTrack.js +83 -0
  69. package/dist/core/animations/keyframes/index.d.ts +4 -0
  70. package/dist/core/animations/keyframes/index.js +5 -0
  71. package/dist/core/animations/keyframes/types.d.ts +25 -0
  72. package/dist/core/animations/keyframes/types.js +6 -0
  73. package/dist/core/animations/morph/MorphTo.d.ts +22 -0
  74. package/dist/core/animations/morph/MorphTo.js +42 -0
  75. package/dist/core/animations/morph/index.d.ts +1 -0
  76. package/dist/core/animations/morph/index.js +1 -0
  77. package/dist/core/animations/transform/MoveTo.d.ts +24 -0
  78. package/dist/core/animations/transform/MoveTo.js +38 -0
  79. package/dist/core/animations/transform/Rotate.d.ts +23 -0
  80. package/dist/core/animations/transform/Rotate.js +34 -0
  81. package/dist/core/animations/transform/Scale.d.ts +23 -0
  82. package/dist/core/animations/transform/Scale.js +35 -0
  83. package/dist/core/animations/transform/index.d.ts +3 -0
  84. package/dist/core/animations/transform/index.js +3 -0
  85. package/dist/core/animations/types.d.ts +52 -0
  86. package/dist/core/animations/types.js +6 -0
  87. package/dist/core/camera/Camera.d.ts +87 -0
  88. package/dist/core/camera/Camera.js +175 -0
  89. package/dist/core/camera/CameraFrame.d.ts +242 -0
  90. package/dist/core/camera/CameraFrame.js +322 -0
  91. package/dist/core/camera/index.d.ts +4 -0
  92. package/dist/core/camera/index.js +3 -0
  93. package/dist/core/camera/types.d.ts +17 -0
  94. package/dist/core/camera/types.js +1 -0
  95. package/dist/core/errors/AnimationErrors.d.ts +12 -0
  96. package/dist/core/errors/AnimationErrors.js +37 -0
  97. package/dist/core/errors/index.d.ts +1 -0
  98. package/dist/core/errors/index.js +1 -0
  99. package/dist/core/math/Vector2/Vector2.d.ts +23 -0
  100. package/dist/core/math/Vector2/Vector2.js +46 -0
  101. package/dist/core/math/Vector2/index.d.ts +1 -0
  102. package/dist/core/math/Vector2/index.js +1 -0
  103. package/dist/core/math/bezier/BezierPath.d.ts +38 -0
  104. package/dist/core/math/bezier/BezierPath.js +264 -0
  105. package/dist/core/math/bezier/evaluators.d.ts +9 -0
  106. package/dist/core/math/bezier/evaluators.js +36 -0
  107. package/dist/core/math/bezier/index.d.ts +8 -0
  108. package/dist/core/math/bezier/index.js +6 -0
  109. package/dist/core/math/bezier/length.d.ts +5 -0
  110. package/dist/core/math/bezier/length.js +27 -0
  111. package/dist/core/math/bezier/morphing.d.ts +16 -0
  112. package/dist/core/math/bezier/morphing.js +151 -0
  113. package/dist/core/math/bezier/sampling.d.ts +7 -0
  114. package/dist/core/math/bezier/sampling.js +153 -0
  115. package/dist/core/math/bezier/split.d.ts +19 -0
  116. package/dist/core/math/bezier/split.js +44 -0
  117. package/dist/core/math/bezier/types.d.ts +8 -0
  118. package/dist/core/math/bezier/types.js +0 -0
  119. package/dist/core/math/color/Color.d.ts +28 -0
  120. package/dist/core/math/color/Color.js +60 -0
  121. package/dist/core/math/color/conversions.d.ts +17 -0
  122. package/dist/core/math/color/conversions.js +100 -0
  123. package/dist/core/math/color/index.d.ts +2 -0
  124. package/dist/core/math/color/index.js +2 -0
  125. package/dist/core/math/index.d.ts +4 -0
  126. package/dist/core/math/index.js +5 -0
  127. package/dist/core/math/matrix/Matrix3x3.d.ts +23 -0
  128. package/dist/core/math/matrix/Matrix3x3.js +91 -0
  129. package/dist/core/math/matrix/factories.d.ts +12 -0
  130. package/dist/core/math/matrix/factories.js +44 -0
  131. package/dist/core/math/matrix/index.d.ts +2 -0
  132. package/dist/core/math/matrix/index.js +2 -0
  133. package/dist/core/renderer/FrameRenderer.d.ts +37 -0
  134. package/dist/core/renderer/FrameRenderer.js +75 -0
  135. package/dist/core/renderer/ProgressReporter.d.ts +19 -0
  136. package/dist/core/renderer/ProgressReporter.js +58 -0
  137. package/dist/core/renderer/Renderer.d.ts +36 -0
  138. package/dist/core/renderer/Renderer.js +102 -0
  139. package/dist/core/renderer/drawMobject.d.ts +8 -0
  140. package/dist/core/renderer/drawMobject.js +109 -0
  141. package/dist/core/renderer/formats/index.d.ts +3 -0
  142. package/dist/core/renderer/formats/index.js +3 -0
  143. package/dist/core/renderer/formats/png.d.ts +5 -0
  144. package/dist/core/renderer/formats/png.js +7 -0
  145. package/dist/core/renderer/formats/sprite.d.ts +6 -0
  146. package/dist/core/renderer/formats/sprite.js +24 -0
  147. package/dist/core/renderer/formats/video.d.ts +8 -0
  148. package/dist/core/renderer/formats/video.js +51 -0
  149. package/dist/core/renderer/index.d.ts +7 -0
  150. package/dist/core/renderer/index.js +9 -0
  151. package/dist/core/renderer/types.d.ts +87 -0
  152. package/dist/core/renderer/types.js +13 -0
  153. package/dist/core/scene/Scene.d.ts +104 -0
  154. package/dist/core/scene/Scene.js +225 -0
  155. package/dist/core/scene/index.d.ts +2 -0
  156. package/dist/core/scene/index.js +1 -0
  157. package/dist/core/scene/types.d.ts +23 -0
  158. package/dist/core/scene/types.js +0 -0
  159. package/dist/core/serialization/animation.d.ts +23 -0
  160. package/dist/core/serialization/animation.js +176 -0
  161. package/dist/core/serialization/easingLookup.d.ts +13 -0
  162. package/dist/core/serialization/easingLookup.js +65 -0
  163. package/dist/core/serialization/index.d.ts +23 -0
  164. package/dist/core/serialization/index.js +29 -0
  165. package/dist/core/serialization/mobject.d.ts +23 -0
  166. package/dist/core/serialization/mobject.js +248 -0
  167. package/dist/core/serialization/prettyPrint.d.ts +12 -0
  168. package/dist/core/serialization/prettyPrint.js +16 -0
  169. package/dist/core/serialization/primitives.d.ts +24 -0
  170. package/dist/core/serialization/primitives.js +98 -0
  171. package/dist/core/serialization/registry.d.ts +29 -0
  172. package/dist/core/serialization/registry.js +39 -0
  173. package/dist/core/serialization/scene.d.ts +28 -0
  174. package/dist/core/serialization/scene.js +114 -0
  175. package/dist/core/serialization/types.d.ts +152 -0
  176. package/dist/core/serialization/types.js +6 -0
  177. package/dist/core/timeline/Timeline.d.ts +70 -0
  178. package/dist/core/timeline/Timeline.js +144 -0
  179. package/dist/core/timeline/index.d.ts +5 -0
  180. package/dist/core/timeline/index.js +4 -0
  181. package/dist/core/timeline/types.d.ts +29 -0
  182. package/dist/core/timeline/types.js +0 -0
  183. package/dist/index.d.ts +18 -0
  184. package/dist/index.js +22 -0
  185. package/dist/mobjects/Mobject.d.ts +98 -0
  186. package/dist/mobjects/Mobject.js +343 -0
  187. package/dist/mobjects/VGroup/VGroup.d.ts +51 -0
  188. package/dist/mobjects/VGroup/VGroup.js +142 -0
  189. package/dist/mobjects/VGroup/index.d.ts +3 -0
  190. package/dist/mobjects/VGroup/index.js +2 -0
  191. package/dist/mobjects/VGroup/layout.d.ts +20 -0
  192. package/dist/mobjects/VGroup/layout.js +139 -0
  193. package/dist/mobjects/VMobject.d.ts +106 -0
  194. package/dist/mobjects/VMobject.js +216 -0
  195. package/dist/mobjects/geometry/Arc.d.ts +8 -0
  196. package/dist/mobjects/geometry/Arc.js +46 -0
  197. package/dist/mobjects/geometry/Arrow.d.ts +7 -0
  198. package/dist/mobjects/geometry/Arrow.js +34 -0
  199. package/dist/mobjects/geometry/Circle.d.ts +4 -0
  200. package/dist/mobjects/geometry/Circle.js +10 -0
  201. package/dist/mobjects/geometry/Line.d.ts +8 -0
  202. package/dist/mobjects/geometry/Line.js +19 -0
  203. package/dist/mobjects/geometry/Point.d.ts +5 -0
  204. package/dist/mobjects/geometry/Point.js +11 -0
  205. package/dist/mobjects/geometry/Polygon.d.ts +7 -0
  206. package/dist/mobjects/geometry/Polygon.js +21 -0
  207. package/dist/mobjects/geometry/Rectangle.d.ts +6 -0
  208. package/dist/mobjects/geometry/Rectangle.js +18 -0
  209. package/dist/mobjects/geometry/index.d.ts +7 -0
  210. package/dist/mobjects/geometry/index.js +7 -0
  211. package/dist/mobjects/graph/Graph.d.ts +28 -0
  212. package/dist/mobjects/graph/Graph.js +119 -0
  213. package/dist/mobjects/graph/GraphEdge.d.ts +26 -0
  214. package/dist/mobjects/graph/GraphEdge.js +64 -0
  215. package/dist/mobjects/graph/GraphNode.d.ts +19 -0
  216. package/dist/mobjects/graph/GraphNode.js +63 -0
  217. package/dist/mobjects/graph/index.d.ts +5 -0
  218. package/dist/mobjects/graph/index.js +5 -0
  219. package/dist/mobjects/graph/layouts/circular.d.ts +8 -0
  220. package/dist/mobjects/graph/layouts/circular.js +23 -0
  221. package/dist/mobjects/graph/layouts/forceDirected.d.ts +9 -0
  222. package/dist/mobjects/graph/layouts/forceDirected.js +102 -0
  223. package/dist/mobjects/graph/layouts/index.d.ts +3 -0
  224. package/dist/mobjects/graph/layouts/index.js +3 -0
  225. package/dist/mobjects/graph/layouts/tree.d.ts +9 -0
  226. package/dist/mobjects/graph/layouts/tree.js +99 -0
  227. package/dist/mobjects/graph/types.d.ts +35 -0
  228. package/dist/mobjects/graph/types.js +0 -0
  229. package/dist/mobjects/index.d.ts +6 -0
  230. package/dist/mobjects/index.js +6 -0
  231. package/dist/mobjects/text/Glyph.d.ts +11 -0
  232. package/dist/mobjects/text/Glyph.js +72 -0
  233. package/dist/mobjects/text/Text.d.ts +19 -0
  234. package/dist/mobjects/text/Text.js +76 -0
  235. package/dist/mobjects/text/index.d.ts +4 -0
  236. package/dist/mobjects/text/index.js +3 -0
  237. package/dist/mobjects/text/types.d.ts +12 -0
  238. package/dist/mobjects/text/types.js +8 -0
  239. package/package.json +51 -0
@@ -0,0 +1,11 @@
1
+ import { VMobject } from '../VMobject';
2
+ import type { Glyph as FontkitGlyph } from 'fontkit';
3
+ /**
4
+ * A VMobject representing a single glyph character.
5
+ * Converts fontkit glyph path to BezierPath for rendering.
6
+ */
7
+ export declare class Glyph extends VMobject {
8
+ readonly character: string;
9
+ readonly glyphId: number;
10
+ constructor(fontkitGlyph: FontkitGlyph, character: string, scale: number, offsetX: number, offsetY: number);
11
+ }
@@ -0,0 +1,72 @@
1
+ import { VMobject } from '../VMobject';
2
+ import { BezierPath } from '../../core/math/bezier/BezierPath';
3
+ import { Vector2 } from '../../core/math/Vector2/Vector2';
4
+ /**
5
+ * Converts a fontkit path command to BezierPath commands.
6
+ * Fontkit uses: moveTo, lineTo, quadraticCurveTo, bezierCurveTo, closePath
7
+ */
8
+ function convertFontkitPath(fontkitPath, scale, offsetX, offsetY) {
9
+ const path = new BezierPath();
10
+ const commands = fontkitPath.commands;
11
+ const transformX = (val) => val * scale + offsetX;
12
+ // Note: Fontkit uses Y-up coordinates (same as Manim world coords)
13
+ // The renderer handles the flip to screen Y-down coordinates
14
+ const transformY = (val) => val * scale + offsetY;
15
+ for (const cmd of commands) {
16
+ const type = cmd.command;
17
+ const args = cmd.args;
18
+ if (type === 'moveTo' && args.length >= 2) {
19
+ const x = args[0] ?? 0;
20
+ const y = args[1] ?? 0;
21
+ path.moveTo(new Vector2(transformX(x), transformY(y)));
22
+ }
23
+ else if (type === 'lineTo' && args.length >= 2) {
24
+ const x = args[0] ?? 0;
25
+ const y = args[1] ?? 0;
26
+ path.lineTo(new Vector2(transformX(x), transformY(y)));
27
+ }
28
+ else if (type === 'quadraticCurveTo' && args.length >= 4) {
29
+ const cpx = args[0] ?? 0;
30
+ const cpy = args[1] ?? 0;
31
+ const x = args[2] ?? 0;
32
+ const y = args[3] ?? 0;
33
+ const cp = new Vector2(transformX(cpx), transformY(cpy));
34
+ const end = new Vector2(transformX(x), transformY(y));
35
+ path.quadraticTo(cp, end);
36
+ }
37
+ else if (type === 'bezierCurveTo' && args.length >= 6) {
38
+ const cp1x = args[0] ?? 0;
39
+ const cp1y = args[1] ?? 0;
40
+ const cp2x = args[2] ?? 0;
41
+ const cp2y = args[3] ?? 0;
42
+ const x = args[4] ?? 0;
43
+ const y = args[5] ?? 0;
44
+ const cp1 = new Vector2(transformX(cp1x), transformY(cp1y));
45
+ const cp2 = new Vector2(transformX(cp2x), transformY(cp2y));
46
+ const end = new Vector2(transformX(x), transformY(y));
47
+ path.cubicTo(cp1, cp2, end);
48
+ }
49
+ else if (type === 'closePath') {
50
+ path.closePath();
51
+ }
52
+ }
53
+ return path;
54
+ }
55
+ /**
56
+ * A VMobject representing a single glyph character.
57
+ * Converts fontkit glyph path to BezierPath for rendering.
58
+ */
59
+ export class Glyph extends VMobject {
60
+ character;
61
+ glyphId;
62
+ constructor(fontkitGlyph, character, scale, offsetX, offsetY) {
63
+ super();
64
+ this.character = character;
65
+ this.glyphId = fontkitGlyph.id;
66
+ const glyphPath = fontkitGlyph.path;
67
+ if (glyphPath.commands.length > 0) {
68
+ const bezierPath = convertFontkitPath(glyphPath, scale, offsetX, offsetY);
69
+ this.addPath(bezierPath);
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,19 @@
1
+ import { VGroup } from '../VGroup';
2
+ import { Glyph } from './Glyph';
3
+ import type { TextStyle } from './types';
4
+ /**
5
+ * A VGroup of vectorized glyphs created from a text string using fontkit.
6
+ * Each character becomes a Glyph VMobject that can be individually animated.
7
+ */
8
+ export declare class Text extends VGroup {
9
+ readonly text: string;
10
+ private style;
11
+ private fontPath;
12
+ constructor(text: string, fontPath: string, options?: Partial<TextStyle>);
13
+ private buildGlyphs;
14
+ private getCharacterForGlyph;
15
+ private applyStyle;
16
+ setStyle(options: Partial<TextStyle>): this;
17
+ getStyle(): TextStyle;
18
+ getGlyph(index: number): Glyph | undefined;
19
+ }
@@ -0,0 +1,76 @@
1
+ import * as fontkit from 'fontkit';
2
+ import { VGroup } from '../VGroup';
3
+ import { centerGroup } from '../VGroup/layout';
4
+ import { Glyph } from './Glyph';
5
+ import { DEFAULT_TEXT_STYLE } from './types';
6
+ /**
7
+ * A VGroup of vectorized glyphs created from a text string using fontkit.
8
+ * Each character becomes a Glyph VMobject that can be individually animated.
9
+ */
10
+ export class Text extends VGroup {
11
+ text;
12
+ style;
13
+ fontPath;
14
+ constructor(text, fontPath, options = {}) {
15
+ super();
16
+ this.text = text;
17
+ this.fontPath = fontPath;
18
+ this.style = { ...DEFAULT_TEXT_STYLE, ...options };
19
+ this.buildGlyphs();
20
+ centerGroup(this);
21
+ this.applyStyle();
22
+ }
23
+ buildGlyphs() {
24
+ const fontOrCollection = fontkit.openSync(this.fontPath);
25
+ // Handle FontCollection (e.g., .ttc files) by getting first font
26
+ const font = 'fonts' in fontOrCollection
27
+ ? fontOrCollection.fonts[0]
28
+ : fontOrCollection;
29
+ if (!font) {
30
+ throw new Error(`Could not load font from ${this.fontPath}`);
31
+ }
32
+ const run = font.layout(this.text);
33
+ const scale = this.style.fontSize / font.unitsPerEm;
34
+ let penX = 0;
35
+ let penY = 0;
36
+ for (let i = 0; i < run.glyphs.length; i++) {
37
+ const glyph = run.glyphs[i];
38
+ const pos = run.positions[i];
39
+ if (glyph === undefined || pos === undefined)
40
+ continue;
41
+ // Get the character for this glyph position
42
+ const char = this.getCharacterForGlyph(i);
43
+ // Calculate glyph position with offsets
44
+ const glyphX = penX + pos.xOffset * scale;
45
+ const glyphY = penY + pos.yOffset * scale;
46
+ const glyphMobject = new Glyph(glyph, char, scale, glyphX, glyphY);
47
+ this.add(glyphMobject);
48
+ // Advance pen position
49
+ penX += pos.xAdvance * scale;
50
+ penY += pos.yAdvance * scale;
51
+ }
52
+ }
53
+ getCharacterForGlyph(index) {
54
+ return this.text.charAt(index) || '';
55
+ }
56
+ applyStyle() {
57
+ for (const child of this.getChildren()) {
58
+ if (child instanceof Glyph) {
59
+ child.stroke(this.style.color, 0);
60
+ child.fill(this.style.color, 1);
61
+ }
62
+ }
63
+ }
64
+ setStyle(options) {
65
+ this.style = { ...this.style, ...options };
66
+ this.applyStyle();
67
+ return this;
68
+ }
69
+ getStyle() {
70
+ return { ...this.style };
71
+ }
72
+ getGlyph(index) {
73
+ const child = this.get(index);
74
+ return child instanceof Glyph ? child : undefined;
75
+ }
76
+ }
@@ -0,0 +1,4 @@
1
+ export { Glyph } from './Glyph';
2
+ export { Text } from './Text';
3
+ export { DEFAULT_TEXT_STYLE } from './types';
4
+ export type { TextStyle } from './types';
@@ -0,0 +1,3 @@
1
+ export { Glyph } from './Glyph';
2
+ export { Text } from './Text';
3
+ export { DEFAULT_TEXT_STYLE } from './types';
@@ -0,0 +1,12 @@
1
+ import { Color } from '../../core/math/color/Color';
2
+ /**
3
+ * Options for configuring Text appearance.
4
+ */
5
+ export interface TextStyle {
6
+ fontSize: number;
7
+ color: Color;
8
+ }
9
+ /**
10
+ * Default text style values.
11
+ */
12
+ export declare const DEFAULT_TEXT_STYLE: TextStyle;
@@ -0,0 +1,8 @@
1
+ import { Color } from '../../core/math/color/Color';
2
+ /**
3
+ * Default text style values.
4
+ */
5
+ export const DEFAULT_TEXT_STYLE = {
6
+ fontSize: 1,
7
+ color: Color.WHITE
8
+ };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@redwilly/anima",
3
+ "version": "0.1.0",
4
+ "description": "Animation library for mathematical visualizations",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "bin": {
15
+ "anima": "./dist/cli/index.js"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "typecheck": "tsc --noEmit",
22
+ "clean": "rimraf dist",
23
+ "build": "bun run clean && tsc -p tsconfig.build.json",
24
+ "prepublishOnly": "bun run build"
25
+ },
26
+ "keywords": [
27
+ "animation",
28
+ "math",
29
+ "visualization",
30
+ "canvas",
31
+ "manim"
32
+ ],
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "devDependencies": {
38
+ "@types/bun": "latest",
39
+ "@types/fontkit": "^2.0.8",
40
+ "fast-check": "^4.5.3",
41
+ "rimraf": "^6.0.1"
42
+ },
43
+ "peerDependencies": {
44
+ "typescript": "^5"
45
+ },
46
+ "dependencies": {
47
+ "@napi-rs/canvas": "^0.1.88",
48
+ "commander": "^14.0.2",
49
+ "fontkit": "^2.0.4"
50
+ }
51
+ }