Provides utility functions to create scene helpers, such as bounding boxes, grids, axes...

Constructors

Accessors

Methods

  • Adds a bounding box helper to the object. If a bounding box is already present, it is updated instead.

    Parameters

    Returns void

    // add a bounding box to 'obj'
    Helpers.addBoundingBox(obj, 'green');
  • Adds an oriented bounding box (OBB) helper to the object. If a bounding box is already present, it is updated instead.

    Parameters

    Returns void

    // add an OBB to 'obj'
    Helpers.addOBB(obj, obj.OBB, 'green');
  • Create a grid on the XZ plane.

    Parameters

    • origin: Vector3

      The grid origin.

    • size: number

      The size of the grid.

    • subdivs: number

      The number of grid subdivisions.

    Returns GridHelper

  • Creates a selection bounding box helper around the specified object.

    Parameters

    Returns BoundingBoxHelper

    the created box helper.

    // add a bounding box to 'obj'
    Helpers.createSelectionBox(obj, 'green');
  • Removes an existing bounding box from the object, if any.

    Parameters

    Returns void

    Helpers.removeBoundingBox(obj);