@xeokit/xeokit-sdk 2.6.0-beta-13 → 2.6.0-beta-15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.6.0-beta-13",
3
+ "version": "2.6.0-beta-15",
4
4
  "description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
@@ -288,13 +288,16 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
288
288
  this._currentAngleMeasurement = this.angleMeasurementsPlugin.createMeasurement({
289
289
  id: math.createUUID(),
290
290
  origin: {
291
- worldPos: mouseWorldPos
291
+ worldPos: mouseWorldPos,
292
+ entity: hoveredEntity
292
293
  },
293
294
  corner: {
294
- worldPos: mouseWorldPos
295
+ worldPos: mouseWorldPos,
296
+ entity: hoveredEntity
295
297
  },
296
298
  target: {
297
- worldPos: mouseWorldPos
299
+ worldPos: mouseWorldPos,
300
+ entity: hoveredEntity
298
301
  },
299
302
  approximate: true
300
303
  });
@@ -245,13 +245,16 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
245
245
  this._currentAngleMeasurement = plugin.createMeasurement({
246
246
  id: math.createUUID(),
247
247
  origin: {
248
- worldPos: snapPickResult.worldPos
248
+ worldPos: snapPickResult.worldPos,
249
+ entity: snapPickResult.entity
249
250
  },
250
251
  corner: {
251
- worldPos: snapPickResult.worldPos
252
+ worldPos: snapPickResult.worldPos,
253
+ entity: snapPickResult.entity
252
254
  },
253
255
  target: {
254
- worldPos: snapPickResult.worldPos
256
+ worldPos: snapPickResult.worldPos,
257
+ entity: snapPickResult.entity
255
258
  }
256
259
  });
257
260
  this._currentAngleMeasurement.clickable = false;
@@ -320,6 +323,7 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
320
323
  this.pointerCircle.start(snapPickResult.snappedCanvasPos);
321
324
  pointerWorldPos.set(snapPickResult.worldPos);
322
325
  this._currentAngleMeasurement.corner.worldPos = snapPickResult.worldPos;
326
+ this._currentAngleMeasurement.corner.entity = snapPickResult.entity;
323
327
  this._currentAngleMeasurement.originVisible = true;
324
328
  this._currentAngleMeasurement.originWireVisible = true;
325
329
  this._currentAngleMeasurement.cornerVisible = true;
@@ -341,6 +345,7 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
341
345
  this.pointerCircle.start(pickResult.canvasPos);
342
346
  pointerWorldPos.set(pickResult.worldPos);
343
347
  this._currentAngleMeasurement.corner.worldPos = pickResult.worldPos;
348
+ this._currentAngleMeasurement.corner.entity = pickResult.entity;
344
349
  this._currentAngleMeasurement.originVisible = true;
345
350
  this._currentAngleMeasurement.originWireVisible = true;
346
351
  this._currentAngleMeasurement.cornerVisible = true;
@@ -411,6 +416,7 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
411
416
  this.pointerCircle.start(snapPickResult.snappedCanvasPos);
412
417
  pointerWorldPos.set(snapPickResult.worldPos);
413
418
  this._currentAngleMeasurement.target.worldPos = snapPickResult.worldPos;
419
+ this._currentAngleMeasurement.target.entity = snapPickResult.entity;
414
420
  this._currentAngleMeasurement.originVisible = true;
415
421
  this._currentAngleMeasurement.originWireVisible = true;
416
422
  this._currentAngleMeasurement.cornerVisible = true;
@@ -432,6 +438,7 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
432
438
  this.pointerCircle.start(pickResult.canvasPos);
433
439
  pointerWorldPos.set(pickResult.worldPos);
434
440
  this._currentAngleMeasurement.target.worldPos = pickResult.worldPos;
441
+ this._currentAngleMeasurement.target.entity = pickResult.entity;
435
442
  this._currentAngleMeasurement.originVisible = true;
436
443
  this._currentAngleMeasurement.originWireVisible = true;
437
444
  this._currentAngleMeasurement.cornerVisible = true;
