# movy
**Repository Path**: riceawa/movy
## Basic Information
- **Project Name**: movy
- **Description**: movy.js is a client-side JS animation engine for creating explanatory videos.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-02-03
- **Last Updated**: 2026-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

**movy.js** is an intuitive animation engine for creating explanatory videos.

## Getting Started
> Make sure you have [node.js (version >= 12)](https://nodejs.org/en/download/) installed on your computer.
1. Install **movy.js** by: `npm i movy@latest -g`
2. Run `movy` to open a list of examples (example animations are located in the `movy/examples` folder):

3. To create a new animation, simply run `movy hello.js`. It will automatically create a new animation file `hello.js` (if the file does not exist):
```js
import * as mo from "movy";
mo.addText("Hello, Movy!", {
scale: 0.8,
color: "yellow",
}).grow();
```
> Note: Modifying the source code will automatically refresh the browser.
4. Click "Render" button to render the animation to a video file: `xxx.webm`

## Add objects into the scene
To add new objects, you can use `mo.add___()`. For example:
| Method | Comment | Preview |
| ------------------ | -------------- | ------------------------- |
| `mo.addCircle()` | Add a circle |  |
| `mo.addRect()` | Add a rect |  |
| `mo.addTriangle()` | Add a triangle |  |
| ... | ... | ... |
### Customize objects
All methods above can take **extra** named arguments for customization. For example, to set the object color and scale, you can use
```
mo.addTriangle({ color: "yellow", scale: 0.5 });
```
This will create a half-sized yellow triangle.
Furthermore, you can pass
| Methods | Comment | Preview |
|---|---|---|
|
Set X and Y coordinates to be (0.5, 0.2). Note that movy.js uses Cartesian coordinates for 2D objects (y-axis pointing upwards). |
![]() |
|
position specifies the circle coordinates similar to x, y, z parameters. However it takes an array of numbers. |
![]() |
|
Rotate the rect along the Z axis by π/4. | ![]() |
|
Note that movy.js internally uses 3D coordinates. You can also rotate any 2D object along X and Y axis by rx and ry parameters. |
![]() |
|
Scale the circle by 0.5 (half size). |
![]() |
|
Create an ellipse by scaling along X and Y axis differently. | ![]() |
|
You can pass hex code, e.g. "#3498db" to specify object color. Alternatively, you can use X11 color name, e.g. "blue". |
![]() |
| Methods | Comment | Preview |
|---|---|---|
|
Set the line width of the circle outline to 0.3. |
![]() |
|
Instead of sx and sy to scale a shape, you can alternatively use width and height to specify the size of a shape. This method will not scale the line strokes unevenly. |
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
t parameter specifies when the animation should be started. For example, t: 1 specifies that the animation should start at 1 second. t: '<' specifies that the animation should begin at the same time of the previous animation. t: '+=1' specifies that the animation should starts 1 second after all previous animations finish. movy.js internally uses gsap. For more information, please refer to Understanding the Position Parameter. |
|
Set the animation duration to 2 seconds. |
|
ease parameter specifies the easing curve used for the animation. Different animations are pre-configured with different default easing functions. However, you can overwrite this to completely change the nature of your animation. For more information, please refer to gsap / Eases |
By combining existing animations with some parameter tweaking, we can derive more complicated and beautiful animations.
```
mo.addRectOutline()
.reveal()
.moveTo({ rz: Math.PI * 4, duration: 2 })
.fadeOut();
```