Function matDefine

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

    Parameters

    • Optionalkey: string | symbol

      define name

    • OptionalcustomDefines: 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

    • OptionalonChange: (...args: any[]) => 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.

    • OptionalprocessVal: (newVal: any) => any

      function that processes the value before setting it.

    • OptionalinvProcessVal: (val: any) => any

      function that processes the value before returning it.

    Returns PropertyDecorator