mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 05:15:32 +01:00
idk bro
This commit is contained in:
1 parent
61fe8c7e7c
commit
78dce028d9
26 files changed
+135
-101
No files matched your search
@@ -1,9 +1,13 @@
|
||||
import { BoundingBox } from '@blitzkit/core';
|
||||
import { Vector3Tuple } from 'three';
|
||||
|
||||
export function unionBoundingBox(a: BoundingBox, b: BoundingBox) {
|
||||
return {
|
||||
min: a.min.map((a, index) => Math.min(a, b.min[index])) as Vector3Tuple,
|
||||
max: a.max.map((a, index) => Math.max(a, b.max[index])) as Vector3Tuple,
|
||||
// min: a.min.map((a, index) => Math.min(a, b.min[index])) as Vector3Tuple,
|
||||
// max: a.max.map((a, index) => Math.max(a, b.max[index])) as Vector3Tuple,
|
||||
min: {
|
||||
x: Math.min(a.min.x, b.min.x),
|
||||
y: Math.min(a.min.y, b.min.y),
|
||||
z: Math.min(a.min.z, b.min.z),
|
||||
},
|
||||
} satisfies BoundingBox;
|
||||
}
|
||||
Reference in new issue
Block a user