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.
an.stage.render–StageEngineand the renderer, which claims bothstageand the persistedcutout;an.stage.compile– shot -> compiled document, as ordered compile passes (an.stage.passes); genres register theirs;an.stage.serialize– the wire contract (field names unchanged);an.stage.timeline– the compiled document’s evaluation and screen space;drawables:
paths,text,raster,environments,props;path_geometry,text_layout,surface;an.stage.preview(live preview),an.stage.fidelity,an.stage.canvas_capture,an.stage.runtime_filesand the bundledruntime under
an/stage/runtime/.
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
the persisted |
- an.stage.STAGE_RENDERER_NAMES: tuple[str, ...] = ('cutout', 'stage')#
the persisted
cutoutand the engine’s ownstage(ADR 0001 decision 9). The ONE copy.- Type:
The
Shot.renderervalues the stage draws
Modules
What a cut-out shot render reads: the keyer behind its shot-cache key (ADR 0004). |
|
The canvas capture path: frames read from the page, not photographed off the screen. |
|
Compile a top-level |
|
A counter, lowered at compile: a number that reads as text (an#342, T2 of an#331). |
|
The stage engine's easing vocabulary — a view of |
|
Environments: a stage made of planes, at declared depths. |
|
How faithfully a compiled scene reproduces the art it was built from. |
|
Gradient fills on the stage: a |
|
Stroked-path geometry — the executable spec of |
|
A hand-drawn wobble for stroked paths, applied at compile time (an#161). |
|
Stroked paths: routes, invasion arrows, borders, timelines, connectors. |
|
Live preview server: render a project's current scene in a browser, reloading on edit. |
|
Check a prop's asset folder offline, and say what a prop must be (an#340). |
|
Props: a rig whose art is not a person. |
|
Raster art: what a PNG, JPEG or WebP is, read from its header (an#211). |
|
The 2D stage engine ( |
|
The rig model the stage draws: bones, slots, skins and attachments. |
|
Cutout JS runtime — see README.md in this directory. |
|
Locate the bundled cutout JS runtime files. |
|
JSON contract between the Python compiler and the (future) JS runtime. |
|
Rasterise art files to PNG in the browser the stage already uses (an#347). |
|
Surface treatments, compiled (an#163 gap 5): outline, paper-gap shadow, glow, grain. |
|
Words on screen: title cards, labels, and text you can animate word by word. |
|
A text block, compiled: one node per unit, each an SVG sprite (an#155). |
|
Stage timeline helpers: the compiled scene as a |
|
The scene tree's paths: the ONE Python statement of how |