• Fits an object into a bounding volume. The volume is defined by a Box3 in world space.

    Parameters

    • obj: Object3D

      the object to fit

    • volume: Box3

      the volume to fit the object into

    • Optionalopts: { ignore?: Object3D<Object3DEventMap>[]; position?: boolean; scale?: boolean }

      options for fitting

      • Optionalignore?: Object3D<Object3DEventMap>[]

        Objects to ignore when calculating the obj's bounding box

      • Optionalposition?: boolean

        when true aligns the objects position to the volume ground

        true
        
      • Optionalscale?: boolean

        when true scales the object to fit the volume

        true
        

    Returns { boundsBefore: Box3; scale: Vector3 }

    • boundsBefore: Box3

      The object's bounding box before fitting

    • scale: Vector3

      The scale that was applied to the object

MMNEPVFCICPMFPCPTTAAATR