Documentation
    Preparing search index...

    Class ShaderExpression

    A handle to one node of one builder's graph-in-progress. Obtained from the builder's source methods; combined with the fluent methods below. Handles are builder-bound — mixing two builders' expressions is refused (§85).

    Index
    nodeId: number

    The node this handle names — its index in the built graph (§33).

    • Polar angle of a vec2, in radians: atan2(this.y, this.x) (§7a, RFC 0001's angle operator). Other types are refused at build (§85).

      Returns ShaderExpression

    • The Euclidean length of this (vectors only) — a float.

      Returns ShaderExpression

    • The unit vector along this (vectors only).

      Returns ShaderExpression

    • Whether this expression belongs to builder — the §85 mixing check.

      Parameters

      Returns boolean

    • Component selection — "x", "xy", "zyx", … over xyzw.

      Parameters

      • pattern: string

      Returns ShaderExpression