Class EdgesRenderer
Hierarchy (View Summary)
- EdgesRenderer
Implements
Constructors
constructor
-
new EdgesRenderer(
source: AbstractMesh,
epsilon?: number,
checkVerticesInsteadOfIndices?: boolean,
generateEdgesLines?: boolean,
options?: IEdgesRendererOptions,
): EdgesRendererCreates an instance of the EdgesRenderer. It is primarily use to display edges of a mesh. Beware when you use this class with complex objects as the adjacencies computation can be really long
Parameters
- source: AbstractMesh
Mesh used to create edges
- epsilon: number = 0.95
sum of angles in adjacency to check for edge
- checkVerticesInsteadOfIndices: boolean = false
bases the edges detection on vertices vs indices. Note that this parameter is not used if options.useAlternateEdgeFinder = true
- generateEdgesLines: boolean = true
should generate Lines or only prepare resources.
Optionaloptions: IEdgesRendererOptionsThe options to apply when generating the edges
Returns EdgesRenderer
- source: AbstractMesh
Properties
custom Instances
List of instances to render in case the source mesh has instances
edges Width Scaler For Orthographic
Define the size of the edges with an orthographic camera
edges Width Scaler For Perspective
Define the size of the edges with a perspective camera
is Enabled
Gets or sets a boolean indicating if the edgesRenderer is active
Accessors
line Shader
-
Gets or sets the shader used to draw the lines
Returns ShaderMaterial
-
Parameters
- shader: ShaderMaterial
Returns void
lines Indices
-
get linesIndices(): readonly number[]
Gets the indices generated by the edge renderer
Returns readonly number[]
lines Normals
-
get linesNormals(): readonly number[]
Gets the normals generated by the edge renderer
Returns readonly number[]
lines Positions
-
get linesPositions(): readonly number[]
Gets the vertices generated by the edge renderer
Returns readonly number[]
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used.
Returns ShaderLanguage
Methods
_ generate Edges Lines
dispose
-
Releases the required resources for the edges renderer
Returns void
is Ready
-
Checks whether or not the edges renderer is ready to render.
Parameters
OptionaluseInstances: booleanDefines whether the instanced shader variant should be checked. If omitted, the current rendering state is used.
Returns boolean
true if ready, otherwise false.
render
-
Renders the edges of the attached mesh,
Returns void
This class is used to generate edges of the mesh that could then easily be rendered in a scene.