Constructor
new Model(viewer)
- Description:
构造函数
- Source:
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Object | 地图场景对象 |
Methods
(async) add3DTiles(url, heightopt) → {Promise.<Primitive>}
- Description:
加载3Dtiles模型
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
String | 模型地址 |
||
height |
Number |
<optional> |
0
|
可选:高度偏差,正数为向上偏,负数为向下偏,根据真实的模型位置不断进行调整 |
Returns:
模型对象,Primitive类对象,参考Cesium
- Type
- Promise.<Primitive>
(async) add3DTilesOnPos(url, position) → {Promise.<Primitive>}
- Description:
加载3Dtiles模型到指定位置
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | 模型地址 |
position |
DegreePosZ | 设置模型位置,WGS84经纬度格式 |
Returns:
模型对象,Primitive类对象,参考Cesium
- Type
- Promise.<Primitive>
addGltf(url, position, options) → {Entity}
- Description:
加载gltf/glb模型
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | GLTF/GLB模型地址URL |
position |
Cartesian3 | 加载位置坐标,笛卡尔坐标 |
options |
GltfOption | 模型参数设置 |
Returns:
加载后的模型对象,Entity类对象,参考Cesium
- Type
- Entity
update3DTiles(model, position) → {Primitive}
- Description:
调整模型位置
- Source:
Parameters:
Name | Type | Description |
---|---|---|
model |
Primitive | 待调整模型对象 |
position |
DegreePosZ | 设置模型位置,WGS84经纬度格式 |
Returns:
模型对象,Primitive类对象,参考Cesium
- Type
- Primitive