Expand description
Runtime entity churn: instantiating a copy of an authored placement, and the two clocks that drive it.
What a copy carries and when one is due is the world’s business and lives
here. Allocating the copy’s draw slot and retiring it afterwards are a
renderer’s, and reach this through the clone_slot / acquire_slot
closures a caller passes in.
Structs§
- DueSpawn
- One spawn a Spawner is due to emit this step: the template to copy, where to place it, and how long the copy should live.
Functions§
- spawn_
from_ template - Instantiate a runtime copy of
template’s renderable: clone each of its backend draw slots attransformthroughclone_slot, then build a new entity carrying the cloned slots, a copy of the template’s renderer, the placement, and an optional Lifetime. - spawn_
skinned_ from_ template - Instantiate a runtime copy of a skinned
template(a SkinnedMesh’s SkeletonPose entity) attransform. - tick_
lifetimes - Decrement every Lifetime by
dtand return the entities whose countdown reached zero this step, in frame scratch, for the caller to despawn. - tick_
spawners - Advance every Spawner’s clock by
dtand return the spawns now due, in frame scratch.