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

    Function calculateCenteringOffset

    • Center an object at the origin

      Calculates the offset needed to center an object and returns it. Does not modify the object itself.

      Parameters

      • obj: Object3D

        The object to center

      Returns Vector3

      Offset vector to apply for centering

      const offset = calculateCenteringOffset(model);
      model.position.add(offset);