FatLineMaterial

This material is specifically used to draw line or dash-line which has width more than 1 pixel.

Core Class

This material is specifically used to draw line or dash-line which has width more than 1 pixel.

Hierarchy

  • SceneClipMaterial
    • FatLineMaterial

Constructors

  • Parameters

    • p: FatLineMaterialParameter

    Returns FatLineMaterial

Properties

isDynamicShape: boolean

Mark this shape of this material is largely affect by shader. Hint the engine that pick, culling is disabled

isVolumeRendering: boolean

Mark this material uses volume like rendering technology. Hint the engine that some effect is disabled

MAX_TEXTURES: 6

max texture count, just in case some platform will take use of some channels by default, so set to 6 instead of 8

name: string

Optional name of the object (doesn't need to be unique). Default is an empty string.

id: number

Unique number for this material instance.

transparent: boolean

If use transparent effect, this value must be set to true to enable blending.

visible: boolean

Defines whether this material is visible.

programId: number

The id of shader program which this material shader belongs to.

side: Side

Set which side of the object will be seen on screen.

blending: Blending

Which blending to use when displaying objects with this material. This must be set to CustomBlending to use custom blendSrc , blendDst or blendEquation . See the blending mode constants for all possible values. Default is NormalBlending.

blendSrc: BlendingFactor

Blending source. Default is SrcAlphaFactor. See the source factors constants for all possible values.

blendDst: BlendingFactor

Blending destination. Default is OneMinusSrcAlphaFactor. See the destination factors constants for all possible values.

blendEquation: BlendingEquation

Blending equation to use when applying blending. Default is AddEquation. See the blending equation constants for all possible values.

blendSrcAlpha: Nullable<BlendingFactor>

The transparency of the blendSrc .

blendDstAlpha: Nullable<BlendingFactor>

The transparency of the blendDst .

blendEquationAlpha: Nullable<BlendingEquation>

The transparency of the blendEquation .

stencilWrite: boolean

Whether rendering this material has any effect on the stencil buffer.

stencilWriteMask: number

The bit mask to use when writing to the stencil buffer.

stencilFuncMask: number

The bit mask to use when comparing against the stencil buffer.

stencilFunc: StencilFunc

The stencil comparison function to use.

stencilRef: number

The value to use when performing stencil comparisons or stencil operations.

stencilFail: StencilOp

Which stencil operation to perform when the comparison function returns false.

stencilZFail: StencilOp

Which stencil operation to perform when the comparison function returns true but the depth test fails.

stencilZPass: StencilOp

Which stencil operation to perform when the comparison function returns true and the depth test passes.

depthFunc: DepthModes

Which depth function to use.

depthTest: boolean

Whether to have depth test enabled when rendering this material. If this is set to false, this object's occluding relationship will depend on Object3D.renderOrder| renderOrder.

depthWrite: boolean

Whether rendering this material has any effect on the depth buffer.

colorWrite: boolean

Whether to render the material's color. This can be used in conjunction with a Object3D.renderOrder| renderOrder property to create invisible objects that occlude other objects.

colorWriteMasks: [boolean, boolean, boolean, boolean]
polygonOffset: boolean

Whether to use polygon offset.

polygonOffsetFactor: number

Sets the polygon offset factor.

polygonOffsetUnits: number

Sets the polygon offset units.

premultipliedAlpha: boolean

Whether to premultiply the alpha (transparency) value.

colorWriteMask: [boolean, boolean, boolean, boolean]
enableSceneClipping: boolean
fallback: LineMaterial
color: ColorWithAlpha
enableDash: boolean
dash: LineDash
fatLineWidth: number
enableViewIndependentDashScale: boolean

This method will be used automatically before

    • (renderer: Renderer): void
    • Parameters

      • renderer: Renderer

        instance of renderer for engine.

      Returns void

userData: Record<keyof any, any>
_uuid: any
uuid: string
_listeners: Map<Symbol, Listener<never>[]>

Accessors

  • get businessTag(): string

    Returns string

  • set businessTag(v: string): void

    Parameters

    • v: string

    Returns void

Methods

  • Returns readonly ShaderComponent[]

  • Parameters

    • index: number

    Returns void

  • Parameters

    • c: ShaderComponent
    • index: number

    Returns void

  • Parameters

    • enable: boolean

    Returns void

  • Parameters

    • r: boolean
    • g: boolean
    • b: boolean
    • a: boolean

    Returns void

  • When user change the material property manually, this method need to use to refresh data.

    Returns void

  • UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.

    Returns string

  • Reset the key of shader and force engine to compile shader again.

    Returns void

  • Copy basic properties from other material.

    Parameters

    • other: Material

      the source of copied data

    Returns void

  • Returns void

  • Returns void

  • Make engine clear the current material's data in Ubo.

    Returns void

  • The name of instance's class.

    Returns string

  • Parameters

    • r: ShaderComponentRegistry

    Returns string

  • Sets the properties with the given values. In extents class, this method need to override in extended material for corresponding parameters.

    Parameters

    • p: FatLineMaterialParameter

    Returns void

  • Parameters

    • program: WGLProgram
    • r: ShaderComponentRegistry

    Returns void

  • Parameters

    • r: ShaderComponentRegistry

    Returns string

  • Parameters

    • builder: ShaderBuilder
    • registry: ShaderComponentRegistry

    Returns void

  • abstract function to copy a same type material instance

    Parameters

    Returns this

  • Store the attributes of this class into string as serializing format.

    Parameters

    • ctx: Serializer

      this parameter has not supported external Serializer yet. It may cause that this method can not be used directly.

    Returns void

  • Parse the data for this class from string according to serializing format.

    Parameters

    • ctx: Deserializer

      this parameter has not supported external Deserializer yet. It may cause that this method can not be used directly.

    Returns void

  • Parameters

    • v: string

    Returns this

  • Returns boolean

  • Returns void

  • Returns void

  • Adds a listener to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Only active the listener one times and then off it| it.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns boolean

  • Removes a listener from listening list.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Active the event and call the registered listener.

    Parameters

    • type: EventType<never>

    Returns void

  • Type Parameters

    • T

    Parameters

    • type: EventType<T>
    • payload: T

    Returns void

  • Removes all listeners from listening list.

    Returns void