Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: add transpose() function #1020

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
Loading