scntix
v0.0.1-alpha.1
Published
WebAssembly animation engine — production-grade DOM animations powered by Rust
Maintainers
Readme
scntix
WebAssembly animation engine — production-grade DOM animations powered by Rust
Install
npm install scntixBundler Usage
Use the root package or grouped subpaths in Vite, Next, and other bundler apps:
import { animate, Easing } from "scntix";
animate({
targets: ".card",
translateX: [0, 120],
duration: 600,
easing: Easing.easeOutQuad,
});import { animate } from "scntix/animation";
import { createDrawable } from "scntix/svg";
import { splitText } from "scntix/text";Manual Initialization
Browser imports auto-load the WASM runtime. Use the explicit init function only when you need to await readiness yourself:
import { init, animate } from "scntix/web";
await init();
animate({ targets: ".card", opacity: [0, 1] });Node Usage
Use the dedicated Node entry when you need the Node runtime surface:
import { animate } from "scntix/node";Export Groups
animation: animate, animateObject, createAnimatable, createTimer, +7 moremotion: Easing, followValue, mapValue, motionValue, +8 moreinput: createDraggable, createHover, createObserver, createPan, +6 morescroll: createScrollObserver, createScrollSmoother, scrollTo, ScntixScrollObserver, +2 moretext: scrambleText, splitText, textReplace, ScntixScrambleText, +2 morelayout: flipCapture, flipFrom, layoutTransition, ScntixFlipAnimation, +2 moresvg: createDrawable, createMotionPath, DrawableHandle, MotionPathValues, +1 morebrowser: commitStyles, createScope, easingToLinear, init, +8 moreutils: Utils, version, ScntixEngine
Environment Notes
- Root package and grouped subpaths auto-load the WASM runtime in browser bundlers such as Vite.
/webis the explicit direct-browser entry for non-bundler usage./nodeis the explicit Node runtime entry.- TypeScript declarations are generated for the root package and grouped subpaths.
Internal Layout
- Public entrypoints live at the package root under
esm/,esm-node/,cjs/, andtypes/. - Internal wasm runtime assets live under
_runtime/. - Subpath imports are the recommended choice when you want smaller consumer bundles.
