Options
Menu

Class BasicMaterialPass

BasicMaterialPass forms an abstract base class for the default shaded materials provided by Stage, using material methods to define their appearance.

Hierarchy

Implements

Index

Constructors

constructor

Properties

_elementsClass

_elementsClass: IElementsClassGL

_material

_material: GL_MaterialBase

_shader

_shader: ShaderBase

_stage

_stage: Stage

Accessors

animationSet

forceSeparateMVP

  • get (): boolean
  • set (value: boolean): void
  • Indicates whether the screen projection should be calculated by forcing a separate scene matrix and view-projection matrix. This is used to prevent rounding errors when using multiple passes with different projection code.

    Returns boolean

  • Indicates whether the screen projection should be calculated by forcing a separate scene matrix and view-projection matrix. This is used to prevent rounding errors when using multiple passes with different projection code.

    Parameters

    • value: boolean

    Returns void

images

preserveAlpha

  • get (): boolean
  • set (value: boolean): void
  • Indicates whether the output alpha value should remain unchanged compared to the material's original alpha.

    Returns boolean

  • Indicates whether the output alpha value should remain unchanged compared to the material's original alpha.

    Parameters

    • value: boolean

    Returns void

samplers

shader

style

  • get (): Style
  • Returns Style

Methods

_activate

  • _activate(projection: ProjectionBase): void
  • Sets the material state for the pass that is independent of the rendered object. This needs to be called before calling pass. Before activating a pass, the previously used pass needs to be deactivated.

    Parameters

    • projection: ProjectionBase

    Returns void

Private _deactivate

  • _deactivate(): void
  • Clears the render state for the pass. This needs to be called before activating another pass.

    Returns void

_getFragmentCode

_getNormalFragmentCode

_getNormalVertexCode

_getPostAnimationFragmentCode

_getVertexCode

_includeDependencies

_initConstantData

_setRenderState

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void

getImageIndex

  • getImageIndex(texture: TextureBase, index?: number): number
  • Parameters

    • texture: TextureBase
    • Default value index: number = 0

    Returns number

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

invalidate

  • invalidate(): void

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

Generated using TypeDoc