an.stage#

The 2D stage: the default engine, shipped with an but outside the core (an#247).

ADR 0001 decisions 5, 9 and 14; core study §5. The stage is a keyframed 2D scene-graph player – runtime.js (PixiJS) in headless Chromium, its JSON wire contract, and what it draws for every genre: stroked paths, text, raster and SVG art, planes with parallax, props, the camera, surface treatments. It is ONE engine among several (Manim draws explainer shots, previz engines draw view states), so the core never imports it: the renderer registry names it by module and imports it on first use (an.adapters.register_lazy_renderer). Its optional dependency (Playwright) is the an[stage] extra.

Every old path (an.adapters.cutout.render, an.paths, …) is a live alias. This __init__ imports nothing, so importing one stage module does not load the others.

Module Attributes

STAGE_RENDERER_NAMES

the persisted cutout and the engine's own stage (ADR 0001 decision 9).

an.stage.STAGE_RENDERER_NAMES: tuple[str, ...] = ('cutout', 'stage')#

the persisted cutout and the engine’s own stage (ADR 0001 decision 9). The ONE copy.

Type:

The Shot.renderer values the stage draws

Modules

cache_key

What a cut-out shot render reads: the keyer behind its shot-cache key (ADR 0004).

canvas_capture

The canvas capture path: frames read from the page, not photographed off the screen.

compile

Compile a top-level Shot (renderer="cutout") into a CutoutSceneJSON.

counters

A counter, lowered at compile: a number that reads as text (an#342, T2 of an#331).

easing

The stage engine's easing vocabulary — a view of an.timing.easing.

environments

Environments: a stage made of planes, at declared depths.

fidelity

How faithfully a compiled scene reproduces the art it was built from.

gradients

Gradient fills on the stage: a Gradient drawn as an inline SVG texture.

path_geometry

Stroked-path geometry — the executable spec of runtime.js::pathGeometry.

path_wobble

A hand-drawn wobble for stroked paths, applied at compile time (an#161).

paths

Stroked paths: routes, invasion arrows, borders, timelines, connectors.

preview

Live preview server: render a project's current scene in a browser, reloading on edit.

prop_validate

Check a prop's asset folder offline, and say what a prop must be (an#340).

props

Props: a rig whose art is not a person.

raster

Raster art: what a PNG, JPEG or WebP is, read from its header (an#211).

render

The 2D stage engine (runtime.js in headless Chromium), and the cut-out renderer built on it.

rig

The rig model the stage draws: bones, slots, skins and attachments.

runtime

Cutout JS runtime — see README.md in this directory.

runtime_files

Locate the bundled cutout JS runtime files.

serialize

JSON contract between the Python compiler and the (future) JS runtime.

snapshot

Rasterise art files to PNG in the browser the stage already uses (an#347).

surface

Surface treatments, compiled (an#163 gap 5): outline, paper-gap shadow, glow, grain.

text

Words on screen: title cards, labels, and text you can animate word by word.

text_layout

A text block, compiled: one node per unit, each an SVG sprite (an#155).

timeline

Stage timeline helpers: the compiled scene as a Timeline, and screen space.

tree

The scene tree's paths: the ONE Python statement of how runtime.js indexes nodes (an#343).