Expand description
The instanced skin-and-morph scene: three entities sharing one deformed mesh.
Ported from the ecs_instanced_skinned_morphed_cubes_match_snapshots
test. Three entities share one skinned-and-morphed mesh. They draw the
same pipeline, bind the same mesh and material bind groups and read the
same vertex and index buffers, so the source folds them into a single
instanced draw; what keeps each instance distinct is the pose state the
instance stream carries β every instance names its own SkinPose and
MorphWeights entity. The frames animate those per instance, so the
sequence is what proves a merged draw still reads each instanceβs own pose.
Re-exportsΒ§
use super::BendSkin;πuse super::SEQUENCE_STEP;πuse super::SceneControl;πuse super::SceneDef;πuse super::SceneOptions;πuse super::TEST_SIZE;πuse super::default_options;πuse super::morph_deltas;πuse super::rest_pose;πuse unlit_ecs::Bundle;πuse unlit_ecs::DynamicBundle;πuse unlit_ecs::bundle;πuse unlit3d::prelude::*;π
StructsΒ§
- Instance π
- One instance of the crowd: the shared mesh drawn at its own place, with its own pose and its own morph weights.
ConstantsΒ§
- CAMERA_
EYE π - Where the camera sits, far enough back to see all instances, and what it looks at.
- CAMERA_
TARGET π - The point the camera looks at.
- FRAMES π
- The frames rendered, one snapshot each.
- INSTANCES π
- How many entities share the mesh.
StaticsΒ§
- SCENE
- The scene: a crowd of three instanced cubes, each skinned and morphed on its own, stored as one snapshot per frame.
FunctionsΒ§
- build π
- Build the instanced sceneβs world content.
- camera π
- The camera the whole sequence shares, wide enough to see all instances.
- instance_
angle π - The bending angle
instanceholds inframe. - instance_
weights π - The morph weights
instanceholds inframe, in target order.