Function shaderReplaceString

  • Replace a string in a shader function with added options to prepend, append, show warning when not found, and replace all occurrences.

    Parameters

    • shader: string

      shader code

    • str: string | RegExp

      string to replace

    • newStr: string

      new string to replace with

    • __namedParameters: {
          append: undefined | boolean;
          prepend: undefined | boolean;
          replaceAll: undefined | boolean;
          str: undefined | string;
      } = {}
      • append: undefined | boolean
      • prepend: undefined | boolean
      • replaceAll: undefined | boolean
      • str: undefined | string

    Returns string

Generated using TypeDoc