Skip to content

Animation Clip

Updated

Plays the animation clips built into a model.

Type
comp-animation-clip
Script class
AnimationClipComponent
Per entity
One
Version
1.0.0

Read about it in Animation Clip: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
speed -100 ≤ x ≤ 100

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • AnimationClip::ready
  • AnimationClip::repeat
  • AnimationClip::finished

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(AnimationClipComponent);
if (component) log(component.props);
}