RenderingGroup

Hierarchy

  • RenderingGroup

Index

Constructors

constructor

  • Creates a new rendering group.

    Parameters

    • index: number

      The rendering group index

    • scene: Scene
    • Optional opaqueSortCompareFn: Nullable<function>

      The opaque sort comparison function. If null no order is applied

    • Optional alphaTestSortCompareFn: Nullable<function>

      The alpha test sort comparison function. If null no order is applied

    • Optional transparentSortCompareFn: Nullable<function>

      The transparent sort comparison function. If null back to front + alpha index sort is applied

    Returns RenderingGroup

Properties

alphaTestSortCompareFn

alphaTestSortCompareFn: Nullable<function>

Set the alpha test sort comparison function. If null the sub meshes will be render in the order they were created

index

index: number

onBeforeTransparentRendering

onBeforeTransparentRendering: function

Type declaration

    • (): void
    • Returns void

opaqueSortCompareFn

opaqueSortCompareFn: Nullable<function>

Set the opaque sort comparison function. If null the sub meshes will be render in the order they were created

transparentSortCompareFn

transparentSortCompareFn: Nullable<function>

Set the transparent sort comparison function. If null the sub meshes will be render in the order they were created

Methods

dispatch

  • Inserts the submesh in its correct queue depending on its material.

    Parameters

    Returns void

dispatchParticles

dispatchSprites

dispose

  • dispose(): void
  • Returns void

prepare

  • prepare(): void
  • Resets the different lists of submeshes to prepare a new frame.

    Returns void

render

  • render(customRenderFunction: Nullable<function>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>): void
  • Render all the sub meshes contained in the group.

    Parameters

    • customRenderFunction: Nullable<function>

      Used to override the default render behaviour of the group.

    • renderSprites: boolean
    • renderParticles: boolean
    • activeMeshes: Nullable<AbstractMesh[]>

    Returns void

    true if rendered some submeshes.

Static backToFrontSortCompare

  • Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent) are rendered back to front.

    Parameters

    Returns number

    The result of the comparison

Static defaultTransparentSortCompare

  • Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent) are rendered back to front if in the same alpha index.

    Parameters

    Returns number

    The result of the comparison

Static frontToBackSortCompare

  • Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent) are rendered front to back (prevent overdraw).

    Parameters

    Returns number

    The result of the comparison

Generated using TypeDoc