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"。
|
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会基于模型重新计算 |