@xeokit/xeokit-sdk 2.6.38 → 2.6.41

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.
Binary file
@@ -688,7 +688,7 @@ class ContextMenu {
688
688
  '</li>');
689
689
  if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
690
690
  html.push(
691
- '<li id="' + item.id + '" class="xeokit-context-menu-item-seperator"></li>'
691
+ '<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
692
692
  );
693
693
  }
694
694
 
@@ -700,7 +700,7 @@ class ContextMenu {
700
700
  '</li>');
701
701
  if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
702
702
  html.push(
703
- '<li id="' + item.id + '" class="xeokit-context-menu-item-seperator"></li>'
703
+ '<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
704
704
  );
705
705
  }
706
706
  }
@@ -900,12 +900,10 @@ class ContextMenu {
900
900
  const shown = getShown(this._context);
901
901
  item.shown = shown;
902
902
  if (!shown) {
903
- itemElement.classList.remove("xeokit-context-menu-item-visible");
904
- itemElement.classList.add("xeokit-context-menu-item-hidden");
903
+ itemElement.style.display = "none";
905
904
  continue;
906
905
  } else {
907
- itemElement.classList.remove("ceokit-context-menu-item-hidden");
908
- itemElement.classList.add("xeokit-context-menu-item-visible");
906
+ itemElement.style.display = "";
909
907
 
910
908
  }
911
909
  const enabled = getEnabled(this._context);
@@ -11355,6 +11353,122 @@ function activateDraggableDots(cfg) {
11355
11353
  };
11356
11354
  }
11357
11355
 
11356
+ const touchPointSelector$1 = function(viewer, pointerCircle, ray2WorldPos) {
11357
+ return function(onCancel, onChange, onCommit) {
11358
+ const scene = viewer.scene;
11359
+ const canvas = scene.canvas.canvas;
11360
+ const longTouchTimeoutMs = 300;
11361
+ const moveTolerance = 20;
11362
+
11363
+ const copyCanvasPos = (event, vec2) => {
11364
+ vec2[0] = event.clientX;
11365
+ vec2[1] = event.clientY;
11366
+ transformToNode(canvas.ownerDocument.documentElement, canvas, vec2);
11367
+ return vec2;
11368
+ };
11369
+
11370
+ const pickWorldPos = canvasPos => {
11371
+ const origin = math.vec3();
11372
+ const direction = math.vec3();
11373
+ math.canvasPosToWorldRay(canvas, scene.camera.viewMatrix, scene.camera.projMatrix, scene.camera.projection, canvasPos, origin, direction);
11374
+ return ray2WorldPos(origin, direction);
11375
+ };
11376
+
11377
+ let longTouchTimeout = null;
11378
+ const nop = () => { };
11379
+ let onSingleTouchMove = nop;
11380
+ let startTouchIdentifier;
11381
+
11382
+ const resetAction = function() {
11383
+ pointerCircle.stop();
11384
+ clearTimeout(longTouchTimeout);
11385
+ viewer.cameraControl.active = true;
11386
+ onSingleTouchMove = nop;
11387
+ startTouchIdentifier = null;
11388
+ };
11389
+
11390
+ const cleanup = function() {
11391
+ resetAction();
11392
+ canvas.removeEventListener("touchstart", onCanvasTouchStart);
11393
+ canvas.removeEventListener("touchmove", onCanvasTouchMove);
11394
+ canvas.removeEventListener("touchend", onCanvasTouchEnd);
11395
+ };
11396
+
11397
+ const onCanvasTouchStart = function(event) {
11398
+ const touches = event.touches;
11399
+
11400
+ if (touches.length !== 1)
11401
+ {
11402
+ resetAction();
11403
+ onCancel();
11404
+ }
11405
+ else
11406
+ {
11407
+ const startTouch = touches[0];
11408
+ const startCanvasPos = copyCanvasPos(startTouch, math.vec2());
11409
+
11410
+ const startWorldPos = pickWorldPos(startCanvasPos);
11411
+ if (startWorldPos)
11412
+ {
11413
+ startTouchIdentifier = startTouch.identifier;
11414
+
11415
+ onSingleTouchMove = canvasPos => {
11416
+ if (math.distVec2(startCanvasPos, canvasPos) > moveTolerance)
11417
+ {
11418
+ resetAction();
11419
+ }
11420
+ };
11421
+
11422
+ longTouchTimeout = setTimeout(
11423
+ function() {
11424
+ pointerCircle.start(startCanvasPos);
11425
+
11426
+ longTouchTimeout = setTimeout(
11427
+ function() {
11428
+ pointerCircle.stop();
11429
+
11430
+ viewer.cameraControl.active = false;
11431
+
11432
+ onSingleTouchMove = canvasPos => {
11433
+ onChange(canvasPos, pickWorldPos(canvasPos));
11434
+ };
11435
+
11436
+ onSingleTouchMove(startCanvasPos);
11437
+ },
11438
+ longTouchTimeoutMs);
11439
+ },
11440
+ 250);
11441
+ }
11442
+ }
11443
+ };
11444
+ canvas.addEventListener("touchstart", onCanvasTouchStart, {passive: true});
11445
+
11446
+ // canvas.addEventListener("touchcancel", e => console.log("touchcancel", e), {passive: true});
11447
+
11448
+ const onCanvasTouchMove = function(event) {
11449
+ const touch = [...event.changedTouches].find(e => e.identifier === startTouchIdentifier);
11450
+ if (touch)
11451
+ {
11452
+ onSingleTouchMove(copyCanvasPos(touch, math.vec2()));
11453
+ }
11454
+ };
11455
+ canvas.addEventListener("touchmove", onCanvasTouchMove, {passive: true});
11456
+
11457
+ const onCanvasTouchEnd = function(event) {
11458
+ const touch = [...event.changedTouches].find(e => e.identifier === startTouchIdentifier);
11459
+ if (touch)
11460
+ {
11461
+ cleanup();
11462
+ const canvasPos = copyCanvasPos(touch, math.vec2());
11463
+ onCommit(canvasPos, pickWorldPos(canvasPos));
11464
+ }
11465
+ };
11466
+ canvas.addEventListener("touchend", onCanvasTouchEnd, {passive: true});
11467
+
11468
+ return cleanup;
11469
+ };
11470
+ };
11471
+
11358
11472
  /** @private */
