Class: FMDynamicModel

FMDynamicModel

FMDynamicModelMarker 模型对象, 是一种动态对象。属于fengmap.map.min.js

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缩放比例

tilt number

DynamicModel倾斜角

heading number

DynamicModel旋转角度

fadeIn boolean

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

fadeOut boolean

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

callback function

model完成动画后的回调函数

Members

readonlybound

Properties:
Name Type Description
bound fengmap.FMBound

边界

color

Properties:
Name Type Description
color

颜色

Deprecated
  • 3.1.0版本及以后版本将不可用
    See:
    • modifyModelColor getModelColor

    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

    显示比例

    readonlytilt

    Properties:
    Name Type Description
    tilt 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
    *

    getModelColor(name){string}

    获取修改后的颜色值

    Name Type Description
    name string

    节点名称

    Returns:
    Type Description
    string 颜色值

    modifyModelColor(color, name)

    修改指定节点颜色

    Name Type Description
    color string

    颜色值

    name string

    节点名称

    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名称

    inherited traverse(callback)

    遍历返回子节点

    Name Type Description
    callback