@@ -21,9 +21,9 @@ const {
21
21
/**
22
22
* @class mapboxgl.supermap.ThreeLayer
23
23
* @category Visualization Three
24
- * @classdesc Three图层 。
24
+ * @classdesc Three 图层 。
25
25
* @param {string } id - 图层 ID。
26
- * @param {string } [renderer="gl"] - 图层渲染方式(canvas或WebGL )。取值:"gl","canvas"。
26
+ * @param {string } [renderer="gl"] - 图层渲染方式( canvas 或 WebGL )。取值:"gl","canvas"。
27
27
* @param {object } options - 初始化参数。
28
28
* @param {object } options.threeOptions - threejs 渲染器初始化参数对象。参数内容详见:
29
29
* [WebGLRenderer]{@link https://threejs.org/docs/index.html#api/renderers/WebGLRenderer}
@@ -49,8 +49,8 @@ const {
49
49
* }
50
50
*
51
51
* 叠加模型可以通过两种方式:</br>
52
- * 1.调用 threeLayer.toThreeMesh 直接将地理坐标转换成threejs 3D 模型(适用于挤压模型,如城市建筑),然后添加到3D场景
53
- * 2.使用 ThreeJS 的接口创建好 Mesh,然后调用 threeLayer.setPosition 设置地理位置,然后添加到3D场景
52
+ * 1.调用 threeLayer.toThreeMesh 直接将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑),然后添加到 3D 场景
53
+ * 2.使用 ThreeJS 的接口创建好 Mesh,然后调用 threeLayer.setPosition 设置地理位置,然后添加到 3D 场景
54
54
*
55
55
*/
56
56
export class ThreeLayer extends mapboxgl . Evented {
@@ -66,7 +66,7 @@ export class ThreeLayer extends mapboxgl.Evented {
66
66
67
67
/**
68
68
* @function mapboxgl.supermap.ThreeLayer.prototype.toThreeShape
69
- * @description 创建threejs shape 对象。
69
+ * @description 创建 threejs shape 对象。
70
70
* @param {Array } coordinates - 坐标点数组。
71
71
* @returns THREE.Shape{@link https://threejs.org/docs/index.html#api/extras/core/Shape} threejs shape 对象。
72
72
*/
@@ -86,7 +86,7 @@ export class ThreeLayer extends mapboxgl.Evented {
86
86
87
87
/**
88
88
* @function mapboxgl.supermap.ThreeLayer.prototype.toThreeMesh
89
- * @description 创建threejs Mesh 对象。将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑)。
89
+ * @description 创建 threejs Mesh 对象。将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑)。
90
90
* @param {Array.<Object> } coordinates - 坐标点数组。
91
91
* @param {number } amount - 高度。
92
92
* @param {THREE.Material } material - Threejs 材质对象。参考:[THREE.Material]{@link https://threejs.org/docs/index.html#api/extras/core/Material}
@@ -117,7 +117,7 @@ export class ThreeLayer extends mapboxgl.Evented {
117
117
118
118
/**
119
119
* @function mapboxgl.supermap.ThreeLayer.prototype.addObject
120
- * @description 设置threejs 3D对象的坐标 (经纬度)。
120
+ * @description 设置threejs 3D 对象的坐标 (经纬度)。
121
121
* @param {THREE.Object3D } object3D - threejs 3D 对象。参考:[THREE.Object3D]{@link https://threejs.org/docs/index.html#api/core/Object3D}及子类对象。
122
122
* @param {(Array.<number>|Object) } coordinate - 添加的 three 对象坐标(经纬度)。
123
123
* @returns {this } this
@@ -149,7 +149,7 @@ export class ThreeLayer extends mapboxgl.Evented {
149
149
150
150
/**
151
151
* @function mapboxgl.supermap.ThreeLayer.prototype.getThreeRenderer
152
- * @description 获取threejs renderer。
152
+ * @description 获取 threejs renderer。
153
153
* @returns {THREE.WebGLRenderer|THREE.CanvasRenderer } threejs renderer。参考:
154
154
* [THREE.WebGLRenderer]{@link https://threejs.org/docs/index.html#api/renderers/WebGLRenderer}/
155
155
* [THREE.CanvasRenderer]{@link https://threejs.org/docs/index.html#examples/renderers/CanvasRenderer }
@@ -197,7 +197,7 @@ export class ThreeLayer extends mapboxgl.Evented {
197
197
198
198
/**
199
199
* @function mapboxgl.supermap.ThreeLayer.prototype.clearAll
200
- * @description 清除所有threejs 对象。
200
+ * @description 清除所有 threejs 对象。
201
201
* @param {boolean } clearCamera - 是否同时清除相机。
202
202
* @returns {this } this 对象。
203
203
*/
@@ -220,7 +220,7 @@ export class ThreeLayer extends mapboxgl.Evented {
220
220
* @description 设置 threejs 3D 对象的坐标(经纬度)。
221
221
* @param {THREE.Object3D } object3D - threejs 3D 对象,参考:[THREE.Object3D]{@link https://threejs.org/docs/index.html#api/core/Object3D}及子类对象。
222
222
* @param {(Array.<number>|Object) } coordinate - 添加的 three 对象坐标(经纬度)。
223
- * @returns {this } this对象 。
223
+ * @returns {this } this 对象 。
224
224
*/
225
225
setPosition ( object3D , coordinate ) {
226
226
if ( ! object3D || ! coordinate ) {
@@ -235,7 +235,7 @@ export class ThreeLayer extends mapboxgl.Evented {
235
235
236
236
/**
237
237
* @function mapboxgl.supermap.ThreeLayer.prototype.lngLatToPosition
238
- * @description 经纬度转threejs 3D失量对象 。
238
+ * @description 经纬度转threejs 3D 失量对象 。
239
239
* @param {(Array.<number>|Object) } lngLat - 经纬度坐标。
240
240
* @returns {THREE.Vector3 } threejs 3D 失量对象。参考:[THREE.Vector3]{@link https://threejs.org/docs/index.html#api/math/Vector3}
241
241
*/
@@ -318,7 +318,7 @@ export class ThreeLayer extends mapboxgl.Evented {
318
318
* @function mapboxgl.supermap.ThreeLayer.prototype.addTo
319
319
* @description 添加图层到地图。
320
320
* @param {Object } map - 地图对象。
321
- * @returns {this } this对象 。
321
+ * @returns {this } this 对象 。
322
322
*/
323
323
addTo ( map ) {
324
324
var me = this ;
@@ -339,7 +339,7 @@ export class ThreeLayer extends mapboxgl.Evented {
339
339
/**
340
340
* @function mapboxgl.supermap.ThreeLayer.prototype.getCanvasContainer
341
341
* @description 获取 three 图层容器。
342
- * @returns {HTMLElement } three图层的容器 。
342
+ * @returns {HTMLElement } three 图层的容器 。
343
343
*/
344
344
getCanvasContainer ( ) {
345
345
return this . renderer . getCanvasContainer ( ) ;
@@ -412,7 +412,7 @@ export class ThreeLayer extends mapboxgl.Evented {
412
412
413
413
_update ( ) {
414
414
/**
415
- * render事件 ,地图渲染时(地图状态改变时)触发。
415
+ * render 事件 ,地图渲染时(地图状态改变时)触发。
416
416
* @event mapboxgl.supermap.ThreeLayer#render
417
417
* @type {Object }
418
418
* @property {string } type - render
0 commit comments