Skip to content

API / AnimationConfig

Class: AnimationConfig

Defined in: model/AnimationConfig.ts:37

Beta

The animation config is used to describe all the information needed to play an animation state. The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used.

Extends

Constructors

Constructor

ts
new AnimationConfig(): AnimationConfig;

Beta

Returns

AnimationConfig

Inherited from

BaseObject.constructor

Properties

animation

ts
animation: string;

Defined in: model/AnimationConfig.ts:204

Beta

The animation data name.


autoFadeOutTime

ts
autoFadeOutTime: number;

Defined in: model/AnimationConfig.ts:188

Beta

The auto fade out time when the animation state play completed. [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds)

Default

ts
-1.0

displayControl

ts
displayControl: boolean;

Defined in: model/AnimationConfig.ts:88

Beta

Whether the animation state has control over the display property of the slots. Sometimes blend a animation state does not want it to control the display properties of the slots, especially if other animation state are controlling the display properties of the slots.

Default

ts
true

duration

ts
duration: number;

Defined in: model/AnimationConfig.ts:144

Beta

The duration of play. [-1: Use the default value of the animation data, 0: Stop play, (0~N]: The duration] (In seconds)

Default

ts
-1.0

fadeInTime

ts
fadeInTime: number;

Defined in: model/AnimationConfig.ts:177

Beta

The fade in time. [-1: Use the default value of the animation data, [0~N]: The fade in time] (In seconds)

Default

ts
-1.0

fadeOutMode

ts
fadeOutMode: AnimationFadeOutMode;

Defined in: model/AnimationConfig.ts:55

Beta

Fade out the pattern of other animation states when the animation state is fade in. This property is typically used to specify the substitution of multiple animation states blend.

Default

ts
AnimationFadeOutMode.All

group

ts
readonly group: string;

Defined in: model/AnimationConfig.ts:215

Beta

The blend group name of the animation state. This property is typically used to specify the substitution of multiple animation states blend.


hashCode

ts
readonly hashCode: number;

Defined in: core/BaseObject.ts:156

Beta

A unique identification number assigned to the object.

Inherited from

BaseObject.hashCode


layer

ts
readonly layer: number;

Defined in: model/AnimationConfig.ts:124

Beta

The blend layer. High layer animation state will get the blend weight first. When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned.


name

ts
name: string;

Defined in: model/AnimationConfig.ts:196

Beta

The name of the animation state. (Can be different from the name of the animation data)


playTimes

ts
playTimes: number;

Defined in: model/AnimationConfig.ts:111

Beta

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


position

ts
position: number;

Defined in: model/AnimationConfig.ts:133

Beta

The start time of play. (In seconds)

Default

ts
0.0

resetToPose

ts
resetToPose: boolean;

Defined in: model/AnimationConfig.ts:99

Beta

Whether to reset the objects without animation to the armature pose when the animation state is start to play. This property should usually be set to false when blend multiple animation states.

Default

ts
true

timeScale

ts
timeScale: number;

Defined in: model/AnimationConfig.ts:157

Beta

The play speed. The value is an overlay relationship with Animation#timeScale. [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play]

Default

ts
1.0

weight

ts
weight: number;

Defined in: model/AnimationConfig.ts:166

Beta

The blend weight.

Default

ts
1.0

Methods

returnToPool()

ts
returnToPool(): void;

Defined in: core/BaseObject.ts:167

Beta

Returns

void

Inherited from

BaseObject.returnToPool


borrowObject()

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

Defined in: core/BaseObject.ts:136

Beta

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

Beta

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

Beta

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/AnimationConfig.ts:38

Beta

Returns

string

Overrides

BaseObject.toString

Released under the MIT License.