11359
11473
  class Wire {
11360
11474
 
@@ -56020,9 +56134,9 @@ const configs$2 = new Configs();
56020
56134
  */
56021
56135
  class VBOBatchingTrianglesBuffer {
56022
56136
 
56023
- constructor() {
56024
- this.maxVerts = configs$2.maxGeometryBatchSize;
56025
- this.maxIndices = configs$2.maxGeometryBatchSize * 3; // Rough rule-of-thumb
56137
+ constructor(maxBatchSize = configs$2.maxGeometryBatchSize) {
56138
+ this.maxVerts = maxBatchSize;
56139
+ this.maxIndices = maxBatchSize * 3; // Rough rule-of-thumb
56026
56140
  this.positions = [];
56027
56141
  this.colors = [];
56028
56142
  this.uv = [];
@@ -85122,7 +85236,21 @@ class SceneModel extends Component {
85122
85236
  if (cfg.image) { // Ignore transcoder for Images
85123
85237
  const image = cfg.image;
85124
85238
  image.crossOrigin = "Anonymous";
85125
- texture.setImage(image, {minFilter, magFilter, wrapS, wrapT, wrapR, flipY: cfg.flipY, encoding});
85239
+ if (image.compressed) {
85240
+ // see `parsedImage` in @loaders.gl/gltf/src/lib/parsers/parse-gltf.ts
85241
+ // NOTE: @loaders.gl in its current version discards potential mipmaps, leaving only a single one
85242
+ const data = image.data;
85243
+ texture.setCompressedData({
85244
+ mipmaps: data,
85245
+ props: {
85246
+ format: data[0].format,
85247
+ minFilter: minFilter,
85248
+ magFilter: magFilter
85249
+ }
85250
+ });
85251
+ } else {
85252
+ texture.setImage(image, {minFilter, magFilter, wrapS, wrapT, wrapR, flipY: cfg.flipY, encoding});
85253
+ }
85126
85254
  } else if (cfg.src) {
85127
85255
  const ext = cfg.src.split('.').pop();
85128
85256
  switch (ext) { // Don't transcode recognized image file types
@@ -88172,6 +88300,16 @@ class DistanceMeasurement extends Component {
88172
88300
  const scene = this.plugin.viewer.scene;
88173
88301
 
88174
88302
  if (this._wpDirty) {
88303
+ const delta = math.subVec3(
88304
+ this._targetWorld,
88305
+ this._originWorld,
88306
+ tmpVec3
88307
+ );
88308
+
88309
+ /**
88310
+ * The length detected for each measurement axis.
88311
+ */
88312
+ this._factors = math.transformVec3(this._axesBasis, delta);
88175
88313
 
88176
88314
  this._measurementOrientation = determineMeasurementOrientation(this._originWorld, this._targetWorld, 0);
88177
88315
  if(this._measurementOrientation === 'Vertical' && this.useRotationAdjustment){
@@ -88196,16 +88334,6 @@ class DistanceMeasurement extends Component {
88196
88334
  this._wp[15] = 1.0;
88197
88335
  }
88198
88336
  else {
88199
- const delta = math.subVec3(
88200
- this._targetWorld,
88201
- this._originWorld,
88202
- tmpVec3
88203
- );
88204
-
88205
- /**
88206
- * The length detected for each measurement axis.
88207
- */
88208
- this._factors = math.transformVec3(this._axesBasis, delta);
88209
88337
 
88210
88338
  this._wp[0] = this._originWorld[0];
88211
88339
  this._wp[1] = this._originWorld[1];
@@ -91358,6 +91486,12 @@ class FastNavPlugin extends Plugin {
91358
91486
  class GLTFDefaultDataSource {
91359
91487
 
91360
91488
  constructor(cfg = {}) {
91489
+
91490
+ /**
91491
+ * Set `true` to enable cache busting for HTTP GETs.
91492
+ * This is `true` by default.
91493
+ * @type {boolean}
91494
+ */
91361
91495
  this.cacheBuster = (cfg.cacheBuster !== false);
91362
91496
  }
91363
91497
 
@@ -126039,12 +126173,15 @@ class RenderService {
126039
126173
  return element.checked;
126040
126174
  }
126041
126175
 
126042
- setCheckbox(nodeId, checked) {
126176
+ setCheckbox(nodeId, checked, indeterminate = false) {
126043
126177
  const checkbox = document.getElementById(`checkbox-${nodeId}`);
126044
126178
  if (checkbox) {
126045
126179
  if (checked !== checkbox.checked) {
126046
126180
  checkbox.checked = checked;
126047
126181
  }
126182
+ if (indeterminate !== checkbox.indeterminate) {
126183
+ checkbox.indeterminate = indeterminate;
126184
+ }
126048
126185
  }
126049
126186
  }
126050
126187
 
@@ -126432,6 +126569,7 @@ class TreeViewPlugin extends Plugin {
126432
126569
  * vertical World axis. For all hierarchy types, other node types will be ordered in the ascending alphanumeric order of their titles.
126433
126570
  * @param {Boolean} [cfg.pruneEmptyNodes=true] When true, will not contain nodes that don't have content in the {@link Scene}. These are nodes whose {@link MetaObject}s don't have {@link Entity}s.
126434
126571
  * @param {RenderService} [cfg.renderService] Optional {@link RenderService} to use. Defaults to the {@link TreeViewPlugin}'s default {@link RenderService}.
126572
+ * @param {Boolean} [cfg.showIndeterminate=false] When true, will show indeterminate state for checkboxes when some but not all child nodes are checked
126435
126573
  */
126436
126574
  constructor(viewer, cfg = {}) {
126437
126575
 
@@ -126483,6 +126621,7 @@ class TreeViewPlugin extends Plugin {
126483
126621
  this._pruneEmptyNodes = cfg.pruneEmptyNodes;
126484
126622
  this._showListItemElementId = null;
126485
126623
  this._renderService = cfg.renderService || new RenderService();
126624
+ this._showIndeterminate = cfg.showIndeterminate ?? false;
126486
126625
 
126487
126626
  if (!this._renderService) {
126488
126627
  throw new Error('TreeViewPlugin: no render service set');
@@ -126524,8 +126663,10 @@ class TreeViewPlugin extends Plugin {
126524
126663
  } else {
126525
126664
  parent.numVisibleEntities--;
126526
126665
  }
126527
-
126528
- this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0));
126666
+ const indeterminate = this._showIndeterminate
126667
+ && parent.numVisibleEntities > 0
126668
+ && parent.numVisibleEntities < parent.numEntities;
126669
+ this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
126529
126670
 
126530
126671
  parent = parent.parent;
126531
126672
  }
@@ -126607,8 +126748,10 @@ class TreeViewPlugin extends Plugin {
126607
126748
  } else {
126608
126749
  parent.numVisibleEntities -= numUpdated;
126609
126750
  }
126610
-
126611
- this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0));
126751
+ const indeterminate = this._showIndeterminate
126752
+ && parent.numVisibleEntities > 0
126753
+ && parent.numVisibleEntities < parent.numEntities;
126754
+ this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
126612
126755
 
126613
126756
  parent = parent.parent;
126614
126757
  }
@@ -126766,6 +126909,8 @@ class TreeViewPlugin extends Plugin {
126766
126909
  return; // Node may not exist for the given object if (this._pruneEmptyNodes == true)
126767
126910
  }
126768
126911
 
126912
+ this.collapse();
126913
+
126769
126914
  const nodeId = node.nodeId;
126770
126915
 
126771
126916
  const switchElement = this._renderService.getSwitchElement(nodeId);
@@ -126848,8 +126993,8 @@ class TreeViewPlugin extends Plugin {
126848
126993
  collapse() {
126849
126994
  for (let i = 0, len = this._rootNodes.length; i < len; i++) {
126850
126995
  const rootNode = this._rootNodes[i];
126851
- const objectId = rootNode.objectId;
126852
- this._collapseNode(objectId);
126996
+ const nodeId = rootNode.nodeId;
126997
+ this._collapseNode(nodeId);
126853
126998
  }
126854
126999
  }
126855
127000
 
@@ -139495,8 +139640,8 @@ class DotBIMDefaultDataSource {
139495
139640
  * set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
139496
139641
  * * When loading, can set the World-space position, scale and rotation of each model within World space,
139497
139642
  * along with initial properties for all the model's {@link Entity}s.
139498
- * * Allows to mask which IFC types we want to load.
139499
- * * Allows to configure initial viewer state for specified IFC types (color, visibility, selection, highlighted, X-rayed, pickable, etc).
139643
+ * * Allows to mask which types we want to load.
139644
+ * * Allows to configure initial viewer state for specified types (color, visibility, selection, highlighted, X-rayed, pickable, etc).
139500
139645
  *
139501
139646
  * ## Usage
139502
139647
  *
@@ -139566,9 +139711,9 @@ class DotBIMDefaultDataSource {
139566
139711
  * });
139567
139712
  * ````
139568
139713
  *
139569
- * ## Including and excluding IFC types
139714
+ * ## Including and excluding types
139570
139715
  *
139571
- * We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
139716
+ * We can also load only those objects that have the specified types. In the example below, we'll load only the
139572
139717
  * objects that represent walls.
139573
139718
  *
139574
139719
  * ````javascript
@@ -139579,7 +139724,7 @@ class DotBIMDefaultDataSource {
139579
139724
  * });
139580
139725
  * ````
139581
139726
  *
139582
- * We can also load only those objects that **don't** have the specified IFC types. In the example below, we'll load only the
139727
+ * We can also load only those objects that **don't** have the specified types. In the example below, we'll load only the
139583
139728
  * objects that do not represent empty space.
139584
139729
  *
139585
139730
  * ````javascript
@@ -139590,13 +139735,13 @@ class DotBIMDefaultDataSource {
139590
139735
  * });
139591
139736
  * ````
139592
139737
  *
139593
- * # Configuring initial IFC object appearances
139738
+ * # Configuring initial object appearances
139594
139739
  *
139595
- * We can specify the custom initial appearance of loaded objects according to their IFC types.
139740
+ * We can specify the custom initial appearance of loaded objects according to their types.
139596
139741
  *
139597
139742
  * This is useful for things like:
139598
139743
  *
139599
- * * setting the colors to our objects according to their IFC types,
139744
+ * * setting the colors to our objects according to their types,
139600
139745
  * * automatically hiding ````IfcSpace```` objects, and
139601
139746
  * * ensuring that ````IfcWindow```` objects are always transparent.
139602
139747
  * <br>
@@ -139628,7 +139773,7 @@ class DotBIMDefaultDataSource {
139628
139773
  * });
139629
139774
  * ````
139630
139775
  *
139631
- * When we don't customize the appearance of IFC types, as just above, then IfcSpace elements tend to obscure other
139776
+ * When we don't customize the appearance of types, as just above, then IfcSpace elements tend to obscure other
139632
139777
  * elements, which can be confusing.
139633
139778
  *
139634
139779
  * It's often helpful to make IfcSpaces transparent and unpickable, like this:
@@ -139828,36 +139973,36 @@ class DotBIMLoaderPlugin extends Plugin {
139828
139973
 
139829
139974
  const dbMeshLoaded = {};
139830
139975
 
139831
- const ifcProjectId = math.createUUID();
139832
- const ifcSiteId = math.createUUID();
139833
- const ifcBuildingId = math.createUUID();
139834
- const ifcBuildingStoryId = math.createUUID();
139976
+ const projectId = math.createUUID();
139977
+ const siteId = math.createUUID();
139978
+ const buildingId = math.createUUID();
139979
+ const buildingStoryId = math.createUUID();
139835
139980
 
139836
139981
  const metaModelData = {
139837
139982
  metaObjects: [
139838
139983
  {
139839
- id: ifcProjectId,
139840
- name: "IfcProject",
139841
- type: "IfcProject",
139984
+ id: projectId,
139985
+ name: "Project",
139986
+ type: "Project",
139842
139987
  parent: null
139843
139988
  },
139844
139989
  {
139845
- id: ifcSiteId,
139846
- name: "IfcSite",
139847
- type: "IfcSite",
139848
- parent: ifcProjectId
139990
+ id: siteId,
139991
+ name: "Site",
139992
+ type: "Site",
139993
+ parent: projectId
139849
139994
  },
139850
139995
  {
139851
- id: ifcBuildingId,
139852
- name: "IfcBuilding",
139853
- type: "IfcBuilding",
139854
- parent: ifcSiteId
139996
+ id: buildingId,
139997
+ name: "Building",
139998
+ type: "Building",
139999
+ parent: siteId
139855
140000
  },
139856
140001
  {
139857
- id: ifcBuildingStoryId,
139858
- name: "IfcBuildingStorey",
139859
- type: "IfcBuildingStorey",
139860
- parent: ifcBuildingId
140002
+ id: buildingStoryId,
140003
+ name: "BuildingStorey",
140004
+ type: "BuildingStorey",
140005
+ parent: buildingId
139861
140006
  }
139862
140007
  ],
139863
140008
  propertySets: []
@@ -140024,30 +140169,23 @@ class DotBIMLoaderPlugin extends Plugin {
140024
140169
  });
140025
140170
  }
140026
140171
 
140172
+ let properties = [];
140027
140173
  for (let infoKey in info) {
140028
- let properties;
140029
- if (infoKey.startsWith("IFC_Pset_")) {
140030
- if (!properties) {
140031
- properties = [];
140032
- }
140033
- properties.push({
140034
- name: infoKey,
140035
- value: info[infoKey]
140036
- });
140037
- }
140038
- if (properties) {
140039
- metaModelData.propertySets.push({
140040
- id: objectId,
140041
- properties
140042
- });
140043
- }
140174
+ properties.push({
140175
+ name: infoKey,
140176
+ value: info[infoKey]
140177
+ });
140044
140178
  }
140179
+ metaModelData.propertySets.push({
140180
+ id: objectId,
140181
+ properties
140182
+ });
140045
140183
 
140046
140184
  metaModelData.metaObjects.push({
140047
140185
  id: objectId,
140048
140186
  name: info && info.Name && info.Name !== "None" ? info.Name : `${element.type} ${objectId}`,
140049
140187
  type: element.type,
140050
- parent: ifcBuildingStoryId,
140188
+ parent: buildingStoryId,
140051
140189
  propertySetIds: [objectId]
140052
140190
  });
140053
140191
  }
@@ -140505,122 +140643,6 @@ const mousePointSelector = function(viewer, ray2WorldPos) {
140505
140643
  };
140506
140644
  };
140507
140645
 
140508
- const touchPointSelector = function(viewer, pointerCircle, ray2WorldPos) {
140509
- return function(onCancel, onChange, onCommit) {
140510
- const scene = viewer.scene;
140511
- const canvas = scene.canvas.canvas;
140512
- const longTouchTimeoutMs = 300;
140513
- const moveTolerance = 20;
140514
-
140515
- const copyCanvasPos = (event, vec2) => {
140516
- vec2[0] = event.clientX;
140517
- vec2[1] = event.clientY;
140518
- transformToNode(canvas.ownerDocument.documentElement, canvas, vec2);
140519
- return vec2;
140520
- };
140521
-
140522
- const pickWorldPos = canvasPos => {
140523
- const origin = math.vec3();
140524
- const direction = math.vec3();
140525
- math.canvasPosToWorldRay(canvas, scene.camera.viewMatrix, scene.camera.projMatrix, scene.camera.projection, canvasPos, origin, direction);
140526
- return ray2WorldPos(origin, direction);
140527
- };
140528
-
140529
- let longTouchTimeout = null;
140530
- const nop = () => { };
140531
- let onSingleTouchMove = nop;
140532
- let startTouchIdentifier;
140533
-
140534
- const resetAction = function() {
140535
- pointerCircle.stop();
140536
- clearTimeout(longTouchTimeout);
140537
- viewer.cameraControl.active = true;
140538
- onSingleTouchMove = nop;
140539
- startTouchIdentifier = null;
140540
- };
140541
-
140542
- const cleanup = function() {
140543
- resetAction();
140544
- canvas.removeEventListener("touchstart", onCanvasTouchStart);
140545
- canvas.removeEventListener("touchmove", onCanvasTouchMove);
140546
- canvas.removeEventListener("touchend", onCanvasTouchEnd);
140547
- };
140548
-
140549
- const onCanvasTouchStart = function(event) {
140550
- const touches = event.touches;
140551
-
140552
- if (touches.length !== 1)
140553
- {
140554
- resetAction();
140555
- onCancel();
140556
- }
140557
- else
140558
- {
140559
- const startTouch = touches[0];
140560
- const startCanvasPos = copyCanvasPos(startTouch, math.vec2());
140561
-
140562
- const startWorldPos = pickWorldPos(startCanvasPos);
140563
- if (startWorldPos)
140564
- {
140565
- startTouchIdentifier = startTouch.identifier;
140566
-
140567
- onSingleTouchMove = canvasPos => {
140568
- if (math.distVec2(startCanvasPos, canvasPos) > moveTolerance)
140569
- {
140570
- resetAction();
140571
- }
140572
- };
140573
-
140574
- longTouchTimeout = setTimeout(
140575
- function() {
140576
- pointerCircle.start(startCanvasPos);
140577
-
140578
- longTouchTimeout = setTimeout(
140579
- function() {
140580
- pointerCircle.stop();
140581
-
140582
- viewer.cameraControl.active = false;
140583
-
140584
- onSingleTouchMove = canvasPos => {
140585
- onChange(canvasPos, pickWorldPos(canvasPos));
140586
- };
140587
-
140588
- onSingleTouchMove(startCanvasPos);
140589
- },
140590
- longTouchTimeoutMs);
140591
- },
140592
- 250);
140593
- }
140594
- }
140595
- };
140596
- canvas.addEventListener("touchstart", onCanvasTouchStart, {passive: true});
140597
-
140598
- // canvas.addEventListener("touchcancel", e => console.log("touchcancel", e), {passive: true});
140599
-
140600
- const onCanvasTouchMove = function(event) {
140601
- const touch = [...event.changedTouches].find(e => e.identifier === startTouchIdentifier);
140602
- if (touch)
140603
- {
140604
- onSingleTouchMove(copyCanvasPos(touch, math.vec2()));
140605
- }
140606
- };
140607
- canvas.addEventListener("touchmove", onCanvasTouchMove, {passive: true});
140608
-
140609
- const onCanvasTouchEnd = function(event) {
140610
- const touch = [...event.changedTouches].find(e => e.identifier === startTouchIdentifier);
140611
- if (touch)
140612
- {
140613
- cleanup();
140614
- const canvasPos = copyCanvasPos(touch, math.vec2());
140615
- onCommit(canvasPos, pickWorldPos(canvasPos));
140616
- }
140617
- };
140618
- canvas.addEventListener("touchend", onCanvasTouchEnd, {passive: true});
140619
-
140620
- return cleanup;
140621
- };
140622
- };
140623
-
140624
140646
  const planeIntersect = function(p0, n, origin, direction) {
140625
140647
  const t = - (math.dotVec3(origin, n) - p0) / math.dotVec3(direction, n);
140626
140648
  {
@@ -141996,6 +142018,7 @@ exports.DistanceMeasurementsControl = DistanceMeasurementsControl;
141996
142018
  exports.DistanceMeasurementsMouseControl = DistanceMeasurementsMouseControl;
141997
142019
  exports.DistanceMeasurementsPlugin = DistanceMeasurementsPlugin;
141998
142020
  exports.DistanceMeasurementsTouchControl = DistanceMeasurementsTouchControl;
142021
+ exports.Dot3D = Dot3D;
141999
142022
  exports.DotBIMDefaultDataSource = DotBIMDefaultDataSource;
142000
142023
  exports.DotBIMLoaderPlugin = DotBIMLoaderPlugin;
142001
142024
  exports.EdgeMaterial = EdgeMaterial;
@@ -142138,6 +142161,8 @@ exports.ZonesPlugin = ZonesPlugin;
142138
142161
  exports.ZonesPolysurfaceMouseControl = ZonesPolysurfaceMouseControl;
142139
142162
  exports.ZonesPolysurfaceTouchControl = ZonesPolysurfaceTouchControl;
142140
142163
  exports.ZonesTouchControl = ZonesTouchControl;
142164
+ exports.activateDraggableDot = activateDraggableDot;
142165
+ exports.activateDraggableDots = activateDraggableDots;
142141
142166
  exports.buildBoxGeometry = buildBoxGeometry;
142142
142167
  exports.buildBoxLinesGeometry = buildBoxLinesGeometry;
142143
142168
  exports.buildBoxLinesGeometryFromAABB = buildBoxLinesGeometryFromAABB;
@@ -142164,6 +142189,8 @@ exports.rtcToWorldPos = rtcToWorldPos;
142164
142189
  exports.sRGBEncoding = sRGBEncoding;
142165
142190
  exports.setFrustum = setFrustum;
142166
142191
  exports.stats = stats;
142192
+ exports.touchPointSelector = touchPointSelector$1;
142193
+ exports.transformToNode = transformToNode;
142167
142194
  exports.utils = utils;
142168
142195
  exports.worldToRTCPos = worldToRTCPos;
142169
142196
  exports.worldToRTCPositions = worldToRTCPositions;