Skip to content
Concepts

Concepts

Optional ember swarm renderer for Sprite: a breathing ring that performs Agent-written scenes

Sprite Swarm is an optional WebGL renderer for Sprite. It draws a character as a swarm of embers: a breathing ring while it rests, and a performance of shapes, SVG paths, labels and catalog models when an Agent writes a scene.

The performance is {sceneId, scene, models, cue: {beat, playing}}. A scene is a list of beats; each beat names shapes (box, sphere, cylinder, cone, torus, plane), SVG paths and text labels, and an element that keeps its name from beat to beat keeps its embers. The renderer keeps its own clock. A new cue (a step, a play or a pause) moves it only when its values change. Keep the sceneId for every cue; only a new id starts the scene over, regardless of object references. Stage assigns an id to each accepted presentation.

The progress is {sceneId, beat, caption, playing, unavailable}. The renderer reports it through Sprite’s reportProgress when any of them changes, and Sprite delivers it on the ready state. Decode it with decodeProgress. unavailable names elements whose model could not load; it is empty until models exist.

Activities are idle (the ring), listening, thinking, speaking and error. They change the ring’s breath and heat while no scene plays. A scene overrides the ring while it plays. There are no expressions.

Appearance. The ember and glow color controls tint the ring’s embers and its glow.

Stillness. Reduced motion, a hidden page and a host pause draw still key frames and run no frame loop. A new cue, a new appearance or a resize draws one more.