跳到主要内容
版本:v10.0

M3D / M3D / Animation / PathAnimation

Class: PathAnimation

M3D.Animation.PathAnimation

Memberof

M3D.Animation

Description

路径动画对象类

Author

YF

Export

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PathAnimation(name, BehaviorManager, outerani?): PathAnimation

Parameters

NameTypeDefault valueDescription
namestringundefined名称
BehaviorManagerBehaviorManagerundefined动画步骤管理器
outerani?Animationnull输出的动画对象

Returns

PathAnimation

Memberof

PathAnimation

Overrides

Animation.constructor

Properties

bCurrentlyRunning

bCurrentlyRunning: boolean

Inherited from

Animation.bCurrentlyRunning


bDefaultActive

bDefaultActive: boolean

Inherited from

Animation.bDefaultActive


bExecuteOnce

bExecuteOnce: boolean

Inherited from

Animation.bExecuteOnce


bExpanded

bExpanded: boolean

Inherited from

Animation.bExpanded


bLocked

bLocked: boolean

Inherited from

Animation.bLocked


childAnimationList

childAnimationList: Animation[]

Inherited from

Animation.childAnimationList


clipPos

clipPos: Vector3

Inherited from

Animation.clipPos


delay

delay: number

Inherited from

Animation.delay


imgPos

imgPos: Vector3

Inherited from

Animation.imgPos


imgScale

imgScale: Vector3

Inherited from

Animation.imgScale


instanceOf

instanceOf: string

Inherited from

Animation.instanceOf


interpolatorList

interpolatorList: Interpolator[]

Inherited from

Animation.interpolatorList


loop

loop: number

Inherited from

Animation.loop


name

name: string

Inherited from

Animation.name


pBehaviorManager

pBehaviorManager: BehaviorManager

Inherited from

Animation.pBehaviorManager


pGroupAnimation

pGroupAnimation: Animation

Inherited from

Animation.pGroupAnimation


pInstancedAnimation

pInstancedAnimation: Animation

Inherited from

Animation.pInstancedAnimation


pParentAnimation

pParentAnimation: Animation

Inherited from

Animation.pParentAnimation


pTimeline

pTimeline: Timeline

Inherited from

Animation.pTimeline


target

target: TargetObject

Inherited from

Animation.target

Methods

addChildAnimation

addChildAnimation(animation): void

Parameters

NameTypeDescription
animationAnimation动画对象

Returns

void

Description

添加子动画

Memberof

Animation

Inherited from

Animation.addChildAnimation


addInterpolator

addInterpolator(interpolator): void

Parameters

NameTypeDescription
interpolatorInterpolator插值器对象

Returns

void

Description

添加插值器

Memberof

PathAnimation

Overrides

Animation.addInterpolator


animate

animate(currenttick): boolean

Parameters

NameTypeDescription
currentticknumber当前的进度

Returns

boolean

Description

动画播放

Memberof

PathAnimation

Overrides

Animation.animate

animate(currenttick, startframe): boolean

Parameters

NameTypeDescription
currenttickany当前的进度
startframeany开始的时间

Returns

boolean

Description

动画播放

Memberof

PathAnimation

Overrides

Animation.animate


animateInternal

animateInternal(currenttick): boolean

Parameters

NameTypeDescription
currentticknumber动画的当前时间

Returns

boolean

如果无效则返回false,如果有效则返回true

Description

这是Animate()的一个辅助函数。它检查当前帧对于相关的时间轴有效,然后使插补器动画

Memberof

PathAnimation

Overrides

Animation.animateInternal


clone

clone(pBehaviorManager): Animation

Parameters

NameTypeDescription
pBehaviorManagerBehaviorManager行为管理器

Returns

Animation

Description

克隆

Memberof

PathAnimation

Overrides

Animation.clone


duplicateNextOrPrevious

duplicateNextOrPrevious(keyFrame, next, bStep): void

Parameters

NameTypeDescription
keyFramenumber复制的关键帧
nextboolean为前一个关键帧传递false,为下一个关键帧传递true
bStepboolean是否单步

