• Public
  • Public/Protected
  • All

Class BoundingBoxRenderer

Component responsible of rendering the bounding box of the meshes in a scene. This is usually used through the mesh.showBoundingBox or the scene.forceShowBoundingBoxes properties


  • BoundingBoxRenderer





  • Instantiates a new bounding box renderer in a scene.


    • scene: Scene

      the scene the renderer renders in

    Returns BoundingBoxRenderer


backColorSearch playground for backColor

backColor: Color3

Color of the bounding box lines placed behind an object

enabledSearch playground for enabled

enabled: boolean

When false, no bounding boxes will be rendered

frontColorSearch playground for frontColor

frontColor: Color3

Color of the bounding box lines placed in front of an object

Readonly nameSearch playground for name

name: string

The component name helpful to identify the component in the list of scene components.

onAfterBoxRenderingObservableSearch playground for onAfterBoxRenderingObservable

onAfterBoxRenderingObservable: Observable<BoundingBox>

Observable raised after rendering a bounding box

onBeforeBoxRenderingObservableSearch playground for onBeforeBoxRenderingObservable

onBeforeBoxRenderingObservable: Observable<BoundingBox>

Observable raised before rendering a bounding box

onResourcesReadyObservableSearch playground for onResourcesReadyObservable

onResourcesReadyObservable: Observable<BoundingBoxRenderer>

Observable raised after resources are created

sceneSearch playground for scene

scene: Scene

The scene the component belongs to.

showBackLinesSearch playground for showBackLines

showBackLines: boolean

Defines if the renderer should show the back lines or not


disposeSearch playground for dispose

  • dispose(): void
  • Dispose and release the resources attached to this renderer.

    Returns void

rebuildSearch playground for rebuild

  • rebuild(): void
  • Rebuilds the elements related to this component in case of context lost for instance.

    Returns void

registerSearch playground for register

  • register(): void
  • Registers the component in a given scene

    Returns void

renderSearch playground for render

  • render(renderingGroupId: number): void
  • Render the bounding boxes of a specific rendering group


    • renderingGroupId: number

      defines the rendering group to render

    Returns void

renderOcclusionBoundingBoxSearch playground for renderOcclusionBoundingBox

  • In case of occlusion queries, we can render the occlusion bounding box through this method


    • mesh: AbstractMesh

      Define the mesh to render the occlusion bounding box for

    Returns void


  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method