class RenderingGroup
Creates a new rendering group.
Name | Type | Description | |
---|---|---|---|
index | number | The rendering group index | |
scene | Scene | ||
optional | opaqueSortCompareFn | Nullable<(a: SubMesh, b: SubMesh) => number> | The opaque sort comparison function. If null no order is applied |
optional | alphaTestSortCompareFn | Nullable<(a: SubMesh, b: SubMesh) => number> | The alpha test sort comparison function. If null no order is applied |
Set the opaque sort comparison function.
If null the sub meshes will be render in the order they were created
Set the alpha test sort comparison function.
If null the sub meshes will be render in the order they were created
Set the transparent sort comparison function.
If null the sub meshes will be render in the order they were created
Render all the sub meshes contained in the group.
@returns true if rendered some submeshes.
Name | Type | Description | |
---|---|---|---|
customRenderFunction | Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void> | Used to override the default render behaviour of the group. | |
renderSprites | boolean | ||
renderParticles | boolean |
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.
* @param a The first submesh
@returns The result of the comparison
Name | Type | Description | |
---|---|---|---|
a | SubMesh | The first submesh | |
b | SubMesh | The second submesh |
Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
are rendered back to front.
* @param a The first submesh
@returns The result of the comparison
Name | Type | Description | |
---|---|---|---|
a | SubMesh | The first submesh | |
b | SubMesh | The second submesh |
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).
* @param a The first submesh
@returns The result of the comparison
Name | Type | Description | |
---|---|---|---|
a | SubMesh | The first submesh | |
b | SubMesh | The second submesh |
Resets the different lists of submeshes to prepare a new frame.
Inserts the submesh in its correct queue depending on its material.
Name | Type | Description | |
---|---|---|---|
subMesh | SubMesh | The submesh to dispatch |
Name | Type | Description | |
---|---|---|---|
spriteManager | SpriteManager |
Name | Type | Description | |
---|---|---|---|
particleSystem | IParticleSystem |