Skip to main content

Crate awsm_renderer_scene

Crate awsm_renderer_scene 

Source
Expand description

awsm-renderer-scene — the lean, canonical runtime scene schema for the awsm-renderer player: a Scene (scene.toml) + an assets/ directory, all by-id. The player and renderer touch only this crate.

Authoring lives elsewhere: the modifier stack + per-vertex overrides + the editor’s Mesh = base + edits are in awsm-renderer-meshgen (recipe types) and awsm-renderer-editor-protocol (the EditorProject document + EditorCommand/ EditorQuery), which depend on this crate and reuse its core types. The editor’s bake step lowers authoring → runtime (MeshDef → [mesh::MeshBlob]).

Coordinate convention: right-handed, Y-up, meters. Rotations are unit quaternions stored as [x, y, z, w].

Re-exports§

pub use animation::*;
pub use assets::*;
pub use camera::*;
pub use collider::*;
pub use curve::*;
pub use decal::*;
pub use dynamic_material::*;
pub use environment::*;
pub use instances::*;
pub use light::*;
pub use line::*;
pub use material::*;
pub use mesh::*;
pub use particle::*;
pub use primitive::*;
pub use project_dir::*;
pub use scene::*;
pub use shadows::*;
pub use sprite::*;
pub use transform::*;
pub use tree::*;

Modules§

animation
Persisted animation clip schema — the serde projection of the editor’s authored animation model (Animation mode), mirroring [crate::StoredMaterial].
assets
Project asset table.
camera
Editor-authored camera configuration.
collider
curve
Authored 3D curves: control points + closed flag + tension + sample count.
decal
Authored decal configuration. The runtime equivalent lives in awsm_renderer::decals::Decal; the editor’s renderer bridge resolves the texture ref and pushes a runtime decal via AwsmRenderer::insert_decal.
dynamic_material
On-disk shape of a runtime-registered “custom” material.
environment
instances
Instance-along-curve schema: place copies of a source node along a curve.
light
line
Authored polylines.
material
Material asset (authorable PBR knobs + texture refs).
mesh
The runtime mesh — what AssetSource::Mesh resolves to in a baked Scene.
particle
Authored particle emitter definitions.
primitive
Procedural primitive shapes — the MeshBase::Primitive base of a mesh ModifierStack. Every procedural-geometry node is a NodeKind::Mesh backed by a MeshDef stack; a box/sphere/… is just a stack whose base is one of these shapes, evaluated to triangles via awsm-renderer-meshgen’s primitive generators.
project_dir
The runtime project directory: a scene.toml + an assets/ directory — the lean, canonical on-disk form the player loads. The editor’s bake produces one; this module owns the scene.toml (de)serialization + the directory layout convention.
scene
The runtime scene document — the lean, canonical thing the player loads (scene.toml + an assets/ directory). The editor authors a richer EditorProject (in awsm-renderer-editor-protocol); its bake step lowers that to a Scene: modifier stacks evaluate + collapse to mesh blobs (cheap primitives stay procedural), per-vertex overrides apply, and the editor-only library snapshots (material/animation authoring state) are dropped — only what the player needs survives.
shadows
Renderer-wide shadow settings serialized into EditorProject.
sprite
Authored sprite / billboard nodes.
transform
tree