Function matDefineBool

  • Same as matDefine but for boolean values. It sets the value to '1' or '0'/undefined.

    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. If a string, it is used as a property name in this and called. If a function, it is called. The function is called with the following parameters: key, newVal

        • (...args): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • deleteOnFalse: boolean = false

      sets to undefined instead of '0' when false. Note deleteOnFalse doesn't work with tweakpane ui because the value will be undefined.

    Returns PropertyDecorator

Generated using TypeDoc