API

Class GreasedLinePluginMaterial

GreasedLinePluginMaterial for GreasedLineMesh/GreasedLineRibbonMesh. Use the GreasedLineBuilder.CreateGreasedLineMaterial function to create and instance of this class.

Hierarchy (View Summary)

Implements

Index

The mixing mode of the color paramater. Default value is GreasedLineMeshColorMode.SET

GreasedLineMeshColorMode

colorsSampling: number

The type of sampling of the colors texture. The values are the same when using with textures.

colorsTexture: Nullable<RawTexture> = null

You can provide a colorsTexture to use instead of one generated from the 'colors' option

dashOffset: number

Dash offset

dashRatio: number

Length of the dash. 0 to 1. 0.5 means half empty, half drawn.

doNotSerialize: boolean = false

Specifies if the material plugin should be serialized, true to skip serialization

markAllDefinesAsDirty: () => void

Helper function to mark defines as being dirty.

name: string

Defines the name of the plugin

priority: number = 500

Defines the priority of the plugin. Lower numbers run first.

registerForExtraEvents: boolean = false

Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)

resolveIncludes: boolean = false

Indicates that any #include directive in the plugin code must be replaced by the corresponding code.

useColors: boolean

Whether to use the colors option to colorize the line

useDash: boolean

Turns on/off dash mode

visibility: number

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

width: number

Line base width. At each point the line width is calculated by widths[pointIndex] * width

ForceGLSL: boolean = false

Force all the greased lines to compile to glsl even on WebGPU engines. False by default. This is mostly meant for backward compatibility.

GREASED_LINE_MATERIAL_NAME: "GreasedLinePluginMaterial"

Plugin name