Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MaterialStencilState

Class that holds the different stencil states of a material Usage example: https://playground.babylonjs.com/#CW5PRI#10

Hierarchy

  • MaterialStencilState

Implements

  • IStencilState

Index

Constructors

constructor

  • Creates a material stencil state instance

    Returns MaterialStencilState

Accessors

enabled

  • get enabled(): boolean
  • set enabled(value: boolean): any
  • Enables or disables the stencil test

    Returns boolean

  • Enables or disables the stencil test

    Parameters

    • value: boolean

    Returns any

func

  • get func(): number
  • set func(value: number): any
  • Gets or sets the stencil function

    Returns number

  • Gets or sets the stencil function

    Parameters

    • value: number

    Returns any

funcMask

  • get funcMask(): number
  • set funcMask(value: number): any
  • Gets or sets the stencil function mask

    Returns number

  • Gets or sets the stencil function mask

    Parameters

    • value: number

    Returns any

funcRef

  • get funcRef(): number
  • set funcRef(value: number): any
  • Gets or sets the stencil function reference

    Returns number

  • Gets or sets the stencil function reference

    Parameters

    • value: number

    Returns any

mask

  • get mask(): number
  • set mask(value: number): any
  • Gets or sets the stencil mask

    Returns number

  • Gets or sets the stencil mask

    Parameters

    • value: number

    Returns any

opDepthFail

  • get opDepthFail(): number
  • set opDepthFail(value: number): any
  • Gets or sets the operation when the depth test fails

    Returns number

  • Gets or sets the operation when the depth test fails

    Parameters

    • value: number

    Returns any

opStencilDepthPass

  • get opStencilDepthPass(): number
  • set opStencilDepthPass(value: number): any
  • Gets or sets the operation when the stencil+depth test succeeds

    Returns number

  • Gets or sets the operation when the stencil+depth test succeeds

    Parameters

    • value: number

    Returns any

opStencilFail

  • get opStencilFail(): number
  • set opStencilFail(value: number): any
  • Gets or sets the operation when the stencil test fails

    Returns number

  • Gets or sets the operation when the stencil test fails

    Parameters

    • value: number

    Returns any

Methods

copyToSearch playground for copyTo

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

    Parameters

    Returns void

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Get the current class name, useful for serialization or dynamic coding.

    Returns string

    "MaterialStencilState"

parseSearch playground for parse

  • parse(source: any, scene: Scene, rootUrl: string): void
  • Parses a stencil state configuration from a serialized object.

    Parameters

    • source: any

      Serialized object.

    • scene: Scene

      Defines the scene we are parsing for

    • rootUrl: string

      Defines the rootUrl to load from

    Returns void

resetSearch playground for reset

  • reset(): void
  • Resets all the stencil states to default values

    Returns void

serializeSearch playground for serialize

  • serialize(): any
  • Serializes this stencil configuration.

    Returns any

    • An object with the serialized config.

Legend

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