@xeokit/xeokit-sdk 2.6.106 → 2.6.108
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 +5 -0
- package/dist/xeokit-sdk.cjs.js +41 -9
- package/dist/xeokit-sdk.es.js +41 -9
- package/dist/xeokit-sdk.es5.js +515 -513
- package/dist/xeokit-sdk.min.cjs.js +7 -7
- package/dist/xeokit-sdk.min.es.js +6 -6
- package/dist/xeokit-sdk.min.es5.js +6 -6
- package/package.json +1 -1
- package/src/plugins/lib/ui/index.js +19 -4
- package/src/viewer/Viewer.js +1 -0
- package/src/viewer/metadata/MetaScene.js +14 -0
- package/src/viewer/scene/model/SceneModel.js +3 -1
- package/types/extras/index.d.ts +1 -0
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +10 -5
- package/types/plugins/lib/ui/index.d.ts +6 -1
- package/types/viewer/Plugin.d.ts +8 -1
- package/types/viewer/scene/Entity.d.ts +19 -0
- package/types/viewer/scene/input/input.d.ts +1 -1
- package/types/viewer/scene/math/math.d.ts +30 -5
- package/types/viewer/scene/scene/Scene.d.ts +8 -0
package/README.md
CHANGED
|
@@ -106,6 +106,11 @@ and [OBJ](https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/OBJLoaderPl
|
|
|
106
106
|
</script>
|
|
107
107
|
</html>
|
|
108
108
|
````
|
|
109
|
+
---
|
|
110
|
+
## Deprecation Notice: ES5 and CJS Builds
|
|
111
|
+
|
|
112
|
+
Starting from **September 2026**, the ES5/UMD and CommonJS builds will no longer be included in the npm package. Maintaining ES5 compatibility requires extensive transpilation and polyfilling that is increasingly difficult to sustain as the codebase evolves. Going forward, only the ES module builds (`xeokit-sdk.es.js` and `xeokit-sdk.min.es.js`) will be provided, which are compatible with all modern browsers and bundlers.
|
|
113
|
+
|
|
109
114
|
---
|
|
110
115
|
## 📜 Licensing & Commercial Use
|
|
111
116
|
|
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* xeokit-sdk v2.6.
|
|
3
|
-
* Commit:
|
|
4
|
-
* Built: 2026-
|
|
2
|
+
* xeokit-sdk v2.6.108
|
|
3
|
+
* Commit: a2bfb2cb967c8a3925c74e4039bfc60f136128c2
|
|
4
|
+
* Built: 2026-04-03T14:14:43.600Z
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
if (typeof window !== 'undefined') {
|
|
8
|
-
window.__XEOKIT__ = { version: '2.6.
|
|
8
|
+
window.__XEOKIT__ = { version: '2.6.108', commit: 'a2bfb2cb967c8a3925c74e4039bfc60f136128c2', built: '2026-04-03T14:14:43.600Z' };
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -41067,11 +41067,13 @@ class SceneModel extends Component {
|
|
|
41067
41067
|
if (testNumVisibleLayerPortions && (this.numVisibleLayerPortions === 0)) {
|
|
41068
41068
|
return;
|
|
41069
41069
|
}
|
|
41070
|
+
const activeSectionPlanes = this.scene._sectionPlanesState.sectionPlanes.filter(p => p.active);
|
|
41070
41071
|
const testLayerCull = frameCtx.testAABB;
|
|
41071
41072
|
const renderFlags = this.renderFlags;
|
|
41072
41073
|
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
|
|
41073
41074
|
const layer = this.layerList[renderFlags.visibleLayers[i]];
|
|
41074
|
-
|
|
41075
|
+
const aabb = layer.getAABB();
|
|
41076
|
+
if (((! testLayerCull) || testLayerCull(aabb)) && activeSectionPlanes.every(p => math.planeAABB3Intersect(p.dir, p.dist, aabb) >= 0)) {
|
|
41075
41077
|
cb(layer);
|
|
41076
41078
|
}
|
|
41077
41079
|
}
|
|
@@ -62769,6 +62771,20 @@ class MetaScene {
|
|
|
62769
62771
|
return metaModel;
|
|
62770
62772
|
}
|
|
62771
62773
|
|
|
62774
|
+
/**
|
|
62775
|
+
* Destroys this MetaScene.
|
|
62776
|
+
*/
|
|
62777
|
+
_destroy() {
|
|
62778
|
+
this.viewer = null;
|
|
62779
|
+
this.scene = null;
|
|
62780
|
+
this.metaModels = {};
|
|
62781
|
+
this.propertySets = {};
|
|
62782
|
+
this.metaObjects = {};
|
|
62783
|
+
this.metaObjectsByType = {};
|
|
62784
|
+
this.rootMetaObjects = {};
|
|
62785
|
+
this._eventSubs = {};
|
|
62786
|
+
}
|
|
62787
|
+
|
|
62772
62788
|
/**
|
|
62773
62789
|
* Removes a {@link MetaModel} from this MetaScene.
|
|
62774
62790
|
*
|
|
@@ -101823,10 +101839,25 @@ class Label3D {
|
|
|
101823
101839
|
this.__visible = true;
|
|
101824
101840
|
|
|
101825
101841
|
this._updatePos = () => {
|
|
101826
|
-
|
|
101827
|
-
|
|
101828
|
-
|
|
101829
|
-
|
|
101842
|
+
const p0 = tmpVec4a;
|
|
101843
|
+
toClipSpace(camera, this._start, p0);
|
|
101844
|
+
math.mulVec3Scalar(p0, 1.0 / p0[3]);
|
|
101845
|
+
|
|
101846
|
+
const outsideFrustum = ((p0[3] < 0)
|
|
101847
|
+
||
|
|
101848
|
+
(p0[0] < -1) || (p0[0] > 1)
|
|
101849
|
+
||
|
|
101850
|
+
(p0[1] < -1) || (p0[1] > 1)
|
|
101851
|
+
||
|
|
101852
|
+
(p0[2] < -1) || (p0[2] > 1));
|
|
101853
|
+
const culled = outsideFrustum || scene._sectionPlanesState.sectionPlanes.some(
|
|
101854
|
+
plane => plane.active && (math.dotVec3(plane.dir, math.subVec3(plane.pos, this._start, tmpVec3a$2)) > 0));
|
|
101855
|
+
|
|
101856
|
+
this._label.setCulled(culled);
|
|
101857
|
+
if (! culled) {
|
|
101858
|
+
toCanvasSpace(scene.canvas.canvas, parentElement, p0, tmpVec2a);
|
|
101859
|
+
this._label.setPos(tmpVec2a[0], tmpVec2a[1]);
|
|
101860
|
+
}
|
|
101830
101861
|
};
|
|
101831
101862
|
|
|
101832
101863
|
const setPosOnWire = (p0, p1, yOff) => {
|
|
@@ -103338,6 +103369,7 @@ class Viewer {
|
|
|
103338
103369
|
const plugin = plugins[i];
|
|
103339
103370
|
plugin.destroy();
|
|
103340
103371
|
}
|
|
103372
|
+
this.metaScene._destroy();
|
|
103341
103373
|
this.scene.destroy();
|
|
103342
103374
|
}
|
|
103343
103375
|
}
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* xeokit-sdk v2.6.
|
|
3
|
-
* Commit:
|
|
4
|
-
* Built: 2026-
|
|
2
|
+
* xeokit-sdk v2.6.108
|
|
3
|
+
* Commit: a2bfb2cb967c8a3925c74e4039bfc60f136128c2
|
|
4
|
+
* Built: 2026-04-03T14:14:43.600Z
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
if (typeof window !== 'undefined') {
|
|
8
|
-
window.__XEOKIT__ = { version: '2.6.
|
|
8
|
+
window.__XEOKIT__ = { version: '2.6.108', commit: 'a2bfb2cb967c8a3925c74e4039bfc60f136128c2', built: '2026-04-03T14:14:43.600Z' };
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/** @private */
|
|
@@ -41063,11 +41063,13 @@ class SceneModel extends Component {
|
|
|
41063
41063
|
if (testNumVisibleLayerPortions && (this.numVisibleLayerPortions === 0)) {
|
|
41064
41064
|
return;
|
|
41065
41065
|
}
|
|
41066
|
+
const activeSectionPlanes = this.scene._sectionPlanesState.sectionPlanes.filter(p => p.active);
|
|
41066
41067
|
const testLayerCull = frameCtx.testAABB;
|
|
41067
41068
|
const renderFlags = this.renderFlags;
|
|
41068
41069
|
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
|
|
41069
41070
|
const layer = this.layerList[renderFlags.visibleLayers[i]];
|
|
41070
|
-
|
|
41071
|
+
const aabb = layer.getAABB();
|
|
41072
|
+
if (((! testLayerCull) || testLayerCull(aabb)) && activeSectionPlanes.every(p => math.planeAABB3Intersect(p.dir, p.dist, aabb) >= 0)) {
|
|
41071
41073
|
cb(layer);
|
|
41072
41074
|
}
|
|
41073
41075
|
}
|
|
@@ -62765,6 +62767,20 @@ class MetaScene {
|
|
|
62765
62767
|
return metaModel;
|
|
62766
62768
|
}
|
|
62767
62769
|
|
|
62770
|
+
/**
|
|
62771
|
+
* Destroys this MetaScene.
|
|
62772
|
+
*/
|
|
62773
|
+
_destroy() {
|
|
62774
|
+
this.viewer = null;
|
|
62775
|
+
this.scene = null;
|
|
62776
|
+
this.metaModels = {};
|
|
62777
|
+
this.propertySets = {};
|
|
62778
|
+
this.metaObjects = {};
|
|
62779
|
+
this.metaObjectsByType = {};
|
|
62780
|
+
this.rootMetaObjects = {};
|
|
62781
|
+
this._eventSubs = {};
|
|
62782
|
+
}
|
|
62783
|
+
|
|
62768
62784
|
/**
|
|
62769
62785
|
* Removes a {@link MetaModel} from this MetaScene.
|
|
62770
62786
|
*
|
|
@@ -101819,10 +101835,25 @@ class Label3D {
|
|
|
101819
101835
|
this.__visible = true;
|
|
101820
101836
|
|
|
101821
101837
|
this._updatePos = () => {
|
|
101822
|
-
|
|
101823
|
-
|
|
101824
|
-
|
|
101825
|
-
|
|
101838
|
+
const p0 = tmpVec4a;
|
|
101839
|
+
toClipSpace(camera, this._start, p0);
|
|
101840
|
+
math.mulVec3Scalar(p0, 1.0 / p0[3]);
|
|
101841
|
+
|
|
101842
|
+
const outsideFrustum = ((p0[3] < 0)
|
|
101843
|
+
||
|
|
101844
|
+
(p0[0] < -1) || (p0[0] > 1)
|
|
101845
|
+
||
|
|
101846
|
+
(p0[1] < -1) || (p0[1] > 1)
|
|
101847
|
+
||
|
|
101848
|
+
(p0[2] < -1) || (p0[2] > 1));
|
|
101849
|
+
const culled = outsideFrustum || scene._sectionPlanesState.sectionPlanes.some(
|
|
101850
|
+
plane => plane.active && (math.dotVec3(plane.dir, math.subVec3(plane.pos, this._start, tmpVec3a$2)) > 0));
|
|
101851
|
+
|
|
101852
|
+
this._label.setCulled(culled);
|
|
101853
|
+
if (! culled) {
|
|
101854
|
+
toCanvasSpace(scene.canvas.canvas, parentElement, p0, tmpVec2a);
|
|
101855
|
+
this._label.setPos(tmpVec2a[0], tmpVec2a[1]);
|
|
101856
|
+
}
|
|
101826
101857
|
};
|
|
101827
101858
|
|
|
101828
101859
|
const setPosOnWire = (p0, p1, yOff) => {
|
|
@@ -103334,6 +103365,7 @@ class Viewer {
|
|
|
103334
103365
|
const plugin = plugins[i];
|
|
103335
103366
|
plugin.destroy();
|
|
103336
103367
|
}
|
|
103368
|
+
this.metaScene._destroy();
|
|
103337
103369
|
this.scene.destroy();
|
|
103338
103370
|
}
|
|
103339
103371
|
}
|