@xeokit/xeokit-sdk 2.4.2-beta-8 → 2.4.2-beta-9
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 +47 -18
- package/dist/xeokit-sdk.es.js +47 -18
- package/dist/xeokit-sdk.es5.js +75 -66
- 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/viewer/metadata/MetaModel.js +17 -2
- package/src/viewer/scene/model/vbo/linesInstancing/LinesInstancingLayer.js +5 -0
- package/src/viewer/scene/model/vbo/pointsInstancing/PointsInstancingLayer.js +4 -0
- package/src/viewer/scene/model/vbo/trianglesInstancing/TrianglesInstancingLayer.js +21 -16
- package/types/viewer/scene/mesh/Mesh.d.ts +7 -0
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +3 -609
- package/types/viewer/scene/models/SceneModel.d.ts +708 -0
- package/types/viewer/scene/models/SceneModelEntity.d.ts +418 -0
- package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -0
- package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -0
- package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -0
- package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -0
- package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +2 -610
- package/types/viewer/scene/models/index.d.ts +8 -1
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -66193,28 +66193,33 @@ class TrianglesInstancingLayer {
|
|
|
66193
66193
|
if (!this._finalized) {
|
|
66194
66194
|
throw "Not finalized";
|
|
66195
66195
|
}
|
|
66196
|
-
var offset = portionId * 4;
|
|
66197
66196
|
|
|
66198
|
-
|
|
66199
|
-
|
|
66200
|
-
|
|
66201
|
-
tempFloat32Vec4$2[3] = matrix[12];
|
|
66197
|
+
////////////////////////////////////////
|
|
66198
|
+
// TODO: Update portion matrix
|
|
66199
|
+
////////////////////////////////////////
|
|
66202
66200
|
|
|
66203
|
-
|
|
66201
|
+
var offset = portionId * 4;
|
|
66204
66202
|
|
|
66205
|
-
|
|
66206
|
-
|
|
66207
|
-
|
|
66208
|
-
|
|
66203
|
+
tempFloat32Vec4$2[0] = matrix[0];
|
|
66204
|
+
tempFloat32Vec4$2[1] = matrix[4];
|
|
66205
|
+
tempFloat32Vec4$2[2] = matrix[8];
|
|
66206
|
+
tempFloat32Vec4$2[3] = matrix[12];
|
|
66209
66207
|
|
|
66210
|
-
|
|
66208
|
+
this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);
|
|
66211
66209
|
|
|
66212
|
-
|
|
66213
|
-
|
|
66214
|
-
|
|
66215
|
-
|
|
66210
|
+
tempFloat32Vec4$2[0] = matrix[1];
|
|
66211
|
+
tempFloat32Vec4$2[1] = matrix[5];
|
|
66212
|
+
tempFloat32Vec4$2[2] = matrix[9];
|
|
66213
|
+
tempFloat32Vec4$2[3] = matrix[13];
|
|
66216
66214
|
|
|
66217
|
-
|
|
66215
|
+
this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);
|
|
66216
|
+
|
|
66217
|
+
tempFloat32Vec4$2[0] = matrix[2];
|
|
66218
|
+
tempFloat32Vec4$2[1] = matrix[6];
|
|
66219
|
+
tempFloat32Vec4$2[2] = matrix[10];
|
|
66220
|
+
tempFloat32Vec4$2[3] = matrix[14];
|
|
66221
|
+
|
|
66222
|
+
this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
|
|
66218
66223
|
}
|
|
66219
66224
|
|
|
66220
66225
|
// ---------------------- COLOR RENDERING -----------------------------------
|
|
@@ -68559,6 +68564,11 @@ class LinesInstancingLayer {
|
|
|
68559
68564
|
}
|
|
68560
68565
|
|
|
68561
68566
|
setMatrix(portionId, matrix) {
|
|
68567
|
+
|
|
68568
|
+
////////////////////////////////////////
|
|
68569
|
+
// TODO: Update portion matrix
|
|
68570
|
+
////////////////////////////////////////
|
|
68571
|
+
|
|
68562
68572
|
if (!this._finalized) {
|
|
68563
68573
|
throw "Not finalized";
|
|
68564
68574
|
}
|
|
@@ -71946,6 +71956,10 @@ class PointsInstancingLayer {
|
|
|
71946
71956
|
}
|
|
71947
71957
|
|
|
71948
71958
|
// setMatrix(portionId, matrix) {
|
|
71959
|
+
|
|
71960
|
+
////////////////////////////////////////
|
|
71961
|
+
// TODO: Update portion matrix
|
|
71962
|
+
////////////////////////////////////////
|
|
71949
71963
|
//
|
|
71950
71964
|
// if (!this._finalized) {
|
|
71951
71965
|
// throw "Not finalized";
|
|
@@ -90953,8 +90967,7 @@ class MetaModel {
|
|
|
90953
90967
|
* @property rootMetaObject
|
|
90954
90968
|
* @type {MetaObject|null}
|
|
90955
90969
|
*/
|
|
90956
|
-
get rootMetaObject()
|
|
90957
|
-
{
|
|
90970
|
+
get rootMetaObject() {
|
|
90958
90971
|
if (this.rootMetaObjects.length == 1) {
|
|
90959
90972
|
return this.rootMetaObjects[0];
|
|
90960
90973
|
}
|
|
@@ -90974,6 +90987,7 @@ class MetaModel {
|
|
|
90974
90987
|
this._globalizeIDs(metaModelData, options);
|
|
90975
90988
|
|
|
90976
90989
|
const metaScene = this.metaScene;
|
|
90990
|
+
const propertyLookup = metaModelData.properties;
|
|
90977
90991
|
|
|
90978
90992
|
// Create global Property Sets
|
|
90979
90993
|
|
|
@@ -90982,6 +90996,9 @@ class MetaModel {
|
|
|
90982
90996
|
const propertySetData = metaModelData.propertySets[i];
|
|
90983
90997
|
let propertySet = metaScene.propertySets[propertySetData.id];
|
|
90984
90998
|
if (!propertySet) {
|
|
90999
|
+
if (propertyLookup) {
|
|
91000
|
+
this._decompressProperties(propertyLookup, propertySetData.properties);
|
|
91001
|
+
}
|
|
90985
91002
|
propertySet = new PropertySet({
|
|
90986
91003
|
id: propertySetData.id,
|
|
90987
91004
|
originalSystemId: propertySetData.originalSystemId || propertySetData.id,
|
|
@@ -91027,6 +91044,18 @@ class MetaModel {
|
|
|
91027
91044
|
}
|
|
91028
91045
|
}
|
|
91029
91046
|
|
|
91047
|
+
_decompressProperties(propertyLookup, properties) {
|
|
91048
|
+
for (let i = 0, len = properties.length; i < len; i++) {
|
|
91049
|
+
const property = properties[i];
|
|
91050
|
+
if (Number.isInteger(property)) {
|
|
91051
|
+
const lookupProperty = propertyLookup[property];
|
|
91052
|
+
if (lookupProperty) {
|
|
91053
|
+
properties[i] = lookupProperty;
|
|
91054
|
+
}
|
|
91055
|
+
}
|
|
91056
|
+
}
|
|
91057
|
+
}
|
|
91058
|
+
|
|
91030
91059
|
finalize() {
|
|
91031
91060
|
|
|
91032
91061
|
if (this.finalized) {
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -66189,28 +66189,33 @@ class TrianglesInstancingLayer {
|
|
|
66189
66189
|
if (!this._finalized) {
|
|
66190
66190
|
throw "Not finalized";
|
|
66191
66191
|
}
|
|
66192
|
-
var offset = portionId * 4;
|
|
66193
66192
|
|
|
66194
|
-
|
|
66195
|
-
|
|
66196
|
-
|
|
66197
|
-
tempFloat32Vec4$2[3] = matrix[12];
|
|
66193
|
+
////////////////////////////////////////
|
|
66194
|
+
// TODO: Update portion matrix
|
|
66195
|
+
////////////////////////////////////////
|
|
66198
66196
|
|
|
66199
|
-
|
|
66197
|
+
var offset = portionId * 4;
|
|
66200
66198
|
|
|
66201
|
-
|
|
66202
|
-
|
|
66203
|
-
|
|
66204
|
-
|
|
66199
|
+
tempFloat32Vec4$2[0] = matrix[0];
|
|
66200
|
+
tempFloat32Vec4$2[1] = matrix[4];
|
|
66201
|
+
tempFloat32Vec4$2[2] = matrix[8];
|
|
66202
|
+
tempFloat32Vec4$2[3] = matrix[12];
|
|
66205
66203
|
|
|
66206
|
-
|
|
66204
|
+
this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);
|
|
66207
66205
|
|
|
66208
|
-
|
|
66209
|
-
|
|
66210
|
-
|
|
66211
|
-
|
|
66206
|
+
tempFloat32Vec4$2[0] = matrix[1];
|
|
66207
|
+
tempFloat32Vec4$2[1] = matrix[5];
|
|
66208
|
+
tempFloat32Vec4$2[2] = matrix[9];
|
|
66209
|
+
tempFloat32Vec4$2[3] = matrix[13];
|
|
66212
66210
|
|
|
66213
|
-
|
|
66211
|
+
this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);
|
|
66212
|
+
|
|
66213
|
+
tempFloat32Vec4$2[0] = matrix[2];
|
|
66214
|
+
tempFloat32Vec4$2[1] = matrix[6];
|
|
66215
|
+
tempFloat32Vec4$2[2] = matrix[10];
|
|
66216
|
+
tempFloat32Vec4$2[3] = matrix[14];
|
|
66217
|
+
|
|
66218
|
+
this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
|
|
66214
66219
|
}
|
|
66215
66220
|
|
|
66216
66221
|
// ---------------------- COLOR RENDERING -----------------------------------
|
|
@@ -68555,6 +68560,11 @@ class LinesInstancingLayer {
|
|
|
68555
68560
|
}
|
|
68556
68561
|
|
|
68557
68562
|
setMatrix(portionId, matrix) {
|
|
68563
|
+
|
|
68564
|
+
////////////////////////////////////////
|
|
68565
|
+
// TODO: Update portion matrix
|
|
68566
|
+
////////////////////////////////////////
|
|
68567
|
+
|
|
68558
68568
|
if (!this._finalized) {
|
|
68559
68569
|
throw "Not finalized";
|
|
68560
68570
|
}
|
|
@@ -71942,6 +71952,10 @@ class PointsInstancingLayer {
|
|
|
71942
71952
|
}
|
|
71943
71953
|
|
|
71944
71954
|
// setMatrix(portionId, matrix) {
|
|
71955
|
+
|
|
71956
|
+
////////////////////////////////////////
|
|
71957
|
+
// TODO: Update portion matrix
|
|
71958
|
+
////////////////////////////////////////
|
|
71945
71959
|
//
|
|
71946
71960
|
// if (!this._finalized) {
|
|
71947
71961
|
// throw "Not finalized";
|
|
@@ -90949,8 +90963,7 @@ class MetaModel {
|
|
|
90949
90963
|
* @property rootMetaObject
|
|
90950
90964
|
* @type {MetaObject|null}
|
|
90951
90965
|
*/
|
|
90952
|
-
get rootMetaObject()
|
|
90953
|
-
{
|
|
90966
|
+
get rootMetaObject() {
|
|
90954
90967
|
if (this.rootMetaObjects.length == 1) {
|
|
90955
90968
|
return this.rootMetaObjects[0];
|
|
90956
90969
|
}
|
|
@@ -90970,6 +90983,7 @@ class MetaModel {
|
|
|
90970
90983
|
this._globalizeIDs(metaModelData, options);
|
|
90971
90984
|
|
|
90972
90985
|
const metaScene = this.metaScene;
|
|
90986
|
+
const propertyLookup = metaModelData.properties;
|
|
90973
90987
|
|
|
90974
90988
|
// Create global Property Sets
|
|
90975
90989
|
|
|
@@ -90978,6 +90992,9 @@ class MetaModel {
|
|
|
90978
90992
|
const propertySetData = metaModelData.propertySets[i];
|
|
90979
90993
|
let propertySet = metaScene.propertySets[propertySetData.id];
|
|
90980
90994
|
if (!propertySet) {
|
|
90995
|
+
if (propertyLookup) {
|
|
90996
|
+
this._decompressProperties(propertyLookup, propertySetData.properties);
|
|
90997
|
+
}
|
|
90981
90998
|
propertySet = new PropertySet({
|
|
90982
90999
|
id: propertySetData.id,
|
|
90983
91000
|
originalSystemId: propertySetData.originalSystemId || propertySetData.id,
|
|
@@ -91023,6 +91040,18 @@ class MetaModel {
|
|
|
91023
91040
|
}
|
|
91024
91041
|
}
|
|
91025
91042
|
|
|
91043
|
+
_decompressProperties(propertyLookup, properties) {
|
|
91044
|
+
for (let i = 0, len = properties.length; i < len; i++) {
|
|
91045
|
+
const property = properties[i];
|
|
91046
|
+
if (Number.isInteger(property)) {
|
|
91047
|
+
const lookupProperty = propertyLookup[property];
|
|
91048
|
+
if (lookupProperty) {
|
|
91049
|
+
properties[i] = lookupProperty;
|
|
91050
|
+
}
|
|
91051
|
+
}
|
|
91052
|
+
}
|
|
91053
|
+
}
|
|
91054
|
+
|
|
91026
91055
|
finalize() {
|
|
91027
91056
|
|
|
91028
91057
|
if (this.finalized) {
|