Skip to content

Mraph.js is a lib for graphing mathematical objects in a browser.

License

Notifications You must be signed in to change notification settings

CooperLorium/Mraph.js

 
 

Repository files navigation

logo

npm GitHub last commit

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!

See more

Contribution

Feel free to contribute to this repo

About

Mraph.js is a lib for graphing mathematical objects in a browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 89.1%
  • Astro 9.4%
  • GLSL 1.5%