Returns

void

Description

复制下一个或上一个关键帧到给定的目标关键帧

Memberof

Animation

Inherited from

Animation.duplicateNextOrPrevious


evaluate

evaluate(currenttick, result): void

Parameters

NameTypeDescription
currentticknumber当前进度
result(boolean | Vector3 | Quaternion)[]结果

Returns

void

Description

获取当前进度时的结果

Memberof

PathAnimation

Overrides

Animation.evaluate


executeOnce

executeOnce(): boolean

Returns

boolean

Description

如果动画被标记为只运行一次更新,则返回True

Memberof

Animation

Inherited from

Animation.executeOnce


getBehaviorManager

getBehaviorManager(): BehaviorManager

Returns

BehaviorManager

Description

获取一个指向与此动画相关的BehaviorManager对象

Memberof

Animation

Inherited from

Animation.getBehaviorManager


getClipPos

getClipPos(): Vector3

Returns

Vector3

位置信息

Description

获取剖切位置

Memberof

Animation

Inherited from

Animation.getClipPos


getCurrentTick

getCurrentTick(): number

Returns

number

Description

获取当前进度

Memberof

PathAnimation

Overrides

Animation.getCurrentTick


getCurrentlyRunning

getCurrentlyRunning(): boolean

Returns

boolean

Description

获取是否正在运行

Memberof

PathAnimation

Overrides

Animation.getCurrentlyRunning


getDefaultActive

getDefaultActive(): boolean

Returns

boolean

Description

获取是否默认激活

Memberof

Animation

Inherited from

Animation.getDefaultActive


getDelay

getDelay(): number

Returns

number

Description

获取动画的初始延迟时间

Memberof

Animation

Inherited from

Animation.getDelay


getDirectionType

getDirectionType(): number

Returns

number

Description

获取方向类型

Memberof

PathAnimation


getExecuteAnimation

getExecuteAnimation(): Animation

Returns

Animation

Description

获取执行的动画

Memberof

PathAnimation


getFirstTick

getFirstTick(): number

Returns

number

Description

获取第一帧

Memberof

PathAnimation

Overrides

Animation.getFirstTick


getImgPos

getImgPos(): Vector3

Returns

Vector3

位置信息

Description

获取图片位置

Memberof

Animation

Inherited from

Animation.getImgPos


getImgScale

getImgScale(): Vector3

Returns

Vector3

Description

获取图片缩放信息

Memberof

Animation

Inherited from

Animation.getImgScale


getInterpolator

getInterpolator(): Interpolator

Returns

Interpolator

Description

获取插值器

Memberof

PathAnimation

Overrides

Animation.getInterpolator

getInterpolator(interpolatortype): Interpolator

Parameters

NameTypeDescription
interpolatortypestring插值器类型

Returns

Interpolator

Description

获取插值器

Memberof

PathAnimation

Overrides

Animation.getInterpolator


getInterpolatorList

getInterpolatorList(): Interpolator[]

Returns

Interpolator[]

Description

返回所有插值器

Memberof

Animation

Inherited from

Animation.getInterpolatorList


getLastTick

getLastTick(): number

Returns

number

Description

获取左后一帧进度

Memberof

Animation

Inherited from

Animation.getLastTick


getLoop

getLoop(): number

Returns

number

Description

获取是否循环播放

Memberof

Animation

Inherited from

Animation.getLoop


getName

getName(): string

Returns

string

Description

获取名称

Memberof

PathAnimation

Overrides

Animation.getName


getOffset

getOffset(): Vector3

Returns

Vector3

Description

获取偏移量

Memberof

PathAnimation


getParentAnimation

getParentAnimation(): Animation

Returns

Animation

Description

返回此动画的父动画

Memberof

Animation

Inherited from

Animation.getParentAnimation


getPath

getPath(): string

Returns

string

Memberof

Animation

Inherited from

Animation.getPath


getPathID

getPathID(): number

Returns

number

Description

获取路径id

