Function matDefine

  • Decorator to create a three.js style define in this.material or this and bind to a property. see also - matDefineBool

    Parameters

    • Optional key: string | symbol

      define name

    • Optional customDefines: any

      object for setting define value (like ShaderMaterial.defines), otherwise this.material.defines is taken

    • thisMat: boolean = false

      access this.defines instead of this.material.defines

    • Optional onChange: ((...args) => any)

      function to call when the value changes. The function is called with the following parameters: [key, newVal]. Note: needsUpdate is set to true for this/material if onChange is not provided.

        • (...args): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • Optional processVal: ((newVal) => any)

      function that processes the value before setting it.

        • (newVal): any
        • Parameters

          • newVal: any

          Returns any

    • Optional invProcessVal: ((val) => any)

      function that processes the value before returning it.

        • (val): any
        • Parameters

          • val: any

          Returns any

    Returns PropertyDecorator

Generated using TypeDoc