Skip to content

Commit

Permalink
TSL: add transpose() function (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Jun 18, 2024
1 parent e410e1d commit 0e3c323
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions types/three/examples/jsm/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export {
step,
tan,
transformDirection,
transpose,
trunc,
} from "./math/MathNode.js";

Expand Down
6 changes: 5 additions & 1 deletion types/three/examples/jsm/nodes/math/MathNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export type MathNodeMethod1 =
| typeof MathNode.RECIPROCAL
| typeof MathNode.TRUNC
| typeof MathNode.FWIDTH
| typeof MathNode.BITCAST;
| typeof MathNode.BITCAST
| typeof MathNode.TRANSPOSE;

export type MathNodeMethod2 =
| typeof MathNode.ATAN2
Expand Down Expand Up @@ -93,6 +94,7 @@ export default class MathNode extends TempNode {
static TRUNC: "trunc";
static FWIDTH: "fwidth";
static BITCAST: "bitcast";
static TRANSPOSE: "transpose";

// 2 inputs

Expand Down Expand Up @@ -167,6 +169,7 @@ export const reciprocal: Unary;
export const trunc: Unary;
export const fwidth: Unary;
export const bitcast: Unary;
export const transpose: Unary;

type Binary = (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<MathNode>;

Expand Down Expand Up @@ -261,5 +264,6 @@ declare module "../shadernode/ShaderNode.js" {
difference: typeof difference;
saturate: typeof saturate;
cbrt: typeof cbrt;
transpose: typeof transpose;
}
}

0 comments on commit 0e3c323

Please sign in to comment.