mirror of
https://github.com/storytold/spark.git
synced 2026-10-18 07:40:38 +00:00
Bump dist build
This commit is contained in:
Vendored
+29
@@ -5708,6 +5708,35 @@ const st = class st extends Kt {
|
||||
dispose() {
|
||||
this.packedSplats.dispose();
|
||||
}
|
||||
// Returns axis-aligned bounding box of the SplatMesh. If centers_only is true,
|
||||
// only the centers of the splats are used to compute the bounding box.
|
||||
// IMPORTANT: This should only be called after the SplatMesh is initialized.
|
||||
getBoundingBox(A = !0) {
|
||||
if (!this.initialized)
|
||||
throw new Error(
|
||||
"Cannot get bounding box before SplatMesh is initialized"
|
||||
);
|
||||
const e = new u.Vector3(
|
||||
Number.POSITIVE_INFINITY,
|
||||
Number.POSITIVE_INFINITY,
|
||||
Number.POSITIVE_INFINITY
|
||||
), s = new u.Vector3(
|
||||
Number.NEGATIVE_INFINITY,
|
||||
Number.NEGATIVE_INFINITY,
|
||||
Number.NEGATIVE_INFINITY
|
||||
), n = new u.Vector3(), i = [-1, 1];
|
||||
return this.packedSplats.forEachSplat(
|
||||
(a, o, g, l, c, I) => {
|
||||
if (A)
|
||||
e.min(o), s.max(o);
|
||||
else
|
||||
for (const h of i)
|
||||
for (const B of i)
|
||||
for (const C of i)
|
||||
n.set(h * g.x, B * g.y, C * g.z), n.applyQuaternion(l), n.add(o), e.min(n), s.max(n);
|
||||
}
|
||||
), new u.Box3(e, s);
|
||||
}
|
||||
constructGenerator(A) {
|
||||
const { transform: e, viewToObject: s, recolor: n } = A, i = MA(
|
||||
{ index: "int" },
|
||||
|
||||
Reference in New Issue
Block a user