Skip to content
本页内容

Class: SkeletonAnimationComponent

skeleton animation

Hierarchy

Properties

Accessors

Methods

Constructors

Properties

object3D

object3D: Object3D = null

owner object3D

Inherited from

ComponentBase.object3D

Defined in

src/components/ComponentBase.ts:17


isPlaying

isPlaying: boolean = true

Whether it is playing

Defined in

src/components/SkeletonAnimationComponent.ts:18


timeScale

timeScale: number = 1.0

Global animation time scaling

Defined in

src/components/SkeletonAnimationComponent.ts:23

Accessors

transform

get transform(): Transform

Return the Transform component attached to the Object3D.

Returns

Transform

Inherited from

ComponentBase.transform

Defined in

src/components/ComponentBase.ts:38


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:59

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:45


currName

get currName(): string

The name of the currently playing animation

Returns

string

Defined in

src/components/SkeletonAnimationComponent.ts:46


skeleton

get skeleton(): Skeleton

Skeleton data

Returns

Skeleton

Defined in

src/components/SkeletonAnimationComponent.ts:68

set skeleton(value): void

Skeleton data

Parameters

NameType
valueSkeleton

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:56


finalSkeletonPose

get finalSkeletonPose(): SkeletonPose

Current final skeleton posture data

Returns

SkeletonPose

Defined in

src/components/SkeletonAnimationComponent.ts:75


jointMatrixIndexTableBuffer

get jointMatrixIndexTableBuffer(): StorageGPUBuffer

Bone matrix index table data

Returns

StorageGPUBuffer

Defined in

src/components/SkeletonAnimationComponent.ts:82

Methods

init

init(param?): void

Parameters

NameType
param?any

Returns

void

Inherited from

ComponentBase.init

Defined in

src/components/ComponentBase.ts:106


stop

stop(): void

Returns

void

Inherited from

ComponentBase.stop

Defined in

src/components/ComponentBase.ts:108


onEnable

Optional onEnable(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onEnable

Defined in

src/components/ComponentBase.ts:109


onDisable

Optional onDisable(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onDisable

Defined in

src/components/ComponentBase.ts:110


onLateUpdate

Optional onLateUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onLateUpdate

Defined in

src/components/ComponentBase.ts:112


onBeforeUpdate

Optional onBeforeUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onBeforeUpdate

Defined in

src/components/ComponentBase.ts:113


onCompute

Optional onCompute(view?, command?): any

Parameters

NameType
view?View3D
command?GPUCommandEncoder

Returns

any

Inherited from

ComponentBase.onCompute

Defined in

src/components/ComponentBase.ts:114


onGraphic

Optional onGraphic(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onGraphic

Defined in

src/components/ComponentBase.ts:115


onParentChange

Optional onParentChange(lastParent?, currentParent?): any

Parameters

NameType
lastParent?Object3D
currentParent?Object3D

Returns

any

Inherited from

ComponentBase.onParentChange

Defined in

src/components/ComponentBase.ts:116


destroy

destroy(force?): void

release this component

Parameters

NameType
force?boolean

Returns

void

Inherited from

ComponentBase.destroy

Defined in

src/components/ComponentBase.ts:190


start

start(): void

Returns

void

Overrides

ComponentBase.start

Defined in

src/components/SkeletonAnimationComponent.ts:39


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:91


addAnimationClip

addAnimationClip(clip): void

Add a skeleton animation clip

Parameters

NameTypeDescription
clipSkeletonAnimationClipSkeletal animation clip

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:105


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:122


getAnimationClips

getAnimationClips(): SkeletonAnimationClip[]

Gets all animation clip data objects

Returns

SkeletonAnimationClip[]

Animation clip data object

Defined in

src/components/SkeletonAnimationComponent.ts:134


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:143


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:154


pause

pause(): void

stop playing

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:161


resume

resume(): void

Resume playback

Returns

void

Defined in

src/components/SkeletonAnimationComponent.ts:168


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:179


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:209


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:249


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:260


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:272


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:320

Constructors

constructor

new SkeletonAnimationComponent()

Overrides

ComponentBase.constructor

Defined in

src/components/SkeletonAnimationComponent.ts:35