pub struct Placement {Show 17 fields
pub prefab: StructuredId,
pub name: String,
pub kind: Option<String>,
pub class: Vec<String>,
pub position: [f32; 3],
pub rotation: [f32; 4],
pub scale: [f32; 3],
pub codex: Option<String>,
pub behavior: Option<String>,
pub interaction: Option<Interaction>,
pub text: Option<TextPanel>,
pub animate: Option<Animate>,
pub solid: Option<bool>,
pub light: Option<LightEmitter>,
pub data: Value,
pub children: Vec<Placement>,
pub extra: Extra,
}Expand description
One placed instance of a prefab.
Fields§
§prefab: StructuredId§name: String§kind: Option<String>Semantic tag for styles type selectors (“tree”, “door”, “sign”) —
the HTML-element analog. JSON key is type.
class: Vec<String>CSS-like classes for styles class selectors (.harvestable).
position: [f32; 3]§rotation: [f32; 4]§scale: [f32; 3]§codex: Option<String>Canonical Codex slug for this object — “inspect” surfaces its lore.
behavior: Option<String>Id of a Behavior bound to this placement.
interaction: Option<Interaction>A codeless interaction — the simple path (no WASM). Name the verb and
list what happens. For anything richer, use behavior.
text: Option<TextPanel>Readable text rendered ONTO this placement’s surface by the browser — plaques, signs, reading boards. Text as content, not as texture: the manifest carries the words; every browser typesets them itself.
animate: Option<Animate>Data-driven idle motion, executed by the browser’s native loop —
the Thread’s idiom for living worlds (the web’s idiom is app code
updating transforms every frame). None = static.
solid: Option<bool>Whether this placement blocks movement. Default true; set false
for decor a traveler should walk (and jump) through — statues,
figures, conjured motes. A curved decorative collider is how you get
bounced into the sky.
light: Option<LightEmitter>This placement emits light — a point light at its position. Lamps,
torches, and stage lights are content, not renderer configuration; the
browser’s lighting pass honors them. None = not a light source.
data: ValueArbitrary per-placement data (e.g. a product id + price for commerce).
children: Vec<Placement>Child placements, positioned relative to this one (the tree / DOM model). Their transforms compose with this placement’s, so you build scenes by containment — a table with a lamp on it — instead of absolute coordinates. Defaults to none (a flat world is just a forest of depth 1).
extra: ExtraUnknown fields, preserved across a round trip (see Extra).