@xeokit/xeokit-sdk 2.6.86 → 2.6.87-rc1-no-las

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.
Files changed (75) hide show
  1. package/README.md +3 -3
  2. package/dist/xeokit-sdk.cjs.js +15512 -32635
  3. package/dist/xeokit-sdk.es.js +15513 -32634
  4. package/dist/xeokit-sdk.es5.js +31259 -29843
  5. package/dist/xeokit-sdk.es5.js.map +1 -0
  6. package/dist/xeokit-sdk.min.cjs.js +8 -8
  7. package/dist/xeokit-sdk.min.es.js +8 -8
  8. package/dist/xeokit-sdk.min.es5.js +34 -33
  9. package/dist/xeokit-sdk.min.es5.js.map +1 -0
  10. package/package.json +10 -3
  11. package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +81 -81
  12. package/src/plugins/CxConverterIFCLoaderPlugin/index.js +1 -1
  13. package/src/plugins/LASLoaderPlugin/index.js +1 -1
  14. package/src/plugins/NavCubePlugin/NavCubePlugin.js +63 -22
  15. package/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +5 -5
  16. package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +5 -5
  17. package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +9 -9
  18. package/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +5 -5
  19. package/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +5 -5
  20. package/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +5 -5
  21. package/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +5 -5
  22. package/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +5 -5
  23. package/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +5 -5
  24. package/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +5 -5
  25. package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +5 -5
  26. package/src/plugins/index.js +2 -2
  27. package/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +7 -6
  28. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +26 -108
  29. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +3 -14
  30. package/types/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.d.ts +5 -23
  31. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +5 -25
  32. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +20 -100
  33. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +3 -14
  34. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +18 -83
  35. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +21 -106
  36. package/types/viewer/Configs.d.ts +6 -24
  37. package/types/viewer/scene/CameraControl/CameraControl.d.ts +66 -445
  38. package/types/viewer/scene/Component.d.ts +1 -1
  39. package/types/viewer/scene/Entity.d.ts +40 -186
  40. package/types/viewer/scene/camera/Camera.d.ts +50 -170
  41. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +8 -57
  42. package/types/viewer/scene/camera/CameraPath.d.ts +8 -13
  43. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +4 -22
  44. package/types/viewer/scene/camera/CustomProjection.d.ts +6 -21
  45. package/types/viewer/scene/camera/Frustum.d.ts +18 -90
  46. package/types/viewer/scene/camera/Ortho.d.ts +14 -54
  47. package/types/viewer/scene/camera/Perspective.d.ts +16 -70
  48. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +21 -25
  49. package/types/viewer/scene/geometry/VBOGeometry.d.ts +7 -7
  50. package/types/viewer/scene/lights/AmbientLight.d.ts +4 -26
  51. package/types/viewer/scene/lights/DirLight.d.ts +8 -52
  52. package/types/viewer/scene/lights/PointLight.d.ts +14 -93
  53. package/types/viewer/scene/materials/EdgeMaterial.d.ts +12 -37
  54. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +22 -119
  55. package/types/viewer/scene/materials/Fresnel.d.ts +10 -50
  56. package/types/viewer/scene/materials/LambertMaterial.d.ts +16 -90
  57. package/types/viewer/scene/materials/LinesMaterial.d.ts +7 -25
  58. package/types/viewer/scene/materials/MetallicMaterial.d.ts +40 -127
  59. package/types/viewer/scene/materials/PhongMaterial.d.ts +52 -185
  60. package/types/viewer/scene/materials/PointsMaterial.d.ts +20 -101
  61. package/types/viewer/scene/materials/SpecularMaterial.d.ts +41 -117
  62. package/types/viewer/scene/materials/Texture.d.ts +22 -62
  63. package/types/viewer/scene/models/SceneModel.d.ts +76 -233
  64. package/types/viewer/scene/models/SceneModelEntity.d.ts +50 -211
  65. package/types/viewer/scene/models/SceneModelMesh.d.ts +4 -4
  66. package/types/viewer/scene/models/SceneModelTransform.d.ts +14 -59
  67. package/types/viewer/scene/paths/CubicBezierCurve.d.ts +12 -73
  68. package/types/viewer/scene/paths/Curve.d.ts +6 -19
  69. package/types/viewer/scene/paths/Path.d.ts +10 -57
  70. package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +10 -57
  71. package/types/viewer/scene/paths/SplineCurve.d.ts +6 -32
  72. package/types/viewer/scene/scene/Scene.d.ts +94 -196
  73. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +12 -69
  74. package/types/viewer/scene/viewport/Viewport.d.ts +4 -14
  75. package/types/viewer/scene/webgl/PickResult.d.ts +13 -28
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xeokit-sdk.min.es5.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.6.86",
3
+ "version": "2.6.87-rc1-no-las",
4
4
  "description": "3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
