Preparing search index...

    Component that manages animation playback with clips and autoplay settings.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Create a scene object with an AnimationPlayer component
    const obj = scene.createSceneObject('AnimatedObject');
    const player = obj.addComponent('AnimationPlayer') as Editor.Components.AnimationPlayer;

    // Configure autoplay and clip range
    player.autoplay = true;
    player.clipRangeType = Editor.Components.ClipRangeType.Seconds;
    console.log(`AnimationPlayer: autoplay=${player.autoplay}, clipRangeType=${player.clipRangeType}`);
    console.log(`Animation clips: ${player.animationClips.length}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    animationClips: AnimationClip[]

    Array of animation clips available for playback.

    autoplay: boolean

    Whether animation starts playing automatically.

    clipRangeType: ClipRangeType

    Defines how animation clip ranges are interpreted.

    enabled: boolean

    Whether the component is active.

    id: Uuid

    The unique id of the entity.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    Name of the component.

    sceneObject: SceneObject

    Scene object this component is attached to.

    type: string

    The entity's type.

    Methods

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean