Skip to content

API / AnimationData

类: AnimationData

定义于: model/AnimationData.ts:34

动画数据。

继承

构造函数

构造函数

ts
new AnimationData(): AnimationData;

返回

AnimationData

继承自

BaseObject.constructor

属性

duration

ts
duration: number;

定义于: model/AnimationData.ts:80

动画的持续时间。 (以秒为单位)


fadeInTime

ts
fadeInTime: number;

定义于: model/AnimationData.ts:92

动画的淡入时间。 (以秒为单位)


frameCount

ts
frameCount: number;

定义于: model/AnimationData.ts:64

动画的帧数。


frameFloatOffset

ts
frameFloatOffset: number;

定义于: model/AnimationData.ts:47

Internal

  • FrameFloatArray.

frameIntOffset

ts
frameIntOffset: number;

定义于: model/AnimationData.ts:42

Internal

  • FrameIntArray.

frameOffset

ts
frameOffset: number;

定义于: model/AnimationData.ts:52

Internal

  • FrameArray.

hashCode

ts
readonly hashCode: number;

定义于: core/BaseObject.ts:156

分配给此实例的唯一标识号。

继承自

BaseObject.hashCode


name

ts
name: string;

定义于: model/AnimationData.ts:104

动画名称。


playTimes

ts
playTimes: number;

定义于: model/AnimationData.ts:72

动画的播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次]

方法

cacheFrames()

ts
cacheFrames(frameRate: number): void;

定义于: model/AnimationData.ts:220

Internal

参数

参数类型
frameRatenumber

返回

void


returnToPool()

ts
returnToPool(): void;

定义于: core/BaseObject.ts:167

清除该实例的所有数据并将其返还对象池。

返回

void

继承自

BaseObject.returnToPool


borrowObject()

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

定义于: core/BaseObject.ts:136

从对象池中获取特定类的实例。

类型参数

类型参数
T extends BaseObject

参数

参数类型描述
objectConstructor() => T特定的类。

返回

T

继承自

BaseObject.borrowObject


clearPool()

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

定义于: core/BaseObject.ts:111

清除特定对象池的缓存实例。

参数

参数类型默认值描述
objectConstructortypeof BaseObjectnull特定的类。 (不设置则清除所有缓存的实例)

返回

void

继承自

BaseObject.clearPool


setMaxCount()

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

定义于: core/BaseObject.ts:72

设置特定对象池的最大缓存数量。

参数

参数类型描述
objectConstructortypeof BaseObject特定的类。 (不设置则设置所有对象池的最大缓存数量)
maxCountnumber最大缓存数量。

返回

void

继承自

BaseObject.setMaxCount


toString()

ts
static toString(): string;

定义于: model/AnimationData.ts:35

返回

string

重写了

BaseObject.toString

Released under the MIT License.