GrowthAnimation

类:生长动画(场景中最大存在数量为4000,动画不再使用时调用destory()函数释放资源)

Constructor

new Glodon.Bimface.Plugins.Animation.GrowthAnimation(growthAnimationConfig)

构造模型生长动画

Parameters:
NameTypeDescription
growthAnimationConfigGlodon.Bimface.Plugins.Animation.GrowthAnimationConfig

生长动画配置项

Methods

destroy()

销毁该动画对象,释放资源

getSpeed()

获取动画速度

Returns:
TypeDescription
Number

动画速度

getTime()

获取动画播放的时间

Returns:
TypeDescription
Number

动画播放时间(单位为毫秒

onProgressChanged(callback)

添加动画进度变化事件,将实时返回当前的进度。

Parameters:
NameTypeDescription
callbackFunction

动画进度变化的回调函数,适用于Viewer3D、ViewerGIS

pause()

暂停动画

play()

播放动画

setProgress(progress)

设置动画进度

Parameters:
NameTypeDescription
progressNumber

动画进度,取值范围[0,1],1代表所有构件均生长完成

setSpeed(speed)

设置动画速度

Parameters:
NameTypeDescription
speedNumber

动画速度

setTime(time)

设置动画时间

Parameters:
NameTypeDescription
timeNumber

动画播放时间(单位为毫秒)

stop()

停止动画