@xeokit/xeokit-sdk 2.6.101 → 2.6.102
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 +1 -1
- package/dist/xeokit-sdk.cjs.js +27 -25
- package/dist/xeokit-sdk.es.js +27 -25
- package/dist/xeokit-sdk.es5.js +26 -22
- package/dist/xeokit-sdk.min.cjs.js +5 -5
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +5 -5
- package/package.json +1 -1
- package/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +2 -4
- package/src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js +2 -3
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +10 -10
- package/src/viewer/scene/model/layer/VBOLayer.js +1 -2
- package/src/viewer/scene/paths/Curve.js +8 -2
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +2 -2
- package/types/viewer/scene/paths/Curve.d.ts +8 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ high-detail, full-precision 3D engineering and BIM models in the browser.
|
|
|
12
12
|
|
|
13
13
|
* [xeokit.io](https://xeokit.io/)
|
|
14
14
|
* [Examples](http://xeokit.github.io/xeokit-sdk/examples/)
|
|
15
|
-
* [
|
|
15
|
+
* [Blog](https://xeokit.io/blog)
|
|
16
16
|
* [API Docs](https://xeokit.github.io/xeokit-sdk/docs/)
|
|
17
17
|
* [Features](https://xeokit.io/index.html?foo=1#features)
|
|
18
18
|
* [Changelog](https://github.com/xeokit/xeokit-sdk/blob/master/CHANGELOG.md)
|
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* xeokit-sdk v2.6.
|
|
3
|
-
* Commit:
|
|
4
|
-
* Built:
|
|
2
|
+
* xeokit-sdk v2.6.102
|
|
3
|
+
* Commit: d1f69b96fcc4d372aeef36a6dd59e51c6130e8c2
|
|
4
|
+
* Built: 2026-01-05T14:04:20.807Z
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
if (typeof window !== 'undefined') {
|
|
8
|
-
window.__XEOKIT__ = { version: '2.6.
|
|
8
|
+
window.__XEOKIT__ = { version: '2.6.102', commit: 'd1f69b96fcc4d372aeef36a6dd59e51c6130e8c2', built: '2026-01-05T14:04:20.807Z' };
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -10971,9 +10971,15 @@ class Curve extends Component {
|
|
|
10971
10971
|
}
|
|
10972
10972
|
|
|
10973
10973
|
/**
|
|
10974
|
-
* Gets the length of this Curve.
|
|
10974
|
+
* Gets the approximate length of this Curve.
|
|
10975
10975
|
*
|
|
10976
|
-
*
|
|
10976
|
+
* This method calculates the length by discretizing Curve into hardcoded number of straight segments. Then it sums
|
|
10977
|
+
* lengths of these straight segments.
|
|
10978
|
+
*
|
|
10979
|
+
* If you need more control over the precision of the length calculation, we strongly encourage you to build
|
|
10980
|
+
* your own custom function.
|
|
10981
|
+
*
|
|
10982
|
+
* @returns {Number} The approximate Curve length.
|
|
10977
10983
|
*/
|
|
10978
10984
|
get length() {
|
|
10979
10985
|
var lengths = this._getLengths();
|
|
@@ -34583,7 +34589,6 @@ class VBOLayer extends Layer {
|
|
|
34583
34589
|
}
|
|
34584
34590
|
origVec[3] = 1;
|
|
34585
34591
|
const sceneModelMatrix = model.matrix;
|
|
34586
|
-
math.mulMat4v4(sceneModelMatrix, origVec, origVec);
|
|
34587
34592
|
const positions = retainedGeometry.quantizedPositions;
|
|
34588
34593
|
const worldPos = tempVec4a$a;
|
|
34589
34594
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
@@ -34595,8 +34600,8 @@ class VBOLayer extends Layer {
|
|
|
34595
34600
|
math.transformPoint3(retainedGeometry.matrix, worldPos, worldPos);
|
|
34596
34601
|
}
|
|
34597
34602
|
worldPos[3] = 1;
|
|
34598
|
-
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
34599
34603
|
math.addVec3(origVec, worldPos, worldPos);
|
|
34604
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
34600
34605
|
callback(worldPos);
|
|
34601
34606
|
}
|
|
34602
34607
|
}
|
|
@@ -111899,11 +111904,10 @@ function loadDefaultScene(ctx) {
|
|
|
111899
111904
|
const nodeName = node.name;
|
|
111900
111905
|
let entityId = (((nodeName !== undefined) && (nodeName !== null) && nodeName)
|
|
111901
111906
|
||
|
|
111902
|
-
((depth === 0) && ("
|
|
111903
|
-
|
|
111907
|
+
((depth === 0) && ("Node." + String(ctx.nextId++).padStart(4, "0"))));
|
|
111904
111908
|
if (entityId) {
|
|
111905
111909
|
while (ctx.sceneModel.objects[entityId]) {
|
|
111906
|
-
entityId = "
|
|
111910
|
+
entityId = nodeName + "." + String(ctx.nextId++).padStart(4, "0");
|
|
111907
111911
|
}
|
|
111908
111912
|
meshIdsStack.push(meshIds);
|
|
111909
111913
|
meshIds = [];
|
|
@@ -112105,7 +112109,7 @@ const IFCObjectDefaults = {
|
|
|
112105
112109
|
* * Creates an {@link Entity} for each object within the model, which is indicated by each glTF ````node```` that has a ````name```` attribute. Those Entities will have {@link Entity#isObject} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
|
|
112106
112110
|
* * When loading, can set the World-space position, scale and rotation of each model within World space, along with initial properties for all the model's {@link Entity}s.
|
|
112107
112111
|
* * Not recommended for large models. For best performance with large glTF datasets, we recommend first converting them
|
|
112108
|
-
* to ````.xkt```` format (
|
|
112112
|
+
* to ````.xkt```` format (e.g. using [convert2xkt](https://github.com/xeokit/xeokit-convert)), then loading
|
|
112109
112113
|
* the ````.xkt```` using {@link XKTLoaderPlugin}.
|
|
112110
112114
|
*
|
|
112111
112115
|
* ## Metadata
|
|
@@ -112128,8 +112132,6 @@ const IFCObjectDefaults = {
|
|
|
112128
112132
|
* Since this model contains IFC types, the GLTFLoaderPlugin will set the initial colors of object {@link Entity}s according
|
|
112129
112133
|
* to the standard IFC element colors in the GLTFModel's current map. Override that with your own map via property {@link GLTFLoaderPlugin#objectDefaults}.
|
|
112130
112134
|
*
|
|
112131
|
-
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
|
|
112132
|
-
*
|
|
112133
112135
|
* ````javascript
|
|
112134
112136
|
* import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
|
|
112135
112137
|
*
|
|
@@ -112266,7 +112268,7 @@ const IFCObjectDefaults = {
|
|
|
112266
112268
|
* contains a MetaObject that corresponds to that Entity.
|
|
112267
112269
|
*
|
|
112268
112270
|
* When we've done that, then xeokit's {@link TreeViewPlugin} is able to have a node that represents the glTF model and controls
|
|
112269
|
-
* the visibility of that Entity (
|
|
112271
|
+
* the visibility of that Entity (i.e. to control the visibility of the entire model).
|
|
112270
112272
|
*
|
|
112271
112273
|
* The snippet below shows how this is done.
|
|
112272
112274
|
*
|
|
@@ -126347,9 +126349,9 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126347
126349
|
*
|
|
126348
126350
|
* # Creating *````.XKT````* Files and Metadata
|
|
126349
126351
|
*
|
|
126350
|
-
* We have several
|
|
126352
|
+
* We have several ways to convert your files into XKT. See these tutorials for more info:
|
|
126351
126353
|
*
|
|
126352
|
-
* * [Converting Models to XKT with convert2xkt](https://
|
|
126354
|
+
* * [Converting Models to XKT with convert2xkt](https://xeokit.io/blog/converting-models-to-xkt-with-convert2xkt) - how to convert various file formats (glTF, IFC, CityJSON, LAS/LAZ...) to XKT using our nodejs-based converter.
|
|
126353
126355
|
* * [Converting IFC Models to XKT using 3rd-Party Open Source Tools](https://www.notion.so/xeokit/Converting-IFC-Models-to-XKT-using-3rd-Party-Open-Source-Tools-c373e48bc4094ff5b6e5c5700ff580ee) - how to convert IFC files to XKT using 3rd-party open source CLI tools.
|
|
126354
126356
|
*
|
|
126355
126357
|
* # Scene representation
|
|
@@ -126384,7 +126386,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126384
126386
|
* Since this model contains IFC types, the XKTLoaderPlugin will set the initial appearance of each object
|
|
126385
126387
|
* {@link Entity} according to its IFC type in {@link XKTLoaderPlugin#objectDefaults}.
|
|
126386
126388
|
*
|
|
126387
|
-
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://
|
|
126389
|
+
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://xeokit.io/blog/viewing-an-ifc-model-with-xktloaderplugin).
|
|
126388
126390
|
*
|
|
126389
126391
|
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_metadata_Schependomlaan)]
|
|
126390
126392
|
*
|
|
@@ -126753,7 +126755,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126753
126755
|
* into a xeokit Viewer in one load operation, combining the XKT files into a single SceneModel and MetaModel.
|
|
126754
126756
|
*
|
|
126755
126757
|
* You can learn more about this conversion and loading process, with splitting, batch converting and batch loading,
|
|
126756
|
-
* in [this tutorial](https://
|
|
126758
|
+
* in [this tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance).
|
|
126757
126759
|
*
|
|
126758
126760
|
* To show how to use XKTLoaderPlugin to load a manifest of XKT files, let's imagine that we have a set of such XKT files. As
|
|
126759
126761
|
* described in the tutorial, they were converted by `ifc2gltf` from an IFC file into a set of glTF+JSON files, that were
|
|
@@ -126798,7 +126800,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126798
126800
|
* TreeViewPlugin,
|
|
126799
126801
|
* } from "xeokit-sdk.es.js";
|
|
126800
126802
|
*
|
|
126801
|
-
*
|
|
126803
|
+
* const viewer = new Viewer({
|
|
126802
126804
|
* canvasId: "myCanvas"
|
|
126803
126805
|
* });
|
|
126804
126806
|
*
|
|
@@ -126824,7 +126826,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126824
126826
|
*
|
|
126825
126827
|
* The main advantage here, of splitting IFC files like this within the conversion and import pipeline,
|
|
126826
126828
|
* is to reduce the memory pressure on each of the `ifc2gltf`, `convert2xkt` and XKTLoaderPlugin components.
|
|
126827
|
-
* They work much reliably (and faster) when processing smaller files (
|
|
126829
|
+
* They work much reliably (and faster) when processing smaller files (e.g. 20MB) than when processing large files (e.g. 500MB), where
|
|
126828
126830
|
* they have less trouble allocating the system memory they need for conversion and parsing.
|
|
126829
126831
|
*
|
|
126830
126832
|
* We can also provide an HTTP URL to the manifest:
|
|
@@ -127176,9 +127178,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
127176
127178
|
* Loads an ````.xkt```` model into this XKTLoaderPlugin's {@link Viewer}.
|
|
127177
127179
|
*
|
|
127178
127180
|
* Since xeokit/xeokit-sdk 1.9.0, XKTLoaderPlugin has supported XKT 8, which bundles the metamodel
|
|
127179
|
-
* data (
|
|
127181
|
+
* data (e.g. an IFC element hierarchy) in the XKT file itself. For XKT 8, we therefore no longer need to
|
|
127180
127182
|
* load the metamodel data from a separate accompanying JSON file, as we did with previous XKT versions.
|
|
127181
|
-
* However, if we do choose to specify a separate metamodel JSON file to load (
|
|
127183
|
+
* However, if we do choose to specify a separate metamodel JSON file to load (e.g. for backward compatibility
|
|
127182
127184
|
* in data pipelines), then that metamodel will be loaded and the metamodel in the XKT 8 file will be ignored.
|
|
127183
127185
|
*
|
|
127184
127186
|
* @param {*} params Loading parameters.
|
|
@@ -127188,9 +127190,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
127188
127190
|
* @param {String} [params.metaModelSrc] Path or URL to an optional metadata file, as an alternative to the ````metaModelData```` parameter.
|
|
127189
127191
|
* @param {*} [params.metaModelData] JSON model metadata, as an alternative to the ````metaModelSrc```` parameter.
|
|
127190
127192
|
* @param {String} [params.manifestSrc] Path or URL to a JSON manifest file that provides paths to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into
|
|
127191
|
-
* multiple XKT files. See [tutorial](https://
|
|
127193
|
+
* multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info.
|
|
127192
127194
|
* @param {Object} [params.manifest] A JSON manifest object (as an alternative to a path or URL) that provides paths to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into
|
|
127193
|
-
* multiple XKT files. See [tutorial](https://
|
|
127195
|
+
* multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info.
|
|
127194
127196
|
* @param {{String:Object}} [params.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
|
|
127195
127197
|
* @param {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|
|
127196
127198
|
* @param {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* xeokit-sdk v2.6.
|
|
3
|
-
* Commit:
|
|
4
|
-
* Built:
|
|
2
|
+
* xeokit-sdk v2.6.102
|
|
3
|
+
* Commit: d1f69b96fcc4d372aeef36a6dd59e51c6130e8c2
|
|
4
|
+
* Built: 2026-01-05T14:04:20.807Z
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
if (typeof window !== 'undefined') {
|
|
8
|
-
window.__XEOKIT__ = { version: '2.6.
|
|
8
|
+
window.__XEOKIT__ = { version: '2.6.102', commit: 'd1f69b96fcc4d372aeef36a6dd59e51c6130e8c2', built: '2026-01-05T14:04:20.807Z' };
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/** @private */
|
|
@@ -10967,9 +10967,15 @@ class Curve extends Component {
|
|
|
10967
10967
|
}
|
|
10968
10968
|
|
|
10969
10969
|
/**
|
|
10970
|
-
* Gets the length of this Curve.
|
|
10970
|
+
* Gets the approximate length of this Curve.
|
|
10971
10971
|
*
|
|
10972
|
-
*
|
|
10972
|
+
* This method calculates the length by discretizing Curve into hardcoded number of straight segments. Then it sums
|
|
10973
|
+
* lengths of these straight segments.
|
|
10974
|
+
*
|
|
10975
|
+
* If you need more control over the precision of the length calculation, we strongly encourage you to build
|
|
10976
|
+
* your own custom function.
|
|
10977
|
+
*
|
|
10978
|
+
* @returns {Number} The approximate Curve length.
|
|
10973
10979
|
*/
|
|
10974
10980
|
get length() {
|
|
10975
10981
|
var lengths = this._getLengths();
|
|
@@ -34579,7 +34585,6 @@ class VBOLayer extends Layer {
|
|
|
34579
34585
|
}
|
|
34580
34586
|
origVec[3] = 1;
|
|
34581
34587
|
const sceneModelMatrix = model.matrix;
|
|
34582
|
-
math.mulMat4v4(sceneModelMatrix, origVec, origVec);
|
|
34583
34588
|
const positions = retainedGeometry.quantizedPositions;
|
|
34584
34589
|
const worldPos = tempVec4a$a;
|
|
34585
34590
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
@@ -34591,8 +34596,8 @@ class VBOLayer extends Layer {
|
|
|
34591
34596
|
math.transformPoint3(retainedGeometry.matrix, worldPos, worldPos);
|
|
34592
34597
|
}
|
|
34593
34598
|
worldPos[3] = 1;
|
|
34594
|
-
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
34595
34599
|
math.addVec3(origVec, worldPos, worldPos);
|
|
34600
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
34596
34601
|
callback(worldPos);
|
|
34597
34602
|
}
|
|
34598
34603
|
}
|
|
@@ -111895,11 +111900,10 @@ function loadDefaultScene(ctx) {
|
|
|
111895
111900
|
const nodeName = node.name;
|
|
111896
111901
|
let entityId = (((nodeName !== undefined) && (nodeName !== null) && nodeName)
|
|
111897
111902
|
||
|
|
111898
|
-
((depth === 0) && ("
|
|
111899
|
-
|
|
111903
|
+
((depth === 0) && ("Node." + String(ctx.nextId++).padStart(4, "0"))));
|
|
111900
111904
|
if (entityId) {
|
|
111901
111905
|
while (ctx.sceneModel.objects[entityId]) {
|
|
111902
|
-
entityId = "
|
|
111906
|
+
entityId = nodeName + "." + String(ctx.nextId++).padStart(4, "0");
|
|
111903
111907
|
}
|
|
111904
111908
|
meshIdsStack.push(meshIds);
|
|
111905
111909
|
meshIds = [];
|
|
@@ -112101,7 +112105,7 @@ const IFCObjectDefaults = {
|
|
|
112101
112105
|
* * Creates an {@link Entity} for each object within the model, which is indicated by each glTF ````node```` that has a ````name```` attribute. Those Entities will have {@link Entity#isObject} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
|
|
112102
112106
|
* * When loading, can set the World-space position, scale and rotation of each model within World space, along with initial properties for all the model's {@link Entity}s.
|
|
112103
112107
|
* * Not recommended for large models. For best performance with large glTF datasets, we recommend first converting them
|
|
112104
|
-
* to ````.xkt```` format (
|
|
112108
|
+
* to ````.xkt```` format (e.g. using [convert2xkt](https://github.com/xeokit/xeokit-convert)), then loading
|
|
112105
112109
|
* the ````.xkt```` using {@link XKTLoaderPlugin}.
|
|
112106
112110
|
*
|
|
112107
112111
|
* ## Metadata
|
|
@@ -112124,8 +112128,6 @@ const IFCObjectDefaults = {
|
|
|
112124
112128
|
* Since this model contains IFC types, the GLTFLoaderPlugin will set the initial colors of object {@link Entity}s according
|
|
112125
112129
|
* to the standard IFC element colors in the GLTFModel's current map. Override that with your own map via property {@link GLTFLoaderPlugin#objectDefaults}.
|
|
112126
112130
|
*
|
|
112127
|
-
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
|
|
112128
|
-
*
|
|
112129
112131
|
* ````javascript
|
|
112130
112132
|
* import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
|
|
112131
112133
|
*
|
|
@@ -112262,7 +112264,7 @@ const IFCObjectDefaults = {
|
|
|
112262
112264
|
* contains a MetaObject that corresponds to that Entity.
|
|
112263
112265
|
*
|
|
112264
112266
|
* When we've done that, then xeokit's {@link TreeViewPlugin} is able to have a node that represents the glTF model and controls
|
|
112265
|
-
* the visibility of that Entity (
|
|
112267
|
+
* the visibility of that Entity (i.e. to control the visibility of the entire model).
|
|
112266
112268
|
*
|
|
112267
112269
|
* The snippet below shows how this is done.
|
|
112268
112270
|
*
|
|
@@ -126343,9 +126345,9 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126343
126345
|
*
|
|
126344
126346
|
* # Creating *````.XKT````* Files and Metadata
|
|
126345
126347
|
*
|
|
126346
|
-
* We have several
|
|
126348
|
+
* We have several ways to convert your files into XKT. See these tutorials for more info:
|
|
126347
126349
|
*
|
|
126348
|
-
* * [Converting Models to XKT with convert2xkt](https://
|
|
126350
|
+
* * [Converting Models to XKT with convert2xkt](https://xeokit.io/blog/converting-models-to-xkt-with-convert2xkt) - how to convert various file formats (glTF, IFC, CityJSON, LAS/LAZ...) to XKT using our nodejs-based converter.
|
|
126349
126351
|
* * [Converting IFC Models to XKT using 3rd-Party Open Source Tools](https://www.notion.so/xeokit/Converting-IFC-Models-to-XKT-using-3rd-Party-Open-Source-Tools-c373e48bc4094ff5b6e5c5700ff580ee) - how to convert IFC files to XKT using 3rd-party open source CLI tools.
|
|
126350
126352
|
*
|
|
126351
126353
|
* # Scene representation
|
|
@@ -126380,7 +126382,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126380
126382
|
* Since this model contains IFC types, the XKTLoaderPlugin will set the initial appearance of each object
|
|
126381
126383
|
* {@link Entity} according to its IFC type in {@link XKTLoaderPlugin#objectDefaults}.
|
|
126382
126384
|
*
|
|
126383
|
-
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://
|
|
126385
|
+
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://xeokit.io/blog/viewing-an-ifc-model-with-xktloaderplugin).
|
|
126384
126386
|
*
|
|
126385
126387
|
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_metadata_Schependomlaan)]
|
|
126386
126388
|
*
|
|
@@ -126749,7 +126751,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126749
126751
|
* into a xeokit Viewer in one load operation, combining the XKT files into a single SceneModel and MetaModel.
|
|
126750
126752
|
*
|
|
126751
126753
|
* You can learn more about this conversion and loading process, with splitting, batch converting and batch loading,
|
|
126752
|
-
* in [this tutorial](https://
|
|
126754
|
+
* in [this tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance).
|
|
126753
126755
|
*
|
|
126754
126756
|
* To show how to use XKTLoaderPlugin to load a manifest of XKT files, let's imagine that we have a set of such XKT files. As
|
|
126755
126757
|
* described in the tutorial, they were converted by `ifc2gltf` from an IFC file into a set of glTF+JSON files, that were
|
|
@@ -126794,7 +126796,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126794
126796
|
* TreeViewPlugin,
|
|
126795
126797
|
* } from "xeokit-sdk.es.js";
|
|
126796
126798
|
*
|
|
126797
|
-
*
|
|
126799
|
+
* const viewer = new Viewer({
|
|
126798
126800
|
* canvasId: "myCanvas"
|
|
126799
126801
|
* });
|
|
126800
126802
|
*
|
|
@@ -126820,7 +126822,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
126820
126822
|
*
|
|
126821
126823
|
* The main advantage here, of splitting IFC files like this within the conversion and import pipeline,
|
|
126822
126824
|
* is to reduce the memory pressure on each of the `ifc2gltf`, `convert2xkt` and XKTLoaderPlugin components.
|
|
126823
|
-
* They work much reliably (and faster) when processing smaller files (
|
|
126825
|
+
* They work much reliably (and faster) when processing smaller files (e.g. 20MB) than when processing large files (e.g. 500MB), where
|
|
126824
126826
|
* they have less trouble allocating the system memory they need for conversion and parsing.
|
|
126825
126827
|
*
|
|
126826
126828
|
* We can also provide an HTTP URL to the manifest:
|
|
@@ -127172,9 +127174,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
127172
127174
|
* Loads an ````.xkt```` model into this XKTLoaderPlugin's {@link Viewer}.
|
|
127173
127175
|
*
|
|
127174
127176
|
* Since xeokit/xeokit-sdk 1.9.0, XKTLoaderPlugin has supported XKT 8, which bundles the metamodel
|
|
127175
|
-
* data (
|
|
127177
|
+
* data (e.g. an IFC element hierarchy) in the XKT file itself. For XKT 8, we therefore no longer need to
|
|
127176
127178
|
* load the metamodel data from a separate accompanying JSON file, as we did with previous XKT versions.
|
|
127177
|
-
* However, if we do choose to specify a separate metamodel JSON file to load (
|
|
127179
|
+
* However, if we do choose to specify a separate metamodel JSON file to load (e.g. for backward compatibility
|
|
127178
127180
|
* in data pipelines), then that metamodel will be loaded and the metamodel in the XKT 8 file will be ignored.
|
|
127179
127181
|
*
|
|
127180
127182
|
* @param {*} params Loading parameters.
|
|
@@ -127184,9 +127186,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
127184
127186
|
* @param {String} [params.metaModelSrc] Path or URL to an optional metadata file, as an alternative to the ````metaModelData```` parameter.
|
|
127185
127187
|
* @param {*} [params.metaModelData] JSON model metadata, as an alternative to the ````metaModelSrc```` parameter.
|
|
127186
127188
|
* @param {String} [params.manifestSrc] Path or URL to a JSON manifest file that provides paths to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into
|
|
127187
|
-
* multiple XKT files. See [tutorial](https://
|
|
127189
|
+
* multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info.
|
|
127188
127190
|
* @param {Object} [params.manifest] A JSON manifest object (as an alternative to a path or URL) that provides paths to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into
|
|
127189
|
-
* multiple XKT files. See [tutorial](https://
|
|
127191
|
+
* multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info.
|
|
127190
127192
|
* @param {{String:Object}} [params.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
|
|
127191
127193
|
* @param {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|
|
127192
127194
|
* @param {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|