ObjectSymbol3DLayer Class

ObjectSymbol3DLayer(typeopt, anchoropt, anchorPositionopt, castShadowsopt, depthopt, headingopt, heightopt, materialopt, resourceopt, rollopt, tiltopt, widthopt)

三维对象图层

Fx构造函数

# new ObjectSymbol3DLayer(typeopt, anchoropt, anchorPositionopt, castShadowsopt, depthopt, headingopt, heightopt, materialopt, resourceopt, rollopt, tiltopt, widthopt)

三维对象图层

参数:
名称 类型 属性 默认值 描述
type String <optional>

类型,只能是'object'

anchor Anchor <optional>
'origin'

锚点,可选值"center"|"top"|"bottom"|"origin"|"relative"。

  1. 当图元为球,立方,菱形时,origin在中心位置;
  2. 当图元为圆柱、锥、四面体时,origin在底部;
  3. 当图元为href时,origin为模型的原点;
  4. 如果anchor设置为relative,通过anchorPosition辅助外包盒
anchorPosition Object <optional>

锚点偏移位置 {x:0,y:0,z:0}

castShadows Object <optional>
true

阴影,默认激活

depth Number <optional>
10

深度或者南北直径,传undefined会基于模型重新计算

heading Number <optional>

偏航角,Z轴旋转角度

height Number <optional>
10

高度,传undefined会基于模型重新计算

material Object <optional>

材质

color String <optional>
'rgb(255,255,255)'

材质-颜色,默认白色

resource Object <optional>
{ primitive: "sphere" }

资源,默认{ primitive: "sphere" }

primitive Object <optional>
"sphere"

资源-图元,使用内置的形状'sphere', 'cylinder', 'cube','cone', 'inverted-cone','diamond', 'tetrahedron'

href String <optional>

资源-引用,引用GLTF的路径URL/URI

roll Number <optional>

滚转角,Y轴旋转角度

tilt Number <optional>

倾斜角,X轴旋转角度,对应pitch

width Number <optional>
10

宽度或者东西直径,传undefined会基于模型重新计算

作者:
  • 基础平台-潘卓然

查看源代码 service/base/symbols/ObjectSymbol3DLayer.js, line 7