@@ -299,10 +299,12 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
299
299
  this._currentDistanceMeasurement = distanceMeasurementsPlugin.createMeasurement({
300
300
  id: math.createUUID(),
301
301
  origin: {
302
- worldPos: pointerWorldPos.slice()
302
+ worldPos: pointerWorldPos.slice(),
303
+ entity: hoveredEntity
303
304
  },
304
305
  target: {
305
- worldPos: pointerWorldPos.slice()
306
+ worldPos: pointerWorldPos.slice(),
307
+ entity: hoveredEntity
306
308
  },
307
309
  approximate: true
308
310
  });
@@ -315,7 +317,7 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
315
317
  this._currentDistanceMeasurement.clickable = false;
316
318
  this._currentDistanceMeasurement.origin.entity = hoveredEntity;
317
319
  hoveredEntity = null;
318
- this.fire("measurementStart", this._currentDistanceMeasurement);
320
+ this.distanceMeasurementsPlugin.fire("measurementStart", this._currentDistanceMeasurement);
319
321
  }
320
322
  }
321
323
  });
@@ -250,10 +250,12 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
250
250
  this._currentDistanceMeasurement = plugin.createMeasurement({
251
251
  id: math.createUUID(),
252
252
  origin: {
253
- worldPos: pointerWorldPos
253
+ worldPos: pointerWorldPos,
254
+ entity: snapPickResult.entity
254
255
  },
255
256
  target: {
256
- worldPos: pointerWorldPos
257
+ worldPos: pointerWorldPos,
258
+ entity: snapPickResult.entity
257
259
  }
258
260
  });
259
261
  this._currentDistanceMeasurement.labelsVisible = false;
@@ -323,6 +325,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
323
325
  this.pointerCircle.start(snapPickResult.snappedCanvasPos);
324
326
  pointerWorldPos.set(snapPickResult.worldPos);
325
327
  this._currentDistanceMeasurement.target.worldPos = snapPickResult.worldPos;
328
+ this._currentDistanceMeasurement.target.entity = snapPickResult.entity;
326
329
  this._currentDistanceMeasurement.targetVisible = true;
327
330
  this._currentDistanceMeasurement.wireVisible = true;
328
331
  this._currentDistanceMeasurement.labelsVisible = true;
@@ -340,6 +343,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
340
343
  this.pointerCircle.start(pickResult.canvasPos);
341
344
  pointerWorldPos.set(pickResult.worldPos);
342
345
  this._currentDistanceMeasurement.target.worldPos = pickResult.worldPos;
346
+ this._currentDistanceMeasurement.target.entity = pickResult.entity;
343
347
  this._currentDistanceMeasurement.targetVisible = true;
344
348
  this._currentDistanceMeasurement.wireVisible = true;
345
349
  this._currentDistanceMeasurement.labelsVisible = true;
@@ -430,10 +434,12 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
430
434
  this._currentDistanceMeasurement = plugin.createMeasurement({
431
435
  id: math.createUUID(),
432
436
  origin: {
433
- worldPos: snapPickResult.worldPos
437
+ worldPos: snapPickResult.worldPos,
438
+ entity: snapPickResult.entity
434
439
  },
435
440
  target: {
436
- worldPos: snapPickResult.worldPos
441
+ worldPos: snapPickResult.worldPos,
442
+ entity: snapPickResult.entity
437
443
  }
438
444
  });
439
445
  this._currentDistanceMeasurement.labelsVisible = false;
@@ -464,10 +470,12 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
464
470
  this._currentDistanceMeasurement = plugin.createMeasurement({
465
471
  id: math.createUUID(),
466
472
  origin: {
467
- worldPos: pickResult.worldPos
473
+ worldPos: pickResult.worldPos,
474
+ entity: pickResult.entity
468
475
  },
469
476
  target: {
470
- worldPos: pickResult.worldPos
477
+ worldPos: pickResult.worldPos,
478
+ entity: pickResult.entity
471
479
  }
472
480
  });
473
481
  this._currentDistanceMeasurement.labelsVisible = false;
@@ -524,6 +532,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
524
532
  this.pointerLens.snapped = true;
525
533
  }
526
534
  this._currentDistanceMeasurement.target.worldPos = snapPickResult.worldPos;
