@babylonjs/core 9.8.0 → 9.9.0
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/Audio/audioSceneComponent.pure.js +17 -9
- package/Bones/bone.pure.js +39 -29
- package/Cameras/arcRotateCamera.pure.d.ts +0 -8
- package/Cameras/arcRotateCamera.pure.js +0 -12
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/inputMapper.d.ts +29 -8
- package/Cameras/inputMapper.js +63 -10
- package/Cameras/inputMapper.js.map +1 -1
- package/Cameras/targetCamera.pure.js +40 -27
- package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +17 -23
- package/Engines/abstractEngine.pure.js +4 -4
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.js +234 -280
- package/Materials/Background/backgroundMaterial.pure.js +5 -4
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.d.ts +5 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js +8 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +278 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +718 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/pure.d.ts +1 -0
- package/Materials/GaussianSplatting/pure.js +1 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +10 -14
- package/Materials/Node/Blocks/Dual/index.d.ts +0 -14
- package/Materials/Node/Blocks/Dual/index.js +0 -18
- package/Materials/Node/Blocks/Dual/index.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.pure.js +660 -662
- package/Materials/Node/Blocks/Fragment/index.d.ts +0 -10
- package/Materials/Node/Blocks/Fragment/index.js +0 -13
- package/Materials/Node/Blocks/Fragment/index.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/index.d.ts +12 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.js +14 -1
- package/Materials/Node/Blocks/GaussianSplatting/index.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/index.d.ts +0 -8
- package/Materials/Node/Blocks/Vertex/index.js +0 -10
- package/Materials/Node/Blocks/Vertex/index.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js +6 -5
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +6 -5
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/internalTexture.js +7 -0
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/texture.pure.js +157 -255
- package/Materials/index.d.ts +30 -0
- package/Materials/index.js +31 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.pure.js +128 -69
- package/Materials/pure.d.ts +1 -0
- package/Materials/pure.js +1 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.js +6 -5
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.color.pure.js +55 -47
- package/Maths/math.vector.pure.js +118 -242
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.d.ts +7 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.js +8 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.d.ts +147 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.js +257 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +11 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +31 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +1 -0
- package/Meshes/GaussianSplatting/pure.js +1 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineMesh.pure.js +9 -14
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +26 -27
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/meshSimplification.common.d.ts +53 -0
- package/Meshes/meshSimplification.common.js +34 -0
- package/Meshes/meshSimplification.common.js.map +1 -0
- package/Meshes/meshSimplification.d.ts +3 -53
- package/Meshes/meshSimplification.js +1 -33
- package/Meshes/meshSimplification.js.map +1 -1
- package/Meshes/meshSimplificationSceneComponent.pure.js.map +1 -1
- package/Meshes/meshSimplificationSceneComponent.types.d.ts +2 -1
- package/Meshes/meshSimplificationSceneComponent.types.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/transformNode.pure.js +82 -44
- package/Misc/tools.pure.js +124 -186
- package/Misc/tools.pure.js.map +1 -1
- package/Physics/v1/physicsImpostor.pure.js +43 -37
- package/Shaders/ShadersInclude/gaussianSplatting.js +33 -10
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +20 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +4 -1
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +33 -10
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +21 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Pure barrel — re-exports only side-effect-free modules */
|
|
2
2
|
export * from "./gaussianSplattingCompoundMesh.pure.js";
|
|
3
|
+
export * from "./gaussianSplattingDebugger.pure.js";
|
|
3
4
|
export * from "./gaussianSplattingMesh.pure.js";
|
|
4
5
|
export * from "./gaussianSplattingMeshBase.pure.js";
|
|
5
6
|
export * from "./gaussianSplattingPartProxyMesh.pure.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Pure barrel — re-exports only side-effect-free modules */
|
|
2
2
|
export * from "./gaussianSplattingCompoundMesh.pure.js";
|
|
3
|
+
export * from "./gaussianSplattingDebugger.pure.js";
|
|
3
4
|
export * from "./gaussianSplattingMesh.pure.js";
|
|
4
5
|
export * from "./gaussianSplattingMeshBase.pure.js";
|
|
5
6
|
export * from "./gaussianSplattingPartProxyMesh.pure.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/GaussianSplatting/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\nexport * from \"./gaussianSplattingCompoundMesh.pure\";\nexport * from \"./gaussianSplattingMesh.pure\";\nexport * from \"./gaussianSplattingMeshBase.pure\";\nexport * from \"./gaussianSplattingPartProxyMesh.pure\";\n"]}
|
|
1
|
+
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/GaussianSplatting/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\nexport * from \"./gaussianSplattingCompoundMesh.pure\";\nexport * from \"./gaussianSplattingDebugger.pure\";\nexport * from \"./gaussianSplattingMesh.pure\";\nexport * from \"./gaussianSplattingMeshBase.pure\";\nexport * from \"./gaussianSplattingPartProxyMesh.pure\";\n"]}
|
|
@@ -58,11 +58,7 @@ export class GreasedLineMesh extends GreasedLineBaseMesh {
|
|
|
58
58
|
this._options.points = points;
|
|
59
59
|
this._initGreasedLine();
|
|
60
60
|
let indiceOffset = 0;
|
|
61
|
-
let vertexPositionsLen = 0,
|
|
62
|
-
indicesLength = 0,
|
|
63
|
-
uvLength = 0,
|
|
64
|
-
previousAndSideLength = 0,
|
|
65
|
-
maxLineLength = 0;
|
|
61
|
+
let vertexPositionsLen = 0, indicesLength = 0, uvLength = 0, previousAndSideLength = 0, maxLineLength = 0;
|
|
66
62
|
for (const p of points) {
|
|
67
63
|
maxLineLength = Math.max(p.length, maxLineLength);
|
|
68
64
|
vertexPositionsLen += p.length * 2;
|
|
@@ -83,11 +79,7 @@ export class GreasedLineMesh extends GreasedLineBaseMesh {
|
|
|
83
79
|
byteOffset += previousAndSide.byteLength;
|
|
84
80
|
// it's the same length here
|
|
85
81
|
const nextAndCounters = new Float32Array(buffer, byteOffset, previousAndSideLength);
|
|
86
|
-
let vertexPositionsOffset = 0,
|
|
87
|
-
indicesOffset = 0,
|
|
88
|
-
uvOffset = 0,
|
|
89
|
-
previousAndSideOffset = 0,
|
|
90
|
-
nextAndCountersOffset = 0;
|
|
82
|
+
let vertexPositionsOffset = 0, indicesOffset = 0, uvOffset = 0, previousAndSideOffset = 0, nextAndCountersOffset = 0;
|
|
91
83
|
for (const p of points) {
|
|
92
84
|
const lengthArray = GreasedLineTools.GetLineLengthArray(p, tempBuffer);
|
|
93
85
|
const totalLength = lengthArray[lengthArray.length - 1];
|
|
@@ -123,7 +115,8 @@ export class GreasedLineMesh extends GreasedLineBaseMesh {
|
|
|
123
115
|
let v;
|
|
124
116
|
if (GreasedLineMesh._CompareV3(0, l - 1, positions)) {
|
|
125
117
|
v = positions.subarray((l - 2) * 6, (l - 1) * 6);
|
|
126
|
-
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
127
120
|
v = positions.subarray(0, 6);
|
|
128
121
|
}
|
|
129
122
|
previous.set(v);
|
|
@@ -131,7 +124,8 @@ export class GreasedLineMesh extends GreasedLineBaseMesh {
|
|
|
131
124
|
next.set(positions.subarray(6));
|
|
132
125
|
if (GreasedLineMesh._CompareV3(l - 1, 0, positions)) {
|
|
133
126
|
v = positions.subarray(6, 12);
|
|
134
|
-
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
135
129
|
v = positions.subarray((l - 1) * 6, l * 6);
|
|
136
130
|
}
|
|
137
131
|
next.set(v, next.length - 6);
|
|
@@ -152,7 +146,8 @@ export class GreasedLineMesh extends GreasedLineBaseMesh {
|
|
|
152
146
|
for (let i = 0; i < this._options.uvs.length; i++) {
|
|
153
147
|
uvArr[uvOffset++] = this._options.uvs[i];
|
|
154
148
|
}
|
|
155
|
-
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
156
151
|
for (let j = 0; j < l; j++) {
|
|
157
152
|
// uvs
|
|
158
153
|
const lengthRatio = lengthArray[j] / totalLength;
|
|
@@ -335,4 +330,4 @@ export function RegisterGreasedLineMesh() {
|
|
|
335
330
|
return GreasedLineMesh.Parse(parsedMesh, scene);
|
|
336
331
|
};
|
|
337
332
|
}
|
|
338
|
-
//# sourceMappingURL=greasedLineMesh.pure.js.map
|
|
333
|
+
//# sourceMappingURL=greasedLineMesh.pure.js.map
|
|
@@ -4,7 +4,7 @@ import { Mesh } from "../mesh.pure.js";
|
|
|
4
4
|
import { Buffer } from "../../Buffers/buffer.pure.js";
|
|
5
5
|
import { DeepCopier } from "../../Misc/deepCopier.js";
|
|
6
6
|
import { GreasedLineTools } from "../../Misc/greasedLineTools.js";
|
|
7
|
-
import { GreasedLineBaseMesh } from "./greasedLineBaseMesh.js";
|
|
7
|
+
import { GreasedLineBaseMesh, } from "./greasedLineBaseMesh.js";
|
|
8
8
|
/**
|
|
9
9
|
* GreasedLineRibbonMesh
|
|
10
10
|
* Use the GreasedLineBuilder.CreateGreasedLine function to create an instance of this class.
|
|
@@ -90,7 +90,8 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
90
90
|
this._colorPointers.push(colorPointer++);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
94
95
|
for (let j = 0; j < points.length; j += 3) {
|
|
95
96
|
for (let k = 0; k < pathCount; k++) {
|
|
96
97
|
this._colorPointers.push(colorPointer);
|
|
@@ -118,7 +119,8 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
118
119
|
c += pathCount;
|
|
119
120
|
if (pathOptions.ribbonOptions?.pointsMode === 1 /* GreasedLineRibbonPointsMode.POINTS_MODE_PATHS */) {
|
|
120
121
|
indiceOffset = this._preprocess(GreasedLineTools.ToVector3Array(subPoints), indiceOffset, pathOptions);
|
|
121
|
-
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
122
124
|
if (pathOptions.ribbonOptions?.directionsAutoMode === 99 /* GreasedLineRibbonAutoDirectionMode.AUTO_DIRECTIONS_NONE */) {
|
|
123
125
|
if (!pathOptions.ribbonOptions.directions) {
|
|
124
126
|
throw "In GreasedLineRibbonAutoDirectionMode.AUTO_DIRECTIONS_NONE 'GreasedLineMeshOptions.ribbonOptions.directions' must be defined.";
|
|
@@ -127,12 +129,7 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
127
129
|
}
|
|
128
130
|
for (let idx = 0; idx < subPoints.length; idx++) {
|
|
129
131
|
const p = subPoints[idx];
|
|
130
|
-
const pathArray = GreasedLineRibbonMesh._ConvertToRibbonPath(
|
|
131
|
-
p,
|
|
132
|
-
pathOptions.ribbonOptions,
|
|
133
|
-
this._scene.useRightHandedSystem,
|
|
134
|
-
directionPlanes ? directionPlanes[idx] : directionPlanes
|
|
135
|
-
);
|
|
132
|
+
const pathArray = GreasedLineRibbonMesh._ConvertToRibbonPath(p, pathOptions.ribbonOptions, this._scene.useRightHandedSystem, directionPlanes ? directionPlanes[idx] : directionPlanes);
|
|
136
133
|
indiceOffset = this._preprocess(pathArray, indiceOffset, pathOptions);
|
|
137
134
|
}
|
|
138
135
|
}
|
|
@@ -163,7 +160,7 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
163
160
|
}
|
|
164
161
|
}
|
|
165
162
|
const v = [1, 0, numOfPaths];
|
|
166
|
-
const doubleSided = options.ribbonOptions?.facesMode === 2
|
|
163
|
+
const doubleSided = options.ribbonOptions?.facesMode === 2 /* GreasedLineRibbonFacesMode.FACES_MODE_DOUBLE_SIDED */;
|
|
167
164
|
const closePath = options.ribbonOptions?.pointsMode === 1 /* GreasedLineRibbonPointsMode.POINTS_MODE_PATHS */ && options.ribbonOptions.closePath;
|
|
168
165
|
if (numOfPaths > 2) {
|
|
169
166
|
for (let i = 0; i < path.length - 1; i++) {
|
|
@@ -184,7 +181,8 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
184
181
|
}
|
|
185
182
|
}
|
|
186
183
|
}
|
|
187
|
-
}
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
188
186
|
for (let i = 0; i < positions.length / 3 - 3; i += 2) {
|
|
189
187
|
indices.push(i, i + 1, i + 2);
|
|
190
188
|
indices.push(i + 2, i + 1, i + 3);
|
|
@@ -258,10 +256,9 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
258
256
|
}
|
|
259
257
|
this._ribbonWidths.push(((this._widths[c++] ?? 1) - 1) * widthUpper);
|
|
260
258
|
}
|
|
261
|
-
const slopes =
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
: GreasedLineRibbonMesh._CalculateSlopes(pathArrayCopy);
|
|
259
|
+
const slopes = options.ribbonOptions?.pointsMode === 1 /* GreasedLineRibbonPointsMode.POINTS_MODE_PATHS */
|
|
260
|
+
? new Array(pathArrayCopy[0].length * pathArrayCopy.length * 6).fill(0)
|
|
261
|
+
: GreasedLineRibbonMesh._CalculateSlopes(pathArrayCopy);
|
|
265
262
|
for (const s of slopes) {
|
|
266
263
|
this._slopes.push(s);
|
|
267
264
|
}
|
|
@@ -297,21 +294,22 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
297
294
|
const p2 = pointVectors[i + 1];
|
|
298
295
|
if (directionPlane) {
|
|
299
296
|
direction = directionPlane;
|
|
300
|
-
}
|
|
297
|
+
}
|
|
298
|
+
else if (ribbonInfo.directionsAutoMode === 3 /* GreasedLineRibbonAutoDirectionMode.AUTO_DIRECTIONS_FACE_TO */) {
|
|
301
299
|
p2.subtractToRef(p1, TmpVectors.Vector3[0]);
|
|
302
300
|
direction = Vector3.CrossToRef(TmpVectors.Vector3[0], TmpVectors.Vector3[1], TmpVectors.Vector3[2]).normalize();
|
|
303
|
-
}
|
|
301
|
+
}
|
|
302
|
+
else if (ribbonInfo.directionsAutoMode === 1 /* GreasedLineRibbonAutoDirectionMode.AUTO_DIRECTIONS_FROM_ALL_SEGMENTS */) {
|
|
304
303
|
direction = GreasedLineRibbonMesh._GetDirectionFromPoints(p1, p2, direction);
|
|
305
|
-
}
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
306
|
// GreasedLineRibbonAutoDirectionMode.DIRECTION_ENHANCED
|
|
307
307
|
const directionTemp = p2.subtract(p1);
|
|
308
|
-
directionTemp.applyRotationQuaternionInPlace(
|
|
309
|
-
|
|
310
|
-
?
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
: GreasedLineRibbonMesh._LeftReadOnlyQuaternion
|
|
314
|
-
);
|
|
308
|
+
directionTemp.applyRotationQuaternionInPlace(directionTemp.x > directionTemp.y && directionTemp.x > directionTemp.z
|
|
309
|
+
? rightHandedSystem
|
|
310
|
+
? GreasedLineRibbonMesh._RightHandedForwardReadOnlyQuaternion
|
|
311
|
+
: GreasedLineRibbonMesh._LeftHandedForwardReadOnlyQuaternion
|
|
312
|
+
: GreasedLineRibbonMesh._LeftReadOnlyQuaternion);
|
|
315
313
|
direction = directionTemp.normalize();
|
|
316
314
|
}
|
|
317
315
|
fatDirection = direction.multiplyByFloats(width, width, width);
|
|
@@ -429,7 +427,8 @@ export class GreasedLineRibbonMesh extends GreasedLineBaseMesh {
|
|
|
429
427
|
points1[i].subtract(points2[i]).normalizeToRef(slope);
|
|
430
428
|
slopes.push(slope.x, slope.y, slope.z);
|
|
431
429
|
slopes.push(-slope.x, -slope.y, -slope.z);
|
|
432
|
-
}
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
433
432
|
slopes.push(0, 0, 0, 0, 0, 0);
|
|
434
433
|
}
|
|
435
434
|
}
|
|
@@ -484,4 +483,4 @@ export function RegisterGreasedLineRibbonMesh() {
|
|
|
484
483
|
return GreasedLineRibbonMesh.Parse(parsedMesh, scene);
|
|
485
484
|
};
|
|
486
485
|
}
|
|
487
|
-
//# sourceMappingURL=greasedLineRibbonMesh.pure.js.map
|
|
486
|
+
//# sourceMappingURL=greasedLineRibbonMesh.pure.js.map
|
package/Meshes/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./Node/index.js";
|
|
|
37
37
|
export * from "./GaussianSplatting/gaussianSplattingMeshBase.js";
|
|
38
38
|
export * from "./GaussianSplatting/gaussianSplattingMesh.js";
|
|
39
39
|
export * from "./GaussianSplatting/gaussianSplattingCompoundMesh.js";
|
|
40
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugger.js";
|
|
40
41
|
export * from "../Shaders/color.fragment.js";
|
|
41
42
|
export * from "../Shaders/color.vertex.js";
|
|
42
43
|
export * from "../ShadersWGSL/color.fragment.js";
|
package/Meshes/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./Node/index.js";
|
|
|
38
38
|
export * from "./GaussianSplatting/gaussianSplattingMeshBase.js";
|
|
39
39
|
export * from "./GaussianSplatting/gaussianSplattingMesh.js";
|
|
40
40
|
export * from "./GaussianSplatting/gaussianSplattingCompoundMesh.js";
|
|
41
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugger.js";
|
|
41
42
|
// LineMesh
|
|
42
43
|
export * from "../Shaders/color.fragment.js";
|
|
43
44
|
export * from "../Shaders/color.vertex.js";
|
package/Meshes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAE9D,WAAW;AACX,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,sBAAsB;AACtB,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,mDAAmD,CAAC;AAClE,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AAEnE,OAAO,yBAAyB,CAAC;AACjC,OAAO,oBAAoB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./abstractMesh\";\r\nexport * from \"./abstractMesh.hotSpot\";\r\nexport * from \"./Compression/index\";\r\nexport * from \"./csg\";\r\nexport * from \"./meshUVSpaceRenderer\";\r\nexport * from \"./geometry\";\r\nexport * from \"./groundMesh\";\r\nexport * from \"./goldbergMesh\";\r\nexport * from \"./trailMesh\";\r\nexport * from \"./instancedMesh\";\r\nexport * from \"./linesMesh\";\r\nexport * from \"./mesh\";\r\nexport * from \"./mesh.vertexData\";\r\nexport * from \"./meshBuilder\";\r\nexport * from \"./meshSimplification\";\r\nexport * from \"./meshSimplificationSceneComponent\";\r\nexport * from \"./meshUtils\";\r\nexport * from \"./polygonMesh\";\r\nexport * from \"./geodesicMesh\";\r\nexport * from \"./subMesh\";\r\nexport * from \"./subMesh.project\";\r\nexport * from \"./lattice\";\r\nexport * from \"./lattice.material\";\r\nexport * from \"./meshLODLevel\";\r\nexport * from \"./transformNode\";\r\nexport * from \"./Builders/index\";\r\nexport * from \"./WebGL/webGLDataBuffer\";\r\nexport * from \"./WebGPU/webgpuDataBuffer\";\r\nexport * from \"./GreasedLine/greasedLineMesh\";\r\nexport * from \"./GreasedLine/greasedLineRibbonMesh\";\r\nexport * from \"./GreasedLine/greasedLineBaseMesh\";\r\nexport * from \"./csg2\";\r\nexport * from \"./mesh.vertexData.functions\";\r\nexport * from \"./mesh.vertexData.subdivide\";\r\nexport * from \"./thinInstanceMesh\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMeshBase\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMesh\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingCompoundMesh\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingDebugger\";\r\n\r\n// LineMesh\r\nexport * from \"../Shaders/color.fragment\";\r\nexport * from \"../Shaders/color.vertex\";\r\nexport * from \"../ShadersWGSL/color.fragment\";\r\nexport * from \"../ShadersWGSL/color.vertex\";\r\n\r\n// MeshUVSPaceRenderer\r\nexport * from \"../Shaders/meshUVSpaceRenderer.vertex\";\r\nexport * from \"../Shaders/meshUVSpaceRenderer.fragment\";\r\nexport * from \"../Shaders/meshUVSpaceRendererMasker.vertex\";\r\nexport * from \"../Shaders/meshUVSpaceRendererMasker.fragment\";\r\nexport * from \"../Shaders/meshUVSpaceRendererFinaliser.fragment\";\r\nexport * from \"../Shaders/meshUVSpaceRendererFinaliser.vertex\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRenderer.vertex\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRenderer.fragment\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRendererMasker.vertex\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRendererMasker.fragment\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRendererFinaliser.fragment\";\r\nexport * from \"../ShadersWGSL/meshUVSpaceRendererFinaliser.vertex\";\r\n\r\nimport \"./abstractMesh.decalMap\";\r\nimport \"./thinInstanceMesh\";\r\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expected simplification settings.
|
|
3
|
+
* Quality should be between 0 and 1 (1 being 100%, 0 being 0%)
|
|
4
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
5
|
+
*/
|
|
6
|
+
export interface ISimplificationSettings {
|
|
7
|
+
/**
|
|
8
|
+
* Gets or sets the expected quality
|
|
9
|
+
*/
|
|
10
|
+
quality: number;
|
|
11
|
+
/**
|
|
12
|
+
* Gets or sets the distance when this optimized version should be used
|
|
13
|
+
*/
|
|
14
|
+
distance: number;
|
|
15
|
+
/**
|
|
16
|
+
* Gets an already optimized mesh
|
|
17
|
+
*/
|
|
18
|
+
optimizeMesh?: boolean | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Class used to specify simplification options
|
|
22
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
23
|
+
*/
|
|
24
|
+
export declare class SimplificationSettings implements ISimplificationSettings {
|
|
25
|
+
/** expected quality */
|
|
26
|
+
quality: number;
|
|
27
|
+
/** distance when this optimized version should be used */
|
|
28
|
+
distance: number;
|
|
29
|
+
/** already optimized mesh */
|
|
30
|
+
optimizeMesh?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a SimplificationSettings
|
|
33
|
+
* @param quality expected quality
|
|
34
|
+
* @param distance distance when this optimized version should be used
|
|
35
|
+
* @param optimizeMesh already optimized mesh
|
|
36
|
+
*/
|
|
37
|
+
constructor(
|
|
38
|
+
/** expected quality */
|
|
39
|
+
quality: number,
|
|
40
|
+
/** distance when this optimized version should be used */
|
|
41
|
+
distance: number,
|
|
42
|
+
/** already optimized mesh */
|
|
43
|
+
optimizeMesh?: boolean | undefined);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The implemented types of simplification
|
|
47
|
+
* At the moment only Quadratic Error Decimation is implemented
|
|
48
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
49
|
+
*/
|
|
50
|
+
export declare enum SimplificationType {
|
|
51
|
+
/** Quadratic error decimation */
|
|
52
|
+
QUADRATIC = 0
|
|
53
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class used to specify simplification options
|
|
3
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
4
|
+
*/
|
|
5
|
+
export class SimplificationSettings {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a SimplificationSettings
|
|
8
|
+
* @param quality expected quality
|
|
9
|
+
* @param distance distance when this optimized version should be used
|
|
10
|
+
* @param optimizeMesh already optimized mesh
|
|
11
|
+
*/
|
|
12
|
+
constructor(
|
|
13
|
+
/** expected quality */
|
|
14
|
+
quality,
|
|
15
|
+
/** distance when this optimized version should be used */
|
|
16
|
+
distance,
|
|
17
|
+
/** already optimized mesh */
|
|
18
|
+
optimizeMesh) {
|
|
19
|
+
this.quality = quality;
|
|
20
|
+
this.distance = distance;
|
|
21
|
+
this.optimizeMesh = optimizeMesh;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The implemented types of simplification
|
|
26
|
+
* At the moment only Quadratic Error Decimation is implemented
|
|
27
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
28
|
+
*/
|
|
29
|
+
export var SimplificationType;
|
|
30
|
+
(function (SimplificationType) {
|
|
31
|
+
/** Quadratic error decimation */
|
|
32
|
+
SimplificationType[SimplificationType["QUADRATIC"] = 0] = "QUADRATIC";
|
|
33
|
+
})(SimplificationType || (SimplificationType = {}));
|
|
34
|
+
//# sourceMappingURL=meshSimplification.common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meshSimplification.common.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/meshSimplification.common.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAC/B;;;;;OAKG;IACH;IACI,uBAAuB;IAChB,OAAe;IACtB,0DAA0D;IACnD,QAAgB;IACvB,8BAA8B;IACvB,YAAsB;QAJtB,YAAO,GAAP,OAAO,CAAQ;QAEf,aAAQ,GAAR,QAAQ,CAAQ;QAEhB,iBAAY,GAAZ,YAAY,CAAU;IAC9B,CAAC;CACP;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAkB,kBAGjB;AAHD,WAAkB,kBAAkB;IAChC,iCAAiC;IACjC,qEAAS,CAAA;AACb,CAAC,EAHiB,kBAAkB,KAAlB,kBAAkB,QAGnC","sourcesContent":["/**\n * Expected simplification settings.\n * Quality should be between 0 and 1 (1 being 100%, 0 being 0%)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes\n */\nexport interface ISimplificationSettings {\n /**\n * Gets or sets the expected quality\n */\n quality: number;\n /**\n * Gets or sets the distance when this optimized version should be used\n */\n distance: number;\n /**\n * Gets an already optimized mesh\n */\n optimizeMesh?: boolean | undefined;\n}\n\n/**\n * Class used to specify simplification options\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes\n */\nexport class SimplificationSettings implements ISimplificationSettings {\n /**\n * Creates a SimplificationSettings\n * @param quality expected quality\n * @param distance distance when this optimized version should be used\n * @param optimizeMesh already optimized mesh\n */\n constructor(\n /** expected quality */\n public quality: number,\n /** distance when this optimized version should be used */\n public distance: number,\n /** already optimized mesh */\n public optimizeMesh?: boolean\n ) {}\n}\n\n/**\n * The implemented types of simplification\n * At the moment only Quadratic Error Decimation is implemented\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes\n */\nexport const enum SimplificationType {\n /** Quadratic error decimation */\n QUADRATIC,\n}\n"]}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Mesh } from "../Meshes/mesh.js";
|
|
2
|
+
import { type ISimplificationSettings, SimplificationType } from "./meshSimplification.common.js";
|
|
3
|
+
export { SimplificationSettings, SimplificationType } from "./meshSimplification.common.js";
|
|
4
|
+
export { type ISimplificationSettings } from "./meshSimplification.common.js";
|
|
2
5
|
/**
|
|
3
6
|
* A simplifier interface for future simplification implementations
|
|
4
7
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
@@ -13,50 +16,6 @@ export interface ISimplifier {
|
|
|
13
16
|
*/
|
|
14
17
|
simplify(settings: ISimplificationSettings, successCallback: (simplifiedMeshes: Mesh) => void, errorCallback?: () => void): void;
|
|
15
18
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Expected simplification settings.
|
|
18
|
-
* Quality should be between 0 and 1 (1 being 100%, 0 being 0%)
|
|
19
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
20
|
-
*/
|
|
21
|
-
export interface ISimplificationSettings {
|
|
22
|
-
/**
|
|
23
|
-
* Gets or sets the expected quality
|
|
24
|
-
*/
|
|
25
|
-
quality: number;
|
|
26
|
-
/**
|
|
27
|
-
* Gets or sets the distance when this optimized version should be used
|
|
28
|
-
*/
|
|
29
|
-
distance: number;
|
|
30
|
-
/**
|
|
31
|
-
* Gets an already optimized mesh
|
|
32
|
-
*/
|
|
33
|
-
optimizeMesh?: boolean | undefined;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Class used to specify simplification options
|
|
37
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
38
|
-
*/
|
|
39
|
-
export declare class SimplificationSettings implements ISimplificationSettings {
|
|
40
|
-
/** expected quality */
|
|
41
|
-
quality: number;
|
|
42
|
-
/** distance when this optimized version should be used */
|
|
43
|
-
distance: number;
|
|
44
|
-
/** already optimized mesh */
|
|
45
|
-
optimizeMesh?: boolean | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Creates a SimplificationSettings
|
|
48
|
-
* @param quality expected quality
|
|
49
|
-
* @param distance distance when this optimized version should be used
|
|
50
|
-
* @param optimizeMesh already optimized mesh
|
|
51
|
-
*/
|
|
52
|
-
constructor(
|
|
53
|
-
/** expected quality */
|
|
54
|
-
quality: number,
|
|
55
|
-
/** distance when this optimized version should be used */
|
|
56
|
-
distance: number,
|
|
57
|
-
/** already optimized mesh */
|
|
58
|
-
optimizeMesh?: boolean | undefined);
|
|
59
|
-
}
|
|
60
19
|
/**
|
|
61
20
|
* Interface used to define a simplification task
|
|
62
21
|
*/
|
|
@@ -112,15 +71,6 @@ export declare class SimplificationQueue {
|
|
|
112
71
|
runSimplification(task: ISimplificationTask): void;
|
|
113
72
|
private _getSimplifier;
|
|
114
73
|
}
|
|
115
|
-
/**
|
|
116
|
-
* The implemented types of simplification
|
|
117
|
-
* At the moment only Quadratic Error Decimation is implemented
|
|
118
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
119
|
-
*/
|
|
120
|
-
export declare enum SimplificationType {
|
|
121
|
-
/** Quadratic error decimation */
|
|
122
|
-
QUADRATIC = 0
|
|
123
|
-
}
|
|
124
74
|
/**
|
|
125
75
|
* An implementation of the Quadratic Error simplification algorithm.
|
|
126
76
|
* Original paper : http://www1.cs.columbia.edu/~cs4162/html05s/garland97.pdf
|
|
@@ -5,29 +5,7 @@ import { Mesh } from "../Meshes/mesh.js";
|
|
|
5
5
|
import { AsyncLoop } from "../Misc/tools.js";
|
|
6
6
|
import { Epsilon } from "../Maths/math.constants.js";
|
|
7
7
|
import { RegisterMeshSimplificationSceneComponent } from "./meshSimplificationSceneComponent.pure.js";
|
|
8
|
-
|
|
9
|
-
* Class used to specify simplification options
|
|
10
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
11
|
-
*/
|
|
12
|
-
export class SimplificationSettings {
|
|
13
|
-
/**
|
|
14
|
-
* Creates a SimplificationSettings
|
|
15
|
-
* @param quality expected quality
|
|
16
|
-
* @param distance distance when this optimized version should be used
|
|
17
|
-
* @param optimizeMesh already optimized mesh
|
|
18
|
-
*/
|
|
19
|
-
constructor(
|
|
20
|
-
/** expected quality */
|
|
21
|
-
quality,
|
|
22
|
-
/** distance when this optimized version should be used */
|
|
23
|
-
distance,
|
|
24
|
-
/** already optimized mesh */
|
|
25
|
-
optimizeMesh) {
|
|
26
|
-
this.quality = quality;
|
|
27
|
-
this.distance = distance;
|
|
28
|
-
this.optimizeMesh = optimizeMesh;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
8
|
+
export { SimplificationSettings, SimplificationType } from "./meshSimplification.common.js";
|
|
31
9
|
/**
|
|
32
10
|
* Queue used to order the simplification tasks
|
|
33
11
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
@@ -118,16 +96,6 @@ export class SimplificationQueue {
|
|
|
118
96
|
}
|
|
119
97
|
}
|
|
120
98
|
}
|
|
121
|
-
/**
|
|
122
|
-
* The implemented types of simplification
|
|
123
|
-
* At the moment only Quadratic Error Decimation is implemented
|
|
124
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/simplifyingMeshes
|
|
125
|
-
*/
|
|
126
|
-
export var SimplificationType;
|
|
127
|
-
(function (SimplificationType) {
|
|
128
|
-
/** Quadratic error decimation */
|
|
129
|
-
SimplificationType[SimplificationType["QUADRATIC"] = 0] = "QUADRATIC";
|
|
130
|
-
})(SimplificationType || (SimplificationType = {}));
|
|
131
99
|
class DecimationTriangle {
|
|
132
100
|
constructor(_vertices) {
|
|
133
101
|
this._vertices = _vertices;
|