Skip to content

Commit

Permalink
MathNode: Add rand(). (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Jul 20, 2024
1 parent f1df8ca commit 934494b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/three/src/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export {
pow3,
pow4,
radians,
rand,
reciprocal,
reflect,
refract,
Expand Down
4 changes: 4 additions & 0 deletions types/three/src/nodes/math/MathNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Node from "../core/Node.js";
import TempNode from "../core/TempNode.js";
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
import OperatorNode from "./OperatorNode.js";

export type MathNodeMethod1 =
| typeof MathNode.RADIANS
Expand Down Expand Up @@ -204,6 +205,8 @@ export const refract: Ternary;
export const smoothstep: Ternary;
export const faceForward: Ternary;

export const rand: (uv: NodeRepresentation) => ShaderNodeObject<OperatorNode>;

export const mixElement: Ternary;
export const smoothstepElement: Ternary;

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

0 comments on commit 934494b

Please sign in to comment.