Expand description
§dotloom-scene
The public scene contract between the Dotloom engine and renderers.
The engine turns documents into SceneItems (world-space shapes with resolved
styles, keyed by entity ID) and ships incremental SceneDeltas. Renderers
consume deltas and never read documents, so any renderer that understands this
crate can replace the default wgpu renderer.
Shapes are exact (f64, curves kept as curves); renderers flatten them with a
zoom-dependent tolerance. Deltas have a compact, versioned binary encoding
(SceneDelta::encode) suitable for transfer between a Worker and the main
thread without JSON parsing.
Re-exports§
pub use dotloom_geometry as geometry;
Modules§
- flags
- Item state flags.
Structs§
- Marker
- A marker in world coordinates, drawn at constant screen size.
- Overlay
- Interaction overlay (selection grips, snap marker, marquee, guides), set by the host UI directly on the renderer; it is not part of the document.
- Scene
Delta - Incremental scene update.
- Scene
Item - Everything drawn for one entity.
- Stroke
- Stroke style (screen-constant width).
Enums§
- Decode
Error - Decoding failure.
- Marker
Kind - Snap/handle marker kinds drawn by overlays.
- Primitive
- One drawable primitive in world coordinates.
Constants§
- MAGIC
- Magic bytes.
- SCENE_
FORMAT_ VERSION - Encoding version.
Type Aliases§
- Rgba
- Packed RGBA color (
0xRRGGBBAA).