535
+ this._currentDistanceMeasurement.target.entity = snapPickResult.entity;
527
536
  this._currentDistanceMeasurement.targetVisible = true;
528
537
  this._currentDistanceMeasurement.wireVisible = true;
529
538
  this._currentDistanceMeasurement.labelsVisible = true;
@@ -538,6 +547,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
538
547
  this.pointerLens.snapped = false;
539
548
  }
540
549
  this._currentDistanceMeasurement.target.worldPos = pickResult.worldPos;
550
+ this._currentDistanceMeasurement.target.entity = pickResult.entity;
541
551
  this._currentDistanceMeasurement.targetVisible = true;
542
552
  this._currentDistanceMeasurement.wireVisible = true;
543
553
  this._currentDistanceMeasurement.labelsVisible = true;
@@ -596,10 +606,12 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
596
606
  this._currentDistanceMeasurement = plugin.createMeasurement({
597
607
  id: math.createUUID(),
598
608
  origin: {
599
- worldPos: pickResult.worldPos
609
+ worldPos: pickResult.worldPos,
610
+ entity: pickResult.entity
600
611
  },
601
612
  target: {
602
- worldPos: pickResult.worldPos
613
+ worldPos: pickResult.worldPos,
614
+ entity: pickResult.entity
603
615
  }
604
616
  });
605
617
  this._currentDistanceMeasurement.labelsVisible = false;
@@ -611,6 +623,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
611
623
  this._currentDistanceMeasurement.targetVisible = false;
612
624
  this._currentDistanceMeasurement.clickable = false;
613
625
  this._touchState = WAITING_FOR_TARGET_TOUCH_START;
626
+ this.distanceMeasurementsPlugin.fire("measurementStart", this._currentDistanceMeasurement);
614
627
  // console.log("touchend: this._touchState= WAITING_FOR_ORIGIN_QUICK_TOUCH_END -> WAITING_FOR_ORIGIN_TOUCH_START")
615
628
  } else {
616
629
  if (this._currentDistanceMeasurement) {
@@ -656,6 +669,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
656
669
  });
