@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/package.json
CHANGED
|
@@ -35,15 +35,10 @@ const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
|
|
|
35
35
|
*/
|
|
36
36
|
const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
|
|
37
37
|
|
|
38
|
-
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
39
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
40
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
41
38
|
const tempMat4a = new Float32Array(16);
|
|
42
39
|
const tempUint8Array4 = new Uint8Array(4);
|
|
43
40
|
const tempFloat32Array3 = new Float32Array(3);
|
|
44
41
|
|
|
45
|
-
const tempAABB3b = math.AABB3();
|
|
46
|
-
|
|
47
42
|
let numLayers = 0;
|
|
48
43
|
|
|
49
44
|
const DEFAULT_MATRIX = math.identityMat4();
|
|
@@ -215,16 +210,6 @@ export class TrianglesDataTextureLayer {
|
|
|
215
210
|
//math.expandAABB3(portionAABB, subPortionAABB);
|
|
216
211
|
subPortionIds.push(subPortionId);
|
|
217
212
|
});
|
|
218
|
-
// const origin = this._state.origin;
|
|
219
|
-
// if (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0) {
|
|
220
|
-
// portionAABB[0] += origin[0];
|
|
221
|
-
// portionAABB[1] += origin[1];
|
|
222
|
-
// portionAABB[2] += origin[2];
|
|
223
|
-
// portionAABB[3] += origin[0];
|
|
224
|
-
// portionAABB[4] += origin[1];
|
|
225
|
-
// portionAABB[5] += origin[2];
|
|
226
|
-
// }
|
|
227
|
-
// math.expandAABB3(this.aabb, portionAABB);
|
|
228
213
|
const portionId = this._portionToSubPortionsMap.length;
|
|
229
214
|
this._portionToSubPortionsMap.push(subPortionIds);
|
|
230
215
|
this.model.numPortions++;
|
|
@@ -322,10 +307,6 @@ export class TrianglesDataTextureLayer {
|
|
|
322
307
|
|
|
323
308
|
dataTextureRamStats.numberOfGeometries++;
|
|
324
309
|
|
|
325
|
-
// const aabb = math.collapseAABB3();
|
|
326
|
-
// math.expandAABB3Points3(aabb, bucket.positionsCompressed);
|
|
327
|
-
// geometryCompressionUtils.decompressAABB(aabb, portionCfg.positionsDecodeMatrix);
|
|
328
|
-
|
|
329
310
|
const bucketGeometry = {
|
|
330
311
|
vertexBase,
|
|
331
312
|
numVertices,
|
|
@@ -333,7 +314,6 @@ export class TrianglesDataTextureLayer {
|
|
|
333
314
|
numEdges,
|
|
334
315
|
indicesBase,
|
|
335
316
|
edgeIndicesBase,
|
|
336
|
-
// aabb,
|
|
337
317
|
obb: null // Lazy-created in _createSubPortion if needed
|
|
338
318
|
};
|
|
339
319
|
|
|
@@ -355,26 +335,6 @@ export class TrianglesDataTextureLayer {
|
|
|
355
335
|
buffer.perObjectPositionsDecodeMatrices.push(portionCfg.positionsDecodeMatrix);
|
|
356
336
|
buffer.perObjectInstancePositioningMatrices.push(meshMatrix || DEFAULT_MATRIX);
|
|
357
337
|
|
|
358
|
-
// if (meshMatrix) { // NB: SceneModel world matrix is used in shaders and SceneModelMesh.aabb
|
|
359
|
-
//
|
|
360
|
-
// if (!bucketGeometry.obb) {
|
|
361
|
-
// bucketGeometry.obb = math.AABB3ToOBB3(bucketGeometry.aabb);
|
|
362
|
-
// }
|
|
363
|
-
// const geometryOBB = bucketGeometry.obb;
|
|
364
|
-
// for (let i = 0, len = geometryOBB.length; i < len; i += 4) {
|
|
365
|
-
// tempVec4a[0] = geometryOBB[i + 0];
|
|
366
|
-
// tempVec4a[1] = geometryOBB[i + 1];
|
|
367
|
-
// tempVec4a[2] = geometryOBB[i + 2];
|
|
368
|
-
// tempVec4a[3] = 1.0;
|
|
369
|
-
// if (meshMatrix) {
|
|
370
|
-
// math.transformPoint4(meshMatrix, tempVec4a, tempVec4b);
|
|
371
|
-
// }
|
|
372
|
-
// math.expandAABB3Point3(subPortionAABB, tempVec4b);
|
|
373
|
-
// }
|
|
374
|
-
// } else {
|
|
375
|
-
// math.expandAABB3(subPortionAABB, bucketGeometry.aabb);
|
|
376
|
-
// }
|
|
377
|
-
|
|
378
338
|
buffer.perObjectSolid.push(!!portionCfg.solid);
|
|
379
339
|
|
|
380
340
|
if (colors) {
|
|
@@ -503,13 +463,6 @@ export class TrianglesDataTextureLayer {
|
|
|
503
463
|
gl,
|
|
504
464
|
buffer.perObjectPositionsDecodeMatrices);
|
|
505
465
|
|
|
506
|
-
// const positionsCompressed = new Uint16Array(buffer.lenPositionsCompressed);
|
|
507
|
-
// for (let i = 0, j = 0, len = buffer.positionsCompressed.length; i < len; i++) {
|
|
508
|
-
// const pc = buffer.positionsCompressed[i];
|
|
509
|
-
// positionsCompressed.set(pc, j);
|
|
510
|
-
// j += pc.length;
|
|
511
|
-
// }
|
|
512
|
-
|
|
513
466
|
textureState.texturePerVertexIdCoordinates = this._dataTextureGenerator.generateTextureForPositions(
|
|
514
467
|
gl,
|
|
515
468
|
buffer.positionsCompressed,
|
|
@@ -758,7 +711,6 @@ export class TrianglesDataTextureLayer {
|
|
|
758
711
|
* flags/flags2 set since the previous invocation of `_beginDeferredFlags`.
|
|
759
712
|
*/
|
|
760
713
|
_uploadDeferredFlags() {
|
|
761
|
-
console.info("_uploadDeferredFlags")
|
|
762
714
|
this._deferredSetFlagsActive = false;
|
|
763
715
|
if (!this._deferredSetFlagsDirty) {
|
|
764
716
|
return;
|
|
@@ -952,7 +904,7 @@ export class TrianglesDataTextureLayer {
|
|
|
952
904
|
|
|
953
905
|
// Pick
|
|
954
906
|
|
|
955
|
-
let f3 = (visible && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
907
|
+
let f3 = (visible && (!culled) && pickable) ? RENDER_PASSES.PICK : RENDER_PASSES.NOT_RENDERED;
|
|
956
908
|
const textureState = this._dataTextureState;
|
|
957
909
|
const gl = this.model.scene.canvas.gl;
|
|
958
910
|
tempUint8Array4 [0] = f0;
|
|
@@ -8,11 +8,6 @@ import {getBatchingRenderers} from "./LinesBatchingRenderers.js";
|
|
|
8
8
|
import {LinesBatchingBuffer} from "./LinesBatchingBuffer.js";
|
|
9
9
|
import {quantizePositions} from "../../compression.js";
|
|
10
10
|
|
|
11
|
-
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
12
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
13
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
14
|
-
const tempOBB3 = math.OBB3();
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* @private
|
|
18
13
|
*/
|
|
@@ -9,10 +9,6 @@ import {getInstancingRenderers} from "./LinesInstancingRenderers.js";
|
|
|
9
9
|
const tempUint8Vec4 = new Uint8Array(4);
|
|
10
10
|
const tempFloat32 = new Float32Array(1);
|
|
11
11
|
|
|
12
|
-
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
13
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
14
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
15
|
-
|
|
16
12
|
const tempVec3fa = new Float32Array(3);
|
|
17
13
|
|
|
18
14
|
const tempFloat32Vec4 = new Float32Array(4);
|
|
@@ -8,13 +8,6 @@ import {getPointsBatchingRenderers} from "./PointsBatchingRenderers.js";
|
|
|
8
8
|
import {PointsBatchingBuffer} from "./PointsBatchingBuffer.js";
|
|
9
9
|
import {quantizePositions} from "../../compression.js";
|
|
10
10
|
|
|
11
|
-
const tempVec3a = math.vec4();
|
|
12
|
-
const tempVec3b = math.vec4();
|
|
13
|
-
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
14
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
15
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
16
|
-
const tempOBB3 = math.OBB3();
|
|
17
|
-
|
|
18
11
|
/**
|
|
19
12
|
* @private
|
|
20
13
|
*/
|
|
@@ -8,9 +8,6 @@ import {getPointsInstancingRenderers} from "./PointsInstancingRenderers.js";
|
|
|
8
8
|
|
|
9
9
|
const tempUint8Vec4 = new Uint8Array(4);
|
|
10
10
|
const tempFloat32 = new Float32Array(1);
|
|
11
|
-
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
12
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
13
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
14
11
|
const tempVec3fa = new Float32Array(3);
|
|
15
12
|
|
|
16
13
|
const tempFloat32Vec4 = new Float32Array(4);
|
|
@@ -13,9 +13,6 @@ import {getSnapBatchingRenderers} from "../snapBatching/SnapBatchingRenderers.js
|
|
|
13
13
|
const tempMat4 = math.mat4();
|
|
14
14
|
const tempMat4b = math.mat4();
|
|
15
15
|
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
16
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
17
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
18
|
-
const tempOBB3 = math.OBB3();
|
|
19
16
|
|
|
20
17
|
const tempVec3a = math.vec3();
|
|
21
18
|
const tempVec3b = math.vec3();
|
|
@@ -129,12 +126,6 @@ class TrianglesBatchingLayer {
|
|
|
129
126
|
this._state.origin.set(cfg.origin);
|
|
130
127
|
}
|
|
131
128
|
|
|
132
|
-
/**
|
|
133
|
-
* The axis-aligned World-space boundary of this TrianglesBatchingLayer's positions.
|
|
134
|
-
* @type {*|Float64Array}
|
|
135
|
-
*/
|
|
136
|
-
this.aabb = math.collapseAABB3();
|
|
137
|
-
|
|
138
129
|
/**
|
|
139
130
|
* When true, this layer contains solid triangle meshes, otherwise this layer contains surface triangle meshes
|
|
140
131
|
* @type {boolean}
|
|
@@ -7,11 +7,8 @@ import {ArrayBuf} from "../../../webgl/ArrayBuf.js";
|
|
|
7
7
|
import {getInstancingRenderers} from "./TrianglesInstancingRenderers.js";
|
|
8
8
|
import {getSnapInstancingRenderers} from "../snapInstancing/SnapInstancingRenderers.js";
|
|
9
9
|
|
|
10
|
-
const tempUint8Vec4 = new Uint8Array(4);
|
|
11
10
|
const tempFloat32 = new Float32Array(1);
|
|
12
11
|
const tempVec4a = math.vec4([0, 0, 0, 1]);
|
|
13
|
-
const tempVec4b = math.vec4([0, 0, 0, 1]);
|
|
14
|
-
const tempVec4c = math.vec4([0, 0, 0, 1]);
|
|
15
12
|
const tempVec3fa = new Float32Array(3);
|
|
16
13
|
|
|
17
14
|
const tempVec3a = math.vec3();
|