Files
blitzkit/src/core/blitzkrieg/normalizeBoundingBox.ts
T

8 lines
257 B
TypeScript
Raw Normal View History

2024-01-28 20:56:49 -06:00
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;
}