Skip to content

Class: SkeletonAnimationComponent

skeleton animation

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SkeletonAnimationComponent(): SkeletonAnimationComponent

Returns

SkeletonAnimationComponent

Overrides

ComponentBase.constructor

Defined in

src/components/SkeletonAnimationComponent.ts:37

Properties

object3D

object3D: Object3D = null

owner object3D

Inherited from

ComponentBase.object3D

Defined in

src/components/ComponentBase.ts:17


isDestroyed

Optional isDestroyed: boolean

Inherited from

ComponentBase.isDestroyed

Defined in

src/components/ComponentBase.ts:38


isPlaying

isPlaying: boolean = true

Whether it is playing

Defined in

src/components/SkeletonAnimationComponent.ts:20


timeScale

timeScale: number = 1.0

Global animation time scaling

Defined in

src/components/SkeletonAnimationComponent.ts:25

Accessors

eventDispatcher

get eventDispatcher(): CEventDispatcher

Returns

CEventDispatcher

Inherited from

ComponentBase.eventDispatcher

Defined in

src/components/ComponentBase.ts:23

set eventDispatcher(value): void

Parameters

NameType
valueCEventDispatcher

Returns

void

Inherited from

ComponentBase.eventDispatcher

Defined in

src/components/ComponentBase.ts:28


isStart

get isStart(): boolean

Returns

boolean

Inherited from

ComponentBase.isStart

Defined in

src/components/ComponentBase.ts:40


transform

get transform(): Transform

Return the Transform component attached to the Object3D.

Returns

Transform

Inherited from

ComponentBase.transform

Defined in

src/components/ComponentBase.ts:47


enable

get enable(): boolean

Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.

Returns

boolean

Inherited from

ComponentBase.enable

Defined in

src/components/ComponentBase.ts:68

set enable(value): void

Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.

Parameters

NameType
valueboolean

Returns

void

Inherited from

ComponentBase.enable

Defined in

src/components/ComponentBase.ts:54


currName

get currName(): string

The name of the currently playing animation

Returns

string

Defined in

src/components/SkeletonAnimationComponent.ts:48


skeleton

get skeleton(): Skeleton

Skeleton data

Returns

Skeleton

Defined in

src/components/SkeletonAnimationComponent.ts:70

set skeleton(value): void

Skeleton data

Parameters

NameType
valueSkeleton

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:58


finalSkeletonPose

get finalSkeletonPose(): SkeletonPose

Current final skeleton posture data

Returns

SkeletonPose

Defined in

src/components/SkeletonAnimationComponent.ts:77


jointMatrixIndexTableBuffer

get jointMatrixIndexTableBuffer(): StorageGPUBuffer

Bone matrix index table data

Returns

StorageGPUBuffer

Defined in

src/components/SkeletonAnimationComponent.ts:84

Methods

init

init(param?): void

Parameters

NameType
param?any

Returns

void

Inherited from

ComponentBase.init

Defined in

src/components/ComponentBase.ts:112


stop

stop(): void

Returns

void

Inherited from

ComponentBase.stop

Defined in

src/components/ComponentBase.ts:114


onEnable

