ThreePipe
    Preparing search index...

    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?: boolean;
            prepend?: boolean;
            replaceAll?: boolean;
            str?: string;
            warn?: boolean;
        } = {}

      Returns string