@openglobus/og 0.12.4 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/@openglobus/og.esm.js +2 -2
- package/dist/@openglobus/og.esm.js.map +1 -1
- package/dist/@openglobus/og.umd.js +2 -2
- package/dist/@openglobus/og.umd.js.map +1 -1
- package/package.json +7 -7
- package/src/og/Extent.js +3 -3
- package/src/og/Globe.js +277 -275
- package/src/og/ImageCanvas.js +3 -3
- package/src/og/LonLat.js +9 -9
- package/src/og/QueueArray.js +2 -2
- package/src/og/Rectangle.js +5 -5
- package/src/og/bv/Box.js +1 -1
- package/src/og/bv/Sphere.js +2 -2
- package/src/og/camera/Camera.js +1 -1
- package/src/og/camera/PlanetCamera.js +649 -646
- package/src/og/control/LayerSwitcher.js +1 -1
- package/src/og/control/MouseNavigation.js +22 -13
- package/src/og/control/MouseWheelZoomControl.js +2 -2
- package/src/og/control/ScaleControl.js +1 -1
- package/src/og/control/TouchNavigation.js +319 -319
- package/src/og/control/ZoomControl.js +132 -132
- package/src/og/control/visibleExtent/Segment.js +12 -12
- package/src/og/ellipsoid/Ellipsoid.js +577 -567
- package/src/og/entity/BillboardHandler.js +878 -1051
- package/src/og/entity/Entity.js +1 -1
- package/src/og/entity/EntityCollection.js +847 -857
- package/src/og/entity/GeoObjectHandler.js +2 -2
- package/src/og/entity/LabelHandler.js +887 -1040
- package/src/og/entity/LabelWorker.js +0 -6
- package/src/og/entity/PointCloud.js +495 -495
- package/src/og/entity/Polyline.js +2218 -2222
- package/src/og/entity/RayHandler.js +1 -1
- package/src/og/layer/CanvasTiles.js +6 -3
- package/src/og/layer/GeoImage.js +1 -1
- package/src/og/layer/KML.js +5 -5
- package/src/og/layer/Layer.js +800 -752
- package/src/og/layer/Vector.js +997 -1010
- package/src/og/layer/XYZ.js +359 -357
- package/src/og/math/Line2.js +4 -4
- package/src/og/math/Quat.js +2 -2
- package/src/og/math/Ray.js +2 -2
- package/src/og/math/Vec2.js +524 -524
- package/src/og/math/Vec3.js +900 -900
- package/src/og/math/Vec4.js +261 -261
- package/src/og/math.js +397 -398
- package/src/og/quadTree/EntityCollectionNode.js +389 -387
- package/src/og/renderer/Renderer.js +14 -20
- package/src/og/renderer/RendererEvents.js +1034 -1045
- package/src/og/scene/Planet.js +12 -9
- package/src/og/scene/RenderNode.js +347 -354
- package/src/og/segment/Segment.js +3 -1
- package/src/og/segment/SegmentLonLat.js +1 -4
- package/src/og/shaders/billboard.js +220 -204
- package/src/og/shaders/drawnode.js +607 -603
- package/src/og/shaders/label.js +576 -456
- package/src/og/shaders/polyline.js +365 -361
- package/src/og/terrain/MapboxTerrain.js +1 -1
- package/src/og/utils/FontAtlas.js +209 -200
- package/src/og/utils/GeoImageCreator.js +4 -5
- package/src/og/utils/TextureAtlas.js +4 -4
- package/src/og/utils/VectorTileCreator.js +414 -414
- package/src/og/utils/shared.js +1 -1
- package/src/og/webgl/Handler.js +28 -60
- package/src/og/webgl/Multisample.js +260 -260
- package/src/og/webgl/Program.js +411 -396
- package/types/bv/Box.d.ts +1 -1
- package/types/bv/Sphere.d.ts +1 -1
- package/types/camera/PlanetCamera.d.ts +3 -3
- package/types/control/LayerSwitcher.d.ts +1 -1
- package/types/ellipsoid/Ellipsoid.d.ts +9 -2
- package/types/entity/BillboardHandler.d.ts +0 -4
- package/types/entity/EntityCollection.d.ts +0 -8
- package/types/entity/LabelHandler.d.ts +0 -2
- package/types/entity/Polyline.d.ts +1 -1
- package/types/layer/KML.d.ts +11 -11
- package/types/layer/Layer.d.ts +4 -0
- package/types/layer/Vector.d.ts +1 -8
- package/types/math/Line2.d.ts +4 -4
- package/types/math/Ray.d.ts +2 -2
- package/types/math/Vec2.d.ts +1 -1
- package/types/math/Vec3.d.ts +1 -1
- package/types/math/Vec4.d.ts +2 -2
- package/types/math.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +1 -1
- package/types/renderer/RendererEvents.d.ts +1 -1
- package/types/shaders/label.d.ts +1 -1
- package/types/utils/FontAtlas.d.ts +3 -2
- package/types/utils/TextureAtlas.d.ts +3 -3
- package/types/utils/VectorTileCreator.d.ts +4 -4
- package/types/utils/shared.d.ts +1 -1
- package/types/webgl/Handler.d.ts +6 -31
- package/types/webgl/Program.d.ts +2 -0
|
@@ -1,859 +1,849 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module og/entity/EntityCollection
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
|
|
7
|
-
import * as math from "../math.js";
|
|
8
|
-
import { BillboardHandler } from "./BillboardHandler.js";
|
|
9
|
-
import { Events } from "../Events.js";
|
|
10
|
-
import { LabelHandler } from "./LabelHandler.js";
|
|
11
|
-
import { PolylineHandler } from "./PolylineHandler.js";
|
|
12
|
-
import { RayHandler } from "./RayHandler.js";
|
|
13
|
-
import { PointCloudHandler } from "./PointCloudHandler.js";
|
|
14
|
-
import { StripHandler } from "./StripHandler.js";
|
|
15
|
-
import { ShapeHandler } from "./ShapeHandler.js";
|
|
16
|
-
import { GeoObjectHandler } from "./GeoObjectHandler.js";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
20
|
-
* Entity collection provide handlers for an each type of entity like billboard, label or 3ds object.
|
|
21
|
-
* @constructor
|
|
22
|
-
* @param {Object} [options] - Entity options:
|
|
23
|
-
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
24
|
-
* @param {boolean} [options.visibility=true] - Entity visibility.
|
|
25
|
-
* @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
|
|
26
|
-
* First index - near distance to the entity, after entity becomes full scale.
|
|
27
|
-
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
28
|
-
* Third index - far distance to the entity, when entity becomes invisible.
|
|
29
|
-
* @param {number} [options.opacity] - Entity global opacity.
|
|
30
|
-
* @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
|
|
31
|
-
* @param {Number} [options.
|
|
32
|
-
* @
|
|
33
|
-
* @fires og.EntityCollection#
|
|
34
|
-
* @fires og.EntityCollection#
|
|
35
|
-
* @fires og.EntityCollection#
|
|
36
|
-
* @fires og.EntityCollection#
|
|
37
|
-
* @fires og.EntityCollection#
|
|
38
|
-
* @fires og.EntityCollection#
|
|
39
|
-
* @fires og.EntityCollection#
|
|
40
|
-
* @fires og.EntityCollection#
|
|
41
|
-
* @fires og.EntityCollection#
|
|
42
|
-
* @fires og.EntityCollection#
|
|
43
|
-
* @fires og.EntityCollection#
|
|
44
|
-
* @fires og.EntityCollection#
|
|
45
|
-
* @fires og.EntityCollection#
|
|
46
|
-
* @fires og.EntityCollection#
|
|
47
|
-
* @fires og.EntityCollection#
|
|
48
|
-
* @fires og.EntityCollection#
|
|
49
|
-
* @fires og.EntityCollection#
|
|
50
|
-
* @fires og.EntityCollection#
|
|
51
|
-
* @fires og.EntityCollection#
|
|
52
|
-
* @fires og.EntityCollection#
|
|
53
|
-
* @fires og.EntityCollection#
|
|
54
|
-
* @fires og.EntityCollection#
|
|
55
|
-
* @fires og.EntityCollection#
|
|
56
|
-
* @fires og.EntityCollection#
|
|
57
|
-
* @fires og.EntityCollection#
|
|
58
|
-
* @fires og.EntityCollection#
|
|
59
|
-
* @fires og.EntityCollection#
|
|
60
|
-
* @fires og.EntityCollection#
|
|
61
|
-
* @fires og.EntityCollection#
|
|
62
|
-
* @fires og.EntityCollection#
|
|
63
|
-
* @fires og.EntityCollection#
|
|
64
|
-
* @fires og.EntityCollection#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
* @
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
* @
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
* @
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
* @
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
* @
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
*
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
*
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*
|
|
177
|
-
* @
|
|
178
|
-
* @type {Array.<
|
|
179
|
-
*/
|
|
180
|
-
this.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*
|
|
186
|
-
* @
|
|
187
|
-
* @type {
|
|
188
|
-
*/
|
|
189
|
-
this.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
*
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
this.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
this.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
this.
|
|
235
|
-
this.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
* @
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
*
|
|
251
|
-
* @
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*
|
|
260
|
-
* @
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
this.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
this.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
*
|
|
285
|
-
* @
|
|
286
|
-
* @
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
entity
|
|
349
|
-
entity.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
*
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
return
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
entity.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
*
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
this.
|
|
517
|
-
this.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
*
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
b[i].setSrc(b[i]._src);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Updates labels font atlas.
|
|
559
|
-
* @public
|
|
560
|
-
*/
|
|
561
|
-
updateLabelsFontAtlas() {
|
|
562
|
-
if (this.renderNode) {
|
|
1
|
+
/**
|
|
2
|
+
* @module og/entity/EntityCollection
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
import * as math from "../math.js";
|
|
8
|
+
import { BillboardHandler } from "./BillboardHandler.js";
|
|
9
|
+
import { Events } from "../Events.js";
|
|
10
|
+
import { LabelHandler } from "./LabelHandler.js";
|
|
11
|
+
import { PolylineHandler } from "./PolylineHandler.js";
|
|
12
|
+
import { RayHandler } from "./RayHandler.js";
|
|
13
|
+
import { PointCloudHandler } from "./PointCloudHandler.js";
|
|
14
|
+
import { StripHandler } from "./StripHandler.js";
|
|
15
|
+
import { ShapeHandler } from "./ShapeHandler.js";
|
|
16
|
+
import { GeoObjectHandler } from "./GeoObjectHandler.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
20
|
+
* Entity collection provide handlers for an each type of entity like billboard, label or 3ds object.
|
|
21
|
+
* @constructor
|
|
22
|
+
* @param {Object} [options] - Entity options:
|
|
23
|
+
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
24
|
+
* @param {boolean} [options.visibility=true] - Entity visibility.
|
|
25
|
+
* @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
|
|
26
|
+
* First index - near distance to the entity, after entity becomes full scale.
|
|
27
|
+
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
28
|
+
* Third index - far distance to the entity, when entity becomes invisible.
|
|
29
|
+
* @param {number} [options.opacity] - Entity global opacity.
|
|
30
|
+
* @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
|
|
31
|
+
* @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
|
|
32
|
+
* @fires og.EntityCollection#entitymove
|
|
33
|
+
* @fires og.EntityCollection#draw
|
|
34
|
+
* @fires og.EntityCollection#drawend
|
|
35
|
+
* @fires og.EntityCollection#add
|
|
36
|
+
* @fires og.EntityCollection#remove
|
|
37
|
+
* @fires og.EntityCollection#entityadd
|
|
38
|
+
* @fires og.EntityCollection#entityremove
|
|
39
|
+
* @fires og.EntityCollection#visibilitychange
|
|
40
|
+
* @fires og.EntityCollection#mousemove
|
|
41
|
+
* @fires og.EntityCollection#mouseenter
|
|
42
|
+
* @fires og.EntityCollection#mouseleave
|
|
43
|
+
* @fires og.EntityCollection#lclick
|
|
44
|
+
* @fires og.EntityCollection#rclick
|
|
45
|
+
* @fires og.EntityCollection#mclick
|
|
46
|
+
* @fires og.EntityCollection#ldblclick
|
|
47
|
+
* @fires og.EntityCollection#rdblclick
|
|
48
|
+
* @fires og.EntityCollection#mdblclick
|
|
49
|
+
* @fires og.EntityCollection#lup
|
|
50
|
+
* @fires og.EntityCollection#rup
|
|
51
|
+
* @fires og.EntityCollection#mup
|
|
52
|
+
* @fires og.EntityCollection#ldown
|
|
53
|
+
* @fires og.EntityCollection#rdown
|
|
54
|
+
* @fires og.EntityCollection#mdown
|
|
55
|
+
* @fires og.EntityCollection#lhold
|
|
56
|
+
* @fires og.EntityCollection#rhold
|
|
57
|
+
* @fires og.EntityCollection#mhold
|
|
58
|
+
* @fires og.EntityCollection#mousewheel
|
|
59
|
+
* @fires og.EntityCollection#touchmove
|
|
60
|
+
* @fires og.EntityCollection#touchstart
|
|
61
|
+
* @fires og.EntityCollection#touchend
|
|
62
|
+
* @fires og.EntityCollection#doubletouch
|
|
63
|
+
* @fires og.EntityCollection#touchleave
|
|
64
|
+
* @fires og.EntityCollection#touchenter
|
|
65
|
+
*/
|
|
66
|
+
class EntityCollection {
|
|
67
|
+
constructor(options) {
|
|
68
|
+
options = options || {};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Unic identifier.
|
|
72
|
+
* @public
|
|
73
|
+
* @readonly
|
|
74
|
+
*/
|
|
75
|
+
this.id = EntityCollection._staticCounter++;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Render node collections array index.
|
|
79
|
+
* @protected
|
|
80
|
+
* @type {number}
|
|
81
|
+
*/
|
|
82
|
+
this._renderNodeIndex = -1;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Render node context.
|
|
86
|
+
* @public
|
|
87
|
+
* @type {RenderNode}
|
|
88
|
+
*/
|
|
89
|
+
this.renderNode = null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Visibility option.
|
|
93
|
+
* @protected
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
*/
|
|
96
|
+
this._visibility = options.visibility == undefined ? true : options.visibility;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
100
|
+
* @public
|
|
101
|
+
* @type {Number}
|
|
102
|
+
*/
|
|
103
|
+
this.polygonOffsetUnits =
|
|
104
|
+
options.polygonOffsetUnits != undefined ? options.polygonOffsetUnits : 0.0;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Billboards handler
|
|
108
|
+
* @public
|
|
109
|
+
* @type {BillboardHandler}
|
|
110
|
+
*/
|
|
111
|
+
this.billboardHandler = new BillboardHandler(this);
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Labels handler
|
|
115
|
+
* @public
|
|
116
|
+
* @type {LabelHandler}
|
|
117
|
+
*/
|
|
118
|
+
this.labelHandler = new LabelHandler(this, options.labelMaxLetters);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Shape handler
|
|
122
|
+
* @public
|
|
123
|
+
* @type {ShapeHandler}
|
|
124
|
+
*/
|
|
125
|
+
this.shapeHandler = new ShapeHandler(this);
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Polyline handler
|
|
129
|
+
* @public
|
|
130
|
+
* @type {PolylineHandler}
|
|
131
|
+
*/
|
|
132
|
+
this.polylineHandler = new PolylineHandler(this);
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Ray handler
|
|
136
|
+
* @public
|
|
137
|
+
* @type {RayHandler}
|
|
138
|
+
*/
|
|
139
|
+
this.rayHandler = new RayHandler(this);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* PointCloud handler
|
|
143
|
+
* @public
|
|
144
|
+
* @type {PointCloudHandler}
|
|
145
|
+
*/
|
|
146
|
+
this.pointCloudHandler = new PointCloudHandler(this);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Strip handler
|
|
150
|
+
* @public
|
|
151
|
+
* @type {StripHandler}
|
|
152
|
+
*/
|
|
153
|
+
this.stripHandler = new StripHandler(this);
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Geo object handler
|
|
157
|
+
* @public
|
|
158
|
+
* @type {og.GeoObjectHandler}
|
|
159
|
+
*/
|
|
160
|
+
this.geoObjectHandler = new GeoObjectHandler(this);
|
|
161
|
+
|
|
162
|
+
if (options.pickingEnabled != undefined) {
|
|
163
|
+
this.setPickingEnabled(options.pickingEnabled);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Entities array.
|
|
168
|
+
* @protected
|
|
169
|
+
* @type {Array.<Entity>}
|
|
170
|
+
*/
|
|
171
|
+
this._entities = [];
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* First index - near distance to the entity, after entity becomes full scale.
|
|
175
|
+
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
176
|
+
* Third index - far distance to the entity, when entity becomes invisible.
|
|
177
|
+
* @public
|
|
178
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
179
|
+
*/
|
|
180
|
+
this.scaleByDistance = options.scaleByDistance || [math.MAX32, math.MAX32, math.MAX32];
|
|
181
|
+
|
|
182
|
+
this.pickingScale = options.pickingScale || 1.0;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Global opacity.
|
|
186
|
+
* @protected
|
|
187
|
+
* @type {number}
|
|
188
|
+
*/
|
|
189
|
+
this._opacity = options.opacity == undefined ? 1.0 : options.opacity;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Opacity state during the animated opacity.
|
|
193
|
+
* @protected
|
|
194
|
+
* @type {number}
|
|
195
|
+
*/
|
|
196
|
+
this._fadingOpacity = this._opacity;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Entity collection events handler.
|
|
200
|
+
* @public
|
|
201
|
+
* @type {Events}
|
|
202
|
+
*/
|
|
203
|
+
this.events = new Events(EVENT_NAMES, this);
|
|
204
|
+
|
|
205
|
+
this.rendererEvents = this.events;
|
|
206
|
+
|
|
207
|
+
// initialize current entities
|
|
208
|
+
if (options.entities) {
|
|
209
|
+
this.addEntities(options.entities);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
static get _staticCounter() {
|
|
214
|
+
if (!this._counter && this._counter !== 0) {
|
|
215
|
+
this._counter = 0;
|
|
216
|
+
}
|
|
217
|
+
return this._counter;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
static set _staticCounter(n) {
|
|
221
|
+
this._counter = n;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// setPolygonOffset(factor, units) {
|
|
225
|
+
// this.polygonOffsetUnits = units;
|
|
226
|
+
// }
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Sets collection visibility.
|
|
230
|
+
* @public
|
|
231
|
+
* @param {boolean} visibility - Visibility flag.
|
|
232
|
+
*/
|
|
233
|
+
setVisibility(visibility) {
|
|
234
|
+
this._visibility = visibility;
|
|
235
|
+
this._fadingOpacity = this._opacity * (visibility ? 1 : 0);
|
|
236
|
+
this.events.dispatch(this.events.visibilitychange, this);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Returns collection visibility.
|
|
241
|
+
* @public
|
|
242
|
+
* @returns {boolean} -
|
|
243
|
+
*/
|
|
244
|
+
getVisibility() {
|
|
245
|
+
return this._visibility;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Sets collection opacity.
|
|
250
|
+
* @public
|
|
251
|
+
* @param {number} opacity - Opacity.
|
|
252
|
+
*/
|
|
253
|
+
setOpacity(opacity) {
|
|
254
|
+
this._opacity = opacity;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Sets collection picking ability.
|
|
259
|
+
* @public
|
|
260
|
+
* @param {boolean} enable - Picking enable flag.
|
|
261
|
+
*/
|
|
262
|
+
setPickingEnabled(enable) {
|
|
263
|
+
this.billboardHandler.pickingEnabled = enable;
|
|
264
|
+
this.labelHandler.pickingEnabled = enable;
|
|
265
|
+
this.polylineHandler.pickingEnabled = enable;
|
|
266
|
+
this.rayHandler.pickingEnabled = enable;
|
|
267
|
+
this.shapeHandler.pickingEnabled = enable;
|
|
268
|
+
this.pointCloudHandler.pickingEnabled = enable;
|
|
269
|
+
this.stripHandler.pickingEnabled = enable;
|
|
270
|
+
this.geoObjectHandler.pickingEnabled = enable;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Gets collection opacity.
|
|
275
|
+
* @public
|
|
276
|
+
* @returns {number} -
|
|
277
|
+
*/
|
|
278
|
+
getOpacity() {
|
|
279
|
+
return this._opacity;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Sets scale by distance parameters.
|
|
284
|
+
* @public
|
|
285
|
+
* @param {number} near - Full scale entity distance.
|
|
286
|
+
* @param {number} far - Zerol scale entity distance.
|
|
287
|
+
* @param {number} [farInvisible] - Entity visibility distance.
|
|
288
|
+
*/
|
|
289
|
+
setScaleByDistance(near, far, farInvisible) {
|
|
290
|
+
this.scaleByDistance[0] = near;
|
|
291
|
+
this.scaleByDistance[1] = far;
|
|
292
|
+
this.scaleByDistance[2] = farInvisible || math.MAX32;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
_addRecursively(entity) {
|
|
296
|
+
// billboard
|
|
297
|
+
entity.billboard && this.billboardHandler.add(entity.billboard);
|
|
298
|
+
|
|
299
|
+
// label
|
|
300
|
+
entity.label && this.labelHandler.add(entity.label);
|
|
301
|
+
|
|
302
|
+
// shape
|
|
303
|
+
entity.shape && this.shapeHandler.add(entity.shape);
|
|
304
|
+
|
|
305
|
+
// polyline
|
|
306
|
+
entity.polyline && this.polylineHandler.add(entity.polyline);
|
|
307
|
+
|
|
308
|
+
// ray
|
|
309
|
+
entity.ray && this.rayHandler.add(entity.ray);
|
|
310
|
+
|
|
311
|
+
// pointCloud
|
|
312
|
+
entity.pointCloud && this.pointCloudHandler.add(entity.pointCloud);
|
|
313
|
+
|
|
314
|
+
// strip
|
|
315
|
+
entity.strip && this.stripHandler.add(entity.strip);
|
|
316
|
+
|
|
317
|
+
//geoObject
|
|
318
|
+
entity.geoObject && this.geoObjectHandler.add(entity.geoObject);
|
|
319
|
+
|
|
320
|
+
this.events.dispatch(this.events.entityadd, entity);
|
|
321
|
+
|
|
322
|
+
for (var i = 0; i < entity.childrenNodes.length; i++) {
|
|
323
|
+
entity.childrenNodes[i]._entityCollection = this;
|
|
324
|
+
entity.childrenNodes[i]._entityCollectionIndex = entity._entityCollectionIndex;
|
|
325
|
+
entity.childrenNodes[i]._pickingColor = entity._pickingColor;
|
|
326
|
+
this._addRecursively(entity.childrenNodes[i]);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Adds entity to the collection and returns collection.
|
|
332
|
+
* @public
|
|
333
|
+
* @param {Entity} entity - Entity.
|
|
334
|
+
* @returns {EntityCollection} -
|
|
335
|
+
*/
|
|
336
|
+
add(entity) {
|
|
337
|
+
if (!entity._entityCollection) {
|
|
338
|
+
entity._entityCollection = this;
|
|
339
|
+
entity._entityCollectionIndex = this._entities.length;
|
|
340
|
+
this._entities.push(entity);
|
|
341
|
+
var rn = this.renderNode;
|
|
342
|
+
if (rn) {
|
|
343
|
+
rn.renderer && rn.renderer.assignPickingColor(entity);
|
|
344
|
+
if (rn.ellipsoid && entity._cartesian.isZero()) {
|
|
345
|
+
entity.setCartesian3v(rn.ellipsoid.lonLatToCartesian(entity._lonlat));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
this._addRecursively(entity);
|
|
349
|
+
entity.setPickingColor();
|
|
350
|
+
}
|
|
351
|
+
return this;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Adds entities array to the collection and returns collection.
|
|
356
|
+
* @public
|
|
357
|
+
* @param {Array.<Entity>} entities - Entities array.
|
|
358
|
+
* @returns {EntityCollection} -
|
|
359
|
+
*/
|
|
360
|
+
addEntities(entities) {
|
|
361
|
+
for (let i = 0, len = entities.length; i < len; i++) {
|
|
362
|
+
this.add(entities[i]);
|
|
363
|
+
}
|
|
364
|
+
return this;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Returns true if the entity belongs this collection, otherwise returns false.
|
|
369
|
+
* @public
|
|
370
|
+
* @param {Entity} entity - Entity.
|
|
371
|
+
* @returns {boolean} -
|
|
372
|
+
*/
|
|
373
|
+
belongs(entity) {
|
|
374
|
+
return (
|
|
375
|
+
entity._entityCollection &&
|
|
376
|
+
this._renderNodeIndex === entity._entityCollection._renderNodeIndex
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
_removeRecursively(entity) {
|
|
381
|
+
entity._entityCollection = null;
|
|
382
|
+
entity._entityCollectionIndex = -1;
|
|
383
|
+
|
|
384
|
+
// billboard
|
|
385
|
+
entity.billboard && this.billboardHandler.remove(entity.billboard);
|
|
386
|
+
|
|
387
|
+
// label
|
|
388
|
+
entity.label && this.labelHandler.remove(entity.label);
|
|
389
|
+
|
|
390
|
+
// shape
|
|
391
|
+
entity.shape && this.shapeHandler.remove(entity.shape);
|
|
392
|
+
|
|
393
|
+
// polyline
|
|
394
|
+
entity.polyline && this.polylineHandler.remove(entity.polyline);
|
|
395
|
+
|
|
396
|
+
// ray
|
|
397
|
+
entity.ray && this.rayHandler.remove(entity.ray);
|
|
398
|
+
|
|
399
|
+
// pointCloud
|
|
400
|
+
entity.pointCloud && this.pointCloudHandler.remove(entity.pointCloud);
|
|
401
|
+
|
|
402
|
+
// strip
|
|
403
|
+
entity.strip && this.stripHandler.remove(entity.strip);
|
|
404
|
+
|
|
405
|
+
// geoObject
|
|
406
|
+
entity.geoObject && this.geoObjectHandler.remove(entity.geoObject);
|
|
407
|
+
|
|
408
|
+
for (var i = 0; i < entity.childrenNodes.length; i++) {
|
|
409
|
+
this._removeRecursively(entity.childrenNodes[i]);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Removes entity from this collection.
|
|
415
|
+
* @public
|
|
416
|
+
* @param {Entity} entity - Entity to remove.
|
|
417
|
+
*/
|
|
418
|
+
removeEntity(entity) {
|
|
419
|
+
this._entities.splice(entity._entityCollectionIndex, 1);
|
|
420
|
+
this.reindexEntitiesArray(entity._entityCollectionIndex);
|
|
421
|
+
|
|
422
|
+
// clear picking color
|
|
423
|
+
if (this.renderNode && this.renderNode.renderer) {
|
|
424
|
+
this.renderNode.renderer.clearPickingColor(entity);
|
|
425
|
+
entity._pickingColor.clear();
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (this.belongs(entity)) {
|
|
429
|
+
this._removeRecursively(entity);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
this.events.dispatch(this.events.entityremove, entity);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
_removeEntitySilent(entity) {
|
|
436
|
+
this._entities.splice(entity._entityCollectionIndex, 1);
|
|
437
|
+
this.reindexEntitiesArray(entity._entityCollectionIndex);
|
|
438
|
+
|
|
439
|
+
// clear picking color
|
|
440
|
+
if (this.renderNode && this.renderNode.renderer) {
|
|
441
|
+
this.renderNode.renderer.clearPickingColor(entity);
|
|
442
|
+
entity._pickingColor.clear();
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if (this.belongs(entity)) {
|
|
446
|
+
this._removeRecursively(entity);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Creates or refresh collected entities picking color.
|
|
452
|
+
* @public
|
|
453
|
+
*/
|
|
454
|
+
createPickingColors() {
|
|
455
|
+
var e = this._entities;
|
|
456
|
+
for (var i = 0; i < e.length; i++) {
|
|
457
|
+
if (!e[i].parent) {
|
|
458
|
+
this.renderNode.renderer.assignPickingColor(e[i]);
|
|
459
|
+
e[i].setPickingColor();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Refresh collected entities indexes from startIndex entitytes collection array position.
|
|
466
|
+
* @public
|
|
467
|
+
* @param {number} startIndex - Entities collection array index.
|
|
468
|
+
*/
|
|
469
|
+
reindexEntitiesArray(startIndex) {
|
|
470
|
+
var e = this._entities;
|
|
471
|
+
for (var i = startIndex; i < e.length; i++) {
|
|
472
|
+
e[i]._entityCollectionIndex = i;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Adds this collection to render node.
|
|
478
|
+
* @public
|
|
479
|
+
* @param {RenderNode} renderNode - Render node.
|
|
480
|
+
* @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
|
|
481
|
+
* @returns {EntityCollection} -
|
|
482
|
+
*/
|
|
483
|
+
addTo(renderNode, isHidden) {
|
|
484
|
+
if (!this.renderNode) {
|
|
485
|
+
this.renderNode = renderNode;
|
|
486
|
+
if (!isHidden) {
|
|
487
|
+
this._renderNodeIndex = renderNode.entityCollections.length;
|
|
488
|
+
renderNode.entityCollections.push(this);
|
|
489
|
+
}
|
|
490
|
+
renderNode.ellipsoid && this._updateGeodeticCoordinates(renderNode.ellipsoid);
|
|
491
|
+
|
|
492
|
+
this.bindRenderNode(renderNode);
|
|
493
|
+
|
|
494
|
+
this.events.dispatch(this.events.add, this);
|
|
495
|
+
}
|
|
496
|
+
return this;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* This function is called in the RenderNode assign function.
|
|
501
|
+
* @param {RenderNode} renderNode
|
|
502
|
+
*/
|
|
503
|
+
bindRenderNode(renderNode) {
|
|
504
|
+
if (renderNode.renderer) {
|
|
505
|
+
this.billboardHandler.setRenderer(renderNode.renderer);
|
|
506
|
+
this.labelHandler.setRenderer(renderNode.renderer);
|
|
507
|
+
this.rayHandler.setRenderer(renderNode.renderer);
|
|
508
|
+
|
|
509
|
+
this.geoObjectHandler.setRenderNode(renderNode);
|
|
510
|
+
|
|
511
|
+
this.shapeHandler.setRenderNode(renderNode);
|
|
512
|
+
this.polylineHandler.setRenderNode(renderNode);
|
|
513
|
+
this.pointCloudHandler.setRenderNode(renderNode);
|
|
514
|
+
this.stripHandler.setRenderNode(renderNode);
|
|
515
|
+
|
|
516
|
+
this.updateBillboardsTextureAtlas();
|
|
517
|
+
this.updateLabelsFontAtlas();
|
|
518
|
+
this.createPickingColors();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
|
|
524
|
+
* @private
|
|
525
|
+
* @param {Ellipsoid} ellipsoid - Globe ellipsoid.
|
|
526
|
+
*/
|
|
527
|
+
_updateGeodeticCoordinates(ellipsoid) {
|
|
528
|
+
var e = this._entities;
|
|
529
|
+
var i = e.length;
|
|
530
|
+
while (i--) {
|
|
531
|
+
var ei = e[i];
|
|
532
|
+
ei._lonlat && ei.setCartesian3v(ellipsoid.lonLatToCartesian(ei._lonlat));
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Updates billboard texture atlas.
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
updateBillboardsTextureAtlas() {
|
|
541
|
+
var b = this.billboardHandler._billboards;
|
|
542
|
+
for (var i = 0; i < b.length; i++) {
|
|
543
|
+
b[i].setSrc(b[i]._src);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Updates labels font atlas.
|
|
549
|
+
* @public
|
|
550
|
+
*/
|
|
551
|
+
updateLabelsFontAtlas() {
|
|
552
|
+
if (this.renderNode) {
|
|
563
553
|
var l = [].concat(this.labelHandler._billboards);
|
|
564
|
-
this.labelHandler._billboards = [];
|
|
554
|
+
this.labelHandler._billboards = [];
|
|
565
555
|
for (var i = 0; i < l.length; i++) {
|
|
566
|
-
this.labelHandler.assignFontAtlas(l[i]);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* Removes collection from render node.
|
|
573
|
-
* @public
|
|
574
|
-
*/
|
|
575
|
-
remove() {
|
|
576
|
-
if (this.renderNode) {
|
|
577
|
-
if (this._renderNodeIndex !== -1) {
|
|
578
|
-
this.renderNode.entityCollections.splice(this._renderNodeIndex, 1);
|
|
579
|
-
// reindex in the renderNode
|
|
580
|
-
for (
|
|
581
|
-
var i = this._renderNodeIndex;
|
|
582
|
-
i < this.renderNode.entityCollections.length;
|
|
583
|
-
i++
|
|
584
|
-
) {
|
|
585
|
-
this.renderNode.entityCollections._renderNodeIndex = i;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
this.renderNode = null;
|
|
589
|
-
this._renderNodeIndex = -1;
|
|
590
|
-
this.events.dispatch(this.events.remove, this);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Gets entity array.
|
|
596
|
-
* @public
|
|
597
|
-
* @returns {Array.<Entity>} -
|
|
598
|
-
*/
|
|
599
|
-
getEntities() {
|
|
600
|
-
return [].concat(this._entities);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Safety entities loop.
|
|
605
|
-
* @public
|
|
606
|
-
* @param {function} callback - Entity callback.
|
|
607
|
-
*/
|
|
608
|
-
each(callback) {
|
|
609
|
-
var i = this._entities.length;
|
|
610
|
-
while (i--) {
|
|
611
|
-
var ei = this._entities[i];
|
|
612
|
-
ei && callback(ei);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* Removes all entities from colection and clear handlers.
|
|
618
|
-
* @public
|
|
619
|
-
*/
|
|
620
|
-
clear() {
|
|
621
|
-
// TODO: Optimize by replace delete
|
|
622
|
-
// code to the clearEntity function.
|
|
623
|
-
this.billboardHandler.clear();
|
|
624
|
-
this.labelHandler.clear();
|
|
625
|
-
this.shapeHandler.clear();
|
|
626
|
-
this.polylineHandler.clear();
|
|
627
|
-
this.rayHandler.clear();
|
|
628
|
-
this.pointCloudHandler.clear();
|
|
629
|
-
this.stripHandler.clear();
|
|
630
|
-
this.geoObjectHandler.clear();
|
|
631
|
-
|
|
632
|
-
var i = this._entities.length;
|
|
633
|
-
while (i--) {
|
|
634
|
-
var ei = this._entities[i];
|
|
635
|
-
if (this.renderNode && this.renderNode.renderer) {
|
|
636
|
-
this.renderNode.renderer.clearPickingColor(ei);
|
|
637
|
-
ei._pickingColor.clear();
|
|
638
|
-
}
|
|
639
|
-
this._clearEntity(ei);
|
|
640
|
-
}
|
|
641
|
-
this._entities.length = 0;
|
|
642
|
-
this._entities = [];
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Clears entity recursevely.
|
|
647
|
-
* @private
|
|
648
|
-
* @param {Entity} entity - Entity to clear.
|
|
649
|
-
*/
|
|
650
|
-
_clearEntity(entity) {
|
|
651
|
-
entity._entityCollection = null;
|
|
652
|
-
entity._entityCollectionIndex = -1;
|
|
653
|
-
for (var i = 0; i < entity.childrenNodes.length; i++) {
|
|
654
|
-
this._clearEntity(entity.childrenNodes[i]);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
const EVENT_NAMES = [
|
|
660
|
-
/**
|
|
661
|
-
* Triggered when entity has moved.
|
|
662
|
-
* @event og.EntityCollection#entitymove
|
|
663
|
-
*/
|
|
664
|
-
"entitymove",
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* Triggered when collection entities begin draw.
|
|
668
|
-
* @event og.EntityCollection#draw
|
|
669
|
-
*/
|
|
670
|
-
"draw",
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Triggered after collection has drawn.
|
|
674
|
-
* @event og.EntityCollection#drawend
|
|
675
|
-
*/
|
|
676
|
-
"drawend",
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* Triggered when added to the render node.
|
|
680
|
-
* @event og.EntityCollection#add
|
|
681
|
-
*/
|
|
682
|
-
"add",
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Triggered when removed from the render node.
|
|
686
|
-
* @event og.EntityCollection#remove
|
|
687
|
-
*/
|
|
688
|
-
"remove",
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Triggered when new entity added to the collection.
|
|
692
|
-
* @event og.EntityCollection#entityadd
|
|
693
|
-
*/
|
|
694
|
-
"entityadd",
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Triggered when entity removes from the collection.
|
|
698
|
-
* @event og.EntityCollection#entityremove
|
|
699
|
-
*/
|
|
700
|
-
"entityremove",
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* Triggered when visibility changes.
|
|
704
|
-
* @event og.EntityCollection#visibilitychange
|
|
705
|
-
*/
|
|
706
|
-
"visibilitychange",
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Triggered when mouse moves over the entity.
|
|
710
|
-
* @event og.EntityCollection#mousemove
|
|
711
|
-
*/
|
|
712
|
-
"mousemove",
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Triggered when mouse has entered over the entity.
|
|
716
|
-
* @event og.EntityCollection#mouseenter
|
|
717
|
-
*/
|
|
718
|
-
"mouseenter",
|
|
719
|
-
|
|
720
|
-
/**
|
|
721
|
-
* Triggered when mouse leaves the entity.
|
|
722
|
-
* @event og.EntityCollection#mouseleave
|
|
723
|
-
*/
|
|
724
|
-
"mouseleave",
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Mouse left button clicked.
|
|
728
|
-
* @event og.EntityCollection#lclick
|
|
729
|
-
*/
|
|
730
|
-
"lclick",
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* Mouse right button clicked.
|
|
734
|
-
* @event og.EntityCollection#rclick
|
|
735
|
-
*/
|
|
736
|
-
"rclick",
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Mouse right button clicked.
|
|
740
|
-
* @event og.EntityCollection#mclick
|
|
741
|
-
*/
|
|
742
|
-
"mclick",
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Mouse left button double click.
|
|
746
|
-
* @event og.EntityCollection#ldblclick
|
|
747
|
-
*/
|
|
748
|
-
"ldblclick",
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Mouse right button double click.
|
|
752
|
-
* @event og.EntityCollection#rdblclick
|
|
753
|
-
*/
|
|
754
|
-
"rdblclick",
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Mouse middle button double click.
|
|
758
|
-
* @event og.EntityCollection#mdblclick
|
|
759
|
-
*/
|
|
760
|
-
"mdblclick",
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* Mouse left button up(stop pressing).
|
|
764
|
-
* @event og.EntityCollection#lup
|
|
765
|
-
*/
|
|
766
|
-
"lup",
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Mouse right button up(stop pressing).
|
|
770
|
-
* @event og.EntityCollection#rup
|
|
771
|
-
*/
|
|
772
|
-
"rup",
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* Mouse middle button up(stop pressing).
|
|
776
|
-
* @event og.EntityCollection#mup
|
|
777
|
-
*/
|
|
778
|
-
"mup",
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Mouse left button is just pressed down(start pressing).
|
|
782
|
-
* @event og.EntityCollection#ldown
|
|
783
|
-
*/
|
|
784
|
-
"ldown",
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* Mouse right button is just pressed down(start pressing).
|
|
788
|
-
* @event og.EntityCollection#rdown
|
|
789
|
-
*/
|
|
790
|
-
"rdown",
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Mouse middle button is just pressed down(start pressing).
|
|
794
|
-
* @event og.EntityCollection#mdown
|
|
795
|
-
*/
|
|
796
|
-
"mdown",
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* Mouse left button is pressing.
|
|
800
|
-
* @event og.EntityCollection#lhold
|
|
801
|
-
*/
|
|
802
|
-
"lhold",
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Mouse right button is pressing.
|
|
806
|
-
* @event og.EntityCollection#rhold
|
|
807
|
-
*/
|
|
808
|
-
"rhold",
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* Mouse middle button is pressing.
|
|
812
|
-
* @event og.EntityCollection#mhold
|
|
813
|
-
*/
|
|
814
|
-
"mhold",
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* Mouse wheel is rotated.
|
|
818
|
-
* @event og.EntityCollection#mousewheel
|
|
819
|
-
*/
|
|
820
|
-
"mousewheel",
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Triggered when touch moves over the entity.
|
|
824
|
-
* @event og.EntityCollection#touchmove
|
|
825
|
-
*/
|
|
826
|
-
"touchmove",
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Triggered when entity begins to touch.
|
|
830
|
-
* @event og.EntityCollection#touchstart
|
|
831
|
-
*/
|
|
832
|
-
"touchstart",
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Triggered when entity ends touching.
|
|
836
|
-
* @event og.EntityCollection#touchend
|
|
837
|
-
*/
|
|
838
|
-
"touchend",
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Triggered entity double touch.
|
|
842
|
-
* @event og.EntityCollection#doubletouch
|
|
843
|
-
*/
|
|
844
|
-
"doubletouch",
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* Triggered when touching leaves entity.
|
|
848
|
-
* @event og.EntityCollection#touchleave
|
|
849
|
-
*/
|
|
850
|
-
"touchleave",
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Triggered when touch enters over the entity.
|
|
854
|
-
* @event og.EntityCollection#touchenter
|
|
855
|
-
*/
|
|
856
|
-
"touchenter"
|
|
857
|
-
];
|
|
858
|
-
|
|
859
|
-
export { EntityCollection };
|
|
556
|
+
this.labelHandler.assignFontAtlas(l[i]);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Removes collection from render node.
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
remove() {
|
|
566
|
+
if (this.renderNode) {
|
|
567
|
+
if (this._renderNodeIndex !== -1) {
|
|
568
|
+
this.renderNode.entityCollections.splice(this._renderNodeIndex, 1);
|
|
569
|
+
// reindex in the renderNode
|
|
570
|
+
for (
|
|
571
|
+
var i = this._renderNodeIndex;
|
|
572
|
+
i < this.renderNode.entityCollections.length;
|
|
573
|
+
i++
|
|
574
|
+
) {
|
|
575
|
+
this.renderNode.entityCollections._renderNodeIndex = i;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
this.renderNode = null;
|
|
579
|
+
this._renderNodeIndex = -1;
|
|
580
|
+
this.events.dispatch(this.events.remove, this);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Gets entity array.
|
|
586
|
+
* @public
|
|
587
|
+
* @returns {Array.<Entity>} -
|
|
588
|
+
*/
|
|
589
|
+
getEntities() {
|
|
590
|
+
return [].concat(this._entities);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Safety entities loop.
|
|
595
|
+
* @public
|
|
596
|
+
* @param {function} callback - Entity callback.
|
|
597
|
+
*/
|
|
598
|
+
each(callback) {
|
|
599
|
+
var i = this._entities.length;
|
|
600
|
+
while (i--) {
|
|
601
|
+
var ei = this._entities[i];
|
|
602
|
+
ei && callback(ei);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Removes all entities from colection and clear handlers.
|
|
608
|
+
* @public
|
|
609
|
+
*/
|
|
610
|
+
clear() {
|
|
611
|
+
// TODO: Optimize by replace delete
|
|
612
|
+
// code to the clearEntity function.
|
|
613
|
+
this.billboardHandler.clear();
|
|
614
|
+
this.labelHandler.clear();
|
|
615
|
+
this.shapeHandler.clear();
|
|
616
|
+
this.polylineHandler.clear();
|
|
617
|
+
this.rayHandler.clear();
|
|
618
|
+
this.pointCloudHandler.clear();
|
|
619
|
+
this.stripHandler.clear();
|
|
620
|
+
this.geoObjectHandler.clear();
|
|
621
|
+
|
|
622
|
+
var i = this._entities.length;
|
|
623
|
+
while (i--) {
|
|
624
|
+
var ei = this._entities[i];
|
|
625
|
+
if (this.renderNode && this.renderNode.renderer) {
|
|
626
|
+
this.renderNode.renderer.clearPickingColor(ei);
|
|
627
|
+
ei._pickingColor.clear();
|
|
628
|
+
}
|
|
629
|
+
this._clearEntity(ei);
|
|
630
|
+
}
|
|
631
|
+
this._entities.length = 0;
|
|
632
|
+
this._entities = [];
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Clears entity recursevely.
|
|
637
|
+
* @private
|
|
638
|
+
* @param {Entity} entity - Entity to clear.
|
|
639
|
+
*/
|
|
640
|
+
_clearEntity(entity) {
|
|
641
|
+
entity._entityCollection = null;
|
|
642
|
+
entity._entityCollectionIndex = -1;
|
|
643
|
+
for (var i = 0; i < entity.childrenNodes.length; i++) {
|
|
644
|
+
this._clearEntity(entity.childrenNodes[i]);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const EVENT_NAMES = [
|
|
650
|
+
/**
|
|
651
|
+
* Triggered when entity has moved.
|
|
652
|
+
* @event og.EntityCollection#entitymove
|
|
653
|
+
*/
|
|
654
|
+
"entitymove",
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Triggered when collection entities begin draw.
|
|
658
|
+
* @event og.EntityCollection#draw
|
|
659
|
+
*/
|
|
660
|
+
"draw",
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Triggered after collection has drawn.
|
|
664
|
+
* @event og.EntityCollection#drawend
|
|
665
|
+
*/
|
|
666
|
+
"drawend",
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Triggered when added to the render node.
|
|
670
|
+
* @event og.EntityCollection#add
|
|
671
|
+
*/
|
|
672
|
+
"add",
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Triggered when removed from the render node.
|
|
676
|
+
* @event og.EntityCollection#remove
|
|
677
|
+
*/
|
|
678
|
+
"remove",
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Triggered when new entity added to the collection.
|
|
682
|
+
* @event og.EntityCollection#entityadd
|
|
683
|
+
*/
|
|
684
|
+
"entityadd",
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Triggered when entity removes from the collection.
|
|
688
|
+
* @event og.EntityCollection#entityremove
|
|
689
|
+
*/
|
|
690
|
+
"entityremove",
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Triggered when visibility changes.
|
|
694
|
+
* @event og.EntityCollection#visibilitychange
|
|
695
|
+
*/
|
|
696
|
+
"visibilitychange",
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Triggered when mouse moves over the entity.
|
|
700
|
+
* @event og.EntityCollection#mousemove
|
|
701
|
+
*/
|
|
702
|
+
"mousemove",
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Triggered when mouse has entered over the entity.
|
|
706
|
+
* @event og.EntityCollection#mouseenter
|
|
707
|
+
*/
|
|
708
|
+
"mouseenter",
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Triggered when mouse leaves the entity.
|
|
712
|
+
* @event og.EntityCollection#mouseleave
|
|
713
|
+
*/
|
|
714
|
+
"mouseleave",
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Mouse left button clicked.
|
|
718
|
+
* @event og.EntityCollection#lclick
|
|
719
|
+
*/
|
|
720
|
+
"lclick",
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Mouse right button clicked.
|
|
724
|
+
* @event og.EntityCollection#rclick
|
|
725
|
+
*/
|
|
726
|
+
"rclick",
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Mouse right button clicked.
|
|
730
|
+
* @event og.EntityCollection#mclick
|
|
731
|
+
*/
|
|
732
|
+
"mclick",
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Mouse left button double click.
|
|
736
|
+
* @event og.EntityCollection#ldblclick
|
|
737
|
+
*/
|
|
738
|
+
"ldblclick",
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Mouse right button double click.
|
|
742
|
+
* @event og.EntityCollection#rdblclick
|
|
743
|
+
*/
|
|
744
|
+
"rdblclick",
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Mouse middle button double click.
|
|
748
|
+
* @event og.EntityCollection#mdblclick
|
|
749
|
+
*/
|
|
750
|
+
"mdblclick",
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Mouse left button up(stop pressing).
|
|
754
|
+
* @event og.EntityCollection#lup
|
|
755
|
+
*/
|
|
756
|
+
"lup",
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Mouse right button up(stop pressing).
|
|
760
|
+
* @event og.EntityCollection#rup
|
|
761
|
+
*/
|
|
762
|
+
"rup",
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Mouse middle button up(stop pressing).
|
|
766
|
+
* @event og.EntityCollection#mup
|
|
767
|
+
*/
|
|
768
|
+
"mup",
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Mouse left button is just pressed down(start pressing).
|
|
772
|
+
* @event og.EntityCollection#ldown
|
|
773
|
+
*/
|
|
774
|
+
"ldown",
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Mouse right button is just pressed down(start pressing).
|
|
778
|
+
* @event og.EntityCollection#rdown
|
|
779
|
+
*/
|
|
780
|
+
"rdown",
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Mouse middle button is just pressed down(start pressing).
|
|
784
|
+
* @event og.EntityCollection#mdown
|
|
785
|
+
*/
|
|
786
|
+
"mdown",
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Mouse left button is pressing.
|
|
790
|
+
* @event og.EntityCollection#lhold
|
|
791
|
+
*/
|
|
792
|
+
"lhold",
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Mouse right button is pressing.
|
|
796
|
+
* @event og.EntityCollection#rhold
|
|
797
|
+
*/
|
|
798
|
+
"rhold",
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Mouse middle button is pressing.
|
|
802
|
+
* @event og.EntityCollection#mhold
|
|
803
|
+
*/
|
|
804
|
+
"mhold",
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Mouse wheel is rotated.
|
|
808
|
+
* @event og.EntityCollection#mousewheel
|
|
809
|
+
*/
|
|
810
|
+
"mousewheel",
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Triggered when touch moves over the entity.
|
|
814
|
+
* @event og.EntityCollection#touchmove
|
|
815
|
+
*/
|
|
816
|
+
"touchmove",
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Triggered when entity begins to touch.
|
|
820
|
+
* @event og.EntityCollection#touchstart
|
|
821
|
+
*/
|
|
822
|
+
"touchstart",
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Triggered when entity ends touching.
|
|
826
|
+
* @event og.EntityCollection#touchend
|
|
827
|
+
*/
|
|
828
|
+
"touchend",
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Triggered entity double touch.
|
|
832
|
+
* @event og.EntityCollection#doubletouch
|
|
833
|
+
*/
|
|
834
|
+
"doubletouch",
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Triggered when touching leaves entity.
|
|
838
|
+
* @event og.EntityCollection#touchleave
|
|
839
|
+
*/
|
|
840
|
+
"touchleave",
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Triggered when touch enters over the entity.
|
|
844
|
+
* @event og.EntityCollection#touchenter
|
|
845
|
+
*/
|
|
846
|
+
"touchenter"
|
|
847
|
+
];
|
|
848
|
+
|
|
849
|
+
export { EntityCollection };
|