Interface which defines the available methods for a GreasedLineMaterial
Color of the line. Applies to all line segments. Defaults to White.
ModeSearch playground for colorMode
The mixing mode of the color paramater. Default value is GreasedLineMeshColorMode.SET. MATERIAL_TYPE_SIMPLE mixes the color and colors of the greased line material. MATERIAL_TYPE_STANDARD and MATERIAL_TYPE_PBR mixes the color from the base material with the color and/or colors of the greased line material.
Colors of the line segments. Defaults to empty.
Distribution TypeSearch playground for colorsDistributionType
The method used to distribute the colors along the line. You can use segment distribution when each segment will use on color from the color table. Or you can use line distribution when the colors are distributed evenly along the line ignoring the segments.
CountSearch playground for dashCount
OffsetSearch playground for dashOffset
RatioSearch playground for dashRatio
Length of the dash. 0 to 1. 0.5 means half empty, half drawn.
resolutionSearch playground for resolution
Defaults to engine.getRenderWidth() and engine.getRenderHeight() Rendering resolution
AttenuationSearch playground for sizeAttenuation
If false then width units = scene units. If true then line will width be reduced. Defaults to false.
ColorsSearch playground for useColors
Whether to use the colors option to colorize the line
Turns on/off dash mode
visibilitySearch playground for visibility
Normalized value of how much of the line will be visible 0 - 0% of the line will be visible 1 - 100% of the line will be visible
Line base width. At each point the line width is calculated by widths[pointIndex] * width
ColorSearch playground for setColor
Allows to change the color without marking the material dirty. MATERIAL_TYPE_STANDARD and MATERIAL_TYPE_PBR material's shaders will get recompiled if there was no color set and you set a color or when there was a color set and you set it to null.
ColorsSearch playground for setColors
LazySearch playground for updateLazy
Creates and sets the colors texture from the colors array which was created in lazy mode