Class: AnimatorComponent
Components are used to attach functionality to object3D, it has an owner object3D. The component can receive update events at each frame.
Hierarchy
↳
AnimatorComponent
Constructors
Properties
Accessors
Methods
- stop
- onEnable
- onDisable
- onLateUpdate
- onBeforeUpdate
- onCompute
- onGraphic
- onParentChange
- onAddChild
- onRemoveChild
- copyComponent
- beforeDestroy
- destroy
- init
- start
- playAnim
- crossFade
- playBlendShape
- getJointIndexTable
- cloneTo
- onUpdate
- updateBlendShape
- getAnimationClipState
- cloneMorphRenderers
Constructors
constructor
• new AnimatorComponent(): AnimatorComponent
Returns
Inherited from
Properties
object3D
• object3D: Object3D = null
owner object3D
Inherited from
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional isDestroyed: boolean
Inherited from
Defined in
src/components/ComponentBase.ts:38
timeScale
• timeScale: number = 1.0
Defined in
src/components/anim/AnimatorComponent.ts:8
jointMatrixIndexTableBuffer
• jointMatrixIndexTableBuffer: StorageGPUBuffer
Defined in
src/components/anim/AnimatorComponent.ts:9
playBlendShapeLoop
• playBlendShapeLoop: boolean = false
Defined in
src/components/anim/AnimatorComponent.ts:10
root
• root: Object3D
Defined in
src/components/anim/AnimatorComponent.ts:28
Accessors
eventDispatcher
• get eventDispatcher(): CEventDispatcher
Returns
Inherited from
ComponentBase.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set eventDispatcher(value): void
Parameters
| Name | Type |
|---|---|
value | CEventDispatcher |
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
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
| Name | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
ComponentBase.enable
Defined in
src/components/ComponentBase.ts:54
avatar
• set avatar(name): void
Parameters
| Name | Type |
|---|---|
name | string |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:125
numJoint
• get numJoint(): number
Returns
number
Defined in
src/components/anim/AnimatorComponent.ts:136
clips
• get clips(): PropertyAnimationClip[]
Returns
Defined in
src/components/anim/AnimatorComponent.ts:200
• set clips(clips): void
Parameters
| Name | Type |
|---|---|
clips | PropertyAnimationClip[] |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:186
clipsState
• get clipsState(): PropertyAnimationClipState[]
Returns
Defined in
src/components/anim/AnimatorComponent.ts:204
Methods
stop
▸ stop(): void
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:114
onEnable
▸ onEnable(view?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:115
onDisable
▸ onDisable(view?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:116
onLateUpdate
▸ onLateUpdate(view?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:119
onCompute
▸ onCompute(view?, command?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
command? | GPUCommandEncoder |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:120
onGraphic
▸ onGraphic(view?): any
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:121
onParentChange
▸ onParentChange(lastParent?, currentParent?): any
Parameters
| Name | Type |
|---|---|
lastParent? | Object3D |
currentParent? | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:122
onAddChild
▸ onAddChild(child): any
Parameters
| Name | Type |
|---|---|
child | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:123
onRemoveChild
▸ onRemoveChild(child): any
Parameters
| Name | Type |
|---|---|
child | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:124
copyComponent
▸ copyComponent(from): this
Parameters
| Name | Type |
|---|---|
from | this |
Returns
this
Inherited from
Defined in
src/components/ComponentBase.ts:133
beforeDestroy
▸ beforeDestroy(force?): void
before release this component, object refrences are not be set null now.
Parameters
| Name | Type |
|---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:200
destroy
▸ destroy(force?): void
release this component
Parameters
| Name | Type |
|---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:207
init
▸ init(param?): void
Parameters
| Name | Type |
|---|---|
param? | any |
Returns
void
Overrides
Defined in
src/components/anim/AnimatorComponent.ts:36
start
▸ start(): void
Returns
void
Overrides
Defined in
src/components/anim/AnimatorComponent.ts:57
playAnim
▸ playAnim(anim, time?, speed?): void
Parameters
| Name | Type | Default value |
|---|---|---|
anim | string | undefined |
time | number | 0 |
speed | number | 1 |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:64
crossFade
▸ crossFade(anim, crossTime): void
Parameters
| Name | Type |
|---|---|
anim | string |
crossTime | number |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:80
playBlendShape
▸ playBlendShape(shapeName, time?, speed?): void
Parameters
| Name | Type | Default value |
|---|---|---|
shapeName | string | undefined |
time | number | 0 |
speed | number | 1 |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:114
getJointIndexTable
▸ getJointIndexTable(skinJointsName): number[]
Parameters
| Name | Type |
|---|---|
skinJointsName | string[] |
Returns
number[]
Defined in
src/components/anim/AnimatorComponent.ts:140
cloneTo
▸ cloneTo(obj): void
clone component data to target object3D
Parameters
| Name | Type | Description |
|---|---|---|
obj | Object3D | target object3D |
Returns
void
Overrides
Defined in
src/components/anim/AnimatorComponent.ts:208
onUpdate
▸ onUpdate(view?): void
Parameters
| Name | Type |
|---|---|
view? | View3D |
Returns
void
Overrides
Defined in
src/components/anim/AnimatorComponent.ts:240
updateBlendShape
▸ updateBlendShape(attributes, key, value): void
Parameters
| Name | Type |
|---|---|
attributes | string[] |
key | string |
value | number |
Returns
void
Defined in
src/components/anim/AnimatorComponent.ts:305
getAnimationClipState
▸ getAnimationClipState(name): PropertyAnimationClipState
Gets the animation clip data object with the specified name
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Name of animation |
Returns
Animation clip data object
Defined in
src/components/anim/AnimatorComponent.ts:413
cloneMorphRenderers
▸ cloneMorphRenderers(): Object
Returns
Object

