@xeokit/xeokit-sdk 2.4.2-beta-41 → 2.4.2-beta-43
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 +17 -97
- package/dist/xeokit-sdk.es.js +17 -97
- package/dist/xeokit-sdk.es5.js +17 -59
- 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 +4 -4
- package/package.json +1 -1
- package/src/viewer/scene/model/SceneModel.js +0 -1
- package/src/viewer/scene/model/dtx/triangles/TrianglesDataTextureLayer.js +1 -49
- package/src/viewer/scene/model/vbo/linesBatching/LinesBatchingLayer.js +0 -5
- package/src/viewer/scene/model/vbo/linesInstancing/LinesInstancingLayer.js +0 -4
- package/src/viewer/scene/model/vbo/pointsBatching/PointsBatchingLayer.js +0 -7
- package/src/viewer/scene/model/vbo/pointsInstancing/PointsInstancingLayer.js +0 -3
- package/src/viewer/scene/model/vbo/trianglesBatching/TrianglesBatchingLayer.js +0 -9
- package/src/viewer/scene/model/vbo/trianglesInstancing/TrianglesInstancingLayer.js +0 -3
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -61340,9 +61340,6 @@ function getSnapBatchingRenderers(scene) {
|
|
|
61340
61340
|
const tempMat4$1 = math.mat4();
|
|
61341
61341
|
const tempMat4b = math.mat4();
|
|
61342
61342
|
const tempVec4a$7 = math.vec4([0, 0, 0, 1]);
|
|
61343
|
-
math.vec4([0, 0, 0, 1]);
|
|
61344
|
-
math.vec4([0, 0, 0, 1]);
|
|
61345
|
-
math.OBB3();
|
|
61346
61343
|
|
|
61347
61344
|
const tempVec3a$o = math.vec3();
|
|
61348
61345
|
const tempVec3b$k = math.vec3();
|
|
@@ -61456,12 +61453,6 @@ class TrianglesBatchingLayer {
|
|
|
61456
61453
|
this._state.origin.set(cfg.origin);
|
|
61457
61454
|
}
|
|
61458
61455
|
|
|
61459
|
-
/**
|
|
61460
|
-
* The axis-aligned World-space boundary of this TrianglesBatchingLayer's positions.
|
|
61461
|
-
* @type {*|Float64Array}
|
|
61462
|
-
*/
|
|
61463
|
-
this.aabb = math.collapseAABB3();
|
|
61464
|
-
|
|
61465
61456
|
/**
|
|
61466
61457
|
* When true, this layer contains solid triangle meshes, otherwise this layer contains surface triangle meshes
|
|
61467
61458
|
* @type {boolean}
|
|
@@ -66397,11 +66388,8 @@ function getSnapInstancingRenderers(scene) {
|
|
|
66397
66388
|
return instancingRenderers;
|
|
66398
66389
|
}
|
|
66399
66390
|
|
|
66400
|
-
const tempUint8Vec4$2 = new Uint8Array(4);
|
|
66401
66391
|
const tempFloat32$2 = new Float32Array(1);
|
|
66402
66392
|
const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
|
|
66403
|
-
math.vec4([0, 0, 0, 1]);
|
|
66404
|
-
math.vec4([0, 0, 0, 1]);
|
|
66405
66393
|
const tempVec3fa$2 = new Float32Array(3);
|
|
66406
66394
|
|
|
66407
66395
|
const tempVec3a$l = math.vec3();
|
|
@@ -66937,12 +66925,12 @@ class TrianglesInstancingLayer {
|
|
|
66937
66925
|
if (!this._finalized) {
|
|
66938
66926
|
throw "Not finalized";
|
|
66939
66927
|
}
|
|
66940
|
-
tempUint8Vec4
|
|
66941
|
-
tempUint8Vec4
|
|
66942
|
-
tempUint8Vec4
|
|
66943
|
-
tempUint8Vec4
|
|
66928
|
+
tempUint8Vec4[0] = color[0];
|
|
66929
|
+
tempUint8Vec4[1] = color[1];
|
|
66930
|
+
tempUint8Vec4[2] = color[2];
|
|
66931
|
+
tempUint8Vec4[3] = color[3];
|
|
66944
66932
|
if (this._state.colorsBuf) {
|
|
66945
|
-
this._state.colorsBuf.setData(tempUint8Vec4
|
|
66933
|
+
this._state.colorsBuf.setData(tempUint8Vec4, portionId * 4);
|
|
66946
66934
|
}
|
|
66947
66935
|
}
|
|
66948
66936
|
|
|
@@ -67906,11 +67894,6 @@ class LinesBatchingBuffer {
|
|
|
67906
67894
|
}
|
|
67907
67895
|
}
|
|
67908
67896
|
|
|
67909
|
-
math.vec4([0, 0, 0, 1]);
|
|
67910
|
-
math.vec4([0, 0, 0, 1]);
|
|
67911
|
-
math.vec4([0, 0, 0, 1]);
|
|
67912
|
-
math.OBB3();
|
|
67913
|
-
|
|
67914
67897
|
/**
|
|
67915
67898
|
* @private
|
|
67916
67899
|
*/
|
|
@@ -68926,13 +68909,9 @@ function getInstancingRenderers(scene) {
|
|
|
68926
68909
|
return instancingRenderers;
|
|
68927
68910
|
}
|
|
68928
68911
|
|
|
68929
|
-
const tempUint8Vec4$
|
|
68912
|
+
const tempUint8Vec4$2 = new Uint8Array(4);
|
|
68930
68913
|
const tempFloat32$1 = new Float32Array(1);
|
|
68931
68914
|
|
|
68932
|
-
math.vec4([0, 0, 0, 1]);
|
|
68933
|
-
math.vec4([0, 0, 0, 1]);
|
|
68934
|
-
math.vec4([0, 0, 0, 1]);
|
|
68935
|
-
|
|
68936
68915
|
const tempVec3fa$1 = new Float32Array(3);
|
|
68937
68916
|
|
|
68938
68917
|
const tempFloat32Vec4$1 = new Float32Array(4);
|
|
@@ -69314,11 +69293,11 @@ class LinesInstancingLayer {
|
|
|
69314
69293
|
if (!this._finalized) {
|
|
69315
69294
|
throw "Not finalized";
|
|
69316
69295
|
}
|
|
69317
|
-
tempUint8Vec4$
|
|
69318
|
-
tempUint8Vec4$
|
|
69319
|
-
tempUint8Vec4$
|
|
69320
|
-
tempUint8Vec4$
|
|
69321
|
-
this._state.colorsBuf.setData(tempUint8Vec4$
|
|
69296
|
+
tempUint8Vec4$2[0] = color[0];
|
|
69297
|
+
tempUint8Vec4$2[1] = color[1];
|
|
69298
|
+
tempUint8Vec4$2[2] = color[2];
|
|
69299
|
+
tempUint8Vec4$2[3] = color[3];
|
|
69300
|
+
this._state.colorsBuf.setData(tempUint8Vec4$2, portionId * 4, 4);
|
|
69322
69301
|
}
|
|
69323
69302
|
|
|
69324
69303
|
setTransparent(portionId, flags, transparent) {
|
|
@@ -70457,13 +70436,6 @@ class PointsBatchingBuffer {
|
|
|
70457
70436
|
}
|
|
70458
70437
|
}
|
|
70459
70438
|
|
|
70460
|
-
math.vec4();
|
|
70461
|
-
math.vec4();
|
|
70462
|
-
math.vec4([0, 0, 0, 1]);
|
|
70463
|
-
math.vec4([0, 0, 0, 1]);
|
|
70464
|
-
math.vec4([0, 0, 0, 1]);
|
|
70465
|
-
math.OBB3();
|
|
70466
|
-
|
|
70467
70439
|
/**
|
|
70468
70440
|
* @private
|
|
70469
70441
|
*/
|
|
@@ -72357,11 +72329,8 @@ function getPointsInstancingRenderers(scene) {
|
|
|
72357
72329
|
return instancingRenderers;
|
|
72358
72330
|
}
|
|
72359
72331
|
|
|
72360
|
-
const tempUint8Vec4 = new Uint8Array(4);
|
|
72332
|
+
const tempUint8Vec4$1 = new Uint8Array(4);
|
|
72361
72333
|
const tempFloat32 = new Float32Array(1);
|
|
72362
|
-
math.vec4([0, 0, 0, 1]);
|
|
72363
|
-
math.vec4([0, 0, 0, 1]);
|
|
72364
|
-
math.vec4([0, 0, 0, 1]);
|
|
72365
72334
|
const tempVec3fa = new Float32Array(3);
|
|
72366
72335
|
|
|
72367
72336
|
const tempFloat32Vec4 = new Float32Array(4);
|
|
@@ -72742,10 +72711,10 @@ class PointsInstancingLayer {
|
|
|
72742
72711
|
if (!this._finalized) {
|
|
72743
72712
|
throw "Not finalized";
|
|
72744
72713
|
}
|
|
72745
|
-
tempUint8Vec4[0] = color[0];
|
|
72746
|
-
tempUint8Vec4[1] = color[1];
|
|
72747
|
-
tempUint8Vec4[2] = color[2];
|
|
72748
|
-
this._state.colorsBuf.setData(tempUint8Vec4, portionId * 3);
|
|
72714
|
+
tempUint8Vec4$1[0] = color[0];
|
|
72715
|
+
tempUint8Vec4$1[1] = color[1];
|
|
72716
|
+
tempUint8Vec4$1[2] = color[2];
|
|
72717
|
+
this._state.colorsBuf.setData(tempUint8Vec4$1, portionId * 3);
|
|
72749
72718
|
}
|
|
72750
72719
|
|
|
72751
72720
|
setTransparent(portionId, flags, transparent) {
|
|
@@ -81179,15 +81148,10 @@ const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
|
|
|
81179
81148
|
*/
|
|
81180
81149
|
const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
|
|
81181
81150
|
|
|
81182
|
-
math.vec4([0, 0, 0, 1]);
|
|
81183
|
-
math.vec4([0, 0, 0, 1]);
|
|
81184
|
-
math.vec4([0, 0, 0, 1]);
|
|
81185
81151
|
const tempMat4a = new Float32Array(16);
|
|
81186
81152
|
const tempUint8Array4 = new Uint8Array(4);
|
|
81187
81153
|
const tempFloat32Array3 = new Float32Array(3);
|
|
81188
81154
|
|
|
81189
|
-
math.AABB3();
|
|
81190
|
-
|
|
81191
81155
|
let numLayers = 0;
|
|
81192
81156
|
|
|
81193
81157
|
const DEFAULT_MATRIX$1 = math.identityMat4();
|
|
@@ -81359,16 +81323,6 @@ class TrianglesDataTextureLayer {
|
|
|
81359
81323
|
//math.expandAABB3(portionAABB, subPortionAABB);
|
|
81360
81324
|
subPortionIds.push(subPortionId);
|
|
81361
81325
|
});
|
|
81362
|
-
// const origin = this._state.origin;
|
|
81363
|
-
// if (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0) {
|
|
81364
|
-
// portionAABB[0] += origin[0];
|
|
81365
|
-
// portionAABB[1] += origin[1];
|
|
81366
|
-
// portionAABB[2] += origin[2];
|
|
81367
|
-
// portionAABB[3] += origin[0];
|
|
81368
|
-
// portionAABB[4] += origin[1];
|
|
81369
|
-
// portionAABB[5] += origin[2];
|
|
81370
|
-
// }
|
|
81371
|
-
// math.expandAABB3(this.aabb, portionAABB);
|
|
81372
81326
|
const portionId = this._portionToSubPortionsMap.length;
|
|
81373
81327
|
this._portionToSubPortionsMap.push(subPortionIds);
|
|
81374
81328
|
this.model.numPortions++;
|
|
@@ -81466,10 +81420,6 @@ class TrianglesDataTextureLayer {
|
|
|
81466
81420
|
|
|
81467
81421
|
dataTextureRamStats.numberOfGeometries++;
|
|
81468
81422
|
|
|
81469
|
-
// const aabb = math.collapseAABB3();
|
|
81470
|
-
// math.expandAABB3Points3(aabb, bucket.positionsCompressed);
|
|
81471
|
-
// geometryCompressionUtils.decompressAABB(aabb, portionCfg.positionsDecodeMatrix);
|
|
81472
|
-
|
|
81473
81423
|
const bucketGeometry = {
|
|
81474
81424
|
vertexBase,
|
|
81475
81425
|
numVertices,
|
|
@@ -81477,7 +81427,6 @@ class TrianglesDataTextureLayer {
|
|
|
81477
81427
|
numEdges,
|
|
81478
81428
|
indicesBase,
|
|
81479
81429
|
edgeIndicesBase,
|
|
81480
|
-
// aabb,
|
|
81481
81430
|
obb: null // Lazy-created in _createSubPortion if needed
|
|
81482
81431
|
};
|
|
81483
81432
|
|
|
@@ -81499,26 +81448,6 @@ class TrianglesDataTextureLayer {
|
|
|
81499
81448
|
buffer.perObjectPositionsDecodeMatrices.push(portionCfg.positionsDecodeMatrix);
|
|
81500
81449
|
buffer.perObjectInstancePositioningMatrices.push(meshMatrix || DEFAULT_MATRIX$1);
|
|
81501
81450
|
|
|
81502
|
-
// if (meshMatrix) { // NB: SceneModel world matrix is used in shaders and SceneModelMesh.aabb
|
|
81503
|
-
//
|
|
81504
|
-
// if (!bucketGeometry.obb) {
|
|
81505
|
-
// bucketGeometry.obb = math.AABB3ToOBB3(bucketGeometry.aabb);
|
|
81506
|
-
// }
|
|
81507
|
-
// const geometryOBB = bucketGeometry.obb;
|
|
81508
|
-
// for (let i = 0, len = geometryOBB.length; i < len; i += 4) {
|
|
81509
|
-
// tempVec4a[0] = geometryOBB[i + 0];
|
|
81510
|
-
// tempVec4a[1] = geometryOBB[i + 1];
|
|
81511
|
-
// tempVec4a[2] = geometryOBB[i + 2];
|
|
81512
|
-
// tempVec4a[3] = 1.0;
|
|
81513
|
-
// if (meshMatrix) {
|
|
81514
|
-
// math.transformPoint4(meshMatrix, tempVec4a, tempVec4b);
|
|
81515
|
-
// }
|
|
81516
|
-
// math.expandAABB3Point3(subPortionAABB, tempVec4b);
|
|
81517
|
-
// }
|
|
81518
|
-
// } else {
|
|
81519
|
-
// math.expandAABB3(subPortionAABB, bucketGeometry.aabb);
|
|
81520
|
-
// }
|
|
81521
|
-
|
|
81522
81451
|
buffer.perObjectSolid.push(!!portionCfg.solid);
|
|
81523
81452
|
|
|
81524
81453
|
if (colors) {
|
|
@@ -81647,13 +81576,6 @@ class TrianglesDataTextureLayer {
|
|
|
81647
81576
|
gl,
|
|
81648
81577
|
buffer.perObjectPositionsDecodeMatrices);
|
|
81649
81578
|
|
|
81650
|
-
// const positionsCompressed = new Uint16Array(buffer.lenPositionsCompressed);
|
|
81651
|
-
// for (let i = 0, j = 0, len = buffer.positionsCompressed.length; i < len; i++) {
|
|
81652
|
-
// const pc = buffer.positionsCompressed[i];
|
|
81653
|
-
// positionsCompressed.set(pc, j);
|
|
81654
|
-
// j += pc.length;
|
|
81655
|
-
// }
|
|
81656
|
-
|
|
81657
81579
|
textureState.texturePerVertexIdCoordinates = this._dataTextureGenerator.generateTextureForPositions(
|
|
81658
81580
|
gl,
|
|
81659
81581
|
buffer.positionsCompressed,
|
|
@@ -81902,7 +81824,6 @@ class TrianglesDataTextureLayer {
|
|
|
81902
81824
|
* flags/flags2 set since the previous invocation of `_beginDeferredFlags`.
|
|
81903
81825
|
*/
|
|
81904
81826
|
_uploadDeferredFlags() {
|
|
81905
|
-
console.info("_uploadDeferredFlags");
|
|
81906
81827
|
this._deferredSetFlagsActive = false;
|
|
81907
81828
|
if (!this._deferredSetFlagsDirty) {
|
|
81908
81829
|
return;
|
|
@@ -82096,7 +82017,7 @@ class TrianglesDataTextureLayer {
|
|
|
82096
82017
|
|
|
82097
82018
|
// Pick
|
|
82098
82019
|
|
|
82099
|
-
let f3 = (visible && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
82020
|
+
let f3 = (visible && (!culled) && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
82100
82021
|
const textureState = this._dataTextureState;
|
|
82101
82022
|
const gl = this.model.scene.canvas.gl;
|
|
82102
82023
|
tempUint8Array4 [0] = f0;
|
|
@@ -82912,7 +82833,6 @@ class SceneModelTransform {
|
|
|
82912
82833
|
}
|
|
82913
82834
|
|
|
82914
82835
|
const tempVec3a$8 = math.vec3();
|
|
82915
|
-
math.mat4();
|
|
82916
82836
|
|
|
82917
82837
|
const tempOBB3 = math.OBB3();
|
|
82918
82838
|
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -61336,9 +61336,6 @@ function getSnapBatchingRenderers(scene) {
|
|
|
61336
61336
|
const tempMat4$1 = math.mat4();
|
|
61337
61337
|
const tempMat4b = math.mat4();
|
|
61338
61338
|
const tempVec4a$7 = math.vec4([0, 0, 0, 1]);
|
|
61339
|
-
math.vec4([0, 0, 0, 1]);
|
|
61340
|
-
math.vec4([0, 0, 0, 1]);
|
|
61341
|
-
math.OBB3();
|
|
61342
61339
|
|
|
61343
61340
|
const tempVec3a$o = math.vec3();
|
|
61344
61341
|
const tempVec3b$k = math.vec3();
|
|
@@ -61452,12 +61449,6 @@ class TrianglesBatchingLayer {
|
|
|
61452
61449
|
this._state.origin.set(cfg.origin);
|
|
61453
61450
|
}
|
|
61454
61451
|
|
|
61455
|
-
/**
|
|
61456
|
-
* The axis-aligned World-space boundary of this TrianglesBatchingLayer's positions.
|
|
61457
|
-
* @type {*|Float64Array}
|
|
61458
|
-
*/
|
|
61459
|
-
this.aabb = math.collapseAABB3();
|
|
61460
|
-
|
|
61461
61452
|
/**
|
|
61462
61453
|
* When true, this layer contains solid triangle meshes, otherwise this layer contains surface triangle meshes
|
|
61463
61454
|
* @type {boolean}
|
|
@@ -66393,11 +66384,8 @@ function getSnapInstancingRenderers(scene) {
|
|
|
66393
66384
|
return instancingRenderers;
|
|
66394
66385
|
}
|
|
66395
66386
|
|
|
66396
|
-
const tempUint8Vec4$2 = new Uint8Array(4);
|
|
66397
66387
|
const tempFloat32$2 = new Float32Array(1);
|
|
66398
66388
|
const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
|
|
66399
|
-
math.vec4([0, 0, 0, 1]);
|
|
66400
|
-
math.vec4([0, 0, 0, 1]);
|
|
66401
66389
|
const tempVec3fa$2 = new Float32Array(3);
|
|
66402
66390
|
|
|
66403
66391
|
const tempVec3a$l = math.vec3();
|
|
@@ -66933,12 +66921,12 @@ class TrianglesInstancingLayer {
|
|
|
66933
66921
|
if (!this._finalized) {
|
|
66934
66922
|
throw "Not finalized";
|
|
66935
66923
|
}
|
|
66936
|
-
tempUint8Vec4
|
|
66937
|
-
tempUint8Vec4
|
|
66938
|
-
tempUint8Vec4
|
|
66939
|
-
tempUint8Vec4
|
|
66924
|
+
tempUint8Vec4[0] = color[0];
|
|
66925
|
+
tempUint8Vec4[1] = color[1];
|
|
66926
|
+
tempUint8Vec4[2] = color[2];
|
|
66927
|
+
tempUint8Vec4[3] = color[3];
|
|
66940
66928
|
if (this._state.colorsBuf) {
|
|
66941
|
-
this._state.colorsBuf.setData(tempUint8Vec4
|
|
66929
|
+
this._state.colorsBuf.setData(tempUint8Vec4, portionId * 4);
|
|
66942
66930
|
}
|
|
66943
66931
|
}
|
|
66944
66932
|
|
|
@@ -67902,11 +67890,6 @@ class LinesBatchingBuffer {
|
|
|
67902
67890
|
}
|
|
67903
67891
|
}
|
|
67904
67892
|
|
|
67905
|
-
math.vec4([0, 0, 0, 1]);
|
|
67906
|
-
math.vec4([0, 0, 0, 1]);
|
|
67907
|
-
math.vec4([0, 0, 0, 1]);
|
|
67908
|
-
math.OBB3();
|
|
67909
|
-
|
|
67910
67893
|
/**
|
|
67911
67894
|
* @private
|
|
67912
67895
|
*/
|
|
@@ -68922,13 +68905,9 @@ function getInstancingRenderers(scene) {
|
|
|
68922
68905
|
return instancingRenderers;
|
|
68923
68906
|
}
|
|
68924
68907
|
|
|
68925
|
-
const tempUint8Vec4$
|
|
68908
|
+
const tempUint8Vec4$2 = new Uint8Array(4);
|
|
68926
68909
|
const tempFloat32$1 = new Float32Array(1);
|
|
68927
68910
|
|
|
68928
|
-
math.vec4([0, 0, 0, 1]);
|
|
68929
|
-
math.vec4([0, 0, 0, 1]);
|
|
68930
|
-
math.vec4([0, 0, 0, 1]);
|
|
68931
|
-
|
|
68932
68911
|
const tempVec3fa$1 = new Float32Array(3);
|
|
68933
68912
|
|
|
68934
68913
|
const tempFloat32Vec4$1 = new Float32Array(4);
|
|
@@ -69310,11 +69289,11 @@ class LinesInstancingLayer {
|
|
|
69310
69289
|
if (!this._finalized) {
|
|
69311
69290
|
throw "Not finalized";
|
|
69312
69291
|
}
|
|
69313
|
-
tempUint8Vec4$
|
|
69314
|
-
tempUint8Vec4$
|
|
69315
|
-
tempUint8Vec4$
|
|
69316
|
-
tempUint8Vec4$
|
|
69317
|
-
this._state.colorsBuf.setData(tempUint8Vec4$
|
|
69292
|
+
tempUint8Vec4$2[0] = color[0];
|
|
69293
|
+
tempUint8Vec4$2[1] = color[1];
|
|
69294
|
+
tempUint8Vec4$2[2] = color[2];
|
|
69295
|
+
tempUint8Vec4$2[3] = color[3];
|
|
69296
|
+
this._state.colorsBuf.setData(tempUint8Vec4$2, portionId * 4, 4);
|
|
69318
69297
|
}
|
|
69319
69298
|
|
|
69320
69299
|
setTransparent(portionId, flags, transparent) {
|
|
@@ -70453,13 +70432,6 @@ class PointsBatchingBuffer {
|
|
|
70453
70432
|
}
|
|
70454
70433
|
}
|
|
70455
70434
|
|
|
70456
|
-
math.vec4();
|
|
70457
|
-
math.vec4();
|
|
70458
|
-
math.vec4([0, 0, 0, 1]);
|
|
70459
|
-
math.vec4([0, 0, 0, 1]);
|
|
70460
|
-
math.vec4([0, 0, 0, 1]);
|
|
70461
|
-
math.OBB3();
|
|
70462
|
-
|
|
70463
70435
|
/**
|
|
70464
70436
|
* @private
|
|
70465
70437
|
*/
|
|
@@ -72353,11 +72325,8 @@ function getPointsInstancingRenderers(scene) {
|
|
|
72353
72325
|
return instancingRenderers;
|
|
72354
72326
|
}
|
|
72355
72327
|
|
|
72356
|
-
const tempUint8Vec4 = new Uint8Array(4);
|
|
72328
|
+
const tempUint8Vec4$1 = new Uint8Array(4);
|
|
72357
72329
|
const tempFloat32 = new Float32Array(1);
|
|
72358
|
-
math.vec4([0, 0, 0, 1]);
|
|
72359
|
-
math.vec4([0, 0, 0, 1]);
|
|
72360
|
-
math.vec4([0, 0, 0, 1]);
|
|
72361
72330
|
const tempVec3fa = new Float32Array(3);
|
|
72362
72331
|
|
|
72363
72332
|
const tempFloat32Vec4 = new Float32Array(4);
|
|
@@ -72738,10 +72707,10 @@ class PointsInstancingLayer {
|
|
|
72738
72707
|
if (!this._finalized) {
|
|
72739
72708
|
throw "Not finalized";
|
|
72740
72709
|
}
|
|
72741
|
-
tempUint8Vec4[0] = color[0];
|
|
72742
|
-
tempUint8Vec4[1] = color[1];
|
|
72743
|
-
tempUint8Vec4[2] = color[2];
|
|
72744
|
-
this._state.colorsBuf.setData(tempUint8Vec4, portionId * 3);
|
|
72710
|
+
tempUint8Vec4$1[0] = color[0];
|
|
72711
|
+
tempUint8Vec4$1[1] = color[1];
|
|
72712
|
+
tempUint8Vec4$1[2] = color[2];
|
|
72713
|
+
this._state.colorsBuf.setData(tempUint8Vec4$1, portionId * 3);
|
|
72745
72714
|
}
|
|
72746
72715
|
|
|
72747
72716
|
setTransparent(portionId, flags, transparent) {
|
|
@@ -81175,15 +81144,10 @@ const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
|
|
|
81175
81144
|
*/
|
|
81176
81145
|
const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
|
|
81177
81146
|
|
|
81178
|
-
math.vec4([0, 0, 0, 1]);
|
|
81179
|
-
math.vec4([0, 0, 0, 1]);
|
|
81180
|
-
math.vec4([0, 0, 0, 1]);
|
|
81181
81147
|
const tempMat4a = new Float32Array(16);
|
|
81182
81148
|
const tempUint8Array4 = new Uint8Array(4);
|
|
81183
81149
|
const tempFloat32Array3 = new Float32Array(3);
|
|
81184
81150
|
|
|
81185
|
-
math.AABB3();
|
|
81186
|
-
|
|
81187
81151
|
let numLayers = 0;
|
|
81188
81152
|
|
|
81189
81153
|
const DEFAULT_MATRIX$1 = math.identityMat4();
|
|
@@ -81355,16 +81319,6 @@ class TrianglesDataTextureLayer {
|
|
|
81355
81319
|
//math.expandAABB3(portionAABB, subPortionAABB);
|
|
81356
81320
|
subPortionIds.push(subPortionId);
|
|
81357
81321
|
});
|
|
81358
|
-
// const origin = this._state.origin;
|
|
81359
|
-
// if (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0) {
|
|
81360
|
-
// portionAABB[0] += origin[0];
|
|
81361
|
-
// portionAABB[1] += origin[1];
|
|
81362
|
-
// portionAABB[2] += origin[2];
|
|
81363
|
-
// portionAABB[3] += origin[0];
|
|
81364
|
-
// portionAABB[4] += origin[1];
|
|
81365
|
-
// portionAABB[5] += origin[2];
|
|
81366
|
-
// }
|
|
81367
|
-
// math.expandAABB3(this.aabb, portionAABB);
|
|
81368
81322
|
const portionId = this._portionToSubPortionsMap.length;
|
|
81369
81323
|
this._portionToSubPortionsMap.push(subPortionIds);
|
|
81370
81324
|
this.model.numPortions++;
|
|
@@ -81462,10 +81416,6 @@ class TrianglesDataTextureLayer {
|
|
|
81462
81416
|
|
|
81463
81417
|
dataTextureRamStats.numberOfGeometries++;
|
|
81464
81418
|
|
|
81465
|
-
// const aabb = math.collapseAABB3();
|
|
81466
|
-
// math.expandAABB3Points3(aabb, bucket.positionsCompressed);
|
|
81467
|
-
// geometryCompressionUtils.decompressAABB(aabb, portionCfg.positionsDecodeMatrix);
|
|
81468
|
-
|
|
81469
81419
|
const bucketGeometry = {
|
|
81470
81420
|
vertexBase,
|
|
81471
81421
|
numVertices,
|
|
@@ -81473,7 +81423,6 @@ class TrianglesDataTextureLayer {
|
|
|
81473
81423
|
numEdges,
|
|
81474
81424
|
indicesBase,
|
|
81475
81425
|
edgeIndicesBase,
|
|
81476
|
-
// aabb,
|
|
81477
81426
|
obb: null // Lazy-created in _createSubPortion if needed
|
|
81478
81427
|
};
|
|
81479
81428
|
|
|
@@ -81495,26 +81444,6 @@ class TrianglesDataTextureLayer {
|
|
|
81495
81444
|
buffer.perObjectPositionsDecodeMatrices.push(portionCfg.positionsDecodeMatrix);
|
|
81496
81445
|
buffer.perObjectInstancePositioningMatrices.push(meshMatrix || DEFAULT_MATRIX$1);
|
|
81497
81446
|
|
|
81498
|
-
// if (meshMatrix) { // NB: SceneModel world matrix is used in shaders and SceneModelMesh.aabb
|
|
81499
|
-
//
|
|
81500
|
-
// if (!bucketGeometry.obb) {
|
|
81501
|
-
// bucketGeometry.obb = math.AABB3ToOBB3(bucketGeometry.aabb);
|
|
81502
|
-
// }
|
|
81503
|
-
// const geometryOBB = bucketGeometry.obb;
|
|
81504
|
-
// for (let i = 0, len = geometryOBB.length; i < len; i += 4) {
|
|
81505
|
-
// tempVec4a[0] = geometryOBB[i + 0];
|
|
81506
|
-
// tempVec4a[1] = geometryOBB[i + 1];
|
|
81507
|
-
// tempVec4a[2] = geometryOBB[i + 2];
|
|
81508
|
-
// tempVec4a[3] = 1.0;
|
|
81509
|
-
// if (meshMatrix) {
|
|
81510
|
-
// math.transformPoint4(meshMatrix, tempVec4a, tempVec4b);
|
|
81511
|
-
// }
|
|
81512
|
-
// math.expandAABB3Point3(subPortionAABB, tempVec4b);
|
|
81513
|
-
// }
|
|
81514
|
-
// } else {
|
|
81515
|
-
// math.expandAABB3(subPortionAABB, bucketGeometry.aabb);
|
|
81516
|
-
// }
|
|
81517
|
-
|
|
81518
81447
|
buffer.perObjectSolid.push(!!portionCfg.solid);
|
|
81519
81448
|
|
|
81520
81449
|
if (colors) {
|
|
@@ -81643,13 +81572,6 @@ class TrianglesDataTextureLayer {
|
|
|
81643
81572
|
gl,
|
|
81644
81573
|
buffer.perObjectPositionsDecodeMatrices);
|
|
81645
81574
|
|
|
81646
|
-
// const positionsCompressed = new Uint16Array(buffer.lenPositionsCompressed);
|
|
81647
|
-
// for (let i = 0, j = 0, len = buffer.positionsCompressed.length; i < len; i++) {
|
|
81648
|
-
// const pc = buffer.positionsCompressed[i];
|
|
81649
|
-
// positionsCompressed.set(pc, j);
|
|
81650
|
-
// j += pc.length;
|
|
81651
|
-
// }
|
|
81652
|
-
|
|
81653
81575
|
textureState.texturePerVertexIdCoordinates = this._dataTextureGenerator.generateTextureForPositions(
|
|
81654
81576
|
gl,
|
|
81655
81577
|
buffer.positionsCompressed,
|
|
@@ -81898,7 +81820,6 @@ class TrianglesDataTextureLayer {
|
|
|
81898
81820
|
* flags/flags2 set since the previous invocation of `_beginDeferredFlags`.
|
|
81899
81821
|
*/
|
|
81900
81822
|
_uploadDeferredFlags() {
|
|
81901
|
-
console.info("_uploadDeferredFlags");
|
|
81902
81823
|
this._deferredSetFlagsActive = false;
|
|
81903
81824
|
if (!this._deferredSetFlagsDirty) {
|
|
81904
81825
|
return;
|
|
@@ -82092,7 +82013,7 @@ class TrianglesDataTextureLayer {
|
|
|
82092
82013
|
|
|
82093
82014
|
// Pick
|
|
82094
82015
|
|
|
82095
|
-
let f3 = (visible && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
82016
|
+
let f3 = (visible && (!culled) && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
82096
82017
|
const textureState = this._dataTextureState;
|
|
82097
82018
|
const gl = this.model.scene.canvas.gl;
|
|
82098
82019
|
tempUint8Array4 [0] = f0;
|
|
@@ -82908,7 +82829,6 @@ class SceneModelTransform {
|
|
|
82908
82829
|
}
|
|
82909
82830
|
|
|
82910
82831
|
const tempVec3a$8 = math.vec3();
|
|
82911
|
-
math.mat4();
|
|
82912
82832
|
|
|
82913
82833
|
const tempOBB3 = math.OBB3();
|
|
82914
82834
|
|