onEnable(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onEnable

Defined in

src/components/ComponentBase.ts:115


onDisable

onDisable(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onDisable

Defined in

src/components/ComponentBase.ts:116


onLateUpdate

onLateUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onLateUpdate

Defined in

src/components/ComponentBase.ts:118


onBeforeUpdate

onBeforeUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onBeforeUpdate

Defined in

src/components/ComponentBase.ts:119


onCompute

onCompute(view?, command?): any

Parameters

NameType
view?View3D
command?GPUCommandEncoder

Returns

any

Inherited from

ComponentBase.onCompute

Defined in

src/components/ComponentBase.ts:120


onGraphic

onGraphic(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onGraphic

Defined in

src/components/ComponentBase.ts:121


onParentChange

onParentChange(lastParent?, currentParent?): any

Parameters

NameType
lastParent?Object3D
currentParent?Object3D

Returns

any

Inherited from

ComponentBase.onParentChange

Defined in

src/components/ComponentBase.ts:122


onAddChild

onAddChild(child): any

Parameters

NameType
childObject3D

Returns

any

Inherited from

ComponentBase.onAddChild

Defined in

src/components/ComponentBase.ts:123


onRemoveChild

onRemoveChild(child): any

Parameters

NameType
childObject3D

Returns

any

Inherited from

ComponentBase.onRemoveChild

Defined in

src/components/ComponentBase.ts:124


copyComponent

copyComponent(from): this

Parameters

NameType
fromthis

Returns

this

Inherited from

ComponentBase.copyComponent

Defined in

src/components/ComponentBase.ts:133


beforeDestroy

beforeDestroy(force?): void

before release this component, object refrences are not be set null now.

Parameters

NameType
force?boolean

Returns

void

Inherited from

ComponentBase.beforeDestroy

Defined in

src/components/ComponentBase.ts:200


destroy

destroy(force?): void

release this component

Parameters

NameType
force?boolean

Returns

void

Inherited from

ComponentBase.destroy

Defined in

src/components/ComponentBase.ts:207


start

start(): void

Returns

void

Overrides

ComponentBase.start

Defined in

src/components/SkeletonAnimationComponent.ts:41


getJointIndexTable

getJointIndexTable(skinJointsName): number[]

Get the bone index information by the bone name

Parameters

NameTypeDescription
skinJointsNamestring[]bone name

Returns

number[]

bone index

Defined in

src/components/SkeletonAnimationComponent.ts:93


addAnimationClip

addAnimationClip(clip): void

Add a skeleton animation clip

Parameters

NameTypeDescription
clipSkeletonAnimationClipSkeletal animation clip

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:107


getAnimationClip

getAnimationClip(name): SkeletonAnimationClip

Gets the animation clip data object with the specified name

Parameters

NameTypeDescription
namestringName of animation

Returns

SkeletonAnimationClip

Animation clip data object

Defined in

src/components/SkeletonAnimationComponent.ts:124


getAnimationClips

getAnimationClips(): SkeletonAnimationClip[]

Gets all animation clip data objects

Returns

SkeletonAnimationClip[]

Animation clip data object

Defined in

src/components/SkeletonAnimationComponent.ts:136


getAnimationClipState

getAnimationClipState(name): SkeletonAnimationClipState

Gets the animation clip state object with the specified name

Parameters

NameTypeDescription
namestringName of animation

Returns

SkeletonAnimationClipState

Animation clip state object

Defined in

src/components/SkeletonAnimationComponent.ts:145


getAnimationClipStates

getAnimationClipStates(): Map<string, SkeletonAnimationClipState>

Gets all animation clip state objects

Returns

Map<string, SkeletonAnimationClipState>

Animation clip state object

Defined in

src/components/SkeletonAnimationComponent.ts:156


pause

pause(): void

stop playing

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:163


resume

resume(): void

Resume playback

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:170


play

play(animName, speed?, reset?): boolean

Play the specified animation

Parameters

NameTypeDefault valueDescription
animNamestringundefinedThe data set name for the animation
speednumber1Animation playback speed, default value is 1.0
resetbooleanfalseWhen true, each play starts with the first frame

Returns

boolean

Defined in

src/components/SkeletonAnimationComponent.ts:181


crossFade

crossFade(animName, crossTime): void

Fades the current animation and fades into another animation state for a specified time.

Parameters

NameTypeDescription
animNamestringThe name of the animation to fade in.
crossTimenumberThe time of transition, in seconds.

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:211


setAnimIsLoop

setAnimIsLoop(animName, isLoop): void

Set the animation loop

Parameters

NameTypeDescription
animNamestringThe data set name for the animation
isLoopbooleanIf true, loop the animation

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:251


addJointBind

addJointBind(jointName, obj): void

Add joint bindings to the object

Parameters

NameTypeDescription
jointNamestringName of joint
objObject3DObject of binding

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:262


removeJointBind

removeJointBind(obj): void

Removes the joint binding of the specified object

Parameters

NameTypeDescription
objObject3DObject of binding

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:274


cloneTo

cloneTo(obj): void

Clones the current component to the specified object

Parameters

NameTypeDescription
objObject3Dtarget object

Returns

void

Overrides

ComponentBase.cloneTo

Defined in

src/components/SkeletonAnimationComponent.ts:322