Repository navigation
Installation
Use Node.js 22 or newer for development. Browser rendering requires Canvas; 3D views require WebGL2.
From the repository root:
npm install
npm run buildInstall the built library into another application:
npm install /absolute/path/to/your-checkoutFor a portable archive, run npm pack in the engine repository, then install the resulting archive in the consuming app:
npm install /absolute/path/to/webnim-math-engine-0.1.0.tgzThese instructions use a local checkout or archive; they do not assume the package has been published to a registry. Rebuild the library after changing its source.
| Command, from the repository root | Purpose |
|---|---|
npm run build |
Compile TypeScript and copy stylesheet, font and schema assets |
npm test |
Build and run the engine's automated tests |
npm run test:package |
Verify a packed installation, TypeScript consumer and browser bundle |
npm run demo |
Build the engine, install demo dependencies, build the site and start its server |
npm pack |
Build and create an installable package archive |
The demo is a separate private app in demo/. It imports public package entry points and is excluded from the published engine package. Open http://localhost:1431 after npm run demo. Stop with Ctrl+C; rerun to rebuild changes. This command does not provide live reload.
| Import | Use |
|---|---|
webnim/document |
Scene types, compiler, evaluator, schema and capability lists |
webnim/browser |
Browser player and player types |
webnim/browser/style.css |
Math label styles and packaged font references |
webnim/scene-v1.schema.json |
Structural JSON schema |
webnim |
Older Engine, SceneBuilder, factories and helpers |
webnim/react |
Optional Stage adapter for the older scene/frame API |
webnim/react/style.css |
Styles for that React adapter |
React is an optional peer dependency. KaTeX, Three.js, AJV and polygon-clipping are package dependencies. A React application can also mount the document player directly in a DOM container.
- Installation and development
- Browser quick start
- Scene documents
- Objects and expressions
- Document field reference
- Complete object reference
- Animation
- All animations and events
- Interaction and multiple views
- Browser player API
- Headless evaluation and validation
- Integration and lifecycle
- Features and limitations
- Publishing Webnim
- Troubleshooting
- Reference files