Crates.io | mathlikeanim-rs |
lib.rs | mathlikeanim-rs |
version | |
source | src |
created_at | 2024-02-04 21:05:02.88928+00 |
updated_at | 2025-03-02 22:01:46.117968+00 |
description | A Rust library for creating mathematical animations |
homepage | |
repository | https://github.com/MathItYT/mathlikeanim-rs |
max_upload_size | |
id | 1126659 |
Cargo.toml error: | TOML parse error at line 37, column 1 | 37 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This is an animation library written in Rust, widely inspired by Manim and, unlike Manim, it allows interactivity thanks to WebAssembly, JavaScript and the web.
π’: Done.
π‘: Meant to be supported, but not available yet.
π΄: Not supported.
You must install the @mathlikeanim-rs/mathlikeanim-rs
(the Rust core) package and the @mathlikeanim-rs/renderer
, both from NPM. Then, write an importmap and a module script tag to load the library.
<script type="importmap">
{
"imports": {
"@mathlikeanim-rs/renderer": "/node_modules/@mathlikeanim-rs/renderer/dist/index.js",
"/node_modules/@mathlikeanim-rs/renderer/dist/canvas-scene": "/node_modules/@mathlikeanim-rs/renderer/dist/canvas-scene.js",
"/node_modules/@mathlikeanim-rs/renderer/dist/scene": "/node_modules/@mathlikeanim-rs/renderer/dist/scene.js",
"/node_modules/@mathlikeanim-rs/renderer/dist/svg-scene": "/node_modules/@mathlikeanim-rs/renderer/dist/svg-scene.js",
"@mathlikeanim-rs/mathlikeanim-rs": "/node_modules/@mathlikeanim-rs/mathlikeanim-rs/index.js",
"@mathlikeanim-rs/mathlikeanim-rs/": "/node_modules/@mathlikeanim-rs/mathlikeanim-rs/"
}
}
</script>
<script type="module">
import initWasm from '@mathlikeanim-rs/mathlikeanim-rs';
import { CanvasScene, SVGScene } from '@mathlikeanim-rs/renderer';
const scene = new CanvasScene(
// width
1920,
// height
1080,
// worker file (usually '/node_modules/@mathlikeanim-rs/renderer/dist/offscreen-canvas-worker.js')
'worker.js'
); // or SVGScene(1920, 1080)
document.body.appendChild(scene.canvas); // or scene.svg
initWasm().then((wasm) => {
...
});
</script>
Python support is available, but for older versions of the library. We are working on updating the Python package to the latest version of the project. If you still want to use the Python package, you can install it by running:
pip install mathlikeanim-rs # It's an old version of the project
If you want to contribute to this project, you can clone a fork of this repository and work with the Rust codebase.
By the moment we don't have any tests, so your contributions are welcome!
Available here!