@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.
- package/README.md +3 -3
- package/dist/xeokit-sdk.cjs.js +15512 -32635
- package/dist/xeokit-sdk.es.js +15513 -32634
- package/dist/xeokit-sdk.es5.js +31259 -29843
- package/dist/xeokit-sdk.es5.js.map +1 -0
- package/dist/xeokit-sdk.min.cjs.js +8 -8
- package/dist/xeokit-sdk.min.es.js +8 -8
- package/dist/xeokit-sdk.min.es5.js +34 -33
- package/dist/xeokit-sdk.min.es5.js.map +1 -0
- package/package.json +10 -3
- package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +81 -81
- package/src/plugins/CxConverterIFCLoaderPlugin/index.js +1 -1
- package/src/plugins/LASLoaderPlugin/index.js +1 -1
- package/src/plugins/NavCubePlugin/NavCubePlugin.js +63 -22
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +9 -9
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +5 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +5 -5
- package/src/plugins/index.js +2 -2
- package/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +7 -6
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +26 -108
- package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +3 -14
- package/types/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.d.ts +5 -23
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +5 -25
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +20 -100
- package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +3 -14
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +18 -83
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +21 -106
- package/types/viewer/Configs.d.ts +6 -24
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +66 -445
- package/types/viewer/scene/Component.d.ts +1 -1
- package/types/viewer/scene/Entity.d.ts +40 -186
- package/types/viewer/scene/camera/Camera.d.ts +50 -170
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +8 -57
- package/types/viewer/scene/camera/CameraPath.d.ts +8 -13
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +4 -22
- package/types/viewer/scene/camera/CustomProjection.d.ts +6 -21
- package/types/viewer/scene/camera/Frustum.d.ts +18 -90
- package/types/viewer/scene/camera/Ortho.d.ts +14 -54
- package/types/viewer/scene/camera/Perspective.d.ts +16 -70
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +21 -25
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +7 -7
- package/types/viewer/scene/lights/AmbientLight.d.ts +4 -26
- package/types/viewer/scene/lights/DirLight.d.ts +8 -52
- package/types/viewer/scene/lights/PointLight.d.ts +14 -93
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +12 -37
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +22 -119
- package/types/viewer/scene/materials/Fresnel.d.ts +10 -50
- package/types/viewer/scene/materials/LambertMaterial.d.ts +16 -90
- package/types/viewer/scene/materials/LinesMaterial.d.ts +7 -25
- package/types/viewer/scene/materials/MetallicMaterial.d.ts +40 -127
- package/types/viewer/scene/materials/PhongMaterial.d.ts +52 -185
- package/types/viewer/scene/materials/PointsMaterial.d.ts +20 -101
- package/types/viewer/scene/materials/SpecularMaterial.d.ts +41 -117
- package/types/viewer/scene/materials/Texture.d.ts +22 -62
- package/types/viewer/scene/models/SceneModel.d.ts +76 -233
- package/types/viewer/scene/models/SceneModelEntity.d.ts +50 -211
- package/types/viewer/scene/models/SceneModelMesh.d.ts +4 -4
- package/types/viewer/scene/models/SceneModelTransform.d.ts +14 -59
- package/types/viewer/scene/paths/CubicBezierCurve.d.ts +12 -73
- package/types/viewer/scene/paths/Curve.d.ts +6 -19
- package/types/viewer/scene/paths/Path.d.ts +10 -57
- package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +10 -57
- package/types/viewer/scene/paths/SplineCurve.d.ts +6 -32
- package/types/viewer/scene/scene/Scene.d.ts +94 -196
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +12 -69
- package/types/viewer/scene/viewport/Viewport.d.ts +4 -14
- 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.
|
|
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
|
|
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
|
-
"
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
async function fetchFile(url) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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(
|
|
299
|
-
|
|
300
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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();
|
package/src/plugins/index.js
CHANGED
|
@@ -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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|