Files
blitzkit/src/core/blitzrinth/normalizeBoundingBox.ts
T
2024-04-20 12:00:48 -05:00

9 lines
257 B
TypeScript

import { Vector3Tuple } from 'three';
import { BoundingBox } from './modelDefinitions';
export function normalizeBoundingBox(boundingBox: BoundingBox) {
return boundingBox.max.map(
(max, index) => max - boundingBox.min[index],
) as Vector3Tuple;
}