Expand description
The sceneβs assets, built once in the render world.
The render world allocates the meshes and materials in one job and publishes them. Every shape a drop needs is its own render instance, asked for when the drop happens; an instance the camera can no longer see is despawned by the render world, so nothing is kept hidden for reuse.
Re-exportsΒ§
use unlit_ecs::bundle;πuse unlit_ecs::Bundle;πuse unlit_ecs::DynamicBundle;πuse unlit_ecs::World;πuse unlit3d::components::Transform;πuse super::HIDDEN_POSITION;πuse super::Scene;πuse super::shapes::BALL_COLORS;πuse super::shapes::PATTERN_SIZE;πuse super::shapes::SHAPE_KINDS;πuse super::shapes::pattern_texture;πuse super::shapes::shape_mesh;πuse super::tick::advancing;πuse crate::render::RenderEntity;πuse crate::render::allocate_mesh;πuse crate::render::allocate_rgba_material;πuse crate::render::linear_sampler;πuse unlit3dx::prelude::*;π
StructsΒ§
- Scene
Assets - The render entities a shape is built from, in kind-major order.
- Scene
Build π - The sceneβs assets and the tick that collects them.
- Scene
State - The sceneβs assets, on their own entity in the gameplay world.
FunctionsΒ§
- build_
assets π - Allocate the sceneβs meshes and materials, and answer their entities.
- create_
instance - Spawn one hidden instance wearing the assets it names, and answer it.
- look
- The kind and color a drop wears, as indices into
SceneAssets.