M3D / M3D / Animation / Animation
Class: Animation
Memberof
M3D.Animation
Description
动画类
Author
YF
Hierarchy
-
Animation
Table of contents
Constructors
Properties
- bCurrentlyRunning
- bDefaultActive
- bExecuteOnce
- bExpanded
- bLocked
- childAnimationList
- clipPos
- delay
- imgPos
- imgScale
- instanceOf
- interpolatorList
- loop
- name
- pBehaviorManager
- pGroupAnimation
- pInstancedAnimation
- pParentAnimation
- pTimeline
- target
Methods
- addChildAnimation
- addInterpolator
- animate
- animateInternal
- clone
- duplicateNextOrPrevious
- evaluate
- executeOnce
- getBehaviorManager
- getClipPos
- getCurrentTick
- getCurrentlyRunning
- getDefaultActive
- getDelay
- getFirstTick
- getImgPos
- getImgScale
- getInterpolator
- getInterpolatorList
- getLastTick
- getLoop
- getName
- getParentAnimation
- getPath
- getTarget
- getTimeline
- isAniIntervalByKeyFrame
- isAnimationInterval
- release
- reset
- resetFirstLastTickByChild
- setBehaviorManager
- setClipPos
- setCurrentlyRunning
- setDefaultActive
- setExecuteOnce
- setImgPos
- setImgScale
- setName
- setParentAnimation
- setTargetByKey
- setTargetByPath
- setTimeline
- processXMLData
Constructors
constructor
• new Animation(name
, BehaviorManager
, outerani?
): Animation
Parameters
Name | Type | Default value | Description |
---|---|---|---|
name | string | undefined | 动画名称 |
BehaviorManager | BehaviorManager | undefined | 动画步骤管理器 |
outerani? | Animation | null | 输出的动画对象 |
Returns
Memberof
Animation
Properties
bCurrentlyRunning
• bCurrentlyRunning: boolean
bDefaultActive
• bDefaultActive: boolean
bExecuteOnce
• bExecuteOnce: boolean
bExpanded
• bExpanded: boolean
bLocked
• bLocked: boolean
childAnimationList
• childAnimationList: Animation
[]
clipPos
• clipPos: Vector3
delay
• delay: number
imgPos
• imgPos: Vector3
imgScale
• imgScale: Vector3
instanceOf
• instanceOf: string
interpolatorList
• interpolatorList: Interpolator
[]
loop
• loop: number
name
• name: string
pBehaviorManager
• pBehaviorManager: BehaviorManager
pGroupAnimation
• pGroupAnimation: Animation
pInstancedAnimation
• pInstancedAnimation: Animation
pParentAnimation
• pParentAnimation: Animation
pTimeline
• pTimeline: Timeline
target
• target: TargetObject
Methods
addChildAnimation
▸ addChildAnimation(animation
): void
Parameters
Name | Type | Description |
---|---|---|
animation | Animation | 动画对象 |
Returns
void
Description
添加子动画
Memberof
Animation
addInterpolator
▸ addInterpolator(interpolator
): void
Parameters
Name | Type | Description |
---|---|---|
interpolator | Interpolator | 插值器对象 |
Returns
void
Description
添加插值器
Memberof
Animation
animate
▸ animate(currenttick
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 相对于整个动画开始时间的时间 |
Returns
boolean
Description
根据给定的时间执行动画
Memberof
Animation
▸ animate(currenttick
, startframe
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | any | 相对于给定开始时间(第二个参数)的时间 |
startframe | any | 计算动画的开始时间 |
Returns
boolean
Description
根据给定的时间相对于给定的开始时间执行动画
Memberof
Animation
animateInternal
▸ animateInternal(currenttick
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 动画的当前时间 |
Returns
boolean
如果无效则返回false,如果有效则返回true
Description
这是Animate()的一个辅助函数。它检查当前帧对于相关的时间轴有效,然后使插补器动画
Memberof
Animation
clone
▸ clone(pBehaviorManager
): Animation
Parameters
Name | Type |
---|---|
pBehaviorManager | BehaviorManager |
Returns
返回一个新的Animation对象
Description
克隆
Memberof
Animation
duplicateNextOrPrevious
▸ duplicateNextOrPrevious(keyFrame
, next
, bStep
): void
Parameters
Name | Type | Description |
---|---|---|
keyFrame | number | 复制的关键帧 |
next | boolean | 为前一个关键帧传递false,为下一个关键帧传递true |
bStep | boolean | 是否单步 |
Returns
void
Description
复制下一个或上一个关键帧到给定的目标关键帧
Memberof
Animation
evaluate
▸ evaluate(currenttick
, result
): void
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 当前进度 |
result | (boolean | Vector3 | Quaternion )[] | 结果 |
Returns
void
Description
获取当前进度时的结果
Memberof
Animation
executeOnce
▸ executeOnce(): boolean
Returns
boolean
Description
如果动画被标记为只运行一次更新,则返回True
Memberof
Animation
getBehaviorManager
▸ getBehaviorManager(): BehaviorManager
Returns
Description
获取一个指向与此动画相关的BehaviorManager对象
Memberof
Animation
getClipPos
▸ getClipPos(): Vector3
Returns
位置信息
Description
获取剖切位置
Memberof
Animation
getCurrentTick
▸ getCurrentTick(): number
Returns
number
Description
获取当前帧
Memberof
Animation
getCurrentlyRunning
▸ getCurrentlyRunning(): boolean
Returns
boolean
Description
如果动画正在运行则返回True,如果动画没有运行则返回false
Memberof
Animation
getDefaultActive
▸ getDefaultActive(): boolean
Returns
boolean
Description
获取是否默认激活
Memberof
Animation
getDelay
▸ getDelay(): number
Returns
number
Description
获取动画的初始延迟时间
Memberof
Animation
getFirstTick
▸ getFirstTick(): number
Returns
number
Description
获取时间轴中第一个条目的值
Memberof
Animation
getImgPos
▸ getImgPos(): Vector3
Returns
位置信息
Description
获取图片位置
Memberof
Animation
getImgScale
▸ getImgScale(): Vector3
Returns
Description
获取图片缩放信息
Memberof
Animation
getInterpolator
▸ getInterpolator(): Interpolator