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

    Function getMaxDimension

    • Get the maximum dimension of a bounding box

      Parameters

      • bbox: Box3

        The bounding box

      Returns number

      The largest dimension (x, y, or z)

      const bbox = new THREE.Box3().setFromObject(model);
      const maxDim = getMaxDimension(bbox);
      const cameraDistance = maxDim * 2; // Position camera based on size