Class: FMDynamicModel

FMDynamicModel

FMDynamicModelMarker 模型对象,是一种动态对象。

new fengmap.FMDynamicModel(options)

Name Type Description
options json

参数项

Name Type Description
id number

唯一标识,默认uuid

url string

路径

x number

图片地图位置x值,默认对应楼层中心点坐标

y number

图片地图位置y值,默认对应楼层中心点坐标

height number

离地高度

color number

颜色

scale number

DynamicModel缩放比例

heading number

DynamicModel旋转角度

fadeIn boolean

是否开启淡入效果, 默认false

fadeOut boolean

是否开启淡出效果,默认false

callback function

model完成动画后的回调函数

Members

color

Properties:
Name Type Description
color

颜色

readonlyheading

Properties:
Name Type Description
angle number

设置z轴旋转

height

离地高度

Properties:
Name Type Description
height number

离地高度

readonlylevel

Properties:
Name Type Description
level number

楼层等级,初始化完成后可以获取当前值

scale

Properties:
Name Type Description
scale number

显示比例

readonlytype

Properties:
Name Type Description
type fengmap.FMType

节点类型

visible

Properties:
Name Type Description
visible Boolean

true 显示 false 隐藏

readonlyx

Properties:
Name Type Description
x number

坐标

readonlyy

Properties:
Name Type Description
y number

坐标

Methods

inherited addTo(floor)

添加到楼层

Name Type Description
floor Object

楼层等级

getActionNames(){*}

获取所有动画片段

Returns:
Type Description
*

moveTo(options){fengmap.FMAnimation}

动画移动marker到指定位置

Name Type Description
options Object
Name Type Description
x number

图片地图位置x值,默认对应楼层中心点坐标

y number

图片地图位置y值,默认对应楼层中心点坐标

animate boolean

是否需要动画,默认false

duration number

移动到指定位置所用的时间(秒)

finish function

移动到指定位置后的回调函数

Returns:
Type Description
fengmap.FMAnimation animation 返回动画

remove()

从楼层中移除

rotateTo(options){fengmap.FMAnimation}

水平旋转至特定角度,带动画

Name Type Description
options json
Name Type Description
heading number

角度

animate boolean

是否需要动画,默认false

duration number

动画持续时间

finish function

移动到指定位置后的回调函数

Returns:
Type Description
fengmap.FMAnimation animation 返回动画

startAction(name, once)

开始播放模型对象的骨骼动画

Name Type Description
name string

模型对象的骨骼动画name名称

once boolean

是否只执行一次动画,默认是循环执行

stopAction(name)

停止播放模型对象的骨骼动画

Name Type Description
name string

模型对象的骨骼动画name名称