MCPcopy Index your code
hub / github.com/airladon/FigureOne

github.com/airladon/FigureOne @v10.0.12

Chat with this repo
repository ↗ · DeepWiki ↗ · release v10.0.12 ↗ · + Follow
2,463 symbols 8,829 edges 494 files 422 documented · 17% updated 20d agov1.10.0 · 2026-06-17★ 621 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FigureOne

Draw, animate and interact with shapes, text, plots and equations.

This JavaScript library can be used for making animated and/or interactive content for the web including: * Diagrams * Equations * Plots * Presentations or slide shows * Video-like experiences

Note: for the video-like experiences, FigureOne creates a custom vector video format which is interactive, resolution independent, and a fraction of the size of an normal audio track. This results in very low bandwidth video. For example, 4 minutes of animated content might result in a video track 70KB in size. See below for some examples of interactive videos. More information on this, and the trade-offs with traditional video can be found in the API Reference.

FigureOne can also be used to create animations (like equation animations) that can then be screen captured and merged into a standard video file.

See the Tutorials, API Reference and Examples and you'll be making beautiful, interactive figures in no time.

The examples are also hosted (and thus can be directly interacted with) on this repository's GitHub Pages site here.

The library used to draw interactive slides at thisiget.com.

Getting Started

Load the FigureOne library into your HTML file:

<script type="text/javascript" src='https://cdn.jsdelivr.net/npm/figureone@0.10.2/figureone.min.js'></script>

Create a div element to attach the figure to:






Then in javascript, create a figure and a shape within it:

const figure = new Fig.Figure();

// Create the shape
const tri = figure.add({
  make: 'triangle',
  color: [1, 0, 0, 1],
});

// Animate the shape
tri.animations.new()
  .position(0.5, 0)
  .rotation(Math.PI)
  .position(0, 0)
  .start();

And you will see:

The Tutorials build on this and introduce FigureOne's concepts and features in simplified examples. The API Reference describes these concepts in more depth as well as provides detailed API documentation. Consider reviewing these first before diving into the code of the examples below.

Examples

Interactive Angle

See this example hosted here.

Equation Animation

See this example hosted here.

Note: This is an animated gif, whose encoding makes the text look less smooth than in the actual hosted example.

Pythagorean Equation Animation

See this example hosted here.

Create a Sine Wave

See this example hosted here.

Total Angle of a Polygon

See this example hosted here.

Sine Limit

See this example hosted here.

Traveling Wave 01 - Shifting Equations

See this example hosted here.

Traveling Wave 02 - Sine Wave

See this example hosted here.

Traveling Wave 03 - Velocity Frequency Wavelength

See this example hosted here.

Holiday Equation

See this example hosted here.

Interactive Video - Tiling

See this example hosted here.

Interactive Video - Trig 1 - Trig Functions

See this example hosted here.

Interactive Video - Trig 2 - Names

See this example hosted here.

Interactive Video - Trig 3 - Relationships

See this example hosted here.

Electric Field

See this example hosted here.

Demonstrator of how shaders can be used to animate over 1000 elements simultaneously and still get excellent performance on low end clients.

NPM Package

On projects that are bundled with tools such as Webpack, it can be useful to use the FigureOne NPM package:

npm install figureone

Then within your project you can:

import Fig from 'figureone';

const figure = new Fig.Figure();

Flow typed files are included in the package for type checking in the editor.

Extension points exported contracts — how you extend this code

ElementInterface (Interface)
(no doc) [6 implementers]
src/js/figure/Equation/Elements/Element.js

Core symbols most depended-on inside this repo

round
called by 3745
src/js/tools/math.js
round
called by 1304
src/js/tools/g2.js
getBoundingRect
called by 518
src/js/figure/Element.js
_dup
called by 385
src/js/figure/Equation/Elements/Element.js
getBorder
called by 376
src/js/figure/Element.js
showForm
called by 363
src/js/figure/Equation/Equation.js
joinObjects
called by 355
src/js/tools/tools.js
new
called by 322
src/js/figure/Animation/AnimationManager.js

Shape

Method 1,372
Function 833
Class 257
Interface 1

Languages

TypeScript100%
Python1%

Modules by API surface

src/js/tools/g2.js269 symbols
src/js/figure/Element.js167 symbols
src/js/figure/Figure.js96 symbols
src/js/tools/tools.js91 symbols
src/js/figure/Recorder/Recorder.js89 symbols
src/js/figure/DrawingObjects/TextObject/TextObject.js71 symbols
src/js/figure/Equation/Equation.js57 symbols
src/js/figure/Equation/HTMLEquation.js43 symbols
src/js/figure/Animation/AnimationManager.js43 symbols
src/js/figure/geometries/arrow.js40 symbols
src/js/figure/Equation/EquationFunctions.js40 symbols
src/js/figure/DrawingObjects/GLObject/GLObject.js39 symbols

For agents

$ claude mcp add FigureOne \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact