@shopware-ag/dive
Version:
Shopware Spatial Framework
34 lines (33 loc) • 1.06 kB
TypeScript
import { AnimationClip, Object3D } from 'three/webgpu';
import { Animator } from './Animator.ts';
import { TAnimatorLoopMode, TAnimatorState } from '../types/AnimatorTypes.ts';
/**
* Animator for mesh-embedded AnimationClip playback (e.g. character animations, keyframe animations).
*
* Wraps Three.js AnimationMixer and AnimationAction into the unified Animator interface.
*
* @module
*/
export declare class ClipAnimator extends Animator {
private _mixer;
private _actions;
private _currentAction;
private _state;
private _loop;
constructor(root: Object3D, clips: AnimationClip[]);
get state(): TAnimatorState;
get duration(): number;
get loop(): TAnimatorLoopMode;
set loop(value: TAnimatorLoopMode);
private _resolveLoopConstant;
get time(): number;
set time(value: number);
get clipNames(): string[];
get currentClipName(): string | null;
play(clipName?: string): this;
pause(): this;
resume(): this;
stop(): this;
update(deltaTime: number): void;
dispose(): void;
}