mraph
v0.0.1-dev.9
Published
### Install with npm:
Downloads
87
Readme
Mraph.js is my personal rendering engine for drawing geometric shapes in a browser, inspired by Manim
Github |
NPM |
Examples
Usage
Install with npm:
npm install --save mraph
or use yarn:
yarn add mraph
A short example:
Once you installed, try this example below.
import { Layer, Point, Vector } from "mraph";
// Create a new Layer
const layer = new Layer().appendTo(document.body);
// Create a new Point
const point = new Point(0, 0);
// Add the point to layer
layer.add(point);
// Set the acceleration of the point
point.a = new Vector(0.5, 1, 0);
// Start animation
layer.play();
Input this at any editor that you prefer, then you would see a small white ball moving with a certain acceleration!
Contribution
Feel free to contribute to this repo