657
670
  if (pickResult && pickResult.worldPos) {
658
671
  this._currentDistanceMeasurement.target.worldPos = pickResult.worldPos;
672
+ this._currentDistanceMeasurement.target.entity = pickResult.entity;
659
673
  this._currentDistanceMeasurement.targetVisible = true;
660
674
  this._currentDistanceMeasurement.wireVisible = true;
661
675
  this._currentDistanceMeasurement.labelsVisible = true;
@@ -244,7 +244,7 @@ class GLTFLoaderPlugin extends Plugin {
244
244
  * @param {Boolean} [params.saoEnabled=true] Indicates if Scalable Ambient Obscurance (SAO) is enabled for the model. SAO is configured by the Scene's {@link SAO} component. Only works when {@link SAO#enabled} is also ````true````
245
245
  * @param {Boolean} [params.pbrEnabled=true] Indicates if physically-based rendering (PBR) is enabled for the model. Overrides ````colorTextureEnabled````. Only works when {@link Scene#pbrEnabled} is also ````true````.
246
246
  * @param {Boolean} [params.colorTextureEnabled=true] Indicates if base color texture rendering is enabled for the model. Overridden by ````pbrEnabled````. Only works when {@link Scene#colorTextureEnabled} is also ````true````.
247
- * @param {Boolean} [params.backfaces=false] When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces.
247
+ * @param {Boolean} [params.backfaces=true] When true, always show backfaces, even on objects for which the glTF material is single-sided. When false, only show backfaces on geometries whenever the glTF material is double-sided.
248
248
  * @param {Number} [params.edgeThreshold=10] When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.
249
249
  * @param {Boolean} [params.dtxEnabled=true] When ````true```` (default) use data textures (DTX), where appropriate, to
250
250
  * represent the returned model. Set false to always use vertex buffer objects (VBOs). Note that DTX is only applicable
@@ -145,6 +145,7 @@ function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok) {
145
145
  loadBuffer: options.loadBuffer,
146
146
  basePath: options.basePath,
147
147
  handlenode: options.handlenode,
148
+ backfaces: !!options.backfaces,
148
149
  gltfData: gltfData,
149
150
  scene: sceneModel.scene,
150
151
  plugin: plugin,
@@ -353,7 +354,8 @@ function loadMaterialAttributes(ctx, material) { // Substitute RGBA for material
353
354
  color: new Float32Array([1, 1, 1, 1]),
354
355
  opacity: 1,
355
356
  metallic: 0,
356
- roughness: 1
357
+ roughness: 1,
358
+ doubleSided : true
357
359
  };
358
360
  if (extensions) {
359
361
  const specularPBR = extensions["KHR_materials_pbrSpecularGlossiness"];
@@ -404,6 +406,7 @@ function loadMaterialAttributes(ctx, material) { // Substitute RGBA for material
404
406
  materialAttributes.roughness = roughnessFactor;
405
407
  }
406
408
  }
409
+ materialAttributes.doubleSided = (material.doubleSided !== false);
407
410
  return materialAttributes;
408
411
  }
409
412
 
@@ -517,6 +520,20 @@ function loadNode(ctx, node, depth, matrix) {
517
520
  id: sceneModel.id + "." + ctx.numObjects++
518
521
  };
519
522
 
523
+ const material = primitive.material;
524
+ if (material) {
525
+ meshCfg.textureSetId = material._textureSetId;
526
+ meshCfg.color = material._attributes.color;
527
+ meshCfg.opacity = material._attributes.opacity;
528
+ meshCfg.metallic = material._attributes.metallic;
529
+ meshCfg.roughness = material._attributes.roughness;
530
+ } else {
531
+ meshCfg.color = new Float32Array([1.0, 1.0, 1.0]);
532
+ meshCfg.opacity = 1.0;
533
+ }
534
+
535
+ const backfaces = ((ctx.backfaces !== false) || (material.doubleSided !== false));
536
+
520
537
  switch (primitive.mode) {
521
538
  case 0: // POINTS
522
539
  meshCfg.primitive = "points";
@@ -531,16 +548,16 @@ function loadNode(ctx, node, depth, matrix) {
531
548
  meshCfg.primitive = "lines";
532
549
  break;
533
550
  case 4: // TRIANGLES
534
- meshCfg.primitive = "triangles";
551
+ meshCfg.primitive = backfaces ? "triangles" : "solid";
535
552
  break;
536
553
  case 5: // TRIANGLE_STRIP
537
- meshCfg.primitive = "triangles";
554
+ meshCfg.primitive = backfaces ? "triangles" : "solid";
538
555
  break;
539
556
  case 6: // TRIANGLE_FAN
540
- meshCfg.primitive = "triangles";
557
+ meshCfg.primitive = backfaces ? "triangles" : "solid";
541
558
  break;
542
559
  default:
543
- meshCfg.primitive = "triangles";
560
+ meshCfg.primitive = backfaces ? "triangles" : "solid";
544
561
  }
545
562
 
546
563
  const POSITION = primitive.attributes.POSITION;
@@ -569,17 +586,6 @@ function loadNode(ctx, node, depth, matrix) {
569
586
  meshCfg.origin = origin;
570
587
  }
571
588
 
572
- const material = primitive.material;
573
- if (material) {
574
- meshCfg.textureSetId = material._textureSetId;
575
- meshCfg.color = material._attributes.color;
576
- meshCfg.opacity = material._attributes.opacity;
577
- meshCfg.metallic = material._attributes.metallic;
578
- meshCfg.roughness = material._attributes.roughness;
579
- } else {
580
- meshCfg.color = new Float32Array([1.0, 1.0, 1.0]);
581
- meshCfg.opacity = 1.0;
582
- }
583
589
  // if (createEntity) {
584
590
  // if (createEntity.colorize) {
585
591
  // meshCfg.color = createEntity.colorize;
@@ -187,7 +187,8 @@ class Control {
187
187
 
188
188
  this._rootNode = new Node(scene, {
189
189
  position: [0, 0, 0],
190
- scale: [5, 5, 5]
190
+ scale: [5, 5, 5],
191
+ isObject: false
191
192
  });
192
193
 
193
194
  const rootNode = this._rootNode;
@@ -378,7 +379,8 @@ class Control {
378
379
  collidable: true,
379
380
  clippable: false,
380
381
  visible: false,
381
- scale: [2.4, 2.4, 1]
382
+ scale: [2.4, 2.4, 1],
383
+ isObject: false
382
384
  }), NO_STATE_INHERIT),
383
385
 
384
386
  planeFrame: rootNode.addChild(new Mesh(rootNode, { // Visible frame
@@ -409,7 +411,8 @@ class Control {
409
411
  clippable: false,
410
412
  visible: false,
411
413
  scale: [1, 1, .1],
412
- rotation: [0, 0, 45]
414
+ rotation: [0, 0, 45],
415
+ isObject: false
413
416
  }), NO_STATE_INHERIT),
414
417
 
415
418
  //----------------------------------------------------------------------------------------------------------
@@ -428,7 +431,8 @@ class Control {
428
431
  collidable: true,
429
432
  clippable: false,
430
433
  backfaces: true,
431
- visible: false
434
+ visible: false,
435
+ isObject: false
432
436
  }), NO_STATE_INHERIT),
433
437
 
434
438
  xCurveHandle: rootNode.addChild(new Mesh(rootNode, { // Red hoop about Y-axis
@@ -443,7 +447,8 @@ class Control {
443
447
  collidable: true,
444
448
  clippable: false,
445
449
  backfaces: true,
446
- visible: false
450
+ visible: false,
451
+ isObject: false
447
452
  }), NO_STATE_INHERIT),
448
453
 
449
454
  xCurveArrow1: rootNode.addChild(new Mesh(rootNode, {
@@ -458,7 +463,8 @@ class Control {
458
463
  pickable: true,
459
464
  collidable: true,
460
465
  clippable: false,
461
- visible: false
466
+ visible: false,
467
+ isObject: false
462
468
  }), NO_STATE_INHERIT),
463
469
 
464
470
  xCurveArrow2: rootNode.addChild(new Mesh(rootNode, {
@@ -473,7 +479,8 @@ class Control {
473
479
  pickable: true,
474
480
  collidable: true,
475
481
  clippable: false,
476
- visible: false
482
+ visible: false,
483
+ isObject: false
477
484
  }), NO_STATE_INHERIT),
478
485
 
479
486
  //----------------------------------------------------------------------------------------------------------
@@ -488,7 +495,8 @@ class Control {
488
495
  collidable: true,
489
496
  clippable: false,
490
497
  backfaces: true,
491
- visible: false
498
+ visible: false,
499
+ isObject: false
492
500
  }), NO_STATE_INHERIT),
493
501
 
494
502
  yCurveHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -499,7 +507,8 @@ class Control {
499
507
  collidable: true,
500
508
  clippable: false,
501
509
  backfaces: true,
502
- visible: false
510
+ visible: false,
511
+ isObject: false
503
512
  }), NO_STATE_INHERIT),
504
513
 
505
514
  yCurveArrow1: rootNode.addChild(new Mesh(rootNode, {
@@ -514,7 +523,8 @@ class Control {
514
523
  pickable: true,
515
524
  collidable: true,
516
525
  clippable: false,
517
- visible: false
526
+ visible: false,
527
+ isObject: false
518
528
  }), NO_STATE_INHERIT),
519
529
 
520
530
  yCurveArrow2: rootNode.addChild(new Mesh(rootNode, {
@@ -529,7 +539,8 @@ class Control {
529
539
  pickable: true,
530
540
  collidable: true,
531
541
  clippable: false,
532
- visible: false
542
+ visible: false,
543
+ isObject: false
533
544
  }), NO_STATE_INHERIT),
534
545
 
535
546
  //----------------------------------------------------------------------------------------------------------
@@ -543,7 +554,8 @@ class Control {
543
554
  pickable: false,
544
555
  collidable: true,
545
556
  clippable: false,
546
- visible: false
557
+ visible: false,
558
+ isObject: false
547
559
  }), NO_STATE_INHERIT),
548
560
 
549
561
  zCurveHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -553,7 +565,8 @@ class Control {
553
565
  pickable: true,
554
566
  collidable: true,
555
567
  clippable: false,
556
- visible: false
568
+ visible: false,
569
+ isObject: false
557
570
  }), NO_STATE_INHERIT),
