ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Function calculateSceneCenteringOffset

    • Calculate centering offset for multiple objects

      Centers the combined bounding box of all objects.

      Parameters

      • objects: Object3D<Object3DEventMap>[]

        Array of objects to center

      Returns Vector3

      Offset vector to apply to all objects

      const offset = calculateSceneCenteringOffset([model1, model2]);
      model1.position.add(offset);
      model2.position.add(offset);