SCENE ENGINE / 2D

Interactive 2D scenes for Codex Desktop

Learn how Codex Styler separates scene layers, entities, renderers, and pointer-aware behaviors without capturing interface clicks.

01

One abstraction, many characters

The scene model uses layers, entities, a renderer, and behavior declarations. Themes and companions are independent: the five built-in themes recommend Moss, Reset God, or Token Thief as intentional defaults, while Pico, Puddle, and Mochi remain independent choices. An explicit replacement or No companion preference persists across theme changes, and the same model can host another animal, object, illustration style, or future built-in renderer.

02

Pointer awareness without interception

The injected scene background has pointer-events disabled. The companion accepts drag gestures without capturing surrounding Codex controls, can snap to a semantic surface, and follows that surface through size changes. Sprite frames use one shared alpha-aware scale and ground line so transparent padding cannot make the character float or jitter.

03

Motion that respects the device

Reduced-motion preferences freeze direction tracking. Rendering updates only when the pointer direction or viewport changes, avoiding an unnecessary permanent animation loop.

OPEN SOURCEInspect the implementation, not just the promise.View the GitHub repository →