7
7
  "types": "./types/index.d.ts",
8
8
  "scripts": {
9
- "build": "rollup --config rollup.config.js; rollup --config rollup.minified.config.js",
9
+ "build": "rollup --config rollup.config.js",
10
10
  "dev-build": "rollup --config rollup.dev.config.js",
11
11
  "docs": "rm -Rf ./docs/*; ./node_modules/.bin/esdoc",
12
12
  "typedocs": "rm -Rf ./docs/*; typedoc --tsconfig tsconfig.json",
@@ -56,7 +56,13 @@
56
56
  "@loaders.gl/core": "^4.3.3",
57
57
  "@loaders.gl/gltf": "^4.3.3",
58
58
  "@loaders.gl/las": "^4.3.3",
59
- "html2canvas": "^1.4.1"
59
+ "@rollup/plugin-replace": "^6.0.2",
60
+ "core-js": "^3.42.0",
61
+ "@rollup/plugin-replace": "^6.0.2",
62
+ "core-js": "^3.42.0",
63
+ "html2canvas": "^1.4.1",
64
+ "pako": "^2.1.0",
65
+ "pako": "^2.1.0"
60
66
  },
61
67
  "devDependencies": {
62
68
  "@babel/core": "^7.18.6",
@@ -65,6 +71,7 @@
65
71
  "@percy/playwright": "^1.0.7",
66
72
  "@playwright/test": "^1.49.1",
67
73
  "@rollup/plugin-babel": "^5.3.1",
74
+ "@rollup/plugin-commonjs": "^28.0.3",
68
75
  "@rollup/plugin-node-resolve": "^13.2.1",
69
76
  "@types/node": "^22.10.6",
70
77
  "auto-changelog": "^2.4.0",
@@ -1,86 +1,86 @@
1
- import { Plugin } from "../../viewer/Plugin.js";
2
- import { GLTFLoaderPlugin } from "../GLTFLoaderPlugin/GLTFLoaderPlugin.js";
3
- import { ifc2gltf } from "@creooxag/cxconverter";
1
+ // import { Plugin } from "../../viewer/Plugin.js";
2
+ // import { GLTFLoaderPlugin } from "../GLTFLoaderPlugin/GLTFLoaderPlugin.js";
3
+ // import { ifc2gltf } from "@creooxag/cxconverter";
4
4
 
5
- /**
6
- * Fetches a file from the given URL and returns its contents as text.
7
- *
8
- * @param {string} url - The URL to fetch the file from.
9
- * @returns {Promise<string>} A promise that resolves to the file contents.
10
- * @private
11
- */
12
- async function fetchFile(url) {
13
- try {
14
- const response = await fetch(url);
15
- if (!response.ok) {
16
- throw new Error(`HTTP error! Status: ${response.status}`);
17
- }
18
- return response.text();
19
- } catch (error) {
20
- console.error('Error fetching file:', error);
21
- }
22
- }
5
+ // /**
6
+ // * Fetches a file from the given URL and returns its contents as text.
7
+ // *
8
+ // * @param {string} url - The URL to fetch the file from.
9
+ // * @returns {Promise<string>} A promise that resolves to the file contents.
10
+ // * @private
11
+ // */
12
+ // async function fetchFile(url) {
13
+ // try {
14
+ // const response = await fetch(url);
15
+ // if (!response.ok) {
16
+ // throw new Error(`HTTP error! Status: ${response.status}`);
17
+ // }
18
+ // return response.text();
19
+ // } catch (error) {
20
+ // console.error('Error fetching file:', error);
21
+ // }
22
+ // }
23
23
 
24
- /**
25
- * {@link Viewer} plugin that uses [CxConverter](https://github.com/Creoox/cxconverter) to load BIM models directly from IFC files, using its WebAssembly buid from [npm package](https://www.npmjs.com/package/@creooxag/cxconverter).
26
- *
27
- * ## Overview
28
- * The WebAssembly build of CxConverter is still in alfa stage, so it may not work as expected. This documentation will be updated as the library and the plugin evolve. The example below shows how to use the plugin:
29
- * ````javascript
30
- * import { CxConverterIFCLoaderPlugin, Viewer } from "../../dist/xeokit-sdk.es.js";
31
- * const cxConverterIFCLoaderPlugin = new CxConverterIFCLoaderPlugin(viewer);
32
- *
33
- * const sceneModel = await cxConverterIFCLoaderPlugin.load({
34
- * src: "../../assets/models/ifc/Duplex.ifc"
35
- * });
36
- * ````
37
- See the code in action [here](https://xeokit.github.io/xeokit-sdk/examples/buildings/#cxConverterIFC_vbo_Duplex).
38
- */
24
+ // /**
25
+ // * {@link Viewer} plugin that uses [CxConverter](https://github.com/Creoox/cxconverter) to load BIM models directly from IFC files, using its WebAssembly buid from [npm package](https://www.npmjs.com/package/@creooxag/cx-converter).
26
+ // *
27
+ // * ## Overview
28
+ // * The WebAssembly build of CxConverter is still in alfa stage, so it may not work as expected. This documentation will be updated as the library and the plugin evolve. The example below shows how to use the plugin:
29
+ // * ````javascript
30
+ // * import { CxConverterIFCLoaderPlugin, Viewer } from "../../dist/xeokit-sdk.es.js";
31
+ // * const cxConverterIFCLoaderPlugin = new CxConverterIFCLoaderPlugin(viewer);
32
+ // *
33
+ // * const sceneModel = await cxConverterIFCLoaderPlugin.load({
34
+ // * src: "../../assets/models/ifc/Duplex.ifc"
35
+ // * });
36
+ // * ````
37
+ // See the code in action [here](https://xeokit.github.io/xeokit-sdk/examples/buildings/#cxConverterIFC_vbo_Duplex).
38
+ // */
39
39
 
40
- class CxConverterIFCLoaderPlugin extends Plugin {
41
- /**
42
- * @constructor
43
- * @param {Viewer} viewer The Viewer.
44
- * @param {Object} [cfg={}] Plugin configuration.
45
- */
46
- constructor(viewer, cfg = {}) {
47
- super("ifcLoader", viewer, cfg);
40
+ // class CxConverterIFCLoaderPlugin extends Plugin {
41
+ // /**
42
+ // * @constructor
43
+ // * @param {Viewer} viewer The Viewer.
44
+ // * @param {Object} [cfg={}] Plugin configuration.
45
+ // */
46
+ // constructor(viewer, cfg = {}) {
47
+ // super("ifcLoader", viewer, cfg);
48
48
 
49
- /**
50
- * The GLTFLoaderPlugin used internally to load the converted GLTF.
51
- * @type {GLTFLoaderPlugin}
52
- */
53
- this.gltfLoader = new GLTFLoaderPlugin(this.viewer);
54
- }
49
+ // /**
50
+ // * The GLTFLoaderPlugin used internally to load the converted GLTF.
51
+ // * @type {GLTFLoaderPlugin}
52
+ // */
53
+ // this.gltfLoader = new GLTFLoaderPlugin(this.viewer);
54
+ // }
55
55
 
56
- /**
57
- * Loads an IFC model from the given source.
58
- *
59
- * @param {Object} [params={}] Loading parameters.
60
- * @param {string} params.src Path to an IFC file.
61
- * @param {Function} [params.progressCallback] Callback to track loading progress.
62
- * @param {Function} [params.progressTextCallback] Callback to track loading progress with text updates.
63
- * @returns {Promise<SceneModel>} A promise that resolves to the loaded SceneModel.
64
- */
65
- async load(params = {}) {
66
- if (!params.src) {
67
- this.error("load() param expected: src");
68
- }
69
- const data = await fetchFile(params.src);
70
- const { gltf, metaData } = await ifc2gltf(
71
- data,
72
- {
73
- remote: true,
74
- progressCallback: params.progressCallback,
75
- progressTextCallback: params.progressTextCallback
76
- }
77
- );
78
- const sceneModel = this.gltfLoader.load({
79
- id: "myModel",
80
- gltf: gltf,
81
- metaModelJSON: metaData
82
- });
83
- return sceneModel;
84
- }
85
- }
86
- export { CxConverterIFCLoaderPlugin };
56
+ // /**
57
+ // * Loads an IFC model from the given source.
58
+ // *
59
+ // * @param {Object} [params={}] Loading parameters.
60
+ // * @param {string} params.src Path to an IFC file.
61
+ // * @param {Function} [params.progressCallback] Callback to track loading progress.
62
+ // * @param {Function} [params.progressTextCallback] Callback to track loading progress with text updates.
63
+ // * @returns {Promise<SceneModel>} A promise that resolves to the loaded SceneModel.
64
+ // */
65
+ // async load(params = {}) {
66
+ // if (!params.src) {
67
+ // this.error("load() param expected: src");
68
+ // }
69
+ // const data = await fetchFile(params.src);
70
+ // const { gltf, metaData } = await ifc2gltf(
71
+ // data,
72
+ // {
73
+ // remote: true,
74
+ // progressCallback: params.progressCallback,
75
+ // progressTextCallback: params.progressTextCallback
76
+ // }
77
+ // );
78
+ // const sceneModel = this.gltfLoader.load({
79
+ // id: "myModel",
80
+ // gltf: gltf,
81
+ // metaModelJSON: metaData
82
+ // });
83
+ // return sceneModel;
84
+ // }
85
+ // }
86
+ // export { CxConverterIFCLoaderPlugin };
@@ -1 +1 @@
1
- export * from "./CxConverterIFCLoaderPlugin.js";
1
+ // export * from "./CxConverterIFCLoaderPlugin.js";
@@ -1 +1 @@
1
- export * from "./LASLoaderPlugin.js";
1
+ // export * from "./LASLoaderPlugin.js";
@@ -295,25 +295,9 @@ class NavCubePlugin extends Plugin {
295
295
  lastY = posY;
296
296
  }
297
297
 
298
- function getCoordsWithinElement(event) {
299
- var coords = [0, 0];
300
- if (!event) {
301
- event = window.event;
302
- coords[0] = event.x;
303
- coords[1] = event.y;
304
- } else {
305
- var element = event.target;
306
- var totalOffsetLeft = 0;
307
- var totalOffsetTop = 0;
308
- while (element.offsetParent) {
309
- totalOffsetLeft += element.offsetLeft;
310
- totalOffsetTop += element.offsetTop;
311
- element = element.offsetParent;
312
- }
313
- coords[0] = event.pageX - totalOffsetLeft;
314
- coords[1] = event.pageY - totalOffsetTop;
315
- }
316
- return coords;
298
+ function getCoordsWithinElement(clientCoords) {
299
+ const { left, top } = self._navCubeCanvas.getBoundingClientRect();
300
+ return [clientCoords.clientX - left, clientCoords.clientY - top];
317
301
  }
318
302
 
319
303
  {
@@ -349,7 +333,7 @@ class NavCubePlugin extends Plugin {
349
333
  downY = e.y;
350
334
  lastX = e.clientX;
351
335
  lastY = e.clientY;
352
- var canvasPos = getCoordsWithinElement(e);
336
+ var canvasPos = getCoordsWithinElement({clientX: e.clientX, clientY: e.clientY});
353
337
  var hit = navCubeScene.pick({
354
338
  canvasPos: canvasPos
355
339
  });
@@ -369,7 +353,7 @@ class NavCubePlugin extends Plugin {
369
353
  if (downX === null) {
370
354
  return;
371
355
  }
372
- var canvasPos = getCoordsWithinElement(e);
356
+ var canvasPos = getCoordsWithinElement({clientX: e.clientX, clientY: e.clientY});
373
357
  var hit = navCubeScene.pick({
374
358
  canvasPos: canvasPos,
375
359
  pickSurface: true
@@ -442,7 +426,7 @@ class NavCubePlugin extends Plugin {
442
426
  if (!over) {
443
427
  return;
444
428
  }
445
- var canvasPos = getCoordsWithinElement(e);
429
+ var canvasPos = getCoordsWithinElement({clientX: e.clientX, clientY: e.clientY});
446
430
  var hit = navCubeScene.pick({
447
431
  canvasPos: canvasPos,
448
432
  pickSurface: true
@@ -472,6 +456,55 @@ class NavCubePlugin extends Plugin {
472
456
  }
473
457
  }
474
458
  });
459
+
460
+ self._navCubeCanvas.addEventListener("touchstart", self._onTouchStart = function (e) {
461
+ if (e.touches.length > 0) {
462
+ downX = e.touches[0].clientX;
463
+ downY = e.touches[0].clientY;
464
+ lastX = e.touches[0].clientX;
465
+ lastY = e.touches[0].clientY;
466
+ var canvasPos = getCoordsWithinElement({clientX: e.touches[0].clientX, clientY: e.touches[0].clientY});
467
+ var hit = navCubeScene.pick({
468
+ canvasPos: canvasPos
469
+ });
470
+ if (hit) {
471
+ down = true;
472
+ } else {
473
+ down = false;
474
+ }
475
+ }
476
+ },
477
+ {
478
+ passive: false
479
+ });
480
+
481
+ self._navCubeCanvas.addEventListener("touchmove", self._onTouchMove = function (e) {
482
+ e.preventDefault();
483
+ var touch = e.touches[0];
484
+ var posX = touch.clientX;
485
+ var posY = touch.clientY;
486
+
487
+ var currentElement = document.elementFromPoint(posX, posY);
488
+ over = (self._navCubeCanvas === currentElement);
489
+
490
+ if (!over) {
491
+ return;
492
+ }
493
+ if (down) {
494
+ actionMove(posX, posY);
495
+ return;
496
+ }
497
+ },
498
+ {
499
+ passive: false
500
+ });
501
+
502
+ self._navCubeCanvas.addEventListener("touchend", self._onTouchEnd = function (e) {
503
+ down = false;
504
+ if (downX === null) {
505
+ return;
506
+ }
507
+ });
475
508
 
476
509
  var flyTo = (function () {
477
510
  var center = math.vec3();
@@ -730,6 +763,10 @@ class NavCubePlugin extends Plugin {
730
763
  this._navCubeCanvas.removeEventListener("mousemove", this._onMouseMove);
731
764
  this._navCubeCanvas.removeEventListener("mouseup", this._onMouseUp);
732
765
 
766
+ this._navCubeCanvas.removeEventListener("touchstart", this._onTouchStart);
767
+ this._navCubeCanvas.removeEventListener("touchmove", this._onTouchMove);
768
+ this._navCubeCanvas.removeEventListener("touchend", this._onTouchEnd);
769
+
733
770
  this._navCubeCanvas = null;
734
771
  this._cubeTextureCanvas.destroy();
735
772
  this._cubeTextureCanvas = null;
@@ -739,6 +776,10 @@ class NavCubePlugin extends Plugin {
739
776
  this._onMouseDown = null;
740
777
  this._onMouseMove = null;
741
778
  this._onMouseUp = null;
779
+
780
+ this._onTouchStart = null;
781
+ this._onTouchMove = null;
782
+ this._onTouchEnd = null;
742
783
  }
743
784
 
744
785
  this._navCubeScene.destroy();
@@ -9,13 +9,13 @@
9
9
  */
10
10
 
11
11
  import {utils} from "../../../viewer/scene/utils.js";
12
- import * as p from "./lib/pako.js";
12
+ import pako from 'pako/dist/pako.esm.mjs';
13
13
  import {math} from "../../../viewer/scene/math/math.js";
14
14
 
15
- let pako = window.pako || p;
16
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
17
- pako = pako.default;
18
- }
15
+ // let pako = window.pako || p;
16
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
17
+ // pako = pako.default;
18
+ // }
19
19
 
20
20
  const decompressColor = (function () {
21
21
  const color2 = new Float32Array(3);
@@ -3,15 +3,15 @@
3
3
  */
4
4
 
5
5
  import {utils} from "../../../viewer/scene/utils.js";
6
- import * as p from "./lib/pako.js";
6
+ import pako from 'pako/dist/pako.esm.mjs';
7
7
  import {math} from "../../../viewer/scene/math/math.js";
8
8
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
9
9
  import {JPEGMediaType, PNGMediaType} from "../../../viewer/scene/constants/constants.js";
10
10
 
11
- let pako = window.pako || p;
12
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
13
- pako = pako.default;
14
- }
11
+ // let pako = window.pako || p;
12
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
13
+ // pako = pako.default;
14
+ // }
15
15
 
16
16
  const tempVec4a = math.vec4();
17
17
  const tempVec4b = math.vec4();
@@ -3,16 +3,16 @@
3
3
  */
4
4
 
5
5
  import {utils} from "../../../viewer/scene/utils.js";
6
- import * as p from "./lib/pako.js";
6
+ import pako from 'pako/dist/pako.esm.mjs';
7
7
  import {math} from "../../../viewer/scene/math/math.js";
8
8
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
9
9
  import {JPEGMediaType, PNGMediaType} from "../../../viewer/scene/constants/constants.js";
10
10
  import { buildVectorTextGeometry } from "../../../viewer/index.js";
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  const tempVec4a = math.vec4();
18
18
  const tempVec4b = math.vec4();
@@ -526,11 +526,11 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
526
526
  text: axisLabel,
527
527
  size: 2
528
528
  });
529
-
529
+
530
530
  geometryArrays.decompressedPositions = ifcLabel.positions;
531
531
  geometryArrays.geometryIndices = ifcLabel.indices;
532
532
  geometryArrays.geometryPositions = null;
533
-
533
+
534
534
  geometryValid = (geometryArrays.decompressedPositions.length > 0 && geometryArrays.geometryIndices.length > 0);
535
535
  break;
536
536
  default:
@@ -564,7 +564,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
564
564
  }
565
565
  geometryArrays.geometryPositions = null;
566
566
  }
567
-
567
+
568
568
  geometryArraysCache[geometryId] = geometryArrays;
569
569
  }
570
570
  }
@@ -723,7 +723,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
723
723
  text: axisLabel,
724
724
  size: 2
725
725
  });
726
-
726
+
727
727
  geometryPositions = ifcLabel.positions;
728
728
  geometryIndices = ifcLabel.indices;
729
729
 
@@ -9,13 +9,13 @@ DEPRECATED
9
9
  */
10
10
 
11
11
  import {utils} from "../../../viewer/scene/utils.js";
12
- import * as p from "./lib/pako.js";
12
+ import pako from 'pako/dist/pako.esm.mjs';
13
13
  import {math} from "../../../viewer/scene/math/math.js";
14
14
 
15
- let pako = window.pako || p;
16
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
17
- pako = pako.default;
18
- }
15
+ // let pako = window.pako || p;
16
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
17
+ // pako = pako.default;
18
+ // }
19
19
 
20
20
  function extract(elements) {
21
21
  return {
@@ -7,13 +7,13 @@ Parser for .XKT Format V3
7
7
  */
8
8
 
9
9
  import {utils} from "../../../viewer/scene/utils.js";
10
- import * as p from "./lib/pako.js";
10
+ import pako from 'pako/dist/pako.esm.mjs';
11
11
  import {math} from "../../../viewer/scene/math/math.js";
12
12
 
13
- let pako = window.pako || p;
14
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
15
- pako = pako.default;
16
- }
13
+ // let pako = window.pako || p;
14
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
15
+ // pako = pako.default;
16
+ // }
17
17
 
18
18
  function extract(elements) {
19
19
  return {
@@ -7,12 +7,12 @@ Parser for .XKT Format V4
7
7
  */
8
8
 
9
9
  import {utils} from "../../../viewer/scene/utils.js";
10
- import * as p from "./lib/pako.js";
10
+ import pako from 'pako/dist/pako.esm.mjs';
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  function extract(elements) {
18
18
  return {
@@ -7,12 +7,12 @@
7
7
  */
8
8
 
9
9
  import {utils} from "../../../viewer/scene/utils.js";
10
- import * as p from "./lib/pako.js";
10
+ import pako from 'pako/dist/pako.esm.mjs';
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  function extract(elements) {
18
18
  return {
@@ -5,14 +5,14 @@
5
5
  */
6
6
 
7
7
  import {utils} from "../../../viewer/scene/utils.js";
8
- import * as p from "./lib/pako.js";
8
+ import pako from 'pako/dist/pako.esm.mjs';
9
9
  import {math} from "../../../viewer/scene/math/math.js";
10
10
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  function extract(elements) {
18
18
 
@@ -5,14 +5,14 @@
5
5
  */
6
6
 
7
7
  import {utils} from "../../../viewer/scene/utils.js";
8
- import * as p from "./lib/pako.js";
8
+ import pako from 'pako/dist/pako.esm.mjs';
9
9
  import {math} from "../../../viewer/scene/math/math.js";
10
10
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  function extract(elements) {
18
18
 
@@ -5,14 +5,14 @@
5
5
  */
6
6
 
7
7
  import {utils} from "../../../viewer/scene/utils.js";
8
- import * as p from "./lib/pako.js";
8
+ import pako from 'pako/dist/pako.esm.mjs';
9
9
  import {math} from "../../../viewer/scene/math/math.js";
10
10
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  const tempVec4a = math.vec4();
18
18
  const tempVec4b = math.vec4();
@@ -5,14 +5,14 @@
5
5
  */
6
6
 
7
7
  import {utils} from "../../../viewer/scene/utils.js";
8
- import * as p from "./lib/pako.js";
8
+ import pako from 'pako/dist/pako.esm.mjs';
9
9
  import {math} from "../../../viewer/scene/math/math.js";
10
10
  import {geometryCompressionUtils} from "../../../viewer/scene/math/geometryCompressionUtils.js";
11
11
 
12
- let pako = window.pako || p;
13
- if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
- pako = pako.default;
15
- }
12
+ // let pako = window.pako || p;
13
+ // if (!pako.inflate) { // See https://github.com/nodeca/pako/issues/97
14
+ // pako = pako.default;
15
+ // }
16
16
 
17
17
  const tempVec4a = math.vec4();
18
18
  const tempVec4b = math.vec4();
@@ -17,8 +17,8 @@ export * from "./ViewCullPlugin/index.js";
17
17
  export * from "./XKTLoaderPlugin/index.js";
18
18
  export * from "./XML3DLoaderPlugin/index.js";
19
19
  export * from "./WebIFCLoaderPlugin/index.js";
20
- export * from "./CxConverterIFCLoaderPlugin/index.js";
21
- export * from "./LASLoaderPlugin/index.js";
20
+ // export * from "./CxConverterIFCLoaderPlugin/index.js";
21
+ // export * from "./LASLoaderPlugin/index.js";
22
22
  export * from "./CityJSONLoaderPlugin/index.js";
23
23
  export * from "./DotBIMLoaderPlugin/index.js";
24
24
  export * from "./ZonesPlugin/index.js";
@@ -92,12 +92,13 @@ class TouchPickHandler {
92
92
  const rightClickPageY = touches[0].pageY;
93
93
 
94
94
  states.longTouchTimeout = setTimeout(() => {
95
- controllers.cameraControl.fire("rightClick", { // For context menus
96
- pagePos: [Math.round(rightClickPageX), Math.round(rightClickPageY)],
97
- canvasPos: [Math.round(rightClickClientX), Math.round(rightClickClientY)],
98
- event: e
99
- }, true);
100
-
95
+ if (configs.active && configs.pointerEnabled) {
96
+ controllers.cameraControl.fire("rightClick", { // For context menus
97
+ pagePos: [Math.round(rightClickPageX), Math.round(rightClickPageY)],
98
+ canvasPos: [Math.round(rightClickClientX), Math.round(rightClickClientY)],
99
+ event: e
100
+ }, true);
101
+ }
101
102
  states.longTouchTimeout = null;
102
103
  }, configs.longTapTimeout);
103
104