mirror of
https://github.com/storytold/spark.git
synced 2026-10-21 08:06:45 +00:00
Bump dist build
This commit is contained in:
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
5465c6033bbf0f31b94f372f60e1628a82e4a156
|
|
||||||
Vendored
+44
@@ -7268,6 +7268,50 @@ const _SplatMesh = class _SplatMesh extends SplatGenerator {
|
|||||||
dispose() {
|
dispose() {
|
||||||
this.packedSplats.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(centers_only = true) {
|
||||||
|
if (!this.initialized) {
|
||||||
|
throw new Error(
|
||||||
|
"Cannot get bounding box before SplatMesh is initialized"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const minVec = new THREE__namespace.Vector3(
|
||||||
|
Number.POSITIVE_INFINITY,
|
||||||
|
Number.POSITIVE_INFINITY,
|
||||||
|
Number.POSITIVE_INFINITY
|
||||||
|
);
|
||||||
|
const maxVec = new THREE__namespace.Vector3(
|
||||||
|
Number.NEGATIVE_INFINITY,
|
||||||
|
Number.NEGATIVE_INFINITY,
|
||||||
|
Number.NEGATIVE_INFINITY
|
||||||
|
);
|
||||||
|
const corners = new THREE__namespace.Vector3();
|
||||||
|
const signs = [-1, 1];
|
||||||
|
this.packedSplats.forEachSplat(
|
||||||
|
(_index, center, scales, quaternion, _opacity, _color) => {
|
||||||
|
if (centers_only) {
|
||||||
|
minVec.min(center);
|
||||||
|
maxVec.max(center);
|
||||||
|
} else {
|
||||||
|
for (const x of signs) {
|
||||||
|
for (const y of signs) {
|
||||||
|
for (const z of signs) {
|
||||||
|
corners.set(x * scales.x, y * scales.y, z * scales.z);
|
||||||
|
corners.applyQuaternion(quaternion);
|
||||||
|
corners.add(center);
|
||||||
|
minVec.min(corners);
|
||||||
|
maxVec.max(corners);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const box = new THREE__namespace.Box3(minVec, maxVec);
|
||||||
|
return box;
|
||||||
|
}
|
||||||
constructGenerator(context) {
|
constructGenerator(context) {
|
||||||
const { transform, viewToObject, recolor } = context;
|
const { transform, viewToObject, recolor } = context;
|
||||||
const generator = dynoBlock(
|
const generator = dynoBlock(
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+23
-23
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+44
@@ -7249,6 +7249,50 @@ const _SplatMesh = class _SplatMesh extends SplatGenerator {
|
|||||||
dispose() {
|
dispose() {
|
||||||
this.packedSplats.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(centers_only = true) {
|
||||||
|
if (!this.initialized) {
|
||||||
|
throw new Error(
|
||||||
|
"Cannot get bounding box before SplatMesh is initialized"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const minVec = new THREE.Vector3(
|
||||||
|
Number.POSITIVE_INFINITY,
|
||||||
|
Number.POSITIVE_INFINITY,
|
||||||
|
Number.POSITIVE_INFINITY
|
||||||
|
);
|
||||||
|
const maxVec = new THREE.Vector3(
|
||||||
|
Number.NEGATIVE_INFINITY,
|
||||||
|
Number.NEGATIVE_INFINITY,
|
||||||
|
Number.NEGATIVE_INFINITY
|
||||||
|
);
|
||||||
|
const corners = new THREE.Vector3();
|
||||||
|
const signs = [-1, 1];
|
||||||
|
this.packedSplats.forEachSplat(
|
||||||
|
(_index, center, scales, quaternion, _opacity, _color) => {
|
||||||
|
if (centers_only) {
|
||||||
|
minVec.min(center);
|
||||||
|
maxVec.max(center);
|
||||||
|
} else {
|
||||||
|
for (const x of signs) {
|
||||||
|
for (const y of signs) {
|
||||||
|
for (const z of signs) {
|
||||||
|
corners.set(x * scales.x, y * scales.y, z * scales.z);
|
||||||
|
corners.applyQuaternion(quaternion);
|
||||||
|
corners.add(center);
|
||||||
|
minVec.min(corners);
|
||||||
|
maxVec.max(corners);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const box = new THREE.Box3(minVec, maxVec);
|
||||||
|
return box;
|
||||||
|
}
|
||||||
constructGenerator(context) {
|
constructGenerator(context) {
|
||||||
const { transform, viewToObject, recolor } = context;
|
const { transform, viewToObject, recolor } = context;
|
||||||
const generator = dynoBlock(
|
const generator = dynoBlock(
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+29
@@ -5708,6 +5708,35 @@ const st = class st extends Kt {
|
|||||||
dispose() {
|
dispose() {
|
||||||
this.packedSplats.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) {
|
constructGenerator(A) {
|
||||||
const { transform: e, viewToObject: s, recolor: n } = A, i = MA(
|
const { transform: e, viewToObject: s, recolor: n } = A, i = MA(
|
||||||
{ index: "int" },
|
{ index: "int" },
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -66,6 +66,7 @@ export declare class SplatMesh extends SplatGenerator {
|
|||||||
pushSplat(center: THREE.Vector3, scales: THREE.Vector3, quaternion: THREE.Quaternion, opacity: number, color: THREE.Color): void;
|
pushSplat(center: THREE.Vector3, scales: THREE.Vector3, quaternion: THREE.Quaternion, opacity: number, color: THREE.Color): void;
|
||||||
forEachSplat(callback: (index: number, center: THREE.Vector3, scales: THREE.Vector3, quaternion: THREE.Quaternion, opacity: number, color: THREE.Color) => void): void;
|
forEachSplat(callback: (index: number, center: THREE.Vector3, scales: THREE.Vector3, quaternion: THREE.Quaternion, opacity: number, color: THREE.Color) => void): void;
|
||||||
dispose(): void;
|
dispose(): void;
|
||||||
|
getBoundingBox(centers_only?: boolean): THREE.Box3;
|
||||||
constructGenerator(context: SplatMeshContext): void;
|
constructGenerator(context: SplatMeshContext): void;
|
||||||
updateGenerator(): void;
|
updateGenerator(): void;
|
||||||
update({ time, viewToWorld, deltaTime, globalEdits, }: {
|
update({ time, viewToWorld, deltaTime, globalEdits, }: {
|
||||||
|
|||||||
Reference in New Issue
Block a user