558
571
 
559
572
  zCurveCurveArrow1: rootNode.addChild(new Mesh(rootNode, {
@@ -567,7 +580,8 @@ class Control {
567
580
  pickable: true,
568
581
  collidable: true,
569
582
  clippable: false,
570
- visible: false
583
+ visible: false,
584
+ isObject: false
571
585
  }), NO_STATE_INHERIT),
572
586
 
573
587
  zCurveArrow2: rootNode.addChild(new Mesh(rootNode, {
@@ -582,7 +596,8 @@ class Control {
582
596
  pickable: true,
583
597
  collidable: true,
584
598
  clippable: false,
585
- visible: false
599
+ visible: false,
600
+ isObject: false
586
601
  }), NO_STATE_INHERIT),
587
602
 
588
603
  //----------------------------------------------------------------------------------------------------------
@@ -597,7 +612,8 @@ class Control {
597
612
  pickable: false,
598
613
  collidable: true,
599
614
  clippable: false,
600
- visible: false
615
+ visible: false,
616
+ isObject: false
601
617
  }), NO_STATE_INHERIT),
602
618
 
603
619
  //----------------------------------------------------------------------------------------------------------
@@ -615,7 +631,8 @@ class Control {
615
631
  pickable: false,
616
632
  collidable: true,
617
633
  clippable: false,
618
- visible: false
634
+ visible: false,
635
+ isObject: false
619
636
  }), NO_STATE_INHERIT),
