@babylonjs/core 7.31.1 → 7.32.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/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Materials/standardMaterial.js +1 -3
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.functions.d.ts +6 -0
- package/Maths/math.functions.js +42 -0
- package/Maths/math.functions.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +144 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +574 -309
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.d.ts +39 -0
- package/Meshes/Node/Blocks/cleanGeometryBlock.js +87 -0
- package/Meshes/Node/Blocks/cleanGeometryBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryTransformBlock.js +4 -4
- package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +7 -3
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +0 -9
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Shaders/ShadersInclude/defaultFragmentDeclaration.js +1 -5
- package/Shaders/ShadersInclude/defaultFragmentDeclaration.js.map +1 -1
- package/Shaders/default.fragment.js +1 -7
- package/Shaders/default.fragment.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +1 -8
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/package.json +1 -1
|
@@ -27,3 +27,9 @@ export declare function extractMinAndMax(positions: FloatArray, start: number, c
|
|
|
27
27
|
minimum: Vector3;
|
|
28
28
|
maximum: Vector3;
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Flip flipped faces
|
|
32
|
+
* @param positions defines the positions to use
|
|
33
|
+
* @param indices defines the indices to use and update
|
|
34
|
+
*/
|
|
35
|
+
export declare function FixFlippedFaces(positions: FloatArray, indices: IndicesArray): void;
|
package/Maths/math.functions.js
CHANGED
|
@@ -86,4 +86,46 @@ export function extractMinAndMax(positions, start, count, bias = null, stride) {
|
|
|
86
86
|
maximum: maximum,
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Flip flipped faces
|
|
91
|
+
* @param positions defines the positions to use
|
|
92
|
+
* @param indices defines the indices to use and update
|
|
93
|
+
*/
|
|
94
|
+
export function FixFlippedFaces(positions, indices) {
|
|
95
|
+
const boundingInfo = extractMinAndMax(positions, 0, positions.length / 3);
|
|
96
|
+
const inside = boundingInfo.maximum.subtract(boundingInfo.minimum).scale(0.5).add(boundingInfo.minimum);
|
|
97
|
+
const tmpVectorA = new Vector3();
|
|
98
|
+
const tmpVectorB = new Vector3();
|
|
99
|
+
const tmpVectorC = new Vector3();
|
|
100
|
+
const tmpVectorAB = new Vector3();
|
|
101
|
+
const tmpVectorAC = new Vector3();
|
|
102
|
+
const tmpVectorNormal = new Vector3();
|
|
103
|
+
const tmpVectorAvgNormal = new Vector3();
|
|
104
|
+
// Clean indices
|
|
105
|
+
for (let index = 0; index < indices.length; index += 3) {
|
|
106
|
+
const a = indices[index];
|
|
107
|
+
const b = indices[index + 1];
|
|
108
|
+
const c = indices[index + 2];
|
|
109
|
+
// Evaluate face normal
|
|
110
|
+
tmpVectorA.fromArray(positions, a * 3);
|
|
111
|
+
tmpVectorB.fromArray(positions, b * 3);
|
|
112
|
+
tmpVectorC.fromArray(positions, c * 3);
|
|
113
|
+
tmpVectorB.subtractToRef(tmpVectorA, tmpVectorAB);
|
|
114
|
+
tmpVectorC.subtractToRef(tmpVectorA, tmpVectorAC);
|
|
115
|
+
Vector3.CrossToRef(tmpVectorAB, tmpVectorAC, tmpVectorNormal);
|
|
116
|
+
tmpVectorNormal.normalize();
|
|
117
|
+
// Calculate normal from face center to the inside of the geometry
|
|
118
|
+
const avgX = tmpVectorA.x + tmpVectorB.x + tmpVectorC.x;
|
|
119
|
+
const avgY = tmpVectorA.y + tmpVectorB.y + tmpVectorC.y;
|
|
120
|
+
const avgZ = tmpVectorA.z + tmpVectorB.z + tmpVectorC.z;
|
|
121
|
+
tmpVectorAvgNormal.set(avgX / 3, avgY / 3, avgZ / 3);
|
|
122
|
+
tmpVectorAvgNormal.subtractInPlace(inside);
|
|
123
|
+
tmpVectorAvgNormal.normalize();
|
|
124
|
+
if (Vector3.Dot(tmpVectorNormal, tmpVectorAvgNormal) >= 0) {
|
|
125
|
+
// Flip!
|
|
126
|
+
indices[index] = c;
|
|
127
|
+
indices[index + 2] = a;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
89
131
|
//# sourceMappingURL=math.functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.functions.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,4FAA4F;AAC5F,MAAM,WAAW;IAGC,AAAP,MAAM,CAAC,uBAAuB,CAAC,SAAqB,EAAE,OAAqB,EAAE,UAAkB,EAAE,UAAkB,EAAE,OAAgB,EAAE,OAAgB;QAC1J,KAAK,IAAI,KAAK,GAAG,UAAU,EAAE,KAAK,GAAG,UAAU,GAAG,UAAU,EAAE,KAAK,EAAE,EAAE;YACnE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5B,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,GAAG,SAAS,CAAC,MAA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loatArray, Nullable, IndicesArray } from \"../types\";\r\nimport type { Vector2 } from \"./math.vector\";\r\nimport { Vector3 } from \"./math.vector\";\r\nimport { nativeOverride } from \"../Misc/decorators\";\r\n\r\n// This helper class is only here so we can apply the nativeOverride decorator to functions.\r\nclass MathHelpers {\r\n @nativeOverride.filter((...[positions, indices]: Parameters<typeof MathHelpers.extractMinAndMaxIndexed>) => !Array.isArray(positions) && !Array.isArray(indices))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMaxIndexed(positions: FloatArray, indices: IndicesArray, indexStart: number, indexCount: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = indexStart; index < indexStart + indexCount; index++) {\r\n const offset = indices[index] * 3;\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[positions]: Parameters<typeof MathHelpers.extractMinAndMax>) => !Array.isArray(positions))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMax(positions: FloatArray, start: number, count: number, stride: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = start, offset = start * stride; index < start + count; index++, offset += stride) {\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of indexed positions\r\n * @param positions defines the positions to use\r\n * @param indices defines the indices to the positions\r\n * @param indexStart defines the start index\r\n * @param indexCount defines the end index\r\n * @param bias defines bias value to add to the result\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMaxIndexed(\r\n positions: FloatArray,\r\n indices: IndicesArray,\r\n indexStart: number,\r\n indexCount: number,\r\n bias: Nullable<Vector2> = null\r\n): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n MathHelpers.extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n };\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of positions\r\n * @param positions defines the positions to use\r\n * @param start defines the start index in the positions array\r\n * @param count defines the number of positions to handle\r\n * @param bias defines bias value to add to the result\r\n * @param stride defines the stride size to use (distance between two positions in the positions array)\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMax(positions: FloatArray, start: number, count: number, bias: Nullable<Vector2> = null, stride?: number): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n if (!stride) {\r\n stride = 3;\r\n }\r\n\r\n MathHelpers.extractMinAndMax(positions, start, count, stride, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n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,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;QACrD,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC3C,kBAAkB,CAAC,SAAS,EAAE,CAAC;QAE/B,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE;YACvD,QAAQ;YACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;SAC1B;KACJ;AACL,CAAC","sourcesContent":["import type { FloatArray, Nullable, IndicesArray } from \"../types\";\r\nimport type { Vector2 } from \"./math.vector\";\r\nimport { Vector3 } from \"./math.vector\";\r\nimport { nativeOverride } from \"../Misc/decorators\";\r\n\r\n// This helper class is only here so we can apply the nativeOverride decorator to functions.\r\nclass MathHelpers {\r\n @nativeOverride.filter((...[positions, indices]: Parameters<typeof MathHelpers.extractMinAndMaxIndexed>) => !Array.isArray(positions) && !Array.isArray(indices))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMaxIndexed(positions: FloatArray, indices: IndicesArray, indexStart: number, indexCount: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = indexStart; index < indexStart + indexCount; index++) {\r\n const offset = indices[index] * 3;\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[positions]: Parameters<typeof MathHelpers.extractMinAndMax>) => !Array.isArray(positions))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMax(positions: FloatArray, start: number, count: number, stride: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = start, offset = start * stride; index < start + count; index++, offset += stride) {\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of indexed positions\r\n * @param positions defines the positions to use\r\n * @param indices defines the indices to the positions\r\n * @param indexStart defines the start index\r\n * @param indexCount defines the end index\r\n * @param bias defines bias value to add to the result\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMaxIndexed(\r\n positions: FloatArray,\r\n indices: IndicesArray,\r\n indexStart: number,\r\n indexCount: number,\r\n bias: Nullable<Vector2> = null\r\n): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n MathHelpers.extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n };\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of positions\r\n * @param positions defines the positions to use\r\n * @param start defines the start index in the positions array\r\n * @param count defines the number of positions to handle\r\n * @param bias defines bias value to add to the result\r\n * @param stride defines the stride size to use (distance between two positions in the positions array)\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMax(positions: FloatArray, start: number, count: number, bias: Nullable<Vector2> = null, stride?: number): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n if (!stride) {\r\n stride = 3;\r\n }\r\n\r\n MathHelpers.extractMinAndMax(positions, start, count, stride, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n };\r\n}\r\n\r\n/**\r\n * Flip flipped faces\r\n * @param positions defines the positions to use\r\n * @param indices defines the indices to use and update\r\n */\r\nexport function FixFlippedFaces(positions: FloatArray, indices: IndicesArray): void {\r\n const boundingInfo = extractMinAndMax(positions!, 0, positions!.length / 3);\r\n\r\n const inside = boundingInfo.maximum.subtract(boundingInfo.minimum).scale(0.5).add(boundingInfo.minimum);\r\n const tmpVectorA = new Vector3();\r\n const tmpVectorB = new Vector3();\r\n const tmpVectorC = new Vector3();\r\n const tmpVectorAB = new Vector3();\r\n const tmpVectorAC = new Vector3();\r\n const tmpVectorNormal = new Vector3();\r\n const tmpVectorAvgNormal = new Vector3();\r\n\r\n // Clean indices\r\n for (let index = 0; index < indices.length; index += 3) {\r\n const a = indices[index];\r\n const b = indices[index + 1];\r\n const c = indices[index + 2];\r\n\r\n // Evaluate face normal\r\n tmpVectorA.fromArray(positions, a * 3);\r\n tmpVectorB.fromArray(positions, b * 3);\r\n tmpVectorC.fromArray(positions, c * 3);\r\n\r\n tmpVectorB.subtractToRef(tmpVectorA, tmpVectorAB);\r\n tmpVectorC.subtractToRef(tmpVectorA, tmpVectorAC);\r\n\r\n Vector3.CrossToRef(tmpVectorAB, tmpVectorAC, tmpVectorNormal);\r\n\r\n tmpVectorNormal.normalize();\r\n\r\n // Calculate normal from face center to the inside of the geometry\r\n const avgX = tmpVectorA.x + tmpVectorB.x + tmpVectorC.x;\r\n const avgY = tmpVectorA.y + tmpVectorB.y + tmpVectorC.y;\r\n const avgZ = tmpVectorA.z + tmpVectorB.z + tmpVectorC.z;\r\n\r\n tmpVectorAvgNormal.set(avgX / 3, avgY / 3, avgZ / 3);\r\n tmpVectorAvgNormal.subtractInPlace(inside);\r\n tmpVectorAvgNormal.normalize();\r\n\r\n if (Vector3.Dot(tmpVectorNormal, tmpVectorAvgNormal) >= 0) {\r\n // Flip!\r\n indices[index] = c;\r\n indices[index + 2] = a;\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -6,6 +6,111 @@ import type { AbstractMesh } from "../abstractMesh";
|
|
|
6
6
|
import { Mesh } from "../mesh";
|
|
7
7
|
import "../thinInstanceMesh.js";
|
|
8
8
|
import type { Material } from "../../Materials/material.js";
|
|
9
|
+
/**
|
|
10
|
+
* Representation of the types
|
|
11
|
+
*/
|
|
12
|
+
declare enum PLYType {
|
|
13
|
+
FLOAT = 0,
|
|
14
|
+
INT = 1,
|
|
15
|
+
UINT = 2,
|
|
16
|
+
DOUBLE = 3,
|
|
17
|
+
UCHAR = 4,
|
|
18
|
+
UNDEFINED = 5
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Usage types of the PLY values
|
|
22
|
+
*/
|
|
23
|
+
declare enum PLYValue {
|
|
24
|
+
MIN_X = 0,
|
|
25
|
+
MIN_Y = 1,
|
|
26
|
+
MIN_Z = 2,
|
|
27
|
+
MAX_X = 3,
|
|
28
|
+
MAX_Y = 4,
|
|
29
|
+
MAX_Z = 5,
|
|
30
|
+
MIN_SCALE_X = 6,
|
|
31
|
+
MIN_SCALE_Y = 7,
|
|
32
|
+
MIN_SCALE_Z = 8,
|
|
33
|
+
MAX_SCALE_X = 9,
|
|
34
|
+
MAX_SCALE_Y = 10,
|
|
35
|
+
MAX_SCALE_Z = 11,
|
|
36
|
+
PACKED_POSITION = 12,
|
|
37
|
+
PACKED_ROTATION = 13,
|
|
38
|
+
PACKED_SCALE = 14,
|
|
39
|
+
PACKED_COLOR = 15,
|
|
40
|
+
X = 16,
|
|
41
|
+
Y = 17,
|
|
42
|
+
Z = 18,
|
|
43
|
+
SCALE_0 = 19,
|
|
44
|
+
SCALE_1 = 20,
|
|
45
|
+
SCALE_2 = 21,
|
|
46
|
+
DIFFUSE_RED = 22,
|
|
47
|
+
DIFFUSE_GREEN = 23,
|
|
48
|
+
DIFFUSE_BLUE = 24,
|
|
49
|
+
OPACITY = 25,
|
|
50
|
+
F_DC_0 = 26,
|
|
51
|
+
F_DC_1 = 27,
|
|
52
|
+
F_DC_2 = 28,
|
|
53
|
+
F_DC_3 = 29,
|
|
54
|
+
ROT_0 = 30,
|
|
55
|
+
ROT_1 = 31,
|
|
56
|
+
ROT_2 = 32,
|
|
57
|
+
ROT_3 = 33,
|
|
58
|
+
UNDEFINED = 34
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Property field found in PLY header
|
|
62
|
+
*/
|
|
63
|
+
export type PlyProperty = {
|
|
64
|
+
/**
|
|
65
|
+
* Value usage
|
|
66
|
+
*/
|
|
67
|
+
value: PLYValue;
|
|
68
|
+
/**
|
|
69
|
+
* Value type
|
|
70
|
+
*/
|
|
71
|
+
type: PLYType;
|
|
72
|
+
/**
|
|
73
|
+
* offset in byte from te beginning of the splat
|
|
74
|
+
*/
|
|
75
|
+
offset: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* meta info on Splat file
|
|
79
|
+
*/
|
|
80
|
+
export interface PLYHeader {
|
|
81
|
+
/**
|
|
82
|
+
* number of splats
|
|
83
|
+
*/
|
|
84
|
+
vertexCount: number;
|
|
85
|
+
/**
|
|
86
|
+
* number of spatial chunks for compressed ply
|
|
87
|
+
*/
|
|
88
|
+
chunkCount: number;
|
|
89
|
+
/**
|
|
90
|
+
* length in bytes of the vertex info
|
|
91
|
+
*/
|
|
92
|
+
rowVertexLength: number;
|
|
93
|
+
/**
|
|
94
|
+
* length in bytes of the chunk
|
|
95
|
+
*/
|
|
96
|
+
rowChunkLength: number;
|
|
97
|
+
/**
|
|
98
|
+
* array listing properties per vertex
|
|
99
|
+
*/
|
|
100
|
+
vertexProperties: PlyProperty[];
|
|
101
|
+
/**
|
|
102
|
+
* array listing properties per chunk
|
|
103
|
+
*/
|
|
104
|
+
chunkProperties: PlyProperty[];
|
|
105
|
+
/**
|
|
106
|
+
* data view for parsing chunks and vertices
|
|
107
|
+
*/
|
|
108
|
+
dataView: DataView;
|
|
109
|
+
/**
|
|
110
|
+
* buffer for the data view
|
|
111
|
+
*/
|
|
112
|
+
buffer: ArrayBuffer;
|
|
113
|
+
}
|
|
9
114
|
/**
|
|
10
115
|
* Class used to render a gaussian splatting mesh
|
|
11
116
|
*/
|
|
@@ -31,6 +136,15 @@ export declare class GaussianSplattingMesh extends Mesh {
|
|
|
31
136
|
private _oldDirection;
|
|
32
137
|
private _useRGBACovariants;
|
|
33
138
|
private _material;
|
|
139
|
+
private _tmpCovariances;
|
|
140
|
+
private _sortIsDirty;
|
|
141
|
+
private static _RowOutputLength;
|
|
142
|
+
private static _SH_C0;
|
|
143
|
+
/**
|
|
144
|
+
* Set the number of batch (a batch is 16384 splats) after which a display update is performed
|
|
145
|
+
* A value of 0 (default) means display update will not happens before splat is ready.
|
|
146
|
+
*/
|
|
147
|
+
static ProgressiveUpdateAmount: number;
|
|
34
148
|
/**
|
|
35
149
|
* Gets the covariancesA texture
|
|
36
150
|
*/
|
|
@@ -88,15 +202,31 @@ export declare class GaussianSplattingMesh extends Mesh {
|
|
|
88
202
|
* @returns the current mesh
|
|
89
203
|
*/
|
|
90
204
|
render(subMesh: SubMesh, enableAlphaMode: boolean, effectiveMeshReplacement?: AbstractMesh): Mesh;
|
|
205
|
+
private static _TypeNameToEnum;
|
|
206
|
+
private static _ValueNameToEnum;
|
|
207
|
+
/**
|
|
208
|
+
* Parse a PLY file header and returns metas infos on splats and chunks
|
|
209
|
+
* @param data the loaded buffer
|
|
210
|
+
* @returns a PLYHeader
|
|
211
|
+
*/
|
|
212
|
+
static ParseHeader(data: ArrayBuffer): PLYHeader | null;
|
|
213
|
+
private static _GetCompressedChunks;
|
|
214
|
+
private static _GetSplat;
|
|
91
215
|
/**
|
|
92
|
-
* Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license
|
|
93
216
|
* Converts a .ply data array buffer to splat
|
|
94
217
|
* if data array buffer is not ply, returns the original buffer
|
|
95
218
|
* @param data the .ply data to load
|
|
219
|
+
* @param useCoroutine use coroutine and yield
|
|
96
220
|
* @returns the loaded splat buffer
|
|
97
|
-
* @deprecated Please use SceneLoader.ImportMeshAsync instead
|
|
98
221
|
*/
|
|
99
|
-
static ConvertPLYToSplat(data: ArrayBuffer): ArrayBuffer
|
|
222
|
+
static ConvertPLYToSplat(data: ArrayBuffer, useCoroutine?: boolean): Generator<undefined, ArrayBuffer, unknown>;
|
|
223
|
+
/**
|
|
224
|
+
* Converts a .ply data array buffer to splat
|
|
225
|
+
* if data array buffer is not ply, returns the original buffer
|
|
226
|
+
* @param data the .ply data to load
|
|
227
|
+
* @returns the loaded splat buffer
|
|
228
|
+
*/
|
|
229
|
+
static ConvertPLYToSplatAsync(data: ArrayBuffer): Promise<ArrayBuffer>;
|
|
100
230
|
/**
|
|
101
231
|
* Loads a .splat Gaussian Splatting array buffer asynchronously
|
|
102
232
|
* @param data arraybuffer containing splat file
|
|
@@ -123,14 +253,24 @@ export declare class GaussianSplattingMesh extends Mesh {
|
|
|
123
253
|
*/
|
|
124
254
|
clone(name?: string): GaussianSplattingMesh;
|
|
125
255
|
private static _CreateWorker;
|
|
256
|
+
private _makeSplat;
|
|
257
|
+
private _updateTextures;
|
|
258
|
+
private _updateData;
|
|
259
|
+
/**
|
|
260
|
+
* Update asynchronously the buffer
|
|
261
|
+
* @param data array buffer containing center, color, orientation and scale of splats
|
|
262
|
+
* @returns a promise
|
|
263
|
+
*/
|
|
264
|
+
updateDataAsync(data: ArrayBuffer): Promise<void>;
|
|
126
265
|
/**
|
|
127
266
|
* @experimental
|
|
128
267
|
* Update data from GS (position, orientation, color, scaling)
|
|
129
268
|
* @param data array that contain all the datas
|
|
130
269
|
*/
|
|
131
270
|
updateData(data: ArrayBuffer): void;
|
|
132
|
-
private _loadData;
|
|
133
271
|
private _updateSplatIndexBuffer;
|
|
272
|
+
private _updateSubTextures;
|
|
134
273
|
private _instanciateWorker;
|
|
135
274
|
private _getTextureSize;
|
|
136
275
|
}
|
|
276
|
+
export {};
|