Skip to main content

Module morphed

Module morphed 

Source
Expand description

The morphed-cube scene: a cube blended by two morph targets across six frames.

Ported from the ecs_morphed_cube_matches_snapshots test. A cube with two morph targets is drawn over several frames while its target weights animate: the weights live in a MorphWeights component the CPU updates, and each frame is stored as its own snapshot.

Re-exportsΒ§

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 unlit_ecs::Bundle; πŸ”’
use unlit_ecs::DynamicBundle; πŸ”’
use unlit_ecs::bundle; πŸ”’
use unlit3d::prelude::*; πŸ”’

StructsΒ§

MorphedCube πŸ”’
The scene’s one visible object: a cube blended by its own weights.

ConstantsΒ§

CAMERA_EYE πŸ”’
Where the camera sits and what it looks at.
CAMERA_TARGET πŸ”’
The point the camera looks at.
FRAMES πŸ”’
The frames rendered, one snapshot each.

StaticsΒ§

SCENE
The scene: a cube changing shape frame by frame, each stored as its own snapshot.

FunctionsΒ§

build πŸ”’
Build the morphed-cube scene’s world content.
camera πŸ”’
The camera the whole sequence shares, so a frame’s difference is the morph’s.
weights πŸ”’
The weights of frame, in target order.