@xeokit/xeokit-sdk 2.5.2-beta-5 → 2.5.2-beta-7
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/dist/xeokit-sdk.cjs.js +29 -25
- package/dist/xeokit-sdk.es.js +116 -112
- package/dist/xeokit-sdk.es5.js +20 -13
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/dist/xeokit-sdk.min.es5.js +1 -1
- package/package.json +1 -1
- package/src/plugins/TreeViewPlugin/TreeViewNode.js +11 -7
- package/src/viewer/scene/model/SceneModel.js +30 -26
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +12 -14
- package/types/plugins/TreeViewPlugin/renderService.d.ts +2 -2
- package/types/viewer/scene/models/SceneModel.d.ts +17 -7
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -80323,8 +80323,6 @@ class SceneModel extends Component {
|
|
|
80323
80323
|
this._vboBatchingLayers = {};
|
|
80324
80324
|
this._dtxLayers = {};
|
|
80325
80325
|
|
|
80326
|
-
this._meshList = [];
|
|
80327
|
-
|
|
80328
80326
|
this.layerList = []; // For GL state efficiency when drawing, InstancingLayers are in first part, BatchingLayers are in second
|
|
80329
80327
|
this._entityList = [];
|
|
80330
80328
|
|
|
@@ -80337,6 +80335,7 @@ class SceneModel extends Component {
|
|
|
80337
80335
|
this._entities = {};
|
|
80338
80336
|
|
|
80339
80337
|
this._scheduledMeshes = {};
|
|
80338
|
+
this._meshesCfgsBeforeMeshCreation = {};
|
|
80340
80339
|
|
|
80341
80340
|
/** @private **/
|
|
80342
80341
|
this.renderFlags = new RenderFlags();
|
|
@@ -81867,7 +81866,7 @@ class SceneModel extends Component {
|
|
|
81867
81866
|
/**
|
|
81868
81867
|
* Creates a new {@link SceneModelMesh} within this SceneModel.
|
|
81869
81868
|
*
|
|
81870
|
-
* *
|
|
81869
|
+
* * It prepares and saves data for a SceneModelMesh {@link SceneModel#meshes} creation. SceneModelMesh will be created only once the SceneModelEntity (which references this particular SceneModelMesh) will be created.
|
|
81871
81870
|
* * The SceneModelMesh can either define its own geometry or share it with other SceneModelMeshes. To define own geometry, provide the
|
|
81872
81871
|
* various geometry arrays to this method. To share a geometry, provide the ID of a geometry created earlier
|
|
81873
81872
|
* with {@link SceneModel#createGeometry}.
|
|
@@ -81902,18 +81901,18 @@ class SceneModel extends Component {
|
|
|
81902
81901
|
* @param {Number} [cfg.opacity=1] Opacity in range ````[0..1]````. Overridden by texture set ````colorTexture````.
|
|
81903
81902
|
* @param {Number} [cfg.metallic=0] Metallic factor in range ````[0..1]````. Overridden by texture set ````metallicRoughnessTexture````.
|
|
81904
81903
|
* @param {Number} [cfg.roughness=1] Roughness factor in range ````[0..1]````. Overridden by texture set ````metallicRoughnessTexture````.
|
|
81905
|
-
* @returns {
|
|
81904
|
+
* @returns {Boolean} True = successfully mesh was created. False = error during creation of a mesh.
|
|
81906
81905
|
*/
|
|
81907
81906
|
createMesh(cfg) {
|
|
81908
81907
|
|
|
81909
81908
|
if (cfg.id === undefined || cfg.id === null) {
|
|
81910
81909
|
this.error("[createMesh] SceneModel.createMesh() config missing: id");
|
|
81911
|
-
return;
|
|
81910
|
+
return false;
|
|
81912
81911
|
}
|
|
81913
81912
|
|
|
81914
81913
|
if (this._scheduledMeshes[cfg.id]) {
|
|
81915
81914
|
this.error(`[createMesh] SceneModel already has a mesh with this ID: ${cfg.id}`);
|
|
81916
|
-
return;
|
|
81915
|
+
return false;
|
|
81917
81916
|
}
|
|
81918
81917
|
|
|
81919
81918
|
const instancing = (cfg.geometryId !== undefined);
|
|
@@ -81928,31 +81927,31 @@ class SceneModel extends Component {
|
|
|
81928
81927
|
}
|
|
81929
81928
|
if (cfg.primitive !== "points" && cfg.primitive !== "lines" && cfg.primitive !== "triangles" && cfg.primitive !== "solid" && cfg.primitive !== "surface") {
|
|
81930
81929
|
this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);
|
|
81931
|
-
return;
|
|
81930
|
+
return false;
|
|
81932
81931
|
}
|
|
81933
81932
|
if (!cfg.positions && !cfg.positionsCompressed && !cfg.buckets) {
|
|
81934
81933
|
this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)");
|
|
81935
|
-
return
|
|
81934
|
+
return false;
|
|
81936
81935
|
}
|
|
81937
81936
|
if (cfg.positions && (cfg.positionsDecodeMatrix || cfg.positionsDecodeBoundary)) {
|
|
81938
81937
|
this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");
|
|
81939
|
-
return
|
|
81938
|
+
return false;
|
|
81940
81939
|
}
|
|
81941
81940
|
if (cfg.positionsCompressed && !cfg.positionsDecodeMatrix && !cfg.positionsDecodeBoundary) {
|
|
81942
81941
|
this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");
|
|
81943
|
-
return
|
|
81942
|
+
return false;
|
|
81944
81943
|
}
|
|
81945
81944
|
if (cfg.uvCompressed && !cfg.uvDecodeMatrix) {
|
|
81946
81945
|
this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");
|
|
81947
|
-
return
|
|
81946
|
+
return false;
|
|
81948
81947
|
}
|
|
81949
81948
|
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
|
|
81950
81949
|
this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`);
|
|
81951
|
-
return
|
|
81950
|
+
return false;
|
|
81952
81951
|
}
|
|
81953
81952
|
if ((cfg.matrix || cfg.position || cfg.rotation || cfg.scale) && (cfg.positionsCompressed || cfg.positionsDecodeBoundary)) {
|
|
81954
81953
|
this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'");
|
|
81955
|
-
return
|
|
81954
|
+
return false;
|
|
81956
81955
|
}
|
|
81957
81956
|
|
|
81958
81957
|
const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles"
|
|
@@ -82117,7 +82116,7 @@ class SceneModel extends Component {
|
|
|
82117
82116
|
cfg.textureSet = this._textureSets[cfg.textureSetId];
|
|
82118
82117
|
if (!cfg.textureSet) {
|
|
82119
82118
|
this.error(`[createMesh] Texture set not found: ${cfg.textureSetId} - ensure that you create it first with createTextureSet()`);
|
|
82120
|
-
return;
|
|
82119
|
+
return false;
|
|
82121
82120
|
}
|
|
82122
82121
|
}
|
|
82123
82122
|
}
|
|
@@ -82128,13 +82127,13 @@ class SceneModel extends Component {
|
|
|
82128
82127
|
|
|
82129
82128
|
if (cfg.positions || cfg.positionsCompressed || cfg.indices || cfg.edgeIndices || cfg.normals || cfg.normalsCompressed || cfg.uv || cfg.uvCompressed || cfg.positionsDecodeMatrix) {
|
|
82130
82129
|
this.error(`Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)`);
|
|
82131
|
-
return;
|
|
82130
|
+
return false;
|
|
82132
82131
|
}
|
|
82133
82132
|
|
|
82134
82133
|
cfg.geometry = this._geometries[cfg.geometryId];
|
|
82135
82134
|
if (!cfg.geometry) {
|
|
82136
82135
|
this.error(`[createMesh] Geometry not found: ${cfg.geometryId} - ensure that you create it first with createGeometry()`);
|
|
82137
|
-
return;
|
|
82136
|
+
return false;
|
|
82138
82137
|
}
|
|
82139
82138
|
|
|
82140
82139
|
cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin;
|
|
@@ -82148,7 +82147,7 @@ class SceneModel extends Component {
|
|
|
82148
82147
|
|
|
82149
82148
|
if (!cfg.transform) {
|
|
82150
82149
|
this.error(`[createMesh] Transform not found: ${cfg.transformId} - ensure that you create it first with createTransform()`);
|
|
82151
|
-
return;
|
|
82150
|
+
return false;
|
|
82152
82151
|
}
|
|
82153
82152
|
|
|
82154
82153
|
cfg.aabb = cfg.geometry.aabb;
|
|
@@ -82216,7 +82215,7 @@ class SceneModel extends Component {
|
|
|
82216
82215
|
cfg.textureSet = this._textureSets[cfg.textureSetId];
|
|
82217
82216
|
// if (!cfg.textureSet) {
|
|
82218
82217
|
// this.error(`[createMesh] Texture set not found: ${cfg.textureSetId} - ensure that you create it first with createTextureSet()`);
|
|
82219
|
-
// return;
|
|
82218
|
+
// return false;
|
|
82220
82219
|
// }
|
|
82221
82220
|
}
|
|
82222
82221
|
}
|
|
@@ -82224,7 +82223,9 @@ class SceneModel extends Component {
|
|
|
82224
82223
|
|
|
82225
82224
|
cfg.numPrimitives = this._getNumPrimitives(cfg);
|
|
82226
82225
|
|
|
82227
|
-
|
|
82226
|
+
this._meshesCfgsBeforeMeshCreation[cfg.id] = cfg;
|
|
82227
|
+
|
|
82228
|
+
return true;
|
|
82228
82229
|
}
|
|
82229
82230
|
|
|
82230
82231
|
_createMesh(cfg) {
|
|
@@ -82256,8 +82257,6 @@ class SceneModel extends Component {
|
|
|
82256
82257
|
cfg.meshMatrix = cfg.transform.worldMatrix;
|
|
82257
82258
|
}
|
|
82258
82259
|
mesh.portionId = mesh.layer.createPortion(mesh, cfg);
|
|
82259
|
-
this._meshes[cfg.id] = mesh;
|
|
82260
|
-
this._meshList.push(mesh);
|
|
82261
82260
|
return mesh;
|
|
82262
82261
|
}
|
|
82263
82262
|
|
|
@@ -82616,10 +82615,15 @@ class SceneModel extends Component {
|
|
|
82616
82615
|
let meshes = [];
|
|
82617
82616
|
for (let i = 0, len = cfg.meshIds.length; i < len; i++) {
|
|
82618
82617
|
const meshId = cfg.meshIds[i];
|
|
82619
|
-
|
|
82620
|
-
if (!mesh) {
|
|
82621
|
-
|
|
82622
|
-
|
|
82618
|
+
let mesh = this._meshes[meshId]; // Trying to get already created mesh
|
|
82619
|
+
if (!mesh) { // Checks if there is already created mesh for this meshId
|
|
82620
|
+
let meshCfg = this._meshesCfgsBeforeMeshCreation[meshId]; // Trying to get already created cfg
|
|
82621
|
+
if (!meshCfg) { // Checks if there is already created cfg for this meshId
|
|
82622
|
+
this.error(`Mesh with this ID not found: "${meshId}" - ignoring this mesh`); // There is no such cfg
|
|
82623
|
+
continue;
|
|
82624
|
+
}
|
|
82625
|
+
mesh = this._createMesh(meshCfg); // There is no such mesh yet, but there is already created cfg, so it creates this mesh
|
|
82626
|
+
this._meshes[cfg.id] = mesh; // Now it will also add this mesh to dictionary of created meshes
|
|
82623
82627
|
}
|
|
82624
82628
|
if (mesh.parent) {
|
|
82625
82629
|
this.error(`Mesh with ID "${meshId}" already belongs to object with ID "${mesh.parent.id}" - ignoring this mesh`);
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -80319,8 +80319,6 @@ class SceneModel extends Component {
|
|
|
80319
80319
|
this._vboBatchingLayers = {};
|
|
80320
80320
|
this._dtxLayers = {};
|
|
80321
80321
|
|
|
80322
|
-
this._meshList = [];
|
|
80323
|
-
|
|
80324
80322
|
this.layerList = []; // For GL state efficiency when drawing, InstancingLayers are in first part, BatchingLayers are in second
|
|
80325
80323
|
this._entityList = [];
|
|
80326
80324
|
|
|
@@ -80333,6 +80331,7 @@ class SceneModel extends Component {
|
|
|
80333
80331
|
this._entities = {};
|
|
80334
80332
|
|
|
80335
80333
|
this._scheduledMeshes = {};
|
|
80334
|
+
this._meshesCfgsBeforeMeshCreation = {};
|
|
80336
80335
|
|
|
80337
80336
|
/** @private **/
|
|
80338
80337
|
this.renderFlags = new RenderFlags();
|
|
@@ -81863,7 +81862,7 @@ class SceneModel extends Component {
|
|
|
81863
81862
|
/**
|
|
81864
81863
|
* Creates a new {@link SceneModelMesh} within this SceneModel.
|
|
81865
81864
|
*
|
|
81866
|
-
* *
|
|
81865
|
+
* * It prepares and saves data for a SceneModelMesh {@link SceneModel#meshes} creation. SceneModelMesh will be created only once the SceneModelEntity (which references this particular SceneModelMesh) will be created.
|
|
81867
81866
|
* * The SceneModelMesh can either define its own geometry or share it with other SceneModelMeshes. To define own geometry, provide the
|
|
81868
81867
|
* various geometry arrays to this method. To share a geometry, provide the ID of a geometry created earlier
|
|
81869
81868
|
* with {@link SceneModel#createGeometry}.
|
|
@@ -81898,18 +81897,18 @@ class SceneModel extends Component {
|
|
|
81898
81897
|
* @param {Number} [cfg.opacity=1] Opacity in range ````[0..1]````. Overridden by texture set ````colorTexture````.
|
|
81899
81898
|
* @param {Number} [cfg.metallic=0] Metallic factor in range ````[0..1]````. Overridden by texture set ````metallicRoughnessTexture````.
|
|
81900
81899
|
* @param {Number} [cfg.roughness=1] Roughness factor in range ````[0..1]````. Overridden by texture set ````metallicRoughnessTexture````.
|
|
81901
|
-
* @returns {
|
|
81900
|
+
* @returns {Boolean} True if mesh was successfully created, else false if an error occurred.
|
|
81902
81901
|
*/
|
|
81903
81902
|
createMesh(cfg) {
|
|
81904
81903
|
|
|
81905
81904
|
if (cfg.id === undefined || cfg.id === null) {
|
|
81906
81905
|
this.error("[createMesh] SceneModel.createMesh() config missing: id");
|
|
81907
|
-
return;
|
|
81906
|
+
return false;
|
|
81908
81907
|
}
|
|
81909
81908
|
|
|
81910
81909
|
if (this._scheduledMeshes[cfg.id]) {
|
|
81911
81910
|
this.error(`[createMesh] SceneModel already has a mesh with this ID: ${cfg.id}`);
|
|
81912
|
-
return;
|
|
81911
|
+
return false;
|
|
81913
81912
|
}
|
|
81914
81913
|
|
|
81915
81914
|
const instancing = (cfg.geometryId !== undefined);
|
|
@@ -81924,31 +81923,31 @@ class SceneModel extends Component {
|
|
|
81924
81923
|
}
|
|
81925
81924
|
if (cfg.primitive !== "points" && cfg.primitive !== "lines" && cfg.primitive !== "triangles" && cfg.primitive !== "solid" && cfg.primitive !== "surface") {
|
|
81926
81925
|
this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);
|
|
81927
|
-
return;
|
|
81926
|
+
return false;
|
|
81928
81927
|
}
|
|
81929
81928
|
if (!cfg.positions && !cfg.positionsCompressed && !cfg.buckets) {
|
|
81930
81929
|
this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)");
|
|
81931
|
-
return
|
|
81930
|
+
return false;
|
|
81932
81931
|
}
|
|
81933
81932
|
if (cfg.positions && (cfg.positionsDecodeMatrix || cfg.positionsDecodeBoundary)) {
|
|
81934
81933
|
this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");
|
|
81935
|
-
return
|
|
81934
|
+
return false;
|
|
81936
81935
|
}
|
|
81937
81936
|
if (cfg.positionsCompressed && !cfg.positionsDecodeMatrix && !cfg.positionsDecodeBoundary) {
|
|
81938
81937
|
this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");
|
|
81939
|
-
return
|
|
81938
|
+
return false;
|
|
81940
81939
|
}
|
|
81941
81940
|
if (cfg.uvCompressed && !cfg.uvDecodeMatrix) {
|
|
81942
81941
|
this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");
|
|
81943
|
-
return
|
|
81942
|
+
return false;
|
|
81944
81943
|
}
|
|
81945
81944
|
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
|
|
81946
81945
|
this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`);
|
|
81947
|
-
return
|
|
81946
|
+
return false;
|
|
81948
81947
|
}
|
|
81949
81948
|
if ((cfg.matrix || cfg.position || cfg.rotation || cfg.scale) && (cfg.positionsCompressed || cfg.positionsDecodeBoundary)) {
|
|
81950
81949
|
this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'");
|
|
81951
|
-
return
|
|
81950
|
+
return false;
|
|
81952
81951
|
}
|
|
81953
81952
|
|
|
81954
81953
|
const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles"
|
|
@@ -82113,7 +82112,7 @@ class SceneModel extends Component {
|
|
|
82113
82112
|
cfg.textureSet = this._textureSets[cfg.textureSetId];
|
|
82114
82113
|
if (!cfg.textureSet) {
|
|
82115
82114
|
this.error(`[createMesh] Texture set not found: ${cfg.textureSetId} - ensure that you create it first with createTextureSet()`);
|
|
82116
|
-
return;
|
|
82115
|
+
return false;
|
|
82117
82116
|
}
|
|
82118
82117
|
}
|
|
82119
82118
|
}
|
|
@@ -82124,13 +82123,13 @@ class SceneModel extends Component {
|
|
|
82124
82123
|
|
|
82125
82124
|
if (cfg.positions || cfg.positionsCompressed || cfg.indices || cfg.edgeIndices || cfg.normals || cfg.normalsCompressed || cfg.uv || cfg.uvCompressed || cfg.positionsDecodeMatrix) {
|
|
82126
82125
|
this.error(`Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)`);
|
|
82127
|
-
return;
|
|
82126
|
+
return false;
|
|
82128
82127
|
}
|
|
82129
82128
|
|
|
82130
82129
|
cfg.geometry = this._geometries[cfg.geometryId];
|
|
82131
82130
|
if (!cfg.geometry) {
|
|
82132
82131
|
this.error(`[createMesh] Geometry not found: ${cfg.geometryId} - ensure that you create it first with createGeometry()`);
|
|
82133
|
-
return;
|
|
82132
|
+
return false;
|
|
82134
82133
|
}
|
|
82135
82134
|
|
|
82136
82135
|
cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin;
|
|
@@ -82144,7 +82143,7 @@ class SceneModel extends Component {
|
|
|
82144
82143
|
|
|
82145
82144
|
if (!cfg.transform) {
|
|
82146
82145
|
this.error(`[createMesh] Transform not found: ${cfg.transformId} - ensure that you create it first with createTransform()`);
|
|
82147
|
-
return;
|
|
82146
|
+
return false;
|
|
82148
82147
|
}
|
|
82149
82148
|
|
|
82150
82149
|
cfg.aabb = cfg.geometry.aabb;
|
|
@@ -82212,7 +82211,7 @@ class SceneModel extends Component {
|
|
|
82212
82211
|
cfg.textureSet = this._textureSets[cfg.textureSetId];
|
|
82213
82212
|
// if (!cfg.textureSet) {
|
|
82214
82213
|
// this.error(`[createMesh] Texture set not found: ${cfg.textureSetId} - ensure that you create it first with createTextureSet()`);
|
|
82215
|
-
// return;
|
|
82214
|
+
// return false;
|
|
82216
82215
|
// }
|
|
82217
82216
|
}
|
|
82218
82217
|
}
|
|
@@ -82220,7 +82219,9 @@ class SceneModel extends Component {
|
|
|
82220
82219
|
|
|
82221
82220
|
cfg.numPrimitives = this._getNumPrimitives(cfg);
|
|
82222
82221
|
|
|
82223
|
-
|
|
82222
|
+
this._meshesCfgsBeforeMeshCreation[cfg.id] = cfg;
|
|
82223
|
+
|
|
82224
|
+
return true;
|
|
82224
82225
|
}
|
|
82225
82226
|
|
|
82226
82227
|
_createMesh(cfg) {
|
|
@@ -82252,8 +82253,6 @@ class SceneModel extends Component {
|
|
|
82252
82253
|
cfg.meshMatrix = cfg.transform.worldMatrix;
|
|
82253
82254
|
}
|
|
82254
82255
|
mesh.portionId = mesh.layer.createPortion(mesh, cfg);
|
|
82255
|
-
this._meshes[cfg.id] = mesh;
|
|
82256
|
-
this._meshList.push(mesh);
|
|
82257
82256
|
return mesh;
|
|
82258
82257
|
}
|
|
82259
82258
|
|
|
@@ -82612,10 +82611,15 @@ class SceneModel extends Component {
|
|
|
82612
82611
|
let meshes = [];
|
|
82613
82612
|
for (let i = 0, len = cfg.meshIds.length; i < len; i++) {
|
|
82614
82613
|
const meshId = cfg.meshIds[i];
|
|
82615
|
-
|
|
82614
|
+
let mesh = this._meshes[meshId];
|
|
82616
82615
|
if (!mesh) {
|
|
82617
|
-
|
|
82618
|
-
|
|
82616
|
+
let meshCfg = this._meshesCfgsBeforeMeshCreation[meshId];
|
|
82617
|
+
if (!meshCfg) {
|
|
82618
|
+
this.error(`Mesh with this ID not found: "${meshId}" - ignoring this mesh`);
|
|
82619
|
+
continue;
|
|
82620
|
+
}
|
|
82621
|
+
mesh = this._createMesh(meshCfg);
|
|
82622
|
+
this._meshes[cfg.id] = mesh;
|
|
82619
82623
|
}
|
|
82620
82624
|
if (mesh.parent) {
|
|
82621
82625
|
this.error(`Mesh with ID "${meshId}" already belongs to object with ID "${mesh.parent.id}" - ignoring this mesh`);
|
|
@@ -97220,94 +97224,94 @@ function arrayToMap(array) {
|
|
|
97220
97224
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
97221
97225
|
* Released under MIT License
|
|
97222
97226
|
*/
|
|
97223
|
-
/*! *****************************************************************************
|
|
97224
|
-
Copyright (c) Microsoft Corporation.
|
|
97225
|
-
|
|
97226
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
97227
|
-
purpose with or without fee is hereby granted.
|
|
97228
|
-
|
|
97229
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
97230
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
97231
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
97232
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
97233
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
97234
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
97235
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
97236
|
-
***************************************************************************** */
|
|
97237
|
-
/* global Reflect, Promise */
|
|
97238
|
-
|
|
97239
|
-
var extendStatics = function(d, b) {
|
|
97240
|
-
extendStatics = Object.setPrototypeOf ||
|
|
97241
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
97242
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
97243
|
-
return extendStatics(d, b);
|
|
97244
|
-
};
|
|
97245
|
-
|
|
97246
|
-
function __extends(d, b) {
|
|
97247
|
-
if (typeof b !== "function" && b !== null)
|
|
97248
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
97249
|
-
extendStatics(d, b);
|
|
97250
|
-
function __() { this.constructor = d; }
|
|
97251
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
97252
|
-
}
|
|
97253
|
-
|
|
97254
|
-
var __assign = function() {
|
|
97255
|
-
__assign = Object.assign || function __assign(t) {
|
|
97256
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
97257
|
-
s = arguments[i];
|
|
97258
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
97259
|
-
}
|
|
97260
|
-
return t;
|
|
97261
|
-
};
|
|
97262
|
-
return __assign.apply(this, arguments);
|
|
97263
|
-
};
|
|
97264
|
-
|
|
97265
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
97266
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
97267
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
97268
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
97269
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
97270
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
97271
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
97272
|
-
});
|
|
97273
|
-
}
|
|
97274
|
-
|
|
97275
|
-
function __generator(thisArg, body) {
|
|
97276
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
97277
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
97278
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
97279
|
-
function step(op) {
|
|
97280
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
97281
|
-
while (_) try {
|
|
97282
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
97283
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
97284
|
-
switch (op[0]) {
|
|
97285
|
-
case 0: case 1: t = op; break;
|
|
97286
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
97287
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
97288
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
97289
|
-
default:
|
|
97290
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
97291
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
97292
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
97293
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
97294
|
-
if (t[2]) _.ops.pop();
|
|
97295
|
-
_.trys.pop(); continue;
|
|
97296
|
-
}
|
|
97297
|
-
op = body.call(thisArg, _);
|
|
97298
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
97299
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
97300
|
-
}
|
|
97301
|
-
}
|
|
97302
|
-
|
|
97303
|
-
function __spreadArray(to, from, pack) {
|
|
97304
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
97305
|
-
if (ar || !(i in from)) {
|
|
97306
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
97307
|
-
ar[i] = from[i];
|
|
97308
|
-
}
|
|
97309
|
-
}
|
|
97310
|
-
return to.concat(ar || from);
|
|
97227
|
+
/*! *****************************************************************************
|
|
97228
|
+
Copyright (c) Microsoft Corporation.
|
|
97229
|
+
|
|
97230
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
97231
|
+
purpose with or without fee is hereby granted.
|
|
97232
|
+
|
|
97233
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
97234
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
97235
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
97236
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
97237
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
97238
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
97239
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
97240
|
+
***************************************************************************** */
|
|
97241
|
+
/* global Reflect, Promise */
|
|
97242
|
+
|
|
97243
|
+
var extendStatics = function(d, b) {
|
|
97244
|
+
extendStatics = Object.setPrototypeOf ||
|
|
97245
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
97246
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
97247
|
+
return extendStatics(d, b);
|
|
97248
|
+
};
|
|
97249
|
+
|
|
97250
|
+
function __extends(d, b) {
|
|
97251
|
+
if (typeof b !== "function" && b !== null)
|
|
97252
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
97253
|
+
extendStatics(d, b);
|
|
97254
|
+
function __() { this.constructor = d; }
|
|
97255
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
97256
|
+
}
|
|
97257
|
+
|
|
97258
|
+
var __assign = function() {
|
|
97259
|
+
__assign = Object.assign || function __assign(t) {
|
|
97260
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
97261
|
+
s = arguments[i];
|
|
97262
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
97263
|
+
}
|
|
97264
|
+
return t;
|
|
97265
|
+
};
|
|
97266
|
+
return __assign.apply(this, arguments);
|
|
97267
|
+
};
|
|
97268
|
+
|
|
97269
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
97270
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
97271
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
97272
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
97273
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
97274
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
97275
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
97276
|
+
});
|
|
97277
|
+
}
|
|
97278
|
+
|
|
97279
|
+
function __generator(thisArg, body) {
|
|
97280
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
97281
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
97282
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
97283
|
+
function step(op) {
|
|
97284
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
97285
|
+
while (_) try {
|
|
97286
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
97287
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
97288
|
+
switch (op[0]) {
|
|
97289
|
+
case 0: case 1: t = op; break;
|
|
97290
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
97291
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
97292
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
97293
|
+
default:
|
|
97294
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
97295
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
97296
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
97297
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
97298
|
+
if (t[2]) _.ops.pop();
|
|
97299
|
+
_.trys.pop(); continue;
|
|
97300
|
+
}
|
|
97301
|
+
op = body.call(thisArg, _);
|
|
97302
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
97303
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
97304
|
+
}
|
|
97305
|
+
}
|
|
97306
|
+
|
|
97307
|
+
function __spreadArray(to, from, pack) {
|
|
97308
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
97309
|
+
if (ar || !(i in from)) {
|
|
97310
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
97311
|
+
ar[i] = from[i];
|
|
97312
|
+
}
|
|
97313
|
+
}
|
|
97314
|
+
return to.concat(ar || from);
|
|
97311
97315
|
}
|
|
97312
97316
|
|
|
97313
97317
|
var Bounds = /** @class */ (function () {
|