Skip to main content

Module skinned

Module skinned 

Source
Expand description

The skinned-cube scene: a mesh bent by two joints across six frames.

Ported from the ecs_skinned_cube_matches_snapshots test. A skinned cube is drawn over several frames while its pose animates: the joint matrices live in a SkinPose component the CPU updates, and each frame is stored as its own snapshot.

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

StructsΒ§

SkinnedCube πŸ”’
The scene’s one visible object: a cube bent by its own pose.

ConstantsΒ§

CAMERA_EYE πŸ”’
Where the camera sits, close enough that a deformation moves many pixels.
CAMERA_TARGET πŸ”’
The point the camera looks at.
FRAMES πŸ”’
The frames rendered, one snapshot each.

StaticsΒ§

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

FunctionsΒ§

bend_angle πŸ”’
The angle the bending joint holds in frame.
build πŸ”’
Build the skinned-cube scene’s world content.
camera πŸ”’
The camera the whole sequence shares, so a frame’s difference is the pose’s.