Calculate centering offset for multiple objects
Centers the combined bounding box of all objects.
Array of objects to center
Offset vector to apply to all objects
const offset = calculateSceneCenteringOffset([model1, model2]);model1.position.add(offset);model2.position.add(offset); Copy
const offset = calculateSceneCenteringOffset([model1, model2]);model1.position.add(offset);model2.position.add(offset);
Calculate centering offset for multiple objects
Centers the combined bounding box of all objects.