Warning
The engine is still in early stages of development. Expect frequent updates and breaking changes.
SnapEngineJS is a collection of utilities for building interactive UI elements on the web.
- Input handling with a common API for mouse and touch events.
- Collision detection for basic shapes and lines.
- Helpers for batching DOM updates.
- Camera and world coordinate translation for pan-and-zoom interfaces.
- A built-in WAAPI-based animation engine.
- A visual debugger for inspecting engine internals.
- Zero-dependency, framework-agnostic APIs.
See the website for details and documentation.
npm install @snap-engine/coreimport { Engine, ElementObject } from "@snap-engine/core";
const engine = new Engine();
engine.assignDom(document.getElementById("container") as HTMLElement);
const object = new ElementObject(engine, null);
object.element = document.getElementById("item");
object.schedule(() => {
object.worldPosition = [100, 200];
object.writeTransform();
}, { stage: "WRITE_1" });MIT
