How imaphatduc/cubecubed works
Cubecubed is a browser-based mathematical visualization library for composing timed 2D SVG and 3D canvas animations, with video export. A typical workflow is to use its exported API to create a scene and groups, add mathematical objects, schedule animations, and render the result; a recorder can capture the scene as video. The README documents both SVG/D3 and canvas/three.js rendering. Some runtime connections are supported only by README or index exports, so those links are documented or marked unverified rather than inferred from names.
Main entry points: index.ts Public exports · CanvasGroup.ts Canvas group · Scene.ts Scene timeline · cubicons SVG objects
Components 21
Library API
- Public exports
src/index.ts
SVG Visualization
- SVG group
src/svg/group/Group.ts - SVG objects
src/svg/cubicons - Axes and graphs
src/svg/cubicons/coordinate-system/Axes.ts - SVG animations
src/svg/animations - Graph point motion
src/svg/animations/PointAlongGraph.ts
Canvas Visualization
- Canvas group
src/canvas/group/CanvasGroup.ts - 3D objects
src/canvas/cubicons/CanvasCubicon.ts - Surface objects
src/canvas/cubicons/ParametricSurface.ts - Canvas animations
src/canvas/animations/CanvasAnimation.ts - Surface animations
src/canvas/animations/CreateSurface.ts - Flow animation
src/canvas/animations/Flow.ts
Scene Runtime
- Scene timeline
src/scene/Scene.ts - Video recorder
src/recorder/Recorder.ts - Interactive slider
src/slider/Slider.ts
Math And Controls
- 2D vectors
src/math/Vector2.ts - 3D vectors
src/math/Vector3.ts - Vector contract
src/math/vector.ts
Other components
- Library user
- Browser renderer
- Media capture
Connections 30
- Library user → Public exports: uses
README.md - Public exports → Scene timeline: exports
src/index.ts - Public exports → SVG group: exports
src/index.ts - Public exports → SVG objects: exports
src/index.ts - Public exports → Axes and graphs: exports
src/index.ts - Public exports → SVG animations: exports
src/index.ts - Public exports → Canvas group: exports
src/index.ts - Public exports → 3D objects: exports
src/index.ts - Public exports → Canvas animations: exports
src/index.ts - Scene timeline → SVG animations: runs transitions
src/scene/Scene.ts - Scene timeline → Canvas animations: queues animations
src/scene/Scene.ts - Scene timeline → Canvas group: queues on
src/scene/Scene.ts - SVG group → Scene timeline: reads scene
src/svg/group/Group.ts - SVG group → SVG objects: hosts
- Axes and graphs → SVG group: adds axes
src/svg/cubicons/coordinate-system/Axes.ts - Axes and graphs → SVG objects: creates graph parts
src/svg/cubicons/coordinate-system/Axes.ts - Graph point motion → Axes and graphs: reads graph scales
src/svg/animations/PointAlongGraph.ts - Graph point motion → SVG objects: moves point
src/svg/animations/PointAlongGraph.ts - Canvas group → Browser renderer: renders scene
src/canvas/group/CanvasGroup.ts - Canvas group → 3D objects: renders objects
- Canvas group → Canvas animations: updates animations
- Surface animations → Canvas animations: extends
src/canvas/animations/CreateSurface.ts - Flow animation → Canvas animations: extends
src/canvas/animations/Flow.ts - Video recorder → Scene timeline: reads elapsed time
src/recorder/Recorder.ts - Video recorder → Media capture: captures display
src/recorder/Recorder.ts - Interactive slider → Library user: calls callback
src/slider/Slider.ts - 2D vectors → Vector contract: implements
src/math/Vector2.ts - 3D vectors → Vector contract: implements
src/math/Vector3.ts - SVG objects → Browser renderer: renders SVG
README.md - Canvas group → Browser renderer: uses 3D rendering
README.md