@animaly/core
v0.2.2
Published
Data-oriented animation engine: springs, tweens, keyframes and inertia computed in typed arrays, with no DOM dependency.
Maintainers
Readme
@animaly/core
The engine behind animaly: every animated value is a row in a set of Float64Array columns, and springs, tweens, keyframes and inertia are solved in closed form. It has no DOM dependency and can drive anything that reads numbers.
pnpm add @animaly/coreimport { Engine } from "@animaly/core";
const engine = new Engine();
const id = engine.allocate(0);
engine.addRenderer({
render(store, dirty, count) {
for (let i = 0; i < count; i++) console.log(store.value[dirty[i]]);
},
});For animating elements, use @animaly/dom.
Pre-release: the API can still change. MIT licensed.
