Morph
Updated
Sets initial weights for this model’s blend shapes and exposes live channels to scripts.
- Type
comp-morph- Script class
MorphComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Skeleton and morphs: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Turn a head and move a mouthA script turns a character's Head bone with a sine wave through its Skeleton and drives its mouthOpen and mouthSmile morph targets through its Morph component.
Watch the head turn and the mouth talk. Click the scene and hold S to smile. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(MorphComponent); if (component) log(component.props);}