620
637
 
621
638
  xAxisArrowHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -629,7 +646,8 @@ class Control {
629
646
  pickable: true,
630
647
  collidable: true,
631
648
  clippable: false,
632
- visible: false
649
+ visible: false,
650
+ isObject: false
633
651
  }), NO_STATE_INHERIT),
634
652
 
635
653
  xAxis: rootNode.addChild(new Mesh(rootNode, {
@@ -643,7 +661,8 @@ class Control {
643
661
  pickable: false,
644
662
  collidable: true,
645
663
  clippable: false,
646
- visible: false
664
+ visible: false,
665
+ isObject: false
647
666
  }), NO_STATE_INHERIT),
648
667
 
649
668
  xAxisHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -657,7 +676,8 @@ class Control {
657
676
  pickable: true,
658
677
  collidable: true,
659
678
  clippable: false,
660
- visible: false
679
+ visible: false,
680
+ isObject: false
661
681
  }), NO_STATE_INHERIT),
662
682
 
663
683
  //----------------------------------------------------------------------------------------------------------
@@ -675,7 +695,8 @@ class Control {
675
695
  pickable: false,
676
696
  collidable: true,
677
697
  clippable: false,
678
- visible: false
698
+ visible: false,
699
+ isObject: false
679
700
  }), NO_STATE_INHERIT),
680
701
 
681
702
  yAxisArrowHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -690,7 +711,8 @@ class Control {
690
711
  collidable: true,
691
712
  clippable: false,
692
713
  visible: false,
693
- opacity: 0.2
714
+ opacity: 0.2,
715
+ isObject: false
694
716
  }), NO_STATE_INHERIT),
695
717
 
696
718
  yShaft: rootNode.addChild(new Mesh(rootNode, {
@@ -700,7 +722,8 @@ class Control {
700
722
  pickable: false,
701
723
  collidable: true,
702
724
  clippable: false,
703
- visible: false
725
+ visible: false,
726
+ isObject: false
704
727
  }), NO_STATE_INHERIT),
705
728
 
706
729
  yShaftHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -710,7 +733,8 @@ class Control {
710
733
  pickable: true,
711
734
  collidable: true,
712
735
  clippable: false,
713
- visible: false
736
+ visible: false,
737
+ isObject: false
714
738
  }), NO_STATE_INHERIT),
715
739
 
716
740
  //----------------------------------------------------------------------------------------------------------
@@ -728,7 +752,8 @@ class Control {
728
752
  pickable: false,
729
753
  collidable: true,
730
754
  clippable: false,
731
- visible: false
755
+ visible: false,
756
+ isObject: false
732
757
  }), NO_STATE_INHERIT),
