dragonbones-pixijs
Version:
DragonBones runtime for pixi v8
74 lines (73 loc) • 2.36 kB
TypeScript
import { IAnimatable } from "./IAnimatable";
/**
* - Worldclock provides clock support for animations, advance time for each IAnimatable object added to the instance.
* @see dragonBones.IAnimateble
* @see dragonBones.Armature
* @version DragonBones 3.0
* @language en_US
*/
export declare class WorldClock implements IAnimatable {
/**
* - Current time. (In seconds)
* @version DragonBones 3.0
* @language en_US
*/
time: number;
/**
* - The play speed, used to control animation speed-shift play.
* [0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play]
* @default 1.0
* @version DragonBones 3.0
* @language en_US
*/
timeScale: number;
private _systemTime;
private readonly _animatebles;
private _clock;
/**
* - Creating a Worldclock instance. Typically, you do not need to create Worldclock instance.
* When multiple Worldclock instances are running at different speeds, can achieving some specific animation effects, such as bullet time.
* @version DragonBones 3.0
* @language en_US
*/
constructor(time?: number);
/**
* - Advance time for all IAnimatable instances.
* @param passedTime - Passed time. [-1: Automatically calculates the time difference between the current frame and the previous frame, [0~N): Passed time] (In seconds)
* @version DragonBones 3.0
* @language en_US
*/
advanceTime(passedTime: number): void;
/**
* - Check whether contains a specific instance of IAnimatable.
* @param value - The IAnimatable instance.
* @version DragonBones 3.0
* @language en_US
*/
contains(value: IAnimatable): boolean;
/**
* - Add IAnimatable instance.
* @param value - The IAnimatable instance.
* @version DragonBones 3.0
* @language en_US
*/
add(value: IAnimatable): void;
/**
* - Removes a specified IAnimatable instance.
* @param value - The IAnimatable instance.
* @version DragonBones 3.0
* @language en_US
*/
remove(value: IAnimatable): void;
/**
* - Clear all IAnimatable instances.
* @version DragonBones 3.0
* @language en_US
*/
clear(): void;
/**
* @inheritDoc
*/
get clock(): WorldClock | null;
set clock(value: WorldClock | null);
}