oxframe-0.2.0 has been yanked.
oxframe-sdk
Status: oxframe is under very active development. The API is not stable yet and may change from version to version. Pin the exact version in your Cargo.toml and check the changelog before upgrading.
The Rust SDK of oxframe.
Procedural animation in Rust, modelled after Motion Canvas: a scene is an
async fn, and every .await on an animation is a frame boundary.
use *;
async
Crates
| Crate | Purpose | wasm32 |
|---|---|---|
oxframe-core |
signals, tweens, Ease, Lerp (incl. path morphing, gradients), deterministic executor, all / sequence / spawn / wait_for / wait_until, seeded random |
yes |
oxframe-2d |
scene graph: Rect, Circle (arcs, pies), Polygon, Star, Path, Line (smooth, arrows), Txt (rich spans, glyph morph), Code (highlighting, focus), Img (PNG/JPEG/SVG), Layout (flexbox/grid via taffy), Grid, Group; gradients, dashes, clip, blend modes, blur, shadow, z-index, anchor |
yes |
oxframe-text |
text layout (parley) and glyph outlines (skrifa), embedded Inter and JetBrains Mono, syntax highlighter | yes |
oxframe-render |
Renderer trait; tiny-skia CPU backend; vello GPU backend (native and WebGPU into an OffscreenCanvas) |
yes |
oxframe-export |
ffmpeg pipe (mp4, webm, ProRes 4444, PNG), audio muxing, waveform | no |
oxframe-preview |
protocol session; native WebSocket server | session only |
oxframe-protocol |
Command / Event, meta.json schema, TS types via ts-rs |
yes |
oxframe-macros |
#[oxframe::scene], color!, ease!, tune! |
— |
oxframe |
facade: prelude, Project, Engine, project CLI (render, preview, info), browser API (wasm feature) |
yes |
Examples
cargo run --release -p oxframe-examples --bin <name> -- render|preview|info
with intro, text, morph, layout, chart, particles, showcase,
effects, shapes, typography, benchmark.
Guarantees
- Deterministic. The same code and
meta.jsongive byte-identical frames: fixeddt = 1/fps, single-threaded executor, no wall clock, ordered maps only. - Exact timing. A tween that ends between frames hands its exact end time to the next one, so chains of non-frame-aligned durations do not drift.
meta.jsonis the source of truth for markers (wait_until), named eases (ease!) and tunables (tune!); code only supplies defaults, which are recorded on first run. Unknown keys are preserved; output is sorted and 2-space indented.
Development
OXFRAME_UPDATE_GOLDEN=1
Licensed under either of MIT or Apache-2.0 at your option.