Memberof

PathAnimation


getPositionInfos

getPositionInfos(): PositionInfos

Returns

PositionInfos

Description

获取位置信息集合类

Memberof

PathAnimation


getReverse

getReverse(): boolean

Returns

boolean

Description

获取是否反向

Memberof

PathAnimation


getTarget

getTarget(): TargetObject

Returns

TargetObject

Description

获取一个指向动画目标对象

Memberof

Animation

Inherited from

Animation.getTarget


getTimeInfos

getTimeInfos(): TimeInfos

Returns

TimeInfos

Description

获取时间信息集合类

Memberof

PathAnimation


getTimeline

getTimeline(): Timeline

Returns

Timeline

Description

获取一个指向与此动画相关的时间轴

Memberof

Animation

Inherited from

Animation.getTimeline


getUpDirection

getUpDirection(): Vector3

Returns

Vector3

Description

获取向上方向

Memberof

PathAnimation


getUsePathDirection

getUsePathDirection(): boolean

Returns

boolean

Description

获取是否使用路径方向

Memberof

PathAnimation


getinterpolatorList

getinterpolatorList(): Interpolator[]

Returns

Interpolator[]

Description

获取插值器列表

Memberof

PathAnimation


isAniIntervalByHKeyFrame

isAniIntervalByHKeyFrame(pBhvInterpolator, iFirstFrame, iSecondFrame): boolean

Parameters

NameTypeDescription
pBhvInterpolatorInterpolator插值器
iFirstFramenumber第一帧
iSecondFramenumber第二帧

Returns

boolean

如果当前动画是间断的,返回true,否则返回false

Description

判断当前动画是不是间断的

Memberof

PathAnimation


isAniIntervalByKeyFrame

isAniIntervalByKeyFrame(pBhvInterpolator, iFirstFrame, iSecondFrame): boolean

Parameters

NameTypeDescription
pBhvInterpolatorInterpolator插值器
iFirstFramenumber第一帧
iSecondFramenumber第二帧

Returns

boolean

Description

判断当前动画是不是间断的

Memberof

Animation

Inherited from

Animation.isAniIntervalByKeyFrame


isAnimationInterval

isAnimationInterval(iFirstFrame, iSecondFrame): boolean

Parameters

NameTypeDescription
iFirstFramenumber第一帧
iSecondFramenumber第二帧

Returns

boolean

Description

判断当前动画是不是间断的

Memberof

PathAnimation

Overrides

Animation.isAnimationInterval


relearse

relearse(): void

Returns

void

Description

释放

Memberof

PathAnimation


release

release(): void

Returns

void

Description

释放动画对象

Memberof

Animation

Inherited from

Animation.release


reset

reset(): void

Returns

void

Description

重置路径动画

Memberof

PathAnimation

Overrides

Animation.reset


resetFirstLastTickByChild

resetFirstLastTickByChild(): void

Returns

void

Description

根据子动画重新设置父动画的时间线长度

Memberof

PathAnimation

Overrides

Animation.resetFirstLastTickByChild


setBehaviorManager

setBehaviorManager(behaviourmanager): void

Parameters

NameType
behaviourmanagerBehaviorManager

Returns

void

Description

设置与此动画相关的BehaviorManager对象

Memberof

Animation

Inherited from

Animation.setBehaviorManager


setClipPos

setClipPos(pos): void

Parameters

NameTypeDescription
posVector3位置

Returns

void

Description

设置剖面位置

Memberof

Animation

Inherited from

Animation.setClipPos


setCurrentlyRunning

setCurrentlyRunning(running): void

Parameters

NameType
runningany

Returns

void

Description

设置是否正在播放

Memberof

PathAnimation

Overrides

Animation.setCurrentlyRunning


setDefaultActive

setDefaultActive(active): void

Parameters

NameTypeDescription
activeboolean是否激活

Returns

void

Description

设置是否默认激活

Memberof

Animation

Inherited from

Animation.setDefaultActive


setDirectionType

setDirectionType(directionType): void

