Skip to content

API / AnimationData

Class: AnimationData

Defined in: model/AnimationData.ts:34

The animation data.

Extends

Constructors

Constructor

ts
new AnimationData(): AnimationData;

Returns

AnimationData

Inherited from

BaseObject.constructor

Properties

duration

ts
duration: number;

Defined in: model/AnimationData.ts:80

The duration of the animation. (In seconds)


fadeInTime

ts
fadeInTime: number;

Defined in: model/AnimationData.ts:92

The fade in time of the animation. (In seconds)


frameCount

ts
frameCount: number;

Defined in: model/AnimationData.ts:64

The frame count of the animation.


frameFloatOffset

ts
frameFloatOffset: number;

Defined in: model/AnimationData.ts:47

Internal

  • FrameFloatArray.

frameIntOffset

ts
frameIntOffset: number;

Defined in: model/AnimationData.ts:42

Internal

  • FrameIntArray.

frameOffset

ts
frameOffset: number;

Defined in: model/AnimationData.ts:52

Internal

  • FrameArray.

hashCode

ts
readonly hashCode: number;

Defined in: core/BaseObject.ts:156

A unique identification number assigned to the object.

Inherited from

BaseObject.hashCode


name

ts
name: string;

Defined in: model/AnimationData.ts:104

The animation name.


playTimes

ts
playTimes: number;

Defined in: model/AnimationData.ts:72

The play times of the animation. [0: Loop play, [1~N]: Play N times]

Methods

cacheFrames()

ts
cacheFrames(frameRate: number): void;

Defined in: model/AnimationData.ts:220

Internal

Parameters

ParameterType
frameRatenumber

Returns

void


returnToPool()

ts
returnToPool(): void;

Defined in: core/BaseObject.ts:167

Clear the object and return it back to object pool。

Returns

void

Inherited from

BaseObject.returnToPool


borrowObject()

ts
static borrowObject<T>(objectConstructor: () => T): T;

Defined in: core/BaseObject.ts:136

Get an instance of the specify class from object pool.

Type Parameters

Type Parameter
T extends BaseObject

Parameters

ParameterTypeDescription
objectConstructor() => TThe specify class.

Returns

T

Inherited from

BaseObject.borrowObject


clearPool()

ts
static clearPool(objectConstructor: typeof BaseObject): void;

Defined in: core/BaseObject.ts:111

Clear the cached instances of a specify object pool.

Parameters

ParameterTypeDefault valueDescription
objectConstructortypeof BaseObjectnullSpecify class. (Clear all cached instances if not set)

Returns

void

Inherited from

BaseObject.clearPool


setMaxCount()

ts
static setMaxCount(objectConstructor: typeof BaseObject, maxCount: number): void;

Defined in: core/BaseObject.ts:72

Set the maximum cache count of the specify object pool.

Parameters

ParameterTypeDescription
objectConstructortypeof BaseObjectThe specify class. (Set all object pools max cache count if not set)
maxCountnumberMax count.

Returns

void

Inherited from

BaseObject.setMaxCount


toString()

ts
static toString(): string;

Defined in: model/AnimationData.ts:35

Returns

string

Overrides

BaseObject.toString

Released under the MIT License.