Skip to main content

AvatarRenderer

Trait AvatarRenderer 

Source
pub trait AvatarRenderer {
    // Required methods
    fn clear(&mut self);
    fn set_body(&mut self, body: &AvatarPart, body_height: f32);
    fn set_part(&mut self, slot: AvatarSlot, part: &AvatarPart);
    fn commit(&mut self);
}
Expand description

The rendering seam. Implemented by a 3D rig-assembler (parent meshes to bones, swap skin material, scale by body height) or a 2D sprite-stacker.

Required Methods§

Source

fn clear(&mut self)

Tear down the current body.

Source

fn set_body(&mut self, body: &AvatarPart, body_height: f32)

Set the base body and overall height (0..1).

Source

fn set_part(&mut self, slot: AvatarSlot, part: &AvatarPart)

Mount one slot’s part.

Source

fn commit(&mut self)

Finalize (rebuild/bake).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§