@xeokit/xeokit-sdk 2.6.105 → 2.6.106
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/README.md +0 -1
- package/dist/xeokit-sdk.cjs.js +29 -40
- package/dist/xeokit-sdk.es.js +29 -40
- package/dist/xeokit-sdk.es5.js +11 -11
- 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 +5 -5
- package/package.json +1 -1
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +1 -1
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +2 -2
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV11.js +2 -2
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +3 -3
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +2 -2
- package/src/viewer/scene/mesh/Mesh.js +15 -23
- package/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +0 -1
- package/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +0 -1
- package/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xeokit/xeokit-sdk",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.106",
|
|
4
4
|
"description": "3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision",
|
|
5
5
|
"module": "./dist/xeokit-sdk.es.js",
|
|
6
6
|
"main": "./dist/xeokit-sdk.cjs.js",
|
|
@@ -59,7 +59,7 @@ parsers[ParserV12.version] = ParserV12;
|
|
|
59
59
|
* We have several ways to convert your files into XKT. See these tutorials for more info:
|
|
60
60
|
*
|
|
61
61
|
* * [Converting Models to XKT with convert2xkt](https://xeokit.io/blog/converting-models-to-xkt-with-convert2xkt) - how to convert various file formats (glTF, IFC, CityJSON, LAS/LAZ...) to XKT using our nodejs-based converter.
|
|
62
|
-
* * [Converting IFC Models to XKT using 3rd-Party Open Source Tools](https://
|
|
62
|
+
* * [Converting IFC Models to XKT using various different methods, including 3rd-Party Open Source Tools](https://xeokit.io/blog/xeokit-loaders-&-converters) - how to convert IFC files to XKT using various different methods, including 3rd-party open source CLI tools.
|
|
63
63
|
*
|
|
64
64
|
* # Scene representation
|
|
65
65
|
*
|
|
@@ -454,7 +454,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
454
454
|
}
|
|
455
455
|
if (geometryArrays.batchThisMesh) {
|
|
456
456
|
geometryArrays.decompressedPositions = new Float32Array(geometryArrays.geometryPositions.length);
|
|
457
|
-
geometryArrays.
|
|
457
|
+
geometryArrays.transformedAndRecompressedPositionsLength = geometryArrays.geometryPositions.length;
|
|
458
458
|
const geometryPositions = geometryArrays.geometryPositions;
|
|
459
459
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
460
460
|
for (let i = 0, len = geometryPositions.length; i < len; i += 3) {
|
|
@@ -473,7 +473,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
473
473
|
if (geometryArrays.batchThisMesh) {
|
|
474
474
|
|
|
475
475
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
476
|
-
const transformedAndRecompressedPositions = geometryArrays.
|
|
476
|
+
const transformedAndRecompressedPositions = new Uint16Array(geometryArrays.transformedAndRecompressedPositionsLength);
|
|
477
477
|
|
|
478
478
|
for (let i = 0, len = decompressedPositions.length; i < len; i += 3) {
|
|
479
479
|
tempVec4a[0] = decompressedPositions[i + 0];
|
|
@@ -447,7 +447,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
447
447
|
}
|
|
448
448
|
if (geometryArrays.batchThisMesh) {
|
|
449
449
|
geometryArrays.decompressedPositions = new Float32Array(geometryArrays.geometryPositions.length);
|
|
450
|
-
geometryArrays.
|
|
450
|
+
geometryArrays.transformedAndRecompressedPositionsLength = geometryArrays.geometryPositions.length;
|
|
451
451
|
const geometryPositions = geometryArrays.geometryPositions;
|
|
452
452
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
453
453
|
for (let i = 0, len = geometryPositions.length; i < len; i += 3) {
|
|
@@ -466,7 +466,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
466
466
|
if (geometryArrays.batchThisMesh) {
|
|
467
467
|
|
|
468
468
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
469
|
-
const transformedAndRecompressedPositions = geometryArrays.
|
|
469
|
+
const transformedAndRecompressedPositions = new Uint16Array(geometryArrays.transformedAndRecompressedPositionsLength);
|
|
470
470
|
|
|
471
471
|
for (let i = 0, len = decompressedPositions.length; i < len; i += 3) {
|
|
472
472
|
tempVec4a[0] = decompressedPositions[i + 0];
|
|
@@ -550,11 +550,11 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
550
550
|
}
|
|
551
551
|
if (geometryArrays.batchThisMesh) {
|
|
552
552
|
if(primitiveType === 7) {
|
|
553
|
-
geometryArrays.
|
|
553
|
+
geometryArrays.transformedAndRecompressedPositionsLength = geometryArrays.decompressedPositions.length;
|
|
554
554
|
}
|
|
555
555
|
else {
|
|
556
556
|
geometryArrays.decompressedPositions = new Float32Array(geometryArrays.geometryPositions.length);
|
|
557
|
-
geometryArrays.
|
|
557
|
+
geometryArrays.transformedAndRecompressedPositionsLength = geometryArrays.geometryPositions.length;
|
|
558
558
|
const geometryPositions = geometryArrays.geometryPositions;
|
|
559
559
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
560
560
|
for (let i = 0, len = geometryPositions.length; i < len; i += 3) {
|
|
@@ -575,7 +575,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
575
575
|
if (geometryArrays.batchThisMesh) {
|
|
576
576
|
|
|
577
577
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
578
|
-
const transformedAndRecompressedPositions = geometryArrays.
|
|
578
|
+
const transformedAndRecompressedPositions = new Uint16Array(geometryArrays.transformedAndRecompressedPositionsLength);
|
|
579
579
|
|
|
580
580
|
for (let i = 0, len = decompressedPositions.length; i < len; i += 3) {
|
|
581
581
|
tempVec4a[0] = decompressedPositions[i + 0];
|
|
@@ -347,7 +347,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
347
347
|
}
|
|
348
348
|
if (geometryArrays.batchThisMesh) {
|
|
349
349
|
geometryArrays.decompressedPositions = new Float32Array(geometryArrays.geometryPositions.length);
|
|
350
|
-
geometryArrays.
|
|
350
|
+
geometryArrays.transformedAndRecompressedPositionsLength = geometryArrays.geometryPositions.length;
|
|
351
351
|
const geometryPositions = geometryArrays.geometryPositions;
|
|
352
352
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
353
353
|
for (let i = 0, len = geometryPositions.length; i < len; i += 3) {
|
|
@@ -366,7 +366,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
|
|
|
366
366
|
if (geometryArrays.batchThisMesh) {
|
|
367
367
|
|
|
368
368
|
const decompressedPositions = geometryArrays.decompressedPositions;
|
|
369
|
-
const transformedAndRecompressedPositions = geometryArrays.
|
|
369
|
+
const transformedAndRecompressedPositions = new Uint16Array(geometryArrays.transformedAndRecompressedPositionsLength);
|
|
370
370
|
|
|
371
371
|
for (let i = 0, len = decompressedPositions.length; i < len; i += 3) {
|
|
372
372
|
tempVec4a[0] = decompressedPositions[i + 0];
|
|
@@ -2205,7 +2205,7 @@ const instantiateMeshRenderer = (mesh, attributes, auxVariables, programSetup, p
|
|
|
2205
2205
|
const projMatrix = programVariables.createUniform("mat4", "projMatrix");
|
|
2206
2206
|
|
|
2207
2207
|
const billboard = mesh.billboard;
|
|
2208
|
-
const isBillboard = (
|
|
2208
|
+
const isBillboard = (billboard === "spherical") || (billboard === "cylindrical");
|
|
2209
2209
|
const stationary = mesh.stationary;
|
|
2210
2210
|
const defineBillboard = isBillboard && ((name, src) => [
|
|
2211
2211
|
`mat4 ${name}(in mat4 matIn) {`,
|
|
@@ -2228,17 +2228,13 @@ const instantiateMeshRenderer = (mesh, attributes, auxVariables, programSetup, p
|
|
|
2228
2228
|
})();
|
|
2229
2229
|
|
|
2230
2230
|
const fragmentOutputsSetup = [ ];
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
fragmentOutputsSetup.push("viewMatrix1[3].xyz = vec3(0.0, 0.0, 0.0);");
|
|
2237
|
-
} else if (meshStateBackground) {
|
|
2238
|
-
fragmentOutputsSetup.push("viewMatrix1[3] = vec4(0.0, 0.0, 0.0, 1.0);");
|
|
2239
|
-
}
|
|
2240
|
-
fragmentOutputsSetup.push(`mat4 viewMatrix2 = ${billboardIfApplicableFrag("viewMatrix1")};`);
|
|
2231
|
+
fragmentOutputsSetup.push(`mat4 viewMatrix1 = ${viewMatrix};`);
|
|
2232
|
+
if (stationary) {
|
|
2233
|
+
fragmentOutputsSetup.push("viewMatrix1[3].xyz = vec3(0.0, 0.0, 0.0);");
|
|
2234
|
+
} else if (meshStateBackground) {
|
|
2235
|
+
fragmentOutputsSetup.push("viewMatrix1[3] = vec4(0.0, 0.0, 0.0, 1.0);");
|
|
2241
2236
|
}
|
|
2237
|
+
fragmentOutputsSetup.push(`mat4 viewMatrix2 = ${billboardIfApplicableFrag("viewMatrix1")};`);
|
|
2242
2238
|
|
|
2243
2239
|
const clipPos = "clipPos";
|
|
2244
2240
|
const getVertexData = function() {
|
|
@@ -2250,20 +2246,16 @@ const instantiateMeshRenderer = (mesh, attributes, auxVariables, programSetup, p
|
|
|
2250
2246
|
}
|
|
2251
2247
|
src.push(`vec4 worldPosition = ${billboardIfApplicable(modelMatrix)} * localPosition;`);
|
|
2252
2248
|
src.push(`worldPosition.xyz = worldPosition.xyz + ${offset};`);
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
}
|
|
2262
|
-
src.push(`mat4 viewMatrix2 = ${billboardIfApplicable("viewMatrix1")};`);
|
|
2263
|
-
src.push(`vec4 viewPosition = ${(isBillboard
|
|
2249
|
+
src.push(`mat4 viewMatrix1 = ${viewMatrix};`);
|
|
2250
|
+
if (stationary) {
|
|
2251
|
+
src.push("viewMatrix1[3].xyz = vec3(0.0, 0.0, 0.0);");
|
|
2252
|
+
} else if (meshStateBackground) {
|
|
2253
|
+
src.push("viewMatrix1[3] = vec4(0.0, 0.0, 0.0, 1.0);");
|
|
2254
|
+
}
|
|
2255
|
+
src.push(`mat4 viewMatrix2 = ${billboardIfApplicable("viewMatrix1")};`);
|
|
2256
|
+
src.push(`vec4 viewPosition = ${(isBillboard
|
|
2264
2257
|
? `${billboardIfApplicable(`viewMatrix1 * ${modelMatrix}`)} * localPosition`
|
|
2265
2258
|
: "viewMatrix2 * worldPosition")};`);
|
|
2266
|
-
}
|
|
2267
2259
|
decodedUv && decodedUv.needed && src.push(`vec2 ${decodedUv} = ${quantizedGeometry ? `(${uvDecodeMatrix} * vec3(${attributes.uv}, 1.0)).xy` : attributes.uv};`);
|
|
2268
2260
|
if (worldNormal && worldNormal.needed) {
|
|
2269
2261
|
const localNormal = quantizedGeometry ? `${programVariables.commonLibrary.octDecode}(${attributes.normal}.xy)` : attributes.normal;
|
|
@@ -16,7 +16,6 @@ export const PickMeshShaderSource = function(meshHash, programVariables) {
|
|
|
16
16
|
getHash: () => [ meshHash ],
|
|
17
17
|
programName: "PickMesh",
|
|
18
18
|
isPick: true,
|
|
19
|
-
dontBillboardAnything: true,
|
|
20
19
|
appendFragmentOutputs: (src) => src.push(`${outColor} = ${pickColor};`)
|
|
21
20
|
};
|
|
22
21
|
};
|
|
@@ -16,7 +16,6 @@ export const ShadowShaderSource = function(meshHash, programVariables) {
|
|
|
16
16
|
programName: "Shadow",
|
|
17
17
|
setsLineWidth: true,
|
|
18
18
|
useShadowView: true,
|
|
19
|
-
dontBillboardAnything: true,
|
|
20
19
|
dontGetLogDepth: true,
|
|
21
20
|
appendFragmentOutputs: (src, getGammaOutputExpression, gl_FragCoord) => src.push(`${outColor} = ${encodeFloat}(${gl_FragCoord}.z);`)
|
|
22
21
|
};
|