@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/package.json
CHANGED
|
@@ -151,8 +151,7 @@ class MetaModel {
|
|
|
151
151
|
* @property rootMetaObject
|
|
152
152
|
* @type {MetaObject|null}
|
|
153
153
|
*/
|
|
154
|
-
get rootMetaObject()
|
|
155
|
-
{
|
|
154
|
+
get rootMetaObject() {
|
|
156
155
|
if (this.rootMetaObjects.length == 1) {
|
|
157
156
|
return this.rootMetaObjects[0];
|
|
158
157
|
}
|
|
@@ -172,6 +171,7 @@ class MetaModel {
|
|
|
172
171
|
this._globalizeIDs(metaModelData, options)
|
|
173
172
|
|
|
174
173
|
const metaScene = this.metaScene;
|
|
174
|
+
const propertyLookup = metaModelData.properties;
|
|
175
175
|
|
|
176
176
|
// Create global Property Sets
|
|
177
177
|
|
|
@@ -180,6 +180,9 @@ class MetaModel {
|
|
|
180
180
|
const propertySetData = metaModelData.propertySets[i];
|
|
181
181
|
let propertySet = metaScene.propertySets[propertySetData.id];
|
|
182
182
|
if (!propertySet) {
|
|
183
|
+
if (propertyLookup) {
|
|
184
|
+
this._decompressProperties(propertyLookup, propertySetData.properties);
|
|
185
|
+
}
|
|
183
186
|
propertySet = new PropertySet({
|
|
184
187
|
id: propertySetData.id,
|
|
185
188
|
originalSystemId: propertySetData.originalSystemId || propertySetData.id,
|
|
@@ -225,6 +228,18 @@ class MetaModel {
|
|
|
225
228
|
}
|
|
226
229
|
}
|
|
227
230
|
|
|
231
|
+
_decompressProperties(propertyLookup, properties) {
|
|
232
|
+
for (let i = 0, len = properties.length; i < len; i++) {
|
|
233
|
+
const property = properties[i];
|
|
234
|
+
if (Number.isInteger(property)) {
|
|
235
|
+
const lookupProperty = propertyLookup[property];
|
|
236
|
+
if (lookupProperty) {
|
|
237
|
+
properties[i] = lookupProperty;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
228
243
|
finalize() {
|
|
229
244
|
|
|
230
245
|
if (this.finalized) {
|
|
@@ -522,6 +522,11 @@ class LinesInstancingLayer {
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
setMatrix(portionId, matrix) {
|
|
525
|
+
|
|
526
|
+
////////////////////////////////////////
|
|
527
|
+
// TODO: Update portion matrix
|
|
528
|
+
////////////////////////////////////////
|
|
529
|
+
|
|
525
530
|
if (!this._finalized) {
|
|
526
531
|
throw "Not finalized";
|
|
527
532
|
}
|
|
@@ -427,6 +427,10 @@ class PointsInstancingLayer {
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
// setMatrix(portionId, matrix) {
|
|
430
|
+
|
|
431
|
+
////////////////////////////////////////
|
|
432
|
+
// TODO: Update portion matrix
|
|
433
|
+
////////////////////////////////////////
|
|
430
434
|
//
|
|
431
435
|
// if (!this._finalized) {
|
|
432
436
|
// throw "Not finalized";
|
|
@@ -752,28 +752,33 @@ class TrianglesInstancingLayer {
|
|
|
752
752
|
if (!this._finalized) {
|
|
753
753
|
throw "Not finalized";
|
|
754
754
|
}
|
|
755
|
-
var offset = portionId * 4;
|
|
756
755
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
tempFloat32Vec4[3] = matrix[12];
|
|
756
|
+
////////////////////////////////////////
|
|
757
|
+
// TODO: Update portion matrix
|
|
758
|
+
////////////////////////////////////////
|
|
761
759
|
|
|
762
|
-
|
|
760
|
+
var offset = portionId * 4;
|
|
763
761
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
762
|
+
tempFloat32Vec4[0] = matrix[0];
|
|
763
|
+
tempFloat32Vec4[1] = matrix[4];
|
|
764
|
+
tempFloat32Vec4[2] = matrix[8];
|
|
765
|
+
tempFloat32Vec4[3] = matrix[12];
|
|
768
766
|
|
|
769
|
-
|
|
767
|
+
this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4, offset);
|
|
770
768
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
769
|
+
tempFloat32Vec4[0] = matrix[1];
|
|
770
|
+
tempFloat32Vec4[1] = matrix[5];
|
|
771
|
+
tempFloat32Vec4[2] = matrix[9];
|
|
772
|
+
tempFloat32Vec4[3] = matrix[13];
|
|
775
773
|
|
|
776
|
-
|
|
774
|
+
this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4, offset);
|
|
775
|
+
|
|
776
|
+
tempFloat32Vec4[0] = matrix[2];
|
|
777
|
+
tempFloat32Vec4[1] = matrix[6];
|
|
778
|
+
tempFloat32Vec4[2] = matrix[10];
|
|
779
|
+
tempFloat32Vec4[3] = matrix[14];
|
|
780
|
+
|
|
781
|
+
this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4, offset);
|
|
777
782
|
}
|
|
778
783
|
|
|
779
784
|
// ---------------------- COLOR RENDERING -----------------------------------
|
|
@@ -783,4 +783,11 @@ export declare class Mesh extends Component implements Omit<Entity, 'parent'> {
|
|
|
783
783
|
* @returns {number}
|
|
784
784
|
*/
|
|
785
785
|
stateSortCompare(mesh1: Mesh, mesh2: Mesh): number;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Gets the World, View and Canvas-space positions of each vertex in a callback.
|
|
789
|
+
*
|
|
790
|
+
* @param callback
|
|
791
|
+
*/
|
|
792
|
+
getEachVertex(callback: any): void;
|
|
786
793
|
}
|