@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
62 lines (61 loc) • 2.13 kB
TypeScript
/**
* AnimEvaluator blends multiple sets of animation clips together.
*
* @ignore
*/
export class AnimEvaluator {
/**
* Create a new animation evaluator.
*
* @param {import('../binder/anim-binder.js').AnimBinder} binder - interface resolves curve
* paths to instances of {@link AnimTarget}.
*/
constructor(binder: import("../binder/anim-binder.js").AnimBinder);
_binder: import("../binder/anim-binder.js").AnimBinder;
_clips: any[];
_inputs: any[];
_outputs: any[];
_targets: {};
/**
* The list of animation clips.
*
* @type {import('./anim-clip.js').AnimClip[]}
*/
get clips(): import("./anim-clip.js").AnimClip[];
/**
* Add a clip to the evaluator.
*
* @param {import('./anim-clip.js').AnimClip} clip - The clip to add to the evaluator.
*/
addClip(clip: import("./anim-clip.js").AnimClip): void;
/**
* Remove a clip from the evaluator.
*
* @param {number} index - Index of the clip to remove.
*/
removeClip(index: number): void;
/**
* Remove all clips from the evaluator.
*/
removeClips(): void;
updateClipTrack(name: any, animTrack: any): void;
/**
* Returns the first clip which matches the given name, or null if no such clip was found.
*
* @param {string} name - Name of the clip to find.
* @returns {import('./anim-clip.js').AnimClip|null} - The clip with the given name or null if no such clip was found.
*/
findClip(name: string): import("./anim-clip.js").AnimClip | null;
rebind(): void;
assignMask(mask: any): any;
/**
* Evaluator frame update function. All the attached {@link AnimClip}s are evaluated, blended
* and the results set on the {@link AnimTarget}.
*
* @param {number} deltaTime - The amount of time that has passed since the last update, in
* seconds.
* @param {boolean} [outputAnimation] - Whether the evaluator should output the results of the
* update to the bound animation targets.
*/
update(deltaTime: number, outputAnimation?: boolean): void;
}