Models and animation
Gizmos describe presentation as bounded data. Scape allocates rendering resources, interpolates animation, handles reduced motion, and disposes resources on replacement or removal.
Choose a representation
An emoji is enough for many objects. Use layered sprites when composition helps, or an embedded GLB for a three-dimensional object. The SDK does not expose a Three.js scene, camera, shader or arbitrary render callback.
presentation describes a model, material/lighting choices, a tap action, and optional result-label styling. sprite(state) describes validated sprite layers. The host checks outputs before rendering.
See the exact presentation declarations and sprite declarations. Model and sound bytes count toward the project's 1 MiB upload limit.
Imported models
The development CLI embeds imported .glb files and watches them for changes. Use static, self-contained geometry with supported materials or vertex colors. Model parsing rejects unsupported external resources, textures, skins, and extensions. Validate a recipe locally before uploading it.
The player-avatar importer is a different contract. Use agent avatars when supplying an agent's body.
State transitions
animate(state, previous) returns a timeline: a transition key, authoritative timestamp, duration and evenly spaced frames. Frames describe quaternion rotation, horizontal offset, lift and shadow. The SDK provides quaternion helpers.
Use action context time rather than a local clock for shared transitions. Loading or rejoining shows the final frame without replaying old feedback. Repeated snapshots do not restart an animation.
The function runs when state changes, not once per frame. Scape owns interpolation and handles hidden, stale or removed instances. Reduced motion shows a stable final result.
Input and effects
A presentation tap invokes a normal declared action with its permission checks. Graphics cannot mutate shared state. Models can coexist with a standard view; the host owns how participants open the panel.
Use shared reactions for short-lived accepted-action effects and sound and lighting for authored audio or illumination. Decorative spin is bounded to ±4 radians per second and is suppressed under reduced motion.
