M3D / M3D / Animation / PathAnimation
Class: PathAnimation
Memberof
M3D.Animation
Description
路径动画对象类
Author
YF
Export
Hierarchy
-
↳
PathAnimation
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
- getDirectionType
- getExecuteAnimation
- getFirstTick
- getImgPos
- getImgScale
- getInterpolator
- getInterpolatorList
- getLastTick
- getLoop
- getName
- getOffset
- getParentAnimation
- getPath
- getPathID
- getPositionInfos
- getReverse
- getTarget
- getTimeInfos
- getTimeline
- getUpDirection
- getUsePathDirection
- getinterpolatorList
- isAniIntervalByHKeyFrame
- isAniIntervalByKeyFrame
- isAnimationInterval
- relearse
- release
- reset
- resetFirstLastTickByChild
- setBehaviorManager
- setClipPos
- setCurrentlyRunning
- setDefaultActive
- setDirectionType
- setExecuteAnimation
- setExecuteOnce
- setImgPos
- setImgScale
- setName
- setOffset
- setParentAnimation
- setPathID
- setPositionInfos
- setReverse
- setTargetByKey
- setTargetByPath
- setTimeInfos
- setTimeline
- setUpDirection
- setUsePathDirection
- addPathKeyFrame
- processXMLData
Constructors
constructor
• new PathAnimation(name
, BehaviorManager
, outerani?
): PathAnimation
Parameters
Name | Type | Default value | Description |
---|---|---|---|
name | string | undefined | 名称 |
BehaviorManager | BehaviorManager | undefined | 动画步骤管理器 |
outerani? | Animation | null | 输出的动画对象 |
Returns
Memberof
PathAnimation
Overrides
Properties
bCurrentlyRunning
• bCurrentlyRunning: boolean
Inherited from
bDefaultActive
• bDefaultActive: boolean
Inherited from
bExecuteOnce
• bExecuteOnce: boolean
Inherited from
bExpanded
• bExpanded: boolean
Inherited from
bLocked
• bLocked: boolean
Inherited from
childAnimationList
• childAnimationList: Animation
[]
Inherited from
clipPos
• clipPos: Vector3
Inherited from
delay
• delay: number
Inherited from
imgPos
• imgPos: Vector3
Inherited from
imgScale
• imgScale: Vector3
Inherited from
instanceOf
• instanceOf: string
Inherited from
interpolatorList
• interpolatorList: Interpolator
[]
Inherited from
loop
• loop: number
Inherited from
name
• name: string
Inherited from
pBehaviorManager
• pBehaviorManager: BehaviorManager
Inherited from
pGroupAnimation
• pGroupAnimation: Animation
Inherited from
pInstancedAnimation
• pInstancedAnimation: Animation
Inherited from
pParentAnimation
• pParentAnimation: Animation
Inherited from
pTimeline
• pTimeline: Timeline
Inherited from
target
• target: TargetObject
Inherited from
Methods
addChildAnimation
▸ addChildAnimation(animation
): void
Parameters
Name | Type | Description |
---|---|---|
animation | Animation | 动画对象 |
Returns
void
Description
添加子动画
Memberof
Animation
Inherited from
addInterpolator
▸ addInterpolator(interpolator
): void
Parameters
Name | Type | Description |
---|---|---|
interpolator | Interpolator | 插值器对象 |
Returns
void
Description
添加插值器
Memberof
PathAnimation
Overrides
animate
▸ animate(currenttick
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 当前的进度 |
Returns
boolean
Description
动画播放
Memberof
PathAnimation
Overrides
▸ animate(currenttick
, startframe
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | any | 当前的进度 |
startframe | any | 开始的时间 |
Returns
boolean
Description
动画播放
Memberof
PathAnimation
Overrides
animateInternal
▸ animateInternal(currenttick
): boolean
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 动画的当前时间 |
Returns
boolean
如果无效则返回false,如果有效则返回true
Description
这是Animate()的一个辅助函数。它检查当前帧对于相关的时间轴有效,然后使插补器动画
Memberof
PathAnimation
Overrides
clone
▸ clone(pBehaviorManager
): Animation
Parameters
Name | Type | Description |
---|---|---|
pBehaviorManager | BehaviorManager | 行为管理器 |
Returns
Description
克隆
Memberof
PathAnimation
Overrides
duplicateNextOrPrevious
▸ duplicateNextOrPrevious(keyFrame
, next
, bStep
): void
Parameters
Name | Type | Description |
---|---|---|
keyFrame | number | 复制的关键帧 |
next | boolean | 为前一个关键帧传递false,为下一个关键帧传递true |
bStep | boolean | 是否单步 |
Returns
void
Description
复制下一个或上一个关键帧到给定的目标关键帧
Memberof
Animation
Inherited from
Animation.duplicateNextOrPrevious
evaluate
▸ evaluate(currenttick
, result
): void
Parameters
Name | Type | Description |
---|---|---|
currenttick | number | 当前进度 |
result | (boolean | Vector3 | Quaternion )[] | 结果 |
Returns
void
Description
获取当前进度时的结果
Memberof
PathAnimation
Overrides
executeOnce
▸ executeOnce(): boolean
Returns
boolean
Description
如果动画被标记为只运行一次更新,则返回True
Memberof
Animation
Inherited from
getBehaviorManager
▸ getBehaviorManager(): BehaviorManager
Returns
Description
获取一个指向与此动画相关的BehaviorManager对象
Memberof
Animation
Inherited from
getClipPos
▸ getClipPos(): Vector3
Returns
位置信息
Description
获取剖切位置
Memberof
Animation
Inherited from
getCurrentTick
▸ getCurrentTick(): number
Returns
number
Description
获取当前进度
Memberof
PathAnimation
Overrides
getCurrentlyRunning
▸ getCurrentlyRunning(): boolean
Returns
boolean
Description
获取是否正在运行
Memberof
PathAnimation
Overrides
getDefaultActive
▸ getDefaultActive(): boolean
Returns
boolean
Description
获取是否默认激活
Memberof
Animation
Inherited from
getDelay
▸ getDelay(): number
Returns
number
Description
获取动画的初始延迟时间
Memberof
Animation
Inherited from
getDirectionType
▸ getDirectionType(): number
Returns
number
Description
获取方向类型
Memberof
PathAnimation
getExecuteAnimation
▸ getExecuteAnimation(): Animation
Returns
Description
获取执行的动画
Memberof
PathAnimation
getFirstTick
▸ getFirstTick(): number
Returns
number
Description
获取第一帧
Memberof
PathAnimation
Overrides
getImgPos
▸ getImgPos(): Vector3
Returns
位置信息
Description
获取图片位置
Memberof
Animation
Inherited from
getImgScale
▸ getImgScale(): Vector3
Returns
Description
获取图片缩放信息
Memberof
Animation
Inherited from
getInterpolator
▸ getInterpolator(): Interpolator
Returns
Description
获取插值器
Memberof
PathAnimation
Overrides
▸ getInterpolator(interpolatortype
): Interpolator
Parameters
Name | Type | Description |
---|---|---|
interpolatortype | string | 插值器类型 |
Returns
Description
获取插值器
Memberof
PathAnimation
Overrides
getInterpolatorList
▸ getInterpolatorList(): Interpolator
[]
Returns
Description
返回所有插值器
Memberof
Animation
Inherited from
getLastTick
▸ getLastTick(): number
Returns
number
Description
获取左后一帧进度
Memberof
Animation
Inherited from
getLoop
▸ getLoop(): number
Returns
number
Description
获取是否循环播放
Memberof
Animation
Inherited from
getName
▸ getName(): string
Returns
string
Description
获取名称
Memberof
PathAnimation
Overrides
getOffset
▸ getOffset(): Vector3
Returns
Description
获取偏移量
Memberof
PathAnimation
getParentAnimation
▸ getParentAnimation(): Animation
Returns
Description
返回此动画的父动画
Memberof
Animation
Inherited from
getPath
▸ getPath(): string
Returns
string
Memberof
Animation
Inherited from
getPathID
▸ getPathID(): number
Returns
number
Description
获取路径id
Memberof
PathAnimation
getPositionInfos
▸ getPositionInfos(): PositionInfos
Returns
Description
获取位置信息集合类
Memberof
PathAnimation
getReverse
▸ getReverse(): boolean
Returns
boolean
Description
获取是否反向
Memberof
PathAnimation
getTarget
▸ getTarget(): TargetObject
Returns
Description
获取一个指向动画目标对象
Memberof
Animation
Inherited from
getTimeInfos
▸ getTimeInfos(): TimeInfos
Returns
Description
获取时间信息集合类
Memberof
PathAnimation
getTimeline
▸ getTimeline(): Timeline
Returns
Description
获取一个指向与此动画相关的时间轴
Memberof
Animation
Inherited from
getUpDirection
▸ getUpDirection(): Vector3
Returns
Description
获取向上方向
Memberof
PathAnimation
getUsePathDirection
▸ getUsePathDirection(): boolean
Returns
boolean
Description
获取是否使用路径方向
Memberof
PathAnimation
getinterpolatorList
▸ getinterpolatorList(): Interpolator
[]
Returns
Description
获取插值器列表
Memberof
PathAnimation
isAniIntervalByHKeyFrame
▸ isAniIntervalByHKeyFrame(pBhvInterpolator
, iFirstFrame
, iSecondFrame
): boolean
Parameters
Name | Type | Description |
---|---|---|
pBhvInterpolator | Interpolator | 插值器 |
iFirstFrame | number | 第一帧 |
iSecondFrame | number | 第二帧 |
Returns
boolean
如果当前动画是间断的,返回true,否则返回false
Description
判断当前动画是不是间断的
Memberof
PathAnimation
isAniIntervalByKeyFrame
▸ isAniIntervalByKeyFrame(pBhvInterpolator
, iFirstFrame
, iSecondFrame
): boolean
Parameters
Name | Type | Description |
---|---|---|
pBhvInterpolator | Interpolator | 插值器 |
iFirstFrame | number | 第一帧 |
iSecondFrame | number | 第二帧 |
Returns
boolean
Description
判断当前动画是不是间断的
Memberof
Animation
Inherited from
Animation.isAniIntervalByKeyFrame
isAnimationInterval
▸ isAnimationInterval(iFirstFrame
, iSecondFrame
): boolean
Parameters
Name | Type | Description |
---|---|---|
iFirstFrame | number | 第一帧 |
iSecondFrame | number | 第二帧 |
Returns
boolean
Description
判断当前动画是不是间断的
Memberof
PathAnimation
Overrides
relearse
▸ relearse(): void
Returns
void
Description
释放
Memberof
PathAnimation
release
▸ release(): void
Returns
void
Description
释放动画对象
Memberof
Animation
Inherited from
reset
▸ reset(): void
Returns
void
Description
重置路径动画
Memberof
PathAnimation
Overrides
resetFirstLastTickByChild
▸ resetFirstLastTickByChild(): void
Returns
void
Description
根据子动画重新设置父动画的时间线长度
Memberof
PathAnimation
Overrides
Animation.resetFirstLastTickByChild
setBehaviorManager
▸ setBehaviorManager(behaviourmanager
): void
Parameters
Name | Type |
---|---|
behaviourmanager | BehaviorManager |
Returns
void
Description
设置与此动画相关的BehaviorManager对象
Memberof
Animation
Inherited from
setClipPos
▸ setClipPos(pos
): void
Parameters
Name | Type | Description |
---|---|---|
pos | Vector3 | 位置 |
Returns
void
Description
设置剖面位置
Memberof
Animation
Inherited from
setCurrentlyRunning
▸ setCurrentlyRunning(running
): void
Parameters
Name | Type |
---|---|
running | any |
Returns
void
Description
设置是否正在播放
Memberof
PathAnimation
Overrides
setDefaultActive
▸ setDefaultActive(active
): void
Parameters
Name | Type | Description |
---|---|---|
active | boolean | 是否激活 |
Returns
void
Description
设置是否默认激活
Memberof
Animation
Inherited from
setDirectionType
▸ setDirectionType(directionType
): void
Parameters
Name | Type |
---|---|
directionType | number |
Returns
void
Description
设置方向类型
Memberof
PathAnimation
setExecuteAnimation
▸ setExecuteAnimation(exeAnimation
): void
Parameters
Name | Type |
---|---|
exeAnimation | Animation |
Returns
void
Description
设置执行的动画
Memberof
PathAnimation
setExecuteOnce
▸ setExecuteOnce(once
): void
Parameters
Name | Type |
---|---|
once | boolean |
Returns
void
Description
设置是否只运行一次更新
Memberof
Animation
Inherited from
setImgPos
▸ setImgPos(pos
): void
Parameters
Name | Type | Description |
---|---|---|
pos | Vector3 | 三维位置信息 |
Returns
void
Description
设置图片位置
Memberof
Animation
Inherited from
setImgScale
▸ setImgScale(scale
): void
Parameters
Name | Type | Description |
---|---|---|
scale | Vector3 | 缩放信息 |
Returns
void
Description
设置图片缩放
Memberof
Animation
Inherited from
setName
▸ setName(name
): void
Parameters
Name | Type | Description |
---|---|---|
name | string | 需要设置的名称 |
Returns
void
Description
设置名称
Memberof
Animation
Inherited from
setOffset
▸ setOffset(x
, y
, z
): void
Parameters
Name | Type | Description |
---|---|---|
x | number | x轴偏移量 |
y | number | y轴偏移量 |
z | number | z轴偏移量 |
Returns
void
Description
设置偏移量
Memberof
PathAnimation
setParentAnimation
▸ setParentAnimation(pParentAnimation
): void
Parameters
Name | Type |
---|---|
pParentAnimation | Animation |
Returns
void
Description
设置父级动画对象
Memberof
PathAnimation
Overrides
setPathID
▸ setPathID(pathID
): void
Parameters
Name | Type |
---|---|
pathID | number |
Returns
void
Description
设置路径ID
Memberof
PathAnimation
setPositionInfos
▸ setPositionInfos(positionInfos
): void
Parameters
Name | Type |
---|---|
positionInfos | PositionInfos |
Returns
void
Description
设置位置信息集合类
Memberof
PathAnimation
setReverse
▸ setReverse(reverse
): void
Parameters
Name | Type |
---|---|
reverse | boolean |
Returns
void
Description
设置是否反向
Memberof
PathAnimation
setTargetByKey
▸ setTargetByKey(key
): void
Parameters
Name | Type |
---|---|
key | number |
Returns
void
Description
通过key设置当前动画的目标
Memberof
PathAnimation
Overrides
setTargetByPath
▸ setTargetByPath(name
, target
): void
Parameters
Name | Type | Description |
---|---|---|
name | string | 新创建的目标对象名称 |
target | string | 目标的段路径 |
Returns
void
Description
使用给定的目标路径和名称创建目标对象。然后它附着在此动画的新创建目标
Memberof
PathAnimation
Overrides
setTimeInfos
▸ setTimeInfos(timeInfos
): void
Parameters
Name | Type |
---|---|
timeInfos | TimeInfos |
Returns
void
Description
设置时间信息集合类
Memberof
PathAnimation
setTimeline
▸ setTimeline(timeline
): void
Parameters
Name | Type | Description |
---|---|---|
timeline | Timeline | 时间线对象 |
Returns
void
Description
设置时间线
Memberof
Animation
Inherited from
setUpDirection
▸ setUpDirection(x
, y
, z
): void
Parameters
Name | Type |
---|---|
x | any |
y | any |
z | any |
Returns
void
Description
设置向上方向
Memberof
PathAnimation
setUsePathDirection
▸ setUsePathDirection(bUsePathDirection
): void
Parameters
Name | Type |
---|---|
bUsePathDirection | boolean |
Returns
void
Description
设置是否使用路径方向
Memberof
PathAnimation
addPathKeyFrame
▸ addPathKeyFrame(pAnimation
, tick
, strPath
): void
Parameters
Name | Type | Description |
---|---|---|
pAnimation | Animation | 对应的动画 |
tick | number | 进度 |
strPath | any | 路径 |
Returns
void
Description
添加路径关键帧
Static
Memberof
PathAnimation
processXMLData
▸ processXMLData(buffer
, outerProcess
): Animation
Parameters
Name | Type | Description |
---|---|---|
buffer | any | XML格式数据 |
outerProcess | any | 父级过程 |
Returns
Description
解析数据
Static
Memberof
PathAnimation