Parameters

NameType
directionTypenumber

Returns

void

Description

设置方向类型

Memberof

PathAnimation


setExecuteAnimation

setExecuteAnimation(exeAnimation): void

Parameters

NameType
exeAnimationAnimation

Returns

void

Description

设置执行的动画

Memberof

PathAnimation


setExecuteOnce

setExecuteOnce(once): void

Parameters

NameType
onceboolean

Returns

void

Description

设置是否只运行一次更新

Memberof

Animation

Inherited from

Animation.setExecuteOnce


setImgPos

setImgPos(pos): void

Parameters

NameTypeDescription
posVector3三维位置信息

Returns

void

Description

设置图片位置

Memberof

Animation

Inherited from

Animation.setImgPos


setImgScale

setImgScale(scale): void

Parameters

NameTypeDescription
scaleVector3缩放信息

Returns

void

Description

设置图片缩放

Memberof

Animation

Inherited from

Animation.setImgScale


setName

setName(name): void

Parameters

NameTypeDescription
namestring需要设置的名称

Returns

void

Description

设置名称

Memberof

Animation

Inherited from

Animation.setName


setOffset

setOffset(x, y, z): void

Parameters

NameTypeDescription
xnumberx轴偏移量
ynumbery轴偏移量
znumberz轴偏移量

Returns

void

Description

设置偏移量

Memberof

PathAnimation


setParentAnimation

setParentAnimation(pParentAnimation): void

Parameters

NameType
pParentAnimationAnimation

Returns

void

Description

设置父级动画对象

Memberof

PathAnimation

Overrides

Animation.setParentAnimation


setPathID

setPathID(pathID): void

Parameters

NameType
pathIDnumber

Returns

void

Description

设置路径ID

Memberof

PathAnimation


setPositionInfos

setPositionInfos(positionInfos): void

Parameters

NameType
positionInfosPositionInfos

Returns

void

Description

设置位置信息集合类

Memberof

PathAnimation


setReverse

setReverse(reverse): void

Parameters

NameType
reverseboolean

Returns

void

Description

设置是否反向

Memberof

PathAnimation


setTargetByKey

setTargetByKey(key): void

Parameters

NameType
keynumber

Returns

void

Description

通过key设置当前动画的目标

Memberof

PathAnimation

Overrides

Animation.setTargetByKey


setTargetByPath

setTargetByPath(name, target): void

Parameters

NameTypeDescription
namestring新创建的目标对象名称
targetstring目标的段路径

Returns

void

Description

使用给定的目标路径和名称创建目标对象。然后它附着在此动画的新创建目标

Memberof

PathAnimation

Overrides

Animation.setTargetByPath


setTimeInfos

setTimeInfos(timeInfos): void

Parameters

NameType
timeInfosTimeInfos

Returns

void

Description

设置时间信息集合类

Memberof

PathAnimation


setTimeline

setTimeline(timeline): void

Parameters

NameTypeDescription
timelineTimeline时间线对象

Returns

void

Description

设置时间线

Memberof

Animation

Inherited from

Animation.setTimeline


setUpDirection

setUpDirection(x, y, z): void

Parameters

NameType
xany
yany
zany

Returns

void

Description

设置向上方向

Memberof

PathAnimation


setUsePathDirection

setUsePathDirection(bUsePathDirection): void

Parameters

NameType
bUsePathDirectionboolean

Returns

void

Description

设置是否使用路径方向

Memberof

PathAnimation


addPathKeyFrame

addPathKeyFrame(pAnimation, tick, strPath): void

Parameters

NameTypeDescription
pAnimationAnimation对应的动画
ticknumber进度
strPathany路径

Returns

void

Description

添加路径关键帧

Static

Memberof

PathAnimation


processXMLData

processXMLData(buffer, outerProcess): Animation

Parameters

NameTypeDescription
bufferanyXML格式数据
outerProcessany父级过程

Returns

Animation

Description

解析数据

Static

Memberof

PathAnimation

Overrides

Animation.processXMLData