Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface which defines the available methods for a GreasedLineMaterial

Hierarchy

  • IGreasedLineMaterial

Implemented by

Index

Properties

Color of the line. Applies to all line segments. Defaults to White.

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.

see

GreasedLineMeshColorMode

colors: Nullable<Color3[]>

Colors of the line segments. Defaults to empty.

colorsDistributionType: GreasedLineMeshColorDistributionType

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.

dashCount: number
see

GreasedLinePluginMaterial.setDashCount Number of dashes in the line. Defaults to 1.

dashOffset: number

Dash offset

dashRatio: number

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

resolution: Vector2

Defaults to engine.getRenderWidth() and engine.getRenderHeight() Rendering resolution

sizeAttenuation: boolean

If false then width units = scene units. If true then line will width be reduced. Defaults to false.

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

Methods

  • 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.

    Parameters

    • value: Nullable<Color3>

      the color

    • Optional doNotMarkDirty: boolean

      the flag

    Returns void

  • setColors(colors: Nullable<Color3[]>, lazy: boolean, forceNewTexture?: boolean): void
  • Parameters

    • colors: Nullable<Color3[]>

      colors array

    • lazy: boolean

      if true the colors texture will not be updated

    • Optional forceNewTexture: boolean

      forces to create a new colors texture

    Returns void

  • updateLazy(): void
  • Creates and sets the colors texture from the colors array which was created in lazy mode

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme