Class OutlineRenderer
Implements
Constructors
constructor
-
Instantiates a new outline renderer. (There could be only one per scene).
Parameters
- scene: Scene
Defines the scene it belongs to
Returns OutlineRenderer
- scene: Scene
Properties
enabled
Gets or sets a boolean indicating if the renderer is enabled
name
The name of the component. Each component must have a unique name.
scene
The scene the component belongs to.
z Offset
Defines a zOffset default Factor to prevent zFighting between the overlay and the mesh.
z Offset Units
Defines a zOffset default Unit to prevent zFighting between the overlay and the mesh.
Accessors
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used in the Outline renderer.
Returns ShaderLanguage
Methods
dispose
-
Disposes the component and the associated resources.
Returns void
is Ready
-
Returns whether or not the outline renderer is ready for a given submesh. All the dependencies e.g. submeshes, texture, effect... mus be ready
Parameters
- subMesh: SubMesh
Defines the submesh to check readiness for
- useInstances: boolean
Defines whether wee are trying to render instances or not
OptionalrenderPassId: numberRender pass id to use to render the mesh
Returns boolean
true if ready otherwise false
- subMesh: SubMesh
rebuild
-
Rebuilds the elements related to this component in case of context lost for instance.
Returns void
register
-
Register the component to one instance of a scene.
Returns void
render
-
render(
subMesh: SubMesh,
batch: _InstancesBatch,
useOverlay?: boolean,
renderPassId?: number,
): voidRenders the outline in the canvas.
Parameters
- subMesh: SubMesh
Defines the sumesh to render
- batch: _InstancesBatch
Defines the batch of meshes in case of instances
- useOverlay: boolean = false
Defines if the rendering is for the overlay or the outline
OptionalrenderPassId: numberRender pass id to use to render the mesh
Returns void
- subMesh: SubMesh
This class is responsible to draw the outline/overlay of meshes. It should not be used directly but through the available method on mesh.