733
758
 
734
759
  zAxisArrowHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -742,7 +767,8 @@ class Control {
742
767
  pickable: true,
743
768
  collidable: true,
744
769
  clippable: false,
745
- visible: false
770
+ visible: false,
771
+ isObject: false
746
772
  }), NO_STATE_INHERIT),
747
773
 
748
774
 
@@ -757,7 +783,8 @@ class Control {
757
783
  clippable: false,
758
784
  pickable: false,
759
785
  collidable: true,
760
- visible: false
786
+ visible: false,
787
+ isObject: false
761
788
  }), NO_STATE_INHERIT),
762
789
 
763
790
  zAxisHandle: rootNode.addChild(new Mesh(rootNode, {
@@ -771,7 +798,8 @@ class Control {
771
798
  clippable: false,
772
799
  pickable: true,
773
800
  collidable: true,
774
- visible: false
801
+ visible: false,
802
+ isObject: false
775
803
  }), NO_STATE_INHERIT)
776
804
  };
777
805
 
@@ -803,7 +831,8 @@ class Control {
803
831
  clippable: false,
804
832
  visible: false,
805
833
  scale: [1, 1, 1],
806
- rotation: [0, 0, 45]
834
+ rotation: [0, 0, 45],
835
+ isObject: false
807
836
  }), NO_STATE_INHERIT),
808
837
 
809
838
  xHoop: rootNode.addChild(new Mesh(rootNode, { // Full
@@ -819,7 +848,8 @@ class Control {
819
848
  pickable: false,
820
849
  collidable: true,
821
850
  clippable: false,
822
- visible: false
851
+ visible: false,
852
+ isObject: false
823
853
  }), NO_STATE_INHERIT),
824
854
 
825
855
  yHoop: rootNode.addChild(new Mesh(rootNode, {
@@ -831,7 +861,8 @@ class Control {
831
861
  pickable: false,
832
862
  collidable: true,
833
863
  clippable: false,
834
- visible: false
864
+ visible: false,
865
+ isObject: false
835
866
  }), NO_STATE_INHERIT),
836
867
 
837
868
  zHoop: rootNode.addChild(new Mesh(rootNode, { // Blue hoop about Z-axis
@@ -844,7 +875,8 @@ class Control {
844
875
  collidable: true,
845
876
  clippable: false,
846
877
  backfaces: true,
847
- visible: false
878
+ visible: false,
879
+ isObject: false
848
880
  }), NO_STATE_INHERIT),
849
881
 
850
882
  xAxisArrow: rootNode.addChild(new Mesh(rootNode, {
@@ -858,7 +890,8 @@ class Control {
858
890
  pickable: false,
859
891
  collidable: true,
860
892
  clippable: false,
861
- visible: false
893
+ visible: false,
894
+ isObject: false
862
895
  }), NO_STATE_INHERIT),
863
896
 
864
897
  yAxisArrow: rootNode.addChild(new Mesh(rootNode, {
@@ -872,7 +905,8 @@ class Control {
872
905
  pickable: false,
873
906
  collidable: true,
874
907
  clippable: false,
875
- visible: false
908
+ visible: false,
909
+ isObject: false
876
910
  }), NO_STATE_INHERIT),
877
911
 
878
912
  zAxisArrow: rootNode.addChild(new Mesh(rootNode, {
@@ -886,7 +920,8 @@ class Control {
886
920
  pickable: false,
887
921
  collidable: true,
888
922
  clippable: false,
889
- visible: false
923
+ visible: false,
924
+ isObject: false
890
925
  }), NO_STATE_INHERIT)
891
926
  };
892
927
  }
@@ -202,6 +202,7 @@ class PickController {
202
202
  if (this.snappedOrPicked) {
203
203
  if (this.snapPickResult) {
204
204
  const pickResult = new PickResult();
205
+ pickResult.entity = this.snapPickResult.entity;
205
206
  pickResult.snappedToVertex = this.snapPickResult.snappedToVertex;
206
207
  pickResult.snappedToEdge = this.snapPickResult.snappedToEdge;
207
208
  pickResult.worldPos = this.snapPickResult.worldPos;