Expand description
A C ABI over the engine, so it can be called from outside Rust.
This exists for the preview: the engine is built for wasm32 and driven
from the page, which means what you tune in a browser is this code and not
a copy of it in JavaScript. A copy would drift the first time either
changed, and the drift would be invisible — the page would still animate
plausibly.
Only f64 and integers cross the boundary, so there is nothing to allocate,
free or get wrong about ownership.
Functions§
- curve 🔒
- The curve at
indexinCurve::all, or the default if out of range. - solium_
curve_ at - A curve’s value at normalised time
t. - solium_
curve_ count - How many curves there are, so a caller can enumerate them.
- solium_
progress - Progress of a fixed-duration animation, for callers that would rather not divide by the duration themselves.
- solium_
spring_ at - A spring’s value
secondsafter it was released. - solium_
spring_ settle_ ms - How long a spring takes to settle, in milliseconds.
- spring 🔒