Options
All
  • Public
  • Public/Protected
  • All
Menu

GreasedLinePluginMaterial for GreasedLineMesh

Hierarchy

Implements

Index

Constructors

Properties

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

see

GreasedLineMeshColorMode

colorsSampling: number

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

dashOffset: number

Dash offset

dashRatio: number

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

markAllDefinesAsDirty: (() => void)

Helper function to mark defines as being dirty.

Type declaration

    • (): void
    • Helper function to mark defines as being dirty.

      Returns void

name: string

Defines the name of the plugin

priority: number

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

registerForExtraEvents: boolean

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

resolveIncludes: boolean

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

DEFAULT_COLOR: Color3

Default line color for newly created lines

DEFAULT_WIDTH: number

Defaule line width

DEFAULT_WIDTH_ATTENUATED: number

Default line width when sizeAttenuation is true

GREASED_LINE_MATERIAL_NAME: "GreasedLinePluginMaterial" = "GreasedLinePluginMaterial"

Plugin name

Accessors

  • Gets the color of the line

    Returns Nullable<Color3>

  • Sets the color of the line

    Parameters

    • value: Nullable<Color3>

      Color3 or null to clear the color. You need to clear the color if you use colors and useColors = true

    Returns void

  • get dashCount(): number
  • set dashCount(value: number): void
  • Gets the number of dashes in the line

    Returns number

  • Sets the number of dashes in the line

    Parameters

    • value: number

      dash

    Returns void

  • get isEnabled(): boolean
  • Returns boolean

  • get sizeAttenuation(): boolean
  • set sizeAttenuation(value: boolean): void
  • False means 1 unit in width = 1 unit on scene, true means 1 unit in width is reduced on the screen to make better looking lines

    Returns boolean

  • Turn on/off attenuation of the width option and widths array.

    Parameters

    • value: boolean

      false means 1 unit in width = 1 unit on scene, true means 1 unit in width is reduced on the screen to make better looking lines

    Returns void

Methods

  • Add fallbacks to the effect fallbacks list.

    Parameters

    • defines: MaterialDefines

      defines the Base texture to use.

    • fallbacks: EffectFallbacks

      defines the current fallback list.

    • currentRank: number

      defines the current fallback rank.

    Returns number

    the new fallback rank.

  • collectDefines(defines: {}): void
  • Collects all defines.

    Parameters

    • defines: {}

      The object to append to.

      • [name: string]: { default: any; type: string }
        • default: any
        • type: string

    Returns void

  • Makes a duplicate of the current configuration into another one.

    Parameters

    Returns void

  • dispose(): void
  • getAttributes(attributes: string[]): void
  • Get the shader attributes

    Parameters

    • attributes: string[]

      array which will be filled with the attributes

    Returns void

  • getClassName(): string
  • getCustomCode(shaderType: string): Nullable<{}>
  • getSamplers(samplers: string[]): void
  • Get the shader samplers

    Parameters

    • samplers: string[]

    Returns void

  • getUniformBuffersNames(ubos: string[]): void
  • Gets the uniform buffers names added by the plugin.

    Parameters

    • ubos: string[]

      list that the ubo names should be added to.

    Returns void

  • getUniforms(): { fragment: string; ubo: { name: string; size: number; type: string }[]; vertex: string }
  • Get the shader uniforms

    Returns { fragment: string; ubo: { name: string; size: number; type: string }[]; vertex: string }

    uniforms

    • fragment: string
    • ubo: { name: string; size: number; type: string }[]
    • vertex: string
  • Binds the material data (this function is called even if mustRebind() returns false)

    Parameters

    • uniformBuffer: UniformBuffer

      defines the Uniform buffer to fill in.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      defines the engine the material belongs to.

    • subMesh: SubMesh

      the submesh to bind data for

    Returns void

  • hasRenderTargetTextures(): boolean
  • Gets a boolean indicating that current material needs to register RTT

    Returns boolean

    true if this uses a render target otherwise false.

  • Checks to see if a texture is used in the material.

    Parameters

    Returns boolean

    • Boolean specifying if a texture is used in the material.
  • Specifies that the submesh is ready to be used.

    Parameters

    • defines: MaterialDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      the engine this scene belongs to.

    • subMesh: SubMesh

      the submesh to check for readiness

    Returns boolean

    • boolean indicating that the submesh is ready or not.
  • parse(source: any, scene: Scene, rootUrl: string): void
  • Parses a serialized objects

    Parameters

    • source: any

      serialized object

    • scene: Scene

      scene

    • rootUrl: string

      root url for textures

    Returns void

  • prepareDefines(defines: MaterialGreasedLineDefines, _scene: Scene, _mesh: AbstractMesh): void
  • Sets the defines for the next rendering. Called before MaterialHelper.PrepareDefinesForAttributes is called.

    Parameters

    • defines: MaterialDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene to the material belongs to.

    • mesh: AbstractMesh

      the mesh being rendered

    Returns void

  • serialize(): any
  • Serializes this plugin material

    Returns any

    serializationObjec

  • Sets the color of the line. If set the whole line will be mixed with this color according to the colorMode option.

    Parameters

    Returns void

  • setColors(colors: Nullable<Color3[]>, lazy?: boolean, forceNewTexture?: boolean): void
  • Creates or updates the colors texture

    Parameters

    • colors: Nullable<Color3[]>

      color table RGBA

    • Optional lazy: boolean

      if lazy, the colors are not updated

    • Optional forceNewTexture: boolean

      force creation of a new texture

    Returns void

  • updateLazy(): void
  • Updates the material. Use when material created in lazy mode.

    Returns void

Legend

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

Settings

Theme