scntix-alpha
v0.0.1-alpha.1
Published
Production-grade animation, motion, physics, layout, SVG, scroll, and text APIs powered by Rust and WebAssembly.
Maintainers
Readme
scntix
Production-grade animation, motion, physics, layout, SVG, scroll, and text APIs powered by Rust and WebAssembly.
This package is the generated JavaScript and TypeScript distribution of the Scntix Rust/WebAssembly runtime. It provides browser and Node.js entrypoints, grouped feature subpaths, and generated TypeScript declarations.
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, +26 morebrowser: commitStyles, createScope, easingToLinear, init, +8 moreinput: createDraggable, createHover, createObserver, createPan, +6 moreinterpolate: colorParseErrorIsFormatMismatch, hslToRgb, interpolateColor, interpolateNumber, +23 morekinetics: accumulateWind, buildCloth, clothElementCounts, clothVertexIndex, +59 morelayout: anchoredBox, anchoredBoxFlippedToFit, correctBorderRadius, correctBoxShadow, +40 moremath: DualQuaternion, Matrix2, Matrix3, Matrix4, +4 moremotion: chainValue, combineValue, followValue, mapValue, +13 morepath: MorphConfig, MotionPath, MotionPathKinematics, PathMorph, +1 moreruntime: createRuntime, dependencyOf, hasDownstreamReaders, qualityLevelDegraded, +22 morescroll: computePin, createScrollObserver, createScrollSmoother, evenSnapPoints, +28 moresvg: createDrawable, createMotionPath, DrawableHandle, MotionPathValuestext: adjustedAdvance, alignLines, assignClusterPaths, axisValue, +83 moreutils: version, ComposedFunction, ScntixEngine, Utils
Runtime and Package Layout
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.
Public entrypoints live at the package root under
esm/,esm-node/,cjs/, andtypes/.Internal WASM runtime assets live under
_runtime/and are loaded by the public entrypoints.Subpath imports are recommended when you want a focused feature surface or smaller consumer bundles.
Repository Development
This package is generated from the Rust crate at crates/scntix-wasm. From the repository root, regenerate it with:
cd crates/scntix-wasm
npm run build:packageLicense
This package is distributed under the MIT License. See LICENSE for the complete terms.
