Skip to content

API / DragonBonesData

Class: DragonBonesData ​

Defined in: model/DragonBonesData.ts:38

The DragonBones data. A DragonBones data contains multiple armature data.

Extends ​

Constructors ​

Constructor ​

ts
new DragonBonesData(): DragonBonesData;

Returns ​

DragonBonesData

Inherited from ​

BaseObject.constructor

Properties ​

armatureNames ​

ts
readonly armatureNames: string[] = [];

Defined in: model/DragonBonesData.ts:91

All armature data names.


binary ​

ts
binary: ArrayBuffer;

Defined in: model/DragonBonesData.ts:99

Internal


cachedFrames ​

ts
readonly cachedFrames: number[] = [];

Defined in: model/DragonBonesData.ts:83

Internal


colorArray ​

ts
colorArray: Int16Array<ArrayBuffer> | Uint16Array<ArrayBuffer>;

Defined in: model/DragonBonesData.ts:127

Internal


floatArray ​

ts
floatArray: Float32Array;

Defined in: model/DragonBonesData.ts:107

Internal


frameArray ​

ts
frameArray: Int16Array;

Defined in: model/DragonBonesData.ts:119

Internal


frameFloatArray ​

ts
frameFloatArray: Float32Array;

Defined in: model/DragonBonesData.ts:115

Internal


frameIndices ​

ts
readonly frameIndices: number[] = [];

Defined in: model/DragonBonesData.ts:79

Internal


frameIntArray ​

ts
frameIntArray: Int16Array;

Defined in: model/DragonBonesData.ts:111

Internal


frameRate ​

ts
frameRate: number;

Defined in: model/DragonBonesData.ts:53

The animation frame rate.


hashCode ​

ts
readonly hashCode: number;

Defined in: core/BaseObject.ts:156

A unique identification number assigned to the object.

Inherited from ​

BaseObject.hashCode


intArray ​

ts
intArray: Int16Array;

Defined in: model/DragonBonesData.ts:103

Internal


name ​

ts
name: string;

Defined in: model/DragonBonesData.ts:71

The DragonBones data name. The name is consistent with the DragonBones project name.


timelineArray ​

ts
timelineArray: Uint16Array;

Defined in: model/DragonBonesData.ts:123

Internal


version ​

ts
version: string;

Defined in: model/DragonBonesData.ts:61

The data version.

Methods ​

addArmature() ​

ts
addArmature(value: ArmatureData): void;

Defined in: model/DragonBonesData.ts:165

Internal

Parameters ​

ParameterType
valueArmatureData

Returns ​

void


getArmature() ​

ts
getArmature(armatureName: string): ArmatureData;

Defined in: model/DragonBonesData.ts:185

Get a specific armature data.

Parameters ​

ParameterTypeDescription
armatureNamestringThe armature data name.

Returns ​

ArmatureData


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/DragonBonesData.ts:39

Returns ​

string

Overrides ​

BaseObject.toString

Released under the MIT License.