@awesome-flow/noise 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract/index.cjs +1 -3490
- package/dist/abstract/index.d.cts +2 -2
- package/dist/abstract/index.d.ts +2 -2
- package/dist/abstract/index.js +1 -3522
- package/dist/modules/index.cjs +1 -44
- package/dist/modules/index.js +1 -18
- package/dist/nodes/generators/index.cjs +1 -346
- package/dist/nodes/generators/index.d.cts +7 -7
- package/dist/nodes/generators/index.d.ts +7 -7
- package/dist/nodes/generators/index.js +1 -311
- package/dist/nodes/groups/index.cjs +1 -113
- package/dist/nodes/groups/index.d.cts +2 -2
- package/dist/nodes/groups/index.d.ts +2 -2
- package/dist/nodes/groups/index.js +1 -92
- package/dist/nodes/index.cjs +1 -3425
- package/dist/nodes/index.js +1 -3435
- package/dist/nodes/modifiers/index.cjs +1 -1478
- package/dist/nodes/modifiers/index.d.cts +6 -6
- package/dist/nodes/modifiers/index.d.ts +6 -6
- package/dist/nodes/modifiers/index.js +1 -1491
- package/dist/nodes/output/index.cjs +1 -1344
- package/dist/nodes/output/index.d.cts +3 -3
- package/dist/nodes/output/index.d.ts +3 -3
- package/dist/nodes/output/index.js +1 -1368
- package/dist/nodes/selectors/index.cjs +1 -1322
- package/dist/nodes/selectors/index.d.cts +1 -1
- package/dist/nodes/selectors/index.d.ts +1 -1
- package/dist/nodes/selectors/index.js +1 -1348
- package/dist/nodes/transformers/index.cjs +1 -337
- package/dist/nodes/transformers/index.d.cts +5 -5
- package/dist/nodes/transformers/index.d.ts +5 -5
- package/dist/nodes/transformers/index.js +1 -319
- package/dist/templates/generators/index.cjs +1 -1221
- package/dist/templates/generators/index.d.cts +5 -5
- package/dist/templates/generators/index.d.ts +5 -5
- package/dist/templates/generators/index.js +1 -1239
- package/dist/templates/groups/index.cjs +1 -1203
- package/dist/templates/groups/index.js +1 -1230
- package/dist/templates/index.cjs +1 -1263
- package/dist/templates/index.js +1 -1260
- package/dist/templates/modifiers/index.cjs +1 -1219
- package/dist/templates/modifiers/index.d.cts +9 -9
- package/dist/templates/modifiers/index.d.ts +9 -9
- package/dist/templates/modifiers/index.js +1 -1238
- package/dist/templates/output/index.cjs +1 -1209
- package/dist/templates/output/index.d.cts +3 -3
- package/dist/templates/output/index.d.ts +3 -3
- package/dist/templates/output/index.js +1 -1233
- package/dist/templates/selectors/index.cjs +1 -1205
- package/dist/templates/selectors/index.js +1 -1231
- package/dist/templates/transformers/index.cjs +1 -1211
- package/dist/templates/transformers/index.js +1 -1234
- package/package.json +9 -7
|
@@ -1,1368 +1 @@
|
|
|
1
|
-
// src/nodes/output/noise-logger-node.tsx
|
|
2
|
-
import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { Divider, Stack, Text } from "@mantine/core";
|
|
5
|
-
import { useIncomingComputedData } from "@awesome-flow/core/hooks";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
function NoiseLoggerNode({ id, selected, data, type }) {
|
|
8
|
-
const incoming = useIncomingComputedData(id);
|
|
9
|
-
const noise = useMemo(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
10
|
-
return /* @__PURE__ */ jsxs(NodeContainer, { id, selected, data, type, children: [
|
|
11
|
-
/* @__PURE__ */ jsxs(Text, { children: [
|
|
12
|
-
"Size: ",
|
|
13
|
-
noise?.length || 0
|
|
14
|
-
] }),
|
|
15
|
-
/* @__PURE__ */ jsx(Divider, { h: 5 }),
|
|
16
|
-
/* @__PURE__ */ jsx(Stack, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
17
|
-
v.position?.x,
|
|
18
|
-
":",
|
|
19
|
-
v.position?.y,
|
|
20
|
-
":",
|
|
21
|
-
v.position?.z,
|
|
22
|
-
": ",
|
|
23
|
-
v.value
|
|
24
|
-
] }, i)) }),
|
|
25
|
-
/* @__PURE__ */ jsx(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
26
|
-
] });
|
|
27
|
-
}
|
|
28
|
-
var noise_logger_node_default = NoiseLoggerNode;
|
|
29
|
-
|
|
30
|
-
// src/nodes/output/noise-output-node.tsx
|
|
31
|
-
import { NodeContainer as NodeContainer31, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
|
|
32
|
-
import { useCallback as useCallback15, useState as useState16 } from "react";
|
|
33
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
|
|
34
|
-
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus4 } from "@awesome-flow/core/components";
|
|
35
|
-
import { Text as Text3 } from "@mantine/core";
|
|
36
|
-
|
|
37
|
-
// src/nodes/generators/position-const-node.tsx
|
|
38
|
-
import { NodeContainer as NodeContainer2 } from "@awesome-flow/core/layout";
|
|
39
|
-
import { useEffect, useState } from "react";
|
|
40
|
-
import { Group, NumberInput, Stack as Stack2 } from "@mantine/core";
|
|
41
|
-
import { useUpdateNodeComputedData, useUpdateNodeData } from "@awesome-flow/core/hooks";
|
|
42
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
43
|
-
|
|
44
|
-
// src/nodes/generators/position-grid-node.tsx
|
|
45
|
-
import { NodeContainer as NodeContainer3 } from "@awesome-flow/core/layout";
|
|
46
|
-
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
47
|
-
import { Group as Group2, NumberInput as NumberInput2, Stack as Stack3 } from "@mantine/core";
|
|
48
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData2, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
|
|
49
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
50
|
-
|
|
51
|
-
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
52
|
-
import { NodeContainer as NodeContainer4, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
|
|
53
|
-
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
54
|
-
import { Group as Group3, NumberInput as NumberInput3, Stack as Stack4 } from "@mantine/core";
|
|
55
|
-
import {
|
|
56
|
-
useIncomingComputedData as useIncomingComputedData2,
|
|
57
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData3,
|
|
58
|
-
useUpdateNodeData as useUpdateNodeData3
|
|
59
|
-
} from "@awesome-flow/core/hooks";
|
|
60
|
-
|
|
61
|
-
// src/modules/normalize-noise-module.ts
|
|
62
|
-
import { ModifierModule } from "libnoise-simplex-ts";
|
|
63
|
-
|
|
64
|
-
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
65
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
66
|
-
|
|
67
|
-
// src/nodes/generators/noise-const-node.tsx
|
|
68
|
-
import { NodeContainer as NodeContainer5 } from "@awesome-flow/core/layout";
|
|
69
|
-
import { useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
|
|
70
|
-
import { Group as Group4, NumberInput as NumberInput4, Stack as Stack5 } from "@mantine/core";
|
|
71
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData4, useUpdateNodeData as useUpdateNodeData4 } from "@awesome-flow/core/hooks";
|
|
72
|
-
import { Const } from "libnoise-simplex-ts";
|
|
73
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
74
|
-
|
|
75
|
-
// src/nodes/generators/noise-billow-node.tsx
|
|
76
|
-
import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
|
|
77
|
-
import { useCallback, useMemo as useMemo3 } from "react";
|
|
78
|
-
import { Billow } from "libnoise-simplex-ts";
|
|
79
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData5 } from "@awesome-flow/core/hooks";
|
|
80
|
-
import { NodePropertyVariables } from "@awesome-flow/core/components";
|
|
81
|
-
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
82
|
-
|
|
83
|
-
// src/nodes/output/noise-raw-texture-node.tsx
|
|
84
|
-
import { NodeContainer as NodeContainer7, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
|
|
85
|
-
import { useEffect as useEffect5, useMemo as useMemo4, useState as useState5 } from "react";
|
|
86
|
-
import { useIncomingComputedData as useIncomingComputedData3, useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
|
|
87
|
-
import { Group as Group5, Stack as Stack6 } from "@mantine/core";
|
|
88
|
-
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
89
|
-
function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
90
|
-
const updateComputedData = useUpdateNodeComputedData6();
|
|
91
|
-
const [dataLength, setDataLength] = useState5(0);
|
|
92
|
-
const [resolution, setResolution] = useState5(0);
|
|
93
|
-
const incoming = useIncomingComputedData3(id);
|
|
94
|
-
const noise = useMemo4(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
95
|
-
useEffect5(() => {
|
|
96
|
-
if (noise?.length) {
|
|
97
|
-
const size = Math.ceil(Math.sqrt(noise.length));
|
|
98
|
-
const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
|
|
99
|
-
const dataArray = new Uint8Array(size * size * 4);
|
|
100
|
-
dataArray.set(colors);
|
|
101
|
-
setResolution(size);
|
|
102
|
-
setDataLength(dataArray.length);
|
|
103
|
-
updateComputedData(id, {
|
|
104
|
-
textureData: dataArray,
|
|
105
|
-
textureResolutionX: size,
|
|
106
|
-
textureResolutionY: size
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}, [noise]);
|
|
110
|
-
return /* @__PURE__ */ jsxs7(NodeContainer7, { id, selected, data, type, children: [
|
|
111
|
-
/* @__PURE__ */ jsxs7(Stack6, { children: [
|
|
112
|
-
/* @__PURE__ */ jsxs7(Group5, { children: [
|
|
113
|
-
"Resolution: ",
|
|
114
|
-
resolution,
|
|
115
|
-
"x",
|
|
116
|
-
resolution
|
|
117
|
-
] }),
|
|
118
|
-
/* @__PURE__ */ jsxs7(Group5, { children: [
|
|
119
|
-
"Input Length: ",
|
|
120
|
-
noise?.length || 0
|
|
121
|
-
] }),
|
|
122
|
-
/* @__PURE__ */ jsxs7(Group5, { children: [
|
|
123
|
-
"Output Length (",
|
|
124
|
-
resolution,
|
|
125
|
-
"*",
|
|
126
|
-
resolution,
|
|
127
|
-
"*4): ",
|
|
128
|
-
dataLength
|
|
129
|
-
] })
|
|
130
|
-
] }),
|
|
131
|
-
/* @__PURE__ */ jsx7(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
|
|
132
|
-
] });
|
|
133
|
-
}
|
|
134
|
-
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
135
|
-
|
|
136
|
-
// src/nodes/generators/noise-checkerboard-node.tsx
|
|
137
|
-
import { NodeContainer as NodeContainer8 } from "@awesome-flow/core/layout";
|
|
138
|
-
import { useEffect as useEffect6, useMemo as useMemo5 } from "react";
|
|
139
|
-
import { Checkerboard } from "libnoise-simplex-ts";
|
|
140
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
|
|
141
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
142
|
-
|
|
143
|
-
// src/nodes/output/positions-logger-node.tsx
|
|
144
|
-
import { NodeContainer as NodeContainer9, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
|
|
145
|
-
import { useMemo as useMemo6 } from "react";
|
|
146
|
-
import { Divider as Divider2, Stack as Stack7, Text as Text2 } from "@mantine/core";
|
|
147
|
-
import { useIncomingComputedData as useIncomingComputedData4 } from "@awesome-flow/core/hooks";
|
|
148
|
-
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
149
|
-
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
150
|
-
const incoming = useIncomingComputedData4(id);
|
|
151
|
-
const positions = useMemo6(() => {
|
|
152
|
-
return incoming?.map((p) => p.positions).flat();
|
|
153
|
-
}, [incoming]);
|
|
154
|
-
return /* @__PURE__ */ jsxs8(NodeContainer9, { id, selected, data, type, children: [
|
|
155
|
-
/* @__PURE__ */ jsxs8(Text2, { children: [
|
|
156
|
-
"Size: ",
|
|
157
|
-
positions?.length || 0
|
|
158
|
-
] }),
|
|
159
|
-
/* @__PURE__ */ jsx9(Divider2, { h: 5 }),
|
|
160
|
-
/* @__PURE__ */ jsx9(Stack7, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs8(Text2, { children: [
|
|
161
|
-
v.x,
|
|
162
|
-
":",
|
|
163
|
-
v.y,
|
|
164
|
-
":",
|
|
165
|
-
v.z
|
|
166
|
-
] }, i)) }),
|
|
167
|
-
/* @__PURE__ */ jsx9(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
|
|
168
|
-
] });
|
|
169
|
-
}
|
|
170
|
-
var positions_logger_node_default = PositionsLoggerNode;
|
|
171
|
-
|
|
172
|
-
// src/nodes/generators/noise-cylinders-node.tsx
|
|
173
|
-
import { NodeContainer as NodeContainer10, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
|
|
174
|
-
import { useCallback as useCallback2, useMemo as useMemo7 } from "react";
|
|
175
|
-
import { Cylinders } from "libnoise-simplex-ts";
|
|
176
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData8 } from "@awesome-flow/core/hooks";
|
|
177
|
-
import { NodePropertyVariables as NodePropertyVariables2 } from "@awesome-flow/core/components";
|
|
178
|
-
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
179
|
-
|
|
180
|
-
// src/nodes/generators/noise-perlin-node.tsx
|
|
181
|
-
import { NodeContainer as NodeContainer11, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
|
|
182
|
-
import { useCallback as useCallback3, useMemo as useMemo8 } from "react";
|
|
183
|
-
import { Perlin } from "libnoise-simplex-ts";
|
|
184
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData9 } from "@awesome-flow/core/hooks";
|
|
185
|
-
import { NodePropertyVariables as NodePropertyVariables3 } from "@awesome-flow/core/components";
|
|
186
|
-
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
187
|
-
|
|
188
|
-
// src/nodes/generators/noise-ridgedmulti-node.tsx
|
|
189
|
-
import { NodeContainer as NodeContainer12, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
|
|
190
|
-
import { useCallback as useCallback4, useMemo as useMemo9 } from "react";
|
|
191
|
-
import { RidgedMulti } from "libnoise-simplex-ts";
|
|
192
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData10 } from "@awesome-flow/core/hooks";
|
|
193
|
-
import { NodePropertyVariables as NodePropertyVariables4 } from "@awesome-flow/core/components";
|
|
194
|
-
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
195
|
-
|
|
196
|
-
// src/nodes/generators/noise-spheres-node.tsx
|
|
197
|
-
import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
|
|
198
|
-
import { useCallback as useCallback5, useMemo as useMemo10 } from "react";
|
|
199
|
-
import { Spheres } from "libnoise-simplex-ts";
|
|
200
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData11 } from "@awesome-flow/core/hooks";
|
|
201
|
-
import { NodePropertyVariables as NodePropertyVariables5 } from "@awesome-flow/core/components";
|
|
202
|
-
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
203
|
-
|
|
204
|
-
// src/nodes/generators/noise-voronoi-node.tsx
|
|
205
|
-
import { NodeContainer as NodeContainer14, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
|
|
206
|
-
import { useCallback as useCallback6 } from "react";
|
|
207
|
-
import { Voronoi } from "libnoise-simplex-ts";
|
|
208
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
|
|
209
|
-
import { NodePropertyVariables as NodePropertyVariables6 } from "@awesome-flow/core/components";
|
|
210
|
-
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
211
|
-
|
|
212
|
-
// src/nodes/modifiers/noise-combine-node.tsx
|
|
213
|
-
import { NodeCombobox, NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
|
|
214
|
-
import { useCallback as useCallback7, useEffect as useEffect7 } from "react";
|
|
215
|
-
import {
|
|
216
|
-
useIncomingComputedData as useIncomingComputedData5,
|
|
217
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData13,
|
|
218
|
-
useUpdateNodeData as useUpdateNodeData5
|
|
219
|
-
} from "@awesome-flow/core/hooks";
|
|
220
|
-
import {
|
|
221
|
-
IconAsterisk,
|
|
222
|
-
IconChevronLeft,
|
|
223
|
-
IconChevronRight,
|
|
224
|
-
IconChevronUp,
|
|
225
|
-
IconPlus
|
|
226
|
-
} from "@tabler/icons-react";
|
|
227
|
-
|
|
228
|
-
// src/abstract/operations.ts
|
|
229
|
-
import { Add, Max, Min, Multiply, Power } from "libnoise-simplex-ts";
|
|
230
|
-
|
|
231
|
-
// src/nodes/modifiers/noise-combine-node.tsx
|
|
232
|
-
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
233
|
-
|
|
234
|
-
// src/nodes/modifiers/noise-clamp-node.tsx
|
|
235
|
-
import { NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
|
|
236
|
-
import { useEffect as useEffect8, useState as useState6 } from "react";
|
|
237
|
-
import { Group as Group6, NumberInput as NumberInput5, Stack as Stack8 } from "@mantine/core";
|
|
238
|
-
import {
|
|
239
|
-
useIncomingComputedData as useIncomingComputedData6,
|
|
240
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData14,
|
|
241
|
-
useUpdateNodeData as useUpdateNodeData6
|
|
242
|
-
} from "@awesome-flow/core/hooks";
|
|
243
|
-
import { Clamp } from "libnoise-simplex-ts";
|
|
244
|
-
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
245
|
-
|
|
246
|
-
// src/nodes/modifiers/noise-abs-node.tsx
|
|
247
|
-
import { NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
|
|
248
|
-
import { useEffect as useEffect9 } from "react";
|
|
249
|
-
import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData15 } from "@awesome-flow/core/hooks";
|
|
250
|
-
import { Abs } from "libnoise-simplex-ts";
|
|
251
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
252
|
-
|
|
253
|
-
// src/nodes/modifiers/noise-curve-node.tsx
|
|
254
|
-
import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
|
|
255
|
-
import { ActionIcon, Button, Group as Group7, NumberInput as NumberInput6, Space } from "@mantine/core";
|
|
256
|
-
import {
|
|
257
|
-
useIncomingComputedData as useIncomingComputedData8,
|
|
258
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData16,
|
|
259
|
-
useUpdateNodeData as useUpdateNodeData7
|
|
260
|
-
} from "@awesome-flow/core/hooks";
|
|
261
|
-
import { useCallback as useCallback8, useEffect as useEffect10, useState as useState7 } from "react";
|
|
262
|
-
import { Curve, Tuple } from "libnoise-simplex-ts";
|
|
263
|
-
import { IconX } from "@tabler/icons-react";
|
|
264
|
-
import { randomId } from "@mantine/hooks";
|
|
265
|
-
import { NodeState } from "@awesome-flow/core/abstract";
|
|
266
|
-
import { Fragment, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
267
|
-
|
|
268
|
-
// src/nodes/modifiers/noise-exponent-node.tsx
|
|
269
|
-
import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
|
|
270
|
-
import { useEffect as useEffect11, useState as useState8 } from "react";
|
|
271
|
-
import { Group as Group8, NumberInput as NumberInput7, Stack as Stack9 } from "@mantine/core";
|
|
272
|
-
import {
|
|
273
|
-
useIncomingComputedData as useIncomingComputedData9,
|
|
274
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData17,
|
|
275
|
-
useUpdateNodeData as useUpdateNodeData8
|
|
276
|
-
} from "@awesome-flow/core/hooks";
|
|
277
|
-
import { Exponent } from "libnoise-simplex-ts";
|
|
278
|
-
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
279
|
-
|
|
280
|
-
// src/nodes/modifiers/noise-invert-node.tsx
|
|
281
|
-
import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
|
|
282
|
-
import { useEffect as useEffect12 } from "react";
|
|
283
|
-
import { useIncomingComputedData as useIncomingComputedData10, useUpdateNodeComputedData as useUpdateNodeComputedData18 } from "@awesome-flow/core/hooks";
|
|
284
|
-
import { Invert } from "libnoise-simplex-ts";
|
|
285
|
-
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
286
|
-
|
|
287
|
-
// src/nodes/modifiers/noise-scale-bias-node.tsx
|
|
288
|
-
import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
|
|
289
|
-
import { useEffect as useEffect13, useState as useState9 } from "react";
|
|
290
|
-
import { Group as Group9, NumberInput as NumberInput8, Stack as Stack10 } from "@mantine/core";
|
|
291
|
-
import {
|
|
292
|
-
useIncomingComputedData as useIncomingComputedData11,
|
|
293
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData19,
|
|
294
|
-
useUpdateNodeData as useUpdateNodeData9
|
|
295
|
-
} from "@awesome-flow/core/hooks";
|
|
296
|
-
import { ScaleBias } from "libnoise-simplex-ts";
|
|
297
|
-
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
298
|
-
|
|
299
|
-
// src/nodes/modifiers/noise-terrace-node.tsx
|
|
300
|
-
import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
|
|
301
|
-
import { ActionIcon as ActionIcon2, Button as Button2, Group as Group10, NumberInput as NumberInput9, Space as Space2 } from "@mantine/core";
|
|
302
|
-
import {
|
|
303
|
-
useIncomingComputedData as useIncomingComputedData12,
|
|
304
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData20,
|
|
305
|
-
useUpdateNodeData as useUpdateNodeData10
|
|
306
|
-
} from "@awesome-flow/core/hooks";
|
|
307
|
-
import { useCallback as useCallback9, useEffect as useEffect14, useState as useState10 } from "react";
|
|
308
|
-
import { Terrace } from "libnoise-simplex-ts";
|
|
309
|
-
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
310
|
-
import { randomId as randomId2 } from "@mantine/hooks";
|
|
311
|
-
import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
|
|
312
|
-
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
313
|
-
|
|
314
|
-
// src/nodes/selectors/noise-blend-node.tsx
|
|
315
|
-
import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
|
|
316
|
-
import { useCallback as useCallback10 } from "react";
|
|
317
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData21 } from "@awesome-flow/core/hooks";
|
|
318
|
-
import { Blend } from "libnoise-simplex-ts";
|
|
319
|
-
import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
|
|
320
|
-
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
321
|
-
|
|
322
|
-
// src/nodes/selectors/noise-select-node.tsx
|
|
323
|
-
import { NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
|
|
324
|
-
import { useCallback as useCallback11, useEffect as useEffect15, useState as useState11 } from "react";
|
|
325
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData22, useUpdateNodeData as useUpdateNodeData11 } from "@awesome-flow/core/hooks";
|
|
326
|
-
import { Select } from "libnoise-simplex-ts";
|
|
327
|
-
import { Group as Group11, NumberInput as NumberInput10, Stack as Stack11 } from "@mantine/core";
|
|
328
|
-
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
|
|
329
|
-
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
330
|
-
|
|
331
|
-
// src/nodes/transformers/noise-displace-node.tsx
|
|
332
|
-
import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
|
|
333
|
-
import { useCallback as useCallback12 } from "react";
|
|
334
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData23 } from "@awesome-flow/core/hooks";
|
|
335
|
-
import { Displace } from "libnoise-simplex-ts";
|
|
336
|
-
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
|
|
337
|
-
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
338
|
-
|
|
339
|
-
// src/nodes/transformers/noise-rotate-point-node.tsx
|
|
340
|
-
import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
|
|
341
|
-
import { useEffect as useEffect16, useState as useState12 } from "react";
|
|
342
|
-
import {
|
|
343
|
-
useIncomingComputedData as useIncomingComputedData13,
|
|
344
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData24,
|
|
345
|
-
useUpdateNodeData as useUpdateNodeData12
|
|
346
|
-
} from "@awesome-flow/core/hooks";
|
|
347
|
-
import { Group as Group12, NumberInput as NumberInput11, Stack as Stack12 } from "@mantine/core";
|
|
348
|
-
import { RotatePoint } from "libnoise-simplex-ts";
|
|
349
|
-
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
350
|
-
|
|
351
|
-
// src/nodes/transformers/noise-scale-point-node.tsx
|
|
352
|
-
import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
|
|
353
|
-
import { useEffect as useEffect17, useState as useState13 } from "react";
|
|
354
|
-
import {
|
|
355
|
-
useIncomingComputedData as useIncomingComputedData14,
|
|
356
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData25,
|
|
357
|
-
useUpdateNodeData as useUpdateNodeData13
|
|
358
|
-
} from "@awesome-flow/core/hooks";
|
|
359
|
-
import { Group as Group13, NumberInput as NumberInput12, Stack as Stack13 } from "@mantine/core";
|
|
360
|
-
import { ScalePoint } from "libnoise-simplex-ts";
|
|
361
|
-
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
362
|
-
|
|
363
|
-
// src/nodes/transformers/noise-translate-point-node.tsx
|
|
364
|
-
import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
|
|
365
|
-
import { useEffect as useEffect18, useState as useState14 } from "react";
|
|
366
|
-
import {
|
|
367
|
-
useIncomingComputedData as useIncomingComputedData15,
|
|
368
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData26,
|
|
369
|
-
useUpdateNodeData as useUpdateNodeData14
|
|
370
|
-
} from "@awesome-flow/core/hooks";
|
|
371
|
-
import { Group as Group14, NumberInput as NumberInput13, Stack as Stack14 } from "@mantine/core";
|
|
372
|
-
import { TranslatePoint } from "libnoise-simplex-ts";
|
|
373
|
-
import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
374
|
-
|
|
375
|
-
// src/nodes/transformers/noise-turbulence-node .tsx
|
|
376
|
-
import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
|
|
377
|
-
import { useCallback as useCallback13, useEffect as useEffect19, useState as useState15 } from "react";
|
|
378
|
-
import { useIncomingComputedData as useIncomingComputedData16, useUpdateNodeComputedData as useUpdateNodeComputedData27 } from "@awesome-flow/core/hooks";
|
|
379
|
-
import { Turbulence } from "libnoise-simplex-ts";
|
|
380
|
-
import { NodePropertyVariables as NodePropertyVariables7 } from "@awesome-flow/core/components";
|
|
381
|
-
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
382
|
-
|
|
383
|
-
// src/templates/generators/noise-checkerboard-template.ts
|
|
384
|
-
import { Position } from "@xyflow/system";
|
|
385
|
-
var NoiseCheckerboardNodeTemplateFactory = class {
|
|
386
|
-
template = {
|
|
387
|
-
type: "noise-checkerboard" /* noiseCheckerboard */,
|
|
388
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
389
|
-
data: {
|
|
390
|
-
title: "Checkerboard Noise"
|
|
391
|
-
},
|
|
392
|
-
handles: [
|
|
393
|
-
{
|
|
394
|
-
position: Position.Right,
|
|
395
|
-
dataType: "module" /* module */,
|
|
396
|
-
connection: "source"
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
// src/templates/generators/noise-const-template.ts
|
|
403
|
-
import { Position as Position2 } from "@xyflow/system";
|
|
404
|
-
var NoiseConstNodeTemplateFactory = class {
|
|
405
|
-
template = {
|
|
406
|
-
type: "noise-constant" /* noiseConst */,
|
|
407
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
408
|
-
data: {
|
|
409
|
-
title: "Const Value Noise",
|
|
410
|
-
noise: 0,
|
|
411
|
-
min: -1,
|
|
412
|
-
max: 1
|
|
413
|
-
},
|
|
414
|
-
handles: [
|
|
415
|
-
{
|
|
416
|
-
position: Position2.Right,
|
|
417
|
-
dataType: "module" /* module */,
|
|
418
|
-
connection: "source"
|
|
419
|
-
}
|
|
420
|
-
]
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
// src/templates/generators/noise-cylinders-template.ts
|
|
425
|
-
import { CoreHandleType } from "@awesome-flow/core/abstract";
|
|
426
|
-
import { Position as Position3 } from "@xyflow/system";
|
|
427
|
-
var NoiseCylindersNodeTemplateFactory = class {
|
|
428
|
-
template = {
|
|
429
|
-
type: "noise-cylinders" /* noiseCylinders */,
|
|
430
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
431
|
-
data: {
|
|
432
|
-
title: "Cylinders Noise",
|
|
433
|
-
frequency: 0.1
|
|
434
|
-
},
|
|
435
|
-
handles: [
|
|
436
|
-
{
|
|
437
|
-
position: Position3.Left,
|
|
438
|
-
dataType: CoreHandleType.variableProperty,
|
|
439
|
-
connection: "target"
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
position: Position3.Right,
|
|
443
|
-
dataType: "module" /* module */,
|
|
444
|
-
connection: "source"
|
|
445
|
-
}
|
|
446
|
-
]
|
|
447
|
-
};
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
// src/templates/generators/noise-perlin-template.ts
|
|
451
|
-
import { CoreHandleType as CoreHandleType2 } from "@awesome-flow/core/abstract";
|
|
452
|
-
import { Position as Position4 } from "@xyflow/system";
|
|
453
|
-
var NoisePerlinNodeTemplateFactory = class {
|
|
454
|
-
template = {
|
|
455
|
-
type: "noise-perlin" /* noisePerlin */,
|
|
456
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
457
|
-
data: {
|
|
458
|
-
title: "Perlin Noise",
|
|
459
|
-
frequency: 0.1,
|
|
460
|
-
lacunarity: 2,
|
|
461
|
-
octaves: 5,
|
|
462
|
-
persistence: 0.5,
|
|
463
|
-
seed: 0
|
|
464
|
-
},
|
|
465
|
-
handles: [
|
|
466
|
-
{
|
|
467
|
-
position: Position4.Left,
|
|
468
|
-
dataType: CoreHandleType2.variableProperty,
|
|
469
|
-
connection: "target"
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
position: Position4.Right,
|
|
473
|
-
dataType: "module" /* module */,
|
|
474
|
-
connection: "source"
|
|
475
|
-
}
|
|
476
|
-
]
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
// src/templates/generators/noise-ridgedmulti-template.ts
|
|
481
|
-
import { CoreHandleType as CoreHandleType3 } from "@awesome-flow/core/abstract";
|
|
482
|
-
import { Position as Position5 } from "@xyflow/system";
|
|
483
|
-
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
484
|
-
template = {
|
|
485
|
-
type: "noise-ridged-multi" /* noiseRidgedMulti */,
|
|
486
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
487
|
-
data: {
|
|
488
|
-
title: "Ridged Multi Noise",
|
|
489
|
-
frequency: 0.1,
|
|
490
|
-
lacunarity: 2,
|
|
491
|
-
octaves: 6,
|
|
492
|
-
offset: 1,
|
|
493
|
-
gain: 2,
|
|
494
|
-
seed: 0
|
|
495
|
-
},
|
|
496
|
-
handles: [
|
|
497
|
-
{
|
|
498
|
-
position: Position5.Left,
|
|
499
|
-
dataType: CoreHandleType3.variableProperty,
|
|
500
|
-
connection: "target"
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
position: Position5.Right,
|
|
504
|
-
dataType: "module" /* module */,
|
|
505
|
-
connection: "source"
|
|
506
|
-
}
|
|
507
|
-
]
|
|
508
|
-
};
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// src/templates/generators/noise-spheres-template.ts
|
|
512
|
-
import { CoreHandleType as CoreHandleType4 } from "@awesome-flow/core/abstract";
|
|
513
|
-
import { Position as Position6 } from "@xyflow/system";
|
|
514
|
-
var NoiseSpheresNodeTemplateFactory = class {
|
|
515
|
-
template = {
|
|
516
|
-
type: "noise-spheres" /* noiseSpheres */,
|
|
517
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
518
|
-
data: {
|
|
519
|
-
title: "Spheres Noise",
|
|
520
|
-
frequency: 0.1
|
|
521
|
-
},
|
|
522
|
-
handles: [
|
|
523
|
-
{
|
|
524
|
-
position: Position6.Left,
|
|
525
|
-
dataType: CoreHandleType4.variableProperty,
|
|
526
|
-
connection: "target"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
position: Position6.Right,
|
|
530
|
-
dataType: "module" /* module */,
|
|
531
|
-
connection: "source"
|
|
532
|
-
}
|
|
533
|
-
]
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
// src/templates/generators/noise-voronoi-template.ts
|
|
538
|
-
import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
|
|
539
|
-
import { Position as Position7 } from "@xyflow/system";
|
|
540
|
-
var NoiseVoronoiNodeTemplateFactory = class {
|
|
541
|
-
template = {
|
|
542
|
-
type: "noise-voronoi" /* noiseVoronoi */,
|
|
543
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
544
|
-
data: {
|
|
545
|
-
title: "Voronoi Noise",
|
|
546
|
-
frequency: 0.1,
|
|
547
|
-
displacement: 1,
|
|
548
|
-
distance: true,
|
|
549
|
-
seed: 0
|
|
550
|
-
},
|
|
551
|
-
handles: [
|
|
552
|
-
{
|
|
553
|
-
position: Position7.Left,
|
|
554
|
-
dataType: CoreHandleType5.variableProperty,
|
|
555
|
-
connection: "target"
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
position: Position7.Right,
|
|
559
|
-
dataType: "module" /* module */,
|
|
560
|
-
connection: "source"
|
|
561
|
-
}
|
|
562
|
-
]
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
|
-
|
|
566
|
-
// src/templates/generators/position-const-template.ts
|
|
567
|
-
import { Position as Position8 } from "@xyflow/system";
|
|
568
|
-
var PositionConstNodeTemplateFactory = class {
|
|
569
|
-
template = {
|
|
570
|
-
type: "position" /* position */,
|
|
571
|
-
group: "Positions" /* positions */,
|
|
572
|
-
data: {
|
|
573
|
-
title: "Position Output",
|
|
574
|
-
position: { x: 0, y: 0, z: 0 }
|
|
575
|
-
},
|
|
576
|
-
handles: [
|
|
577
|
-
{
|
|
578
|
-
position: Position8.Right,
|
|
579
|
-
dataType: "position" /* position */,
|
|
580
|
-
connection: "source"
|
|
581
|
-
}
|
|
582
|
-
]
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
// src/templates/generators/position-grid-template.ts
|
|
587
|
-
import { Position as Position9 } from "@xyflow/system";
|
|
588
|
-
var PositionGridNodeTemplateFactory = class {
|
|
589
|
-
template = {
|
|
590
|
-
type: "grid" /* grid */,
|
|
591
|
-
group: "Positions" /* positions */,
|
|
592
|
-
data: {
|
|
593
|
-
title: "Grid Output",
|
|
594
|
-
center: { x: 0, y: 0, z: 0 },
|
|
595
|
-
radius: 1
|
|
596
|
-
},
|
|
597
|
-
handles: [
|
|
598
|
-
{
|
|
599
|
-
position: Position9.Right,
|
|
600
|
-
dataType: "position" /* position */,
|
|
601
|
-
connection: "source"
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
};
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
// src/templates/modifiers/noise-normalize-template.ts
|
|
608
|
-
import { IDGenerator } from "@awesome-flow/core/utils";
|
|
609
|
-
import { Position as Position10 } from "@xyflow/system";
|
|
610
|
-
var NoiseNormalizeNodeTemplateFactory = class {
|
|
611
|
-
template = {
|
|
612
|
-
id: IDGenerator.template(),
|
|
613
|
-
type: "noise-normalize" /* noiseNormalize */,
|
|
614
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
615
|
-
data: {
|
|
616
|
-
title: "Normalize Noise",
|
|
617
|
-
intervalStart: -1,
|
|
618
|
-
intervalEnd: 1
|
|
619
|
-
},
|
|
620
|
-
handles: [
|
|
621
|
-
{
|
|
622
|
-
position: Position10.Left,
|
|
623
|
-
dataType: "module" /* module */,
|
|
624
|
-
connection: "target",
|
|
625
|
-
maxConnections: 1
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
position: Position10.Right,
|
|
629
|
-
dataType: "module" /* module */,
|
|
630
|
-
connection: "source"
|
|
631
|
-
}
|
|
632
|
-
]
|
|
633
|
-
};
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
// src/templates/output/noise-logger-template.ts
|
|
637
|
-
import { Position as Position11 } from "@xyflow/system";
|
|
638
|
-
var NoiseLoggerNodeTemplateFactory = class {
|
|
639
|
-
template = {
|
|
640
|
-
type: "noise-logger" /* noiseLogger */,
|
|
641
|
-
group: "Output" /* output */,
|
|
642
|
-
data: {
|
|
643
|
-
title: "Noise Logger"
|
|
644
|
-
},
|
|
645
|
-
handles: [
|
|
646
|
-
{
|
|
647
|
-
position: Position11.Left,
|
|
648
|
-
dataType: "noise" /* noise */,
|
|
649
|
-
connection: "target"
|
|
650
|
-
}
|
|
651
|
-
]
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
// src/templates/output/noise-raw-texture-template.ts
|
|
656
|
-
import { Position as Position12 } from "@xyflow/system";
|
|
657
|
-
var NoiseRawTextureTemplateFactory = class {
|
|
658
|
-
template = {
|
|
659
|
-
type: "texture-data" /* textureData */,
|
|
660
|
-
group: "Output" /* output */,
|
|
661
|
-
data: {
|
|
662
|
-
title: "Texture Data"
|
|
663
|
-
},
|
|
664
|
-
handles: [
|
|
665
|
-
{
|
|
666
|
-
position: Position12.Left,
|
|
667
|
-
dataType: "noise" /* noise */,
|
|
668
|
-
connection: "target",
|
|
669
|
-
maxConnections: 1
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
position: Position12.Right,
|
|
673
|
-
dataType: "texture" /* texture */,
|
|
674
|
-
connection: "source"
|
|
675
|
-
}
|
|
676
|
-
]
|
|
677
|
-
};
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
// src/templates/output/position-logger-template.ts
|
|
681
|
-
import { Position as Position13 } from "@xyflow/system";
|
|
682
|
-
var PositionLoggerNodeTemplateFactory = class {
|
|
683
|
-
template = {
|
|
684
|
-
type: "position-logger" /* positionLogger */,
|
|
685
|
-
group: "Positions" /* positions */,
|
|
686
|
-
data: {
|
|
687
|
-
title: "Position Logger"
|
|
688
|
-
},
|
|
689
|
-
handles: [
|
|
690
|
-
{
|
|
691
|
-
position: Position13.Left,
|
|
692
|
-
dataType: "position" /* position */,
|
|
693
|
-
connection: "target"
|
|
694
|
-
}
|
|
695
|
-
]
|
|
696
|
-
};
|
|
697
|
-
};
|
|
698
|
-
|
|
699
|
-
// src/templates/modifiers/noise-combine-template.ts
|
|
700
|
-
import { Position as Position14 } from "@xyflow/system";
|
|
701
|
-
var NoiseCombineNodeTemplateFactory = class {
|
|
702
|
-
template = {
|
|
703
|
-
type: "noise-combiner" /* noiseCombine */,
|
|
704
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
705
|
-
data: {
|
|
706
|
-
title: "Combine Noise",
|
|
707
|
-
operation: "add" /* add */
|
|
708
|
-
},
|
|
709
|
-
handles: [
|
|
710
|
-
{
|
|
711
|
-
position: Position14.Left,
|
|
712
|
-
dataType: "module" /* module */,
|
|
713
|
-
connection: "target",
|
|
714
|
-
maxConnections: 2
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
position: Position14.Right,
|
|
718
|
-
dataType: "module" /* module */,
|
|
719
|
-
connection: "source"
|
|
720
|
-
}
|
|
721
|
-
]
|
|
722
|
-
};
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
// src/templates/modifiers/noise-clamp-template.ts
|
|
726
|
-
import { Position as Position15 } from "@xyflow/system";
|
|
727
|
-
var NoiseClampNodeTemplateFactory = class {
|
|
728
|
-
template = {
|
|
729
|
-
type: "noise-clamp" /* noiseClamp */,
|
|
730
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
731
|
-
data: {
|
|
732
|
-
title: "Clamp Noise",
|
|
733
|
-
lowerBound: -1,
|
|
734
|
-
upperBound: 1
|
|
735
|
-
},
|
|
736
|
-
handles: [
|
|
737
|
-
{
|
|
738
|
-
position: Position15.Left,
|
|
739
|
-
dataType: "module" /* module */,
|
|
740
|
-
connection: "target",
|
|
741
|
-
maxConnections: 1
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
position: Position15.Right,
|
|
745
|
-
dataType: "module" /* module */,
|
|
746
|
-
connection: "source"
|
|
747
|
-
}
|
|
748
|
-
]
|
|
749
|
-
};
|
|
750
|
-
};
|
|
751
|
-
|
|
752
|
-
// src/templates/modifiers/noise-abs-template.ts
|
|
753
|
-
import { Position as Position16 } from "@xyflow/system";
|
|
754
|
-
var NoiseAbsNodeTemplateFactory = class {
|
|
755
|
-
template = {
|
|
756
|
-
type: "noise-abs" /* noiseAbs */,
|
|
757
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
758
|
-
data: {
|
|
759
|
-
title: "Abs Noise"
|
|
760
|
-
},
|
|
761
|
-
handles: [
|
|
762
|
-
{
|
|
763
|
-
position: Position16.Left,
|
|
764
|
-
dataType: "module" /* module */,
|
|
765
|
-
connection: "target",
|
|
766
|
-
maxConnections: 1
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
position: Position16.Right,
|
|
770
|
-
dataType: "module" /* module */,
|
|
771
|
-
connection: "source"
|
|
772
|
-
}
|
|
773
|
-
]
|
|
774
|
-
};
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
// src/templates/output/noise-output-template.ts
|
|
778
|
-
import { Position as Position17 } from "@xyflow/system";
|
|
779
|
-
var NoiseOutputNodeTemplateFactory = class {
|
|
780
|
-
template = {
|
|
781
|
-
type: "noise-output" /* noiseOutput */,
|
|
782
|
-
group: "Output" /* output */,
|
|
783
|
-
data: {
|
|
784
|
-
title: "Noise Output"
|
|
785
|
-
},
|
|
786
|
-
handles: [
|
|
787
|
-
{
|
|
788
|
-
position: Position17.Left,
|
|
789
|
-
dataType: "position" /* position */,
|
|
790
|
-
connection: "target"
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
position: Position17.Left,
|
|
794
|
-
dataType: "module" /* module */,
|
|
795
|
-
connection: "target",
|
|
796
|
-
maxConnections: 1
|
|
797
|
-
},
|
|
798
|
-
{
|
|
799
|
-
position: Position17.Right,
|
|
800
|
-
dataType: "noise" /* noise */,
|
|
801
|
-
connection: "source"
|
|
802
|
-
}
|
|
803
|
-
]
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
|
|
807
|
-
// src/templates/modifiers/noise-curve-template.ts
|
|
808
|
-
import { Position as Position18 } from "@xyflow/system";
|
|
809
|
-
var NoiseCurveNodeTemplateFactory = class {
|
|
810
|
-
template = {
|
|
811
|
-
type: "noise-curve" /* noiseCurve */,
|
|
812
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
813
|
-
data: {
|
|
814
|
-
title: "Noise Curve",
|
|
815
|
-
points: []
|
|
816
|
-
},
|
|
817
|
-
handles: [
|
|
818
|
-
{
|
|
819
|
-
position: Position18.Left,
|
|
820
|
-
dataType: "module" /* module */,
|
|
821
|
-
connection: "target",
|
|
822
|
-
maxConnections: 1
|
|
823
|
-
},
|
|
824
|
-
// {
|
|
825
|
-
// position: Position.Left,
|
|
826
|
-
// dataType: CoreHandleType.variableProperty,
|
|
827
|
-
// connection: 'target',
|
|
828
|
-
// },
|
|
829
|
-
{
|
|
830
|
-
position: Position18.Right,
|
|
831
|
-
dataType: "module" /* module */,
|
|
832
|
-
connection: "source"
|
|
833
|
-
}
|
|
834
|
-
]
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
// src/templates/modifiers/noise-exponent-template.ts
|
|
839
|
-
import { Position as Position19 } from "@xyflow/system";
|
|
840
|
-
var NoiseExponentNodeTemplateFactory = class {
|
|
841
|
-
template = {
|
|
842
|
-
type: "noise-exponent" /* noiseExponent */,
|
|
843
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
844
|
-
data: {
|
|
845
|
-
title: "Noise Exponent",
|
|
846
|
-
exponent: 1
|
|
847
|
-
},
|
|
848
|
-
handles: [
|
|
849
|
-
{
|
|
850
|
-
position: Position19.Left,
|
|
851
|
-
dataType: "module" /* module */,
|
|
852
|
-
connection: "target",
|
|
853
|
-
maxConnections: 1
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
position: Position19.Right,
|
|
857
|
-
dataType: "module" /* module */,
|
|
858
|
-
connection: "source"
|
|
859
|
-
}
|
|
860
|
-
]
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
// src/templates/modifiers/noise-invert-template.ts
|
|
865
|
-
import { Position as Position20 } from "@xyflow/system";
|
|
866
|
-
var NoiseInvertNodeTemplateFactory = class {
|
|
867
|
-
template = {
|
|
868
|
-
type: "noise-invert" /* noiseInvert */,
|
|
869
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
870
|
-
data: {
|
|
871
|
-
title: "Invert Noise"
|
|
872
|
-
},
|
|
873
|
-
handles: [
|
|
874
|
-
{
|
|
875
|
-
position: Position20.Left,
|
|
876
|
-
dataType: "module" /* module */,
|
|
877
|
-
connection: "target",
|
|
878
|
-
maxConnections: 1
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
position: Position20.Right,
|
|
882
|
-
dataType: "module" /* module */,
|
|
883
|
-
connection: "source"
|
|
884
|
-
}
|
|
885
|
-
]
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
// src/templates/modifiers/noise-scalebias-template.ts
|
|
890
|
-
import { Position as Position21 } from "@xyflow/system";
|
|
891
|
-
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
892
|
-
template = {
|
|
893
|
-
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
894
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
895
|
-
data: {
|
|
896
|
-
title: "Scale/Bias Noise",
|
|
897
|
-
scale: 1,
|
|
898
|
-
bias: 0
|
|
899
|
-
},
|
|
900
|
-
handles: [
|
|
901
|
-
{
|
|
902
|
-
position: Position21.Left,
|
|
903
|
-
dataType: "module" /* module */,
|
|
904
|
-
connection: "target",
|
|
905
|
-
maxConnections: 1
|
|
906
|
-
},
|
|
907
|
-
{
|
|
908
|
-
position: Position21.Right,
|
|
909
|
-
dataType: "module" /* module */,
|
|
910
|
-
connection: "source"
|
|
911
|
-
}
|
|
912
|
-
]
|
|
913
|
-
};
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
// src/templates/modifiers/noise-terrace-template.ts
|
|
917
|
-
import { Position as Position22 } from "@xyflow/system";
|
|
918
|
-
var NoiseTerraceNodeTemplateFactory = class {
|
|
919
|
-
template = {
|
|
920
|
-
type: "noise-terrace" /* noiseTerrace */,
|
|
921
|
-
group: "Noise Modifiers" /* noiseModifiers */,
|
|
922
|
-
data: {
|
|
923
|
-
title: "Noise Terrace",
|
|
924
|
-
points: []
|
|
925
|
-
},
|
|
926
|
-
handles: [
|
|
927
|
-
{
|
|
928
|
-
position: Position22.Left,
|
|
929
|
-
dataType: "module" /* module */,
|
|
930
|
-
connection: "target",
|
|
931
|
-
maxConnections: 1
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
position: Position22.Right,
|
|
935
|
-
dataType: "module" /* module */,
|
|
936
|
-
connection: "source"
|
|
937
|
-
}
|
|
938
|
-
]
|
|
939
|
-
};
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
// src/templates/selectors/noise-blend-template.ts
|
|
943
|
-
import { Position as Position23 } from "@xyflow/system";
|
|
944
|
-
var NoiseBlendNodeTemplateFactory = class {
|
|
945
|
-
template = {
|
|
946
|
-
type: "noise-blend" /* noiseBlend */,
|
|
947
|
-
group: "Noise Selectors" /* noiseSelectors */,
|
|
948
|
-
data: {
|
|
949
|
-
title: "Noise Blend"
|
|
950
|
-
},
|
|
951
|
-
handles: [
|
|
952
|
-
{
|
|
953
|
-
position: Position23.Left,
|
|
954
|
-
dataType: "module" /* module */,
|
|
955
|
-
connection: "target",
|
|
956
|
-
label: "Source Modules",
|
|
957
|
-
dataId: "source" /* source */,
|
|
958
|
-
maxConnections: 2,
|
|
959
|
-
minConnections: 2
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
position: Position23.Left,
|
|
963
|
-
dataType: "module" /* module */,
|
|
964
|
-
dataId: "control" /* control */,
|
|
965
|
-
connection: "target",
|
|
966
|
-
label: "Control Module",
|
|
967
|
-
maxConnections: 1
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
position: Position23.Right,
|
|
971
|
-
dataType: "module" /* module */,
|
|
972
|
-
dataId: "output" /* output */,
|
|
973
|
-
connection: "source"
|
|
974
|
-
}
|
|
975
|
-
]
|
|
976
|
-
};
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
// src/templates/selectors/noise-select-template.ts
|
|
980
|
-
import { Position as Position24 } from "@xyflow/system";
|
|
981
|
-
var NoiseSelectNodeTemplateFactory = class {
|
|
982
|
-
template = {
|
|
983
|
-
type: "noise-select" /* noiseSelect */,
|
|
984
|
-
group: "Noise Selectors" /* noiseSelectors */,
|
|
985
|
-
data: {
|
|
986
|
-
title: "Noise Select",
|
|
987
|
-
edgeFalloff: 0,
|
|
988
|
-
lowerBound: -1,
|
|
989
|
-
upperBound: 1
|
|
990
|
-
},
|
|
991
|
-
handles: [
|
|
992
|
-
{
|
|
993
|
-
position: Position24.Left,
|
|
994
|
-
dataType: "module" /* module */,
|
|
995
|
-
dataId: "source" /* source */,
|
|
996
|
-
connection: "target",
|
|
997
|
-
label: "Source Modules",
|
|
998
|
-
maxConnections: 2,
|
|
999
|
-
minConnections: 2
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
position: Position24.Left,
|
|
1003
|
-
dataType: "module" /* module */,
|
|
1004
|
-
dataId: "control" /* control */,
|
|
1005
|
-
connection: "target",
|
|
1006
|
-
label: "Control Module",
|
|
1007
|
-
maxConnections: 1
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
position: Position24.Right,
|
|
1011
|
-
dataType: "module" /* module */,
|
|
1012
|
-
dataId: "output" /* output */,
|
|
1013
|
-
connection: "source"
|
|
1014
|
-
}
|
|
1015
|
-
]
|
|
1016
|
-
};
|
|
1017
|
-
};
|
|
1018
|
-
|
|
1019
|
-
// src/templates/transformers/noise-displace-template.ts
|
|
1020
|
-
import { Position as Position25 } from "@xyflow/system";
|
|
1021
|
-
var NoiseDisplaceNodeTemplateFactory = class {
|
|
1022
|
-
template = {
|
|
1023
|
-
type: "noise-displace" /* noiseDisplace */,
|
|
1024
|
-
group: "Noise Transformers" /* noiseTransformers */,
|
|
1025
|
-
data: {
|
|
1026
|
-
title: "Noise Displace"
|
|
1027
|
-
},
|
|
1028
|
-
handles: [
|
|
1029
|
-
{
|
|
1030
|
-
position: Position25.Left,
|
|
1031
|
-
connection: "target",
|
|
1032
|
-
label: "Source Module",
|
|
1033
|
-
dataType: "module" /* module */,
|
|
1034
|
-
dataId: "source" /* sourceModule */,
|
|
1035
|
-
maxConnections: 1
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
position: Position25.Left,
|
|
1039
|
-
connection: "target",
|
|
1040
|
-
label: "X Module",
|
|
1041
|
-
dataType: "module" /* module */,
|
|
1042
|
-
dataId: "x-module" /* xModule */,
|
|
1043
|
-
maxConnections: 1
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
position: Position25.Left,
|
|
1047
|
-
connection: "target",
|
|
1048
|
-
label: "Y Module",
|
|
1049
|
-
dataType: "module" /* module */,
|
|
1050
|
-
dataId: "y-module" /* yModule */,
|
|
1051
|
-
maxConnections: 1
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
position: Position25.Left,
|
|
1055
|
-
connection: "target",
|
|
1056
|
-
label: "Z Module",
|
|
1057
|
-
dataType: "module" /* module */,
|
|
1058
|
-
dataId: "z-module" /* zModule */,
|
|
1059
|
-
maxConnections: 1
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
position: Position25.Right,
|
|
1063
|
-
dataType: "module" /* module */,
|
|
1064
|
-
dataId: "output" /* output */,
|
|
1065
|
-
connection: "source"
|
|
1066
|
-
}
|
|
1067
|
-
]
|
|
1068
|
-
};
|
|
1069
|
-
};
|
|
1070
|
-
|
|
1071
|
-
// src/templates/transformers/noise-rotate-point-template.ts
|
|
1072
|
-
import { Position as Position26 } from "@xyflow/system";
|
|
1073
|
-
var NoiseRotatePointNodeTemplateFactory = class {
|
|
1074
|
-
template = {
|
|
1075
|
-
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
1076
|
-
group: "Noise Transformers" /* noiseTransformers */,
|
|
1077
|
-
data: {
|
|
1078
|
-
title: "Noise Rotate Point",
|
|
1079
|
-
xAngle: 0,
|
|
1080
|
-
yAngle: 0,
|
|
1081
|
-
zAngle: 0
|
|
1082
|
-
},
|
|
1083
|
-
handles: [
|
|
1084
|
-
{
|
|
1085
|
-
position: Position26.Left,
|
|
1086
|
-
dataType: "module" /* module */,
|
|
1087
|
-
connection: "target",
|
|
1088
|
-
label: "Source Module",
|
|
1089
|
-
maxConnections: 1
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
position: Position26.Right,
|
|
1093
|
-
dataType: "module" /* module */,
|
|
1094
|
-
connection: "source"
|
|
1095
|
-
}
|
|
1096
|
-
]
|
|
1097
|
-
};
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
// src/templates/transformers/noise-scale-point-template.ts
|
|
1101
|
-
import { Position as Position27 } from "@xyflow/system";
|
|
1102
|
-
var NoiseScalePointNodeTemplateFactory = class {
|
|
1103
|
-
template = {
|
|
1104
|
-
type: "noise-scale-point" /* noiseScalePoint */,
|
|
1105
|
-
group: "Noise Transformers" /* noiseTransformers */,
|
|
1106
|
-
data: {
|
|
1107
|
-
title: "Noise Scale Point",
|
|
1108
|
-
xScale: 1,
|
|
1109
|
-
yScale: 1,
|
|
1110
|
-
zScale: 1
|
|
1111
|
-
},
|
|
1112
|
-
handles: [
|
|
1113
|
-
{
|
|
1114
|
-
position: Position27.Left,
|
|
1115
|
-
dataType: "module" /* module */,
|
|
1116
|
-
connection: "target",
|
|
1117
|
-
label: "Source Module",
|
|
1118
|
-
maxConnections: 1
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
position: Position27.Right,
|
|
1122
|
-
dataType: "module" /* module */,
|
|
1123
|
-
connection: "source"
|
|
1124
|
-
}
|
|
1125
|
-
]
|
|
1126
|
-
};
|
|
1127
|
-
};
|
|
1128
|
-
|
|
1129
|
-
// src/templates/transformers/noise-translate-point-template.ts
|
|
1130
|
-
import { Position as Position28 } from "@xyflow/system";
|
|
1131
|
-
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
1132
|
-
template = {
|
|
1133
|
-
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
1134
|
-
group: "Noise Transformers" /* noiseTransformers */,
|
|
1135
|
-
data: {
|
|
1136
|
-
title: "Noise Translate Point",
|
|
1137
|
-
translateX: 0,
|
|
1138
|
-
translateY: 0,
|
|
1139
|
-
translateZ: 0
|
|
1140
|
-
},
|
|
1141
|
-
handles: [
|
|
1142
|
-
{
|
|
1143
|
-
position: Position28.Left,
|
|
1144
|
-
dataType: "module" /* module */,
|
|
1145
|
-
connection: "target",
|
|
1146
|
-
label: "Source Module",
|
|
1147
|
-
maxConnections: 1
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
position: Position28.Right,
|
|
1151
|
-
dataType: "module" /* module */,
|
|
1152
|
-
connection: "source"
|
|
1153
|
-
}
|
|
1154
|
-
]
|
|
1155
|
-
};
|
|
1156
|
-
};
|
|
1157
|
-
|
|
1158
|
-
// src/templates/transformers/noise-turbulence-template.ts
|
|
1159
|
-
import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
|
|
1160
|
-
import { Position as Position29 } from "@xyflow/system";
|
|
1161
|
-
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
1162
|
-
template = {
|
|
1163
|
-
type: "noise-turbulence" /* noiseTurbulence */,
|
|
1164
|
-
group: "Noise Transformers" /* noiseTransformers */,
|
|
1165
|
-
data: {
|
|
1166
|
-
title: "Noise Turbulence",
|
|
1167
|
-
frequency: 1,
|
|
1168
|
-
power: 1,
|
|
1169
|
-
roughness: 1,
|
|
1170
|
-
seed: 0
|
|
1171
|
-
},
|
|
1172
|
-
handles: [
|
|
1173
|
-
{
|
|
1174
|
-
position: Position29.Left,
|
|
1175
|
-
dataType: "module" /* module */,
|
|
1176
|
-
connection: "target",
|
|
1177
|
-
label: "Source Module",
|
|
1178
|
-
maxConnections: 1
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
position: Position29.Left,
|
|
1182
|
-
dataType: CoreHandleType6.variableProperty,
|
|
1183
|
-
label: "Variable Properties",
|
|
1184
|
-
connection: "target"
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
position: Position29.Right,
|
|
1188
|
-
dataType: "module" /* module */,
|
|
1189
|
-
connection: "source"
|
|
1190
|
-
}
|
|
1191
|
-
]
|
|
1192
|
-
};
|
|
1193
|
-
};
|
|
1194
|
-
|
|
1195
|
-
// src/templates/generators/noise-billow-template.ts
|
|
1196
|
-
import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
|
|
1197
|
-
import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
|
|
1198
|
-
import { Position as Position30 } from "@xyflow/system";
|
|
1199
|
-
var NoiseBillowNodeTemplateFactory = class {
|
|
1200
|
-
template = {
|
|
1201
|
-
id: IDGenerator2.template(),
|
|
1202
|
-
type: "noise-billow" /* noiseBillow */,
|
|
1203
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
1204
|
-
data: {
|
|
1205
|
-
title: "Billow Noise",
|
|
1206
|
-
frequency: 0.1,
|
|
1207
|
-
lacunarity: 2,
|
|
1208
|
-
octaves: 5,
|
|
1209
|
-
persistence: 0.5,
|
|
1210
|
-
seed: 0
|
|
1211
|
-
},
|
|
1212
|
-
handles: [
|
|
1213
|
-
{
|
|
1214
|
-
position: Position30.Left,
|
|
1215
|
-
dataType: CoreHandleType7.variableProperty,
|
|
1216
|
-
connection: "target"
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
position: Position30.Right,
|
|
1220
|
-
dataType: "module" /* module */,
|
|
1221
|
-
connection: "source"
|
|
1222
|
-
}
|
|
1223
|
-
]
|
|
1224
|
-
};
|
|
1225
|
-
};
|
|
1226
|
-
|
|
1227
|
-
// src/templates/groups/module-group-template.ts
|
|
1228
|
-
import {
|
|
1229
|
-
CoreTemplateGroup
|
|
1230
|
-
} from "@awesome-flow/core/abstract";
|
|
1231
|
-
import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
|
|
1232
|
-
import { Position as Position31 } from "@xyflow/system";
|
|
1233
|
-
var ModuleGroupNodeTemplateFactory = class {
|
|
1234
|
-
template = {
|
|
1235
|
-
id: IDGenerator3.template(),
|
|
1236
|
-
type: "group-module" /* groupModule */,
|
|
1237
|
-
group: CoreTemplateGroup.groups,
|
|
1238
|
-
data: {
|
|
1239
|
-
title: "Modules Group",
|
|
1240
|
-
isGroup: true,
|
|
1241
|
-
initialSize: {
|
|
1242
|
-
width: 300,
|
|
1243
|
-
height: 200
|
|
1244
|
-
},
|
|
1245
|
-
collapsedSize: {
|
|
1246
|
-
width: 300,
|
|
1247
|
-
height: 80
|
|
1248
|
-
}
|
|
1249
|
-
},
|
|
1250
|
-
handles: [
|
|
1251
|
-
{
|
|
1252
|
-
position: Position31.Bottom,
|
|
1253
|
-
dataType: "module" /* module */,
|
|
1254
|
-
connection: "target",
|
|
1255
|
-
maxConnections: 1,
|
|
1256
|
-
hideOnCollapse: true
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
position: Position31.Right,
|
|
1260
|
-
dataType: "module" /* module */,
|
|
1261
|
-
connection: "source"
|
|
1262
|
-
}
|
|
1263
|
-
]
|
|
1264
|
-
};
|
|
1265
|
-
};
|
|
1266
|
-
|
|
1267
|
-
// src/nodes/groups/module-group-node.tsx
|
|
1268
|
-
import { NodeContainer as NodeContainer30, NodeCollapse, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
|
|
1269
|
-
import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
|
|
1270
|
-
import { useCallback as useCallback14, useEffect as useEffect20, useMemo as useMemo11 } from "react";
|
|
1271
|
-
import { shallow } from "zustand/shallow";
|
|
1272
|
-
import { Badge, Group as Group15 } from "@mantine/core";
|
|
1273
|
-
import {
|
|
1274
|
-
useFlowStore,
|
|
1275
|
-
useIncomingComputedData as useIncomingComputedData17,
|
|
1276
|
-
useInteractiveStore,
|
|
1277
|
-
useUpdateNodeComputedData as useUpdateNodeComputedData28
|
|
1278
|
-
} from "@awesome-flow/core/hooks";
|
|
1279
|
-
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1280
|
-
|
|
1281
|
-
// src/abstract/node-types.ts
|
|
1282
|
-
var noiseNodeTemplates = {
|
|
1283
|
-
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
1284
|
-
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
1285
|
-
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
1286
|
-
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|
|
1287
|
-
["noise-logger" /* noiseLogger */]: new NoiseLoggerNodeTemplateFactory(),
|
|
1288
|
-
["noise-constant" /* noiseConst */]: new NoiseConstNodeTemplateFactory(),
|
|
1289
|
-
["position" /* position */]: new PositionConstNodeTemplateFactory(),
|
|
1290
|
-
["position-logger" /* positionLogger */]: new PositionLoggerNodeTemplateFactory(),
|
|
1291
|
-
["grid" /* grid */]: new PositionGridNodeTemplateFactory(),
|
|
1292
|
-
["texture-data" /* textureData */]: new NoiseRawTextureTemplateFactory(),
|
|
1293
|
-
["noise-cylinders" /* noiseCylinders */]: new NoiseCylindersNodeTemplateFactory(),
|
|
1294
|
-
["noise-perlin" /* noisePerlin */]: new NoisePerlinNodeTemplateFactory(),
|
|
1295
|
-
["noise-ridged-multi" /* noiseRidgedMulti */]: new NoiseRidgedMultiNodeTemplateFactory(),
|
|
1296
|
-
["noise-spheres" /* noiseSpheres */]: new NoiseSpheresNodeTemplateFactory(),
|
|
1297
|
-
["noise-voronoi" /* noiseVoronoi */]: new NoiseVoronoiNodeTemplateFactory(),
|
|
1298
|
-
["noise-combiner" /* noiseCombine */]: new NoiseCombineNodeTemplateFactory(),
|
|
1299
|
-
["noise-clamp" /* noiseClamp */]: new NoiseClampNodeTemplateFactory(),
|
|
1300
|
-
["noise-abs" /* noiseAbs */]: new NoiseAbsNodeTemplateFactory(),
|
|
1301
|
-
["noise-curve" /* noiseCurve */]: new NoiseCurveNodeTemplateFactory(),
|
|
1302
|
-
["noise-exponent" /* noiseExponent */]: new NoiseExponentNodeTemplateFactory(),
|
|
1303
|
-
["noise-invert" /* noiseInvert */]: new NoiseInvertNodeTemplateFactory(),
|
|
1304
|
-
["noise-scale-bias" /* noiseScaleBias */]: new NoiseScaleBiasNodeTemplateFactory(),
|
|
1305
|
-
["noise-terrace" /* noiseTerrace */]: new NoiseTerraceNodeTemplateFactory(),
|
|
1306
|
-
["noise-blend" /* noiseBlend */]: new NoiseBlendNodeTemplateFactory(),
|
|
1307
|
-
["noise-select" /* noiseSelect */]: new NoiseSelectNodeTemplateFactory(),
|
|
1308
|
-
["noise-displace" /* noiseDisplace */]: new NoiseDisplaceNodeTemplateFactory(),
|
|
1309
|
-
["noise-rotate-point" /* noiseRotatePoint */]: new NoiseRotatePointNodeTemplateFactory(),
|
|
1310
|
-
["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
|
|
1311
|
-
["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
|
|
1312
|
-
["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
|
|
1313
|
-
["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
|
|
1314
|
-
};
|
|
1315
|
-
|
|
1316
|
-
// src/nodes/output/noise-output-node.tsx
|
|
1317
|
-
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1318
|
-
function NoiseOutputNode({ id, selected, data, type }) {
|
|
1319
|
-
const [size, setSize] = useState16(0);
|
|
1320
|
-
const updateComputedData = useUpdateNodeComputedData29();
|
|
1321
|
-
const onDataUpdated = useCallback15(
|
|
1322
|
-
(handleData) => {
|
|
1323
|
-
const incomingPositions = handleData["position" /* position */];
|
|
1324
|
-
const incomingModule = handleData["module" /* module */];
|
|
1325
|
-
if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
|
|
1326
|
-
const { module } = incomingModule[0];
|
|
1327
|
-
const noise = [];
|
|
1328
|
-
for (const input of incomingPositions) {
|
|
1329
|
-
for (const position of input.positions) {
|
|
1330
|
-
const value = module.getValue(position.x, position.y, position.z);
|
|
1331
|
-
noise.push({
|
|
1332
|
-
position,
|
|
1333
|
-
value
|
|
1334
|
-
});
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
updateComputedData(id, { noise, module });
|
|
1338
|
-
setSize(noise.length);
|
|
1339
|
-
}
|
|
1340
|
-
},
|
|
1341
|
-
[]
|
|
1342
|
-
);
|
|
1343
|
-
return /* @__PURE__ */ jsxs28(NodeContainer31, { id, selected, data, type, children: [
|
|
1344
|
-
/* @__PURE__ */ jsx31(
|
|
1345
|
-
HandlesIncomingDataStatus4,
|
|
1346
|
-
{
|
|
1347
|
-
nodeId: id,
|
|
1348
|
-
handles: data.handles,
|
|
1349
|
-
handleKey: "dataType",
|
|
1350
|
-
onDataUpdated,
|
|
1351
|
-
type: "target",
|
|
1352
|
-
resetComputedData: true
|
|
1353
|
-
}
|
|
1354
|
-
),
|
|
1355
|
-
/* @__PURE__ */ jsxs28(Text3, { mt: 5, children: [
|
|
1356
|
-
"Noise points: ",
|
|
1357
|
-
size
|
|
1358
|
-
] }),
|
|
1359
|
-
/* @__PURE__ */ jsx31(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
|
|
1360
|
-
] });
|
|
1361
|
-
}
|
|
1362
|
-
var noise_output_node_default = NoiseOutputNode;
|
|
1363
|
-
export {
|
|
1364
|
-
noise_logger_node_default as NoiseLoggerNode,
|
|
1365
|
-
noise_output_node_default as NoiseOutputNode,
|
|
1366
|
-
noise_raw_texture_node_default as NoiseRawTextureNode,
|
|
1367
|
-
positions_logger_node_default as PositionsLoggerNode
|
|
1368
|
-
};
|
|
1
|
+
import{useIncomingComputedData as Ue}from"@awesome-flow/core/hooks";import{NodeContainer as Ve,NodeTrackConnections as Ee}from"@awesome-flow/core/layout";import{Divider as He,Stack as Ae,Text as pe}from"@mantine/core";import{useMemo as Oe}from"react";import{jsx as Q,jsxs as J}from"react/jsx-runtime";function Xe({id:e,selected:u,data:i,type:N}){let s=Ue(e),m=Oe(()=>s?.map(r=>r.noise).flat(),[s]);return J(Ve,{id:e,selected:u,data:i,type:N,children:[J(pe,{children:["Size: ",m?.length||0]}),Q(He,{h:5}),Q(Ae,{children:m?.map((r,n)=>J(pe,{children:[r.position?.x,":",r.position?.y,":",r.position?.z,": ",r.value]},n))}),Q(Ee,{handles:i.handles,nodeId:e,type:"target"})]})}var se=Xe;import{HandlesIncomingDataStatus as Qo}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as jo}from"@awesome-flow/core/hooks";import{NodeContainer as et,NodeTrackConnections as ot}from"@awesome-flow/core/layout";import{Text as tt}from"@mantine/core";import{useCallback as at,useState as rt}from"react";import{NodePropertyVariables as ct}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as yt}from"@awesome-flow/core/hooks";import{NodeContainer as Tt,NodeTrackConnections as gt}from"@awesome-flow/core/layout";import{Billow as ht}from"libnoise-simplex-ts";import{useCallback as xt}from"react";import{jsx as Mt,jsxs as St}from"react/jsx-runtime";import{useUpdateNodeComputedData as Bt}from"@awesome-flow/core/hooks";import{NodeContainer as Gt}from"@awesome-flow/core/layout";import{Checkerboard as Rt}from"libnoise-simplex-ts";import{useEffect as Lt}from"react";import{jsx as Et}from"react/jsx-runtime";import{useUpdateNodeComputedData as Ot,useUpdateNodeData as Xt}from"@awesome-flow/core/hooks";import{NodeContainer as Zt}from"@awesome-flow/core/layout";import{Group as $t,NumberInput as Kt,Stack as Wt}from"@mantine/core";import{Const as Jt}from"libnoise-simplex-ts";import{useEffect as jt,useState as ea}from"react";import{jsx as ta,jsxs as aa}from"react/jsx-runtime";import{NodePropertyVariables as na}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as sa}from"@awesome-flow/core/hooks";import{NodeContainer as da,NodeTrackConnections as la}from"@awesome-flow/core/layout";import{Cylinders as Na}from"libnoise-simplex-ts";import{useCallback as fa}from"react";import{jsx as Ca,jsxs as Ta}from"react/jsx-runtime";import{NodePropertyVariables as ha}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as xa}from"@awesome-flow/core/hooks";import{NodeContainer as ba,NodeTrackConnections as Ma}from"@awesome-flow/core/layout";import{Perlin as wa}from"libnoise-simplex-ts";import{useCallback as Ba}from"react";import{jsx as Ga,jsxs as za}from"react/jsx-runtime";import{NodePropertyVariables as La}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as Va}from"@awesome-flow/core/hooks";import{NodeContainer as Ha,NodeTrackConnections as Aa}from"@awesome-flow/core/layout";import{RidgedMulti as Xa}from"libnoise-simplex-ts";import{useCallback as Za}from"react";import{jsx as $a,jsxs as Ka}from"react/jsx-runtime";import{NodePropertyVariables as Ja}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as ja}from"@awesome-flow/core/hooks";import{NodeContainer as or,NodeTrackConnections as tr}from"@awesome-flow/core/layout";import{Spheres as rr}from"libnoise-simplex-ts";import{useCallback as nr}from"react";import{jsx as mr,jsxs as dr}from"react/jsx-runtime";import{NodePropertyVariables as Nr}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as fr}from"@awesome-flow/core/hooks";import{NodeContainer as Cr,NodeTrackConnections as Tr}from"@awesome-flow/core/layout";import{Voronoi as Dr}from"libnoise-simplex-ts";import{useCallback as Pr}from"react";import{jsx as Ir,jsxs as br}from"react/jsx-runtime";import{useUpdateNodeComputedData as wr,useUpdateNodeData as vr}from"@awesome-flow/core/hooks";import{NodeContainer as kr}from"@awesome-flow/core/layout";import{Group as zr,NumberInput as Rr,Stack as Fr}from"@mantine/core";import{useEffect as Ur,useState as Vr}from"react";import{jsx as Hr,jsxs as Ar}from"react/jsx-runtime";import{useUpdateNodeComputedData as Yr,useUpdateNodeData as Zr}from"@awesome-flow/core/hooks";import{NodeContainer as $r}from"@awesome-flow/core/layout";import{Group as Wr,NumberInput as _r,Stack as Jr}from"@mantine/core";import{useEffect as jr,useState as ei}from"react";import{jsx as ti,jsxs as ai}from"react/jsx-runtime";import{useFlowStore as Ci,useIncomingComputedData as Ti,useInteractiveStore as gi,useUpdateNodeComputedData as Di}from"@awesome-flow/core/hooks";import{NodeCollapse as Pi,NodeContainer as xi,NodeTrackConnections as Ii}from"@awesome-flow/core/layout";import{Badge as Mi,Group as Si}from"@mantine/core";import{NodeResizer as ki,useStore as Gi,useUpdateNodeInternals as zi}from"@xyflow/react";import{useCallback as Fi,useEffect as Li,useMemo as Ui}from"react";import{shallow as Ei}from"zustand/shallow";import{jsx as Ai,jsxs as Oi}from"react/jsx-runtime";import{useIncomingComputedData as $i,useUpdateNodeComputedData as Ki}from"@awesome-flow/core/hooks";import{NodeContainer as _i,NodeTrackConnections as Ji}from"@awesome-flow/core/layout";import{Abs as ji}from"libnoise-simplex-ts";import{useEffect as on}from"react";import{jsx as an}from"react/jsx-runtime";import{useIncomingComputedData as pn,useUpdateNodeComputedData as sn,useUpdateNodeData as mn}from"@awesome-flow/core/hooks";import{NodeContainer as ln,NodeTrackConnections as un}from"@awesome-flow/core/layout";import{Group as cn,NumberInput as fn,Stack as yn}from"@mantine/core";import{Clamp as Tn}from"libnoise-simplex-ts";import{useEffect as Dn,useState as hn}from"react";import{jsx as xn,jsxs as In}from"react/jsx-runtime";import{useIncomingComputedData as Fn,useUpdateNodeComputedData as Ln,useUpdateNodeData as Un}from"@awesome-flow/core/hooks";import{NodeCombobox as En,NodeContainer as Hn,NodeTrackConnections as An}from"@awesome-flow/core/layout";import{IconAsterisk as Xn,IconChevronLeft as Yn,IconChevronRight as Zn,IconChevronUp as qn,IconPlus as $n}from"@tabler/icons-react";import{useCallback as _n,useEffect as Jn}from"react";import{Add as Sn,Max as wn,Min as vn,Multiply as Bn,Power as kn}from"libnoise-simplex-ts";import{jsx as op,jsxs as tp}from"react/jsx-runtime";import{NodeState as ip}from"@awesome-flow/core/abstract";import{useIncomingComputedData as pp,useUpdateNodeComputedData as sp,useUpdateNodeData as mp}from"@awesome-flow/core/hooks";import{NodeContainer as lp,NodeTrackConnections as up}from"@awesome-flow/core/layout";import{ActionIcon as cp,Button as fp,Group as yp,NumberInput as Cp,Space as Tp}from"@mantine/core";import{FORM_INDEX as Dp,useForm as hp}from"@mantine/form";import{randomId as xp}from"@mantine/hooks";import{IconX as bp}from"@tabler/icons-react";import{Curve as Sp,Tuple as wp}from"libnoise-simplex-ts";import{useCallback as Bp,useEffect as kp,useState as Gp}from"react";import{Fragment as Lp,jsx as Rp,jsxs as Fp}from"react/jsx-runtime";import{useIncomingComputedData as Ep,useUpdateNodeComputedData as Hp,useUpdateNodeData as Ap}from"@awesome-flow/core/hooks";import{NodeContainer as Xp,NodeTrackConnections as Yp}from"@awesome-flow/core/layout";import{Group as qp,NumberInput as $p,Stack as Kp}from"@mantine/core";import{Exponent as _p}from"libnoise-simplex-ts";import{useEffect as Qp,useState as jp}from"react";import{jsx as os,jsxs as ts}from"react/jsx-runtime";import{useIncomingComputedData as is,useUpdateNodeComputedData as ns}from"@awesome-flow/core/hooks";import{NodeContainer as ss,NodeTrackConnections as ms}from"@awesome-flow/core/layout";import{Invert as ls}from"libnoise-simplex-ts";import{useEffect as Ns}from"react";import{jsx as fs}from"react/jsx-runtime";import{useIncomingComputedData as xs,useUpdateNodeComputedData as Is,useUpdateNodeData as bs}from"@awesome-flow/core/hooks";import{NodeContainer as Ss,NodeTrackConnections as ws}from"@awesome-flow/core/layout";import{Group as Bs,NumberInput as ks,Stack as Gs}from"@mantine/core";import{useEffect as Rs,useState as Fs}from"react";import{ModifierModule as Ts}from"libnoise-simplex-ts";import{jsx as Vs,jsxs as Es}from"react/jsx-runtime";import{useIncomingComputedData as Os,useUpdateNodeComputedData as Xs,useUpdateNodeData as Ys}from"@awesome-flow/core/hooks";import{NodeContainer as qs,NodeTrackConnections as $s}from"@awesome-flow/core/layout";import{Group as Ws,NumberInput as _s,Stack as Js}from"@mantine/core";import{ScaleBias as js}from"libnoise-simplex-ts";import{useEffect as om,useState as tm}from"react";import{jsx as rm,jsxs as im}from"react/jsx-runtime";import{NodeState as sm}from"@awesome-flow/core/abstract";import{useIncomingComputedData as dm,useUpdateNodeComputedData as lm,useUpdateNodeData as um}from"@awesome-flow/core/hooks";import{NodeContainer as cm,NodeTrackConnections as fm}from"@awesome-flow/core/layout";import{ActionIcon as Cm,Button as Tm,Group as gm,NumberInput as Dm,Space as hm}from"@mantine/core";import{FORM_INDEX as xm,useForm as Im}from"@mantine/form";import{randomId as Mm}from"@mantine/hooks";import{IconX as wm}from"@tabler/icons-react";import{Terrace as Bm}from"libnoise-simplex-ts";import{useCallback as Gm,useEffect as zm,useState as Rm}from"react";import{Fragment as Vm,jsx as Lm,jsxs as Um}from"react/jsx-runtime";import{HandlesIncomingDataStatus as Jm}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as jm}from"@awesome-flow/core/hooks";import{NodeContainer as od,NodeTrackConnections as td}from"@awesome-flow/core/layout";import{Blend as rd}from"libnoise-simplex-ts";import{useCallback as nd}from"react";import{jsx as md,jsxs as dd}from"react/jsx-runtime";import{HandlesIncomingDataStatus as Nd}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as fd,useUpdateNodeData as yd}from"@awesome-flow/core/hooks";import{NodeContainer as Td,NodeTrackConnections as gd}from"@awesome-flow/core/layout";import{Group as hd,NumberInput as Pd,Stack as xd}from"@mantine/core";import{Select as bd}from"libnoise-simplex-ts";import{useCallback as Sd,useEffect as wd,useState as vd}from"react";import{jsx as Gd,jsxs as zd}from"react/jsx-runtime";import{HandlesIncomingDataStatus as Ed}from"@awesome-flow/core/components";import{useUpdateNodeComputedData as Ad}from"@awesome-flow/core/hooks";import{NodeContainer as Xd,NodeTrackConnections as Yd}from"@awesome-flow/core/layout";import{Displace as qd}from"libnoise-simplex-ts";import{useCallback as Kd}from"react";import{jsx as Jd,jsxs as Qd}from"react/jsx-runtime";import{useIncomingComputedData as ol,useUpdateNodeComputedData as tl,useUpdateNodeData as al}from"@awesome-flow/core/hooks";import{NodeContainer as il,NodeTrackConnections as nl}from"@awesome-flow/core/layout";import{Group as sl,NumberInput as ml,Stack as dl}from"@mantine/core";import{RotatePoint as ul}from"libnoise-simplex-ts";import{useEffect as cl,useState as fl}from"react";import{jsx as Cl,jsxs as Tl}from"react/jsx-runtime";import{useIncomingComputedData as hl,useUpdateNodeComputedData as Pl,useUpdateNodeData as xl}from"@awesome-flow/core/hooks";import{NodeContainer as bl,NodeTrackConnections as Ml}from"@awesome-flow/core/layout";import{Group as wl,NumberInput as vl,Stack as Bl}from"@mantine/core";import{ScalePoint as Gl}from"libnoise-simplex-ts";import{useEffect as Rl,useState as Fl}from"react";import{jsx as Ul,jsxs as Vl}from"react/jsx-runtime";import{useIncomingComputedData as Al,useUpdateNodeComputedData as Ol,useUpdateNodeData as Xl}from"@awesome-flow/core/hooks";import{NodeContainer as Zl,NodeTrackConnections as ql}from"@awesome-flow/core/layout";import{Group as Kl,NumberInput as Wl,Stack as _l}from"@mantine/core";import{TranslatePoint as Ql}from"libnoise-simplex-ts";import{useEffect as eu,useState as ou}from"react";import{jsx as au,jsxs as ru}from"react/jsx-runtime";import{NodePropertyVariables as pu}from"@awesome-flow/core/components";import{useIncomingComputedData as mu,useUpdateNodeComputedData as du}from"@awesome-flow/core/hooks";import{NodeContainer as uu,NodeTrackConnections as Nu}from"@awesome-flow/core/layout";import{Turbulence as fu}from"libnoise-simplex-ts";import{useCallback as Cu,useEffect as Tu,useState as gu}from"react";import{jsx as hu,jsxs as Pu}from"react/jsx-runtime";import{useIncomingComputedData as go,useUpdateNodeComputedData as Do}from"@awesome-flow/core/hooks";import{NodeContainer as ho,NodeTrackConnections as Po}from"@awesome-flow/core/layout";import{Group as ee,Stack as xo}from"@mantine/core";import{useEffect as Io,useMemo as bo,useState as me}from"react";import{jsx as So,jsxs as C}from"react/jsx-runtime";function Mo({id:e,selected:u,data:i,type:N}){let s=Do(),[m,r]=me(0),[n,g]=me(0),c=go(e),d=bo(()=>c?.map(p=>p.noise).flat(),[c]);return Io(()=>{if(d?.length){let p=Math.ceil(Math.sqrt(d.length)),f=d.map(l=>[l.value*255,l.value*255,l.value*255,255]).flat(),y=new Uint8Array(p*p*4);y.set(f),g(p),r(y.length),s(e,{textureData:y,textureResolutionX:p,textureResolutionY:p})}},[d]),C(ho,{id:e,selected:u,data:i,type:N,children:[C(xo,{children:[C(ee,{children:["Resolution: ",n,"x",n]}),C(ee,{children:["Input Length: ",d?.length||0]}),C(ee,{children:["Output Length (",n,"*",n,"*4): ",m]})]}),So(Po,{handles:i.handles,nodeId:e,type:"target"})]})}var de=Mo;import{useIncomingComputedData as wo}from"@awesome-flow/core/hooks";import{NodeContainer as vo,NodeTrackConnections as Bo}from"@awesome-flow/core/layout";import{Divider as ko,Stack as Go,Text as le}from"@mantine/core";import{useMemo as zo}from"react";import{jsx as te,jsxs as oe}from"react/jsx-runtime";function Ro({id:e,selected:u,data:i,type:N}){let s=wo(e),m=zo(()=>s?.map(r=>r.positions).flat(),[s]);return oe(vo,{id:e,selected:u,data:i,type:N,children:[oe(le,{children:["Size: ",m?.length||0]}),te(ko,{h:5}),te(Go,{children:m?.map((r,n)=>oe(le,{children:[r.x,":",r.y,":",r.z]},n))}),te(Bo,{handles:i.handles,nodeId:e,type:"target"})]})}var ue=Ro;import{CoreHandleType as Fo}from"@awesome-flow/core/abstract";import{IDGenerator as Lo}from"@awesome-flow/core/utils";import{Position as Ne}from"@xyflow/system";var D=class{template={id:Lo.template(),type:"noise-billow",group:"Noise Generators",data:{title:"Billow Noise",frequency:.1,lacunarity:2,octaves:5,persistence:.5,seed:0},handles:[{position:Ne.Left,dataType:Fo.variableProperty,connection:"target"},{position:Ne.Right,dataType:"module",connection:"source"}]}};import{Position as Uo}from"@xyflow/system";var h=class{template={type:"noise-checkerboard",group:"Noise Generators",data:{title:"Checkerboard Noise"},handles:[{position:Uo.Right,dataType:"module",connection:"source"}]}};import{Position as Vo}from"@xyflow/system";var P=class{template={type:"noise-constant",group:"Noise Generators",data:{title:"Const Value Noise",noise:0,min:-1,max:1},handles:[{position:Vo.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Eo}from"@awesome-flow/core/abstract";import{Position as ce}from"@xyflow/system";var x=class{template={type:"noise-cylinders",group:"Noise Generators",data:{title:"Cylinders Noise",frequency:.1},handles:[{position:ce.Left,dataType:Eo.variableProperty,connection:"target"},{position:ce.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Ho}from"@awesome-flow/core/abstract";import{Position as fe}from"@xyflow/system";var I=class{template={type:"noise-perlin",group:"Noise Generators",data:{title:"Perlin Noise",frequency:.1,lacunarity:2,octaves:5,persistence:.5,seed:0},handles:[{position:fe.Left,dataType:Ho.variableProperty,connection:"target"},{position:fe.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Ao}from"@awesome-flow/core/abstract";import{Position as ye}from"@xyflow/system";var b=class{template={type:"noise-ridged-multi",group:"Noise Generators",data:{title:"Ridged Multi Noise",frequency:.1,lacunarity:2,octaves:6,offset:1,gain:2,seed:0},handles:[{position:ye.Left,dataType:Ao.variableProperty,connection:"target"},{position:ye.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Oo}from"@awesome-flow/core/abstract";import{Position as Ce}from"@xyflow/system";var M=class{template={type:"noise-spheres",group:"Noise Generators",data:{title:"Spheres Noise",frequency:.1},handles:[{position:Ce.Left,dataType:Oo.variableProperty,connection:"target"},{position:Ce.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Xo}from"@awesome-flow/core/abstract";import{Position as Te}from"@xyflow/system";var S=class{template={type:"noise-voronoi",group:"Noise Generators",data:{title:"Voronoi Noise",frequency:.1,displacement:1,distance:!0,seed:0},handles:[{position:Te.Left,dataType:Xo.variableProperty,connection:"target"},{position:Te.Right,dataType:"module",connection:"source"}]}};import{Position as Yo}from"@xyflow/system";var w=class{template={type:"position",group:"Positions",data:{title:"Position Output",position:{x:0,y:0,z:0}},handles:[{position:Yo.Right,dataType:"position",connection:"source"}]}};import{Position as Zo}from"@xyflow/system";var v=class{template={type:"grid",group:"Positions",data:{title:"Grid Output",center:{x:0,y:0,z:0},radius:1},handles:[{position:Zo.Right,dataType:"position",connection:"source"}]}};import{CoreTemplateGroup as qo}from"@awesome-flow/core/abstract";import{IDGenerator as $o}from"@awesome-flow/core/utils";import{Position as ge}from"@xyflow/system";var B=class{template={id:$o.template(),type:"group-module",group:qo.groups,data:{title:"Modules Group",isGroup:!0,initialSize:{width:300,height:200},collapsedSize:{width:300,height:80}},handles:[{position:ge.Bottom,dataType:"module",connection:"target",maxConnections:1,hideOnCollapse:!0},{position:ge.Right,dataType:"module",connection:"source"}]}};import{Position as De}from"@xyflow/system";var k=class{template={type:"noise-abs",group:"Noise Modifiers",data:{title:"Abs Noise"},handles:[{position:De.Left,dataType:"module",connection:"target",maxConnections:1},{position:De.Right,dataType:"module",connection:"source"}]}};import{Position as he}from"@xyflow/system";var G=class{template={type:"noise-clamp",group:"Noise Modifiers",data:{title:"Clamp Noise",lowerBound:-1,upperBound:1},handles:[{position:he.Left,dataType:"module",connection:"target",maxConnections:1},{position:he.Right,dataType:"module",connection:"source"}]}};import{Position as Pe}from"@xyflow/system";var z=class{template={type:"noise-combiner",group:"Noise Modifiers",data:{title:"Combine Noise",operation:"add"},handles:[{position:Pe.Left,dataType:"module",connection:"target",maxConnections:2},{position:Pe.Right,dataType:"module",connection:"source"}]}};import{Position as xe}from"@xyflow/system";var R=class{template={type:"noise-curve",group:"Noise Modifiers",data:{title:"Noise Curve",points:[]},handles:[{position:xe.Left,dataType:"module",connection:"target",maxConnections:1},{position:xe.Right,dataType:"module",connection:"source"}]}};import{Position as Ie}from"@xyflow/system";var F=class{template={type:"noise-exponent",group:"Noise Modifiers",data:{title:"Noise Exponent",exponent:1},handles:[{position:Ie.Left,dataType:"module",connection:"target",maxConnections:1},{position:Ie.Right,dataType:"module",connection:"source"}]}};import{Position as be}from"@xyflow/system";var L=class{template={type:"noise-invert",group:"Noise Modifiers",data:{title:"Invert Noise"},handles:[{position:be.Left,dataType:"module",connection:"target",maxConnections:1},{position:be.Right,dataType:"module",connection:"source"}]}};import{IDGenerator as Ko}from"@awesome-flow/core/utils";import{Position as Me}from"@xyflow/system";var U=class{template={id:Ko.template(),type:"noise-normalize",group:"Noise Modifiers",data:{title:"Normalize Noise",intervalStart:-1,intervalEnd:1},handles:[{position:Me.Left,dataType:"module",connection:"target",maxConnections:1},{position:Me.Right,dataType:"module",connection:"source"}]}};import{Position as Se}from"@xyflow/system";var V=class{template={type:"noise-scale-bias",group:"Noise Modifiers",data:{title:"Scale/Bias Noise",scale:1,bias:0},handles:[{position:Se.Left,dataType:"module",connection:"target",maxConnections:1},{position:Se.Right,dataType:"module",connection:"source"}]}};import{Position as we}from"@xyflow/system";var E=class{template={type:"noise-terrace",group:"Noise Modifiers",data:{title:"Noise Terrace",points:[]},handles:[{position:we.Left,dataType:"module",connection:"target",maxConnections:1},{position:we.Right,dataType:"module",connection:"source"}]}};import{Position as Wo}from"@xyflow/system";var H=class{template={type:"noise-logger",group:"Output",data:{title:"Noise Logger"},handles:[{position:Wo.Left,dataType:"noise",connection:"target"}]}};import{Position as ae}from"@xyflow/system";var A=class{template={type:"noise-output",group:"Output",data:{title:"Noise Output"},handles:[{position:ae.Left,dataType:"position",connection:"target"},{position:ae.Left,dataType:"module",connection:"target",maxConnections:1},{position:ae.Right,dataType:"noise",connection:"source"}]}};import{Position as ve}from"@xyflow/system";var O=class{template={type:"texture-data",group:"Output",data:{title:"Texture Data"},handles:[{position:ve.Left,dataType:"noise",connection:"target",maxConnections:1},{position:ve.Right,dataType:"texture",connection:"source"}]}};import{Position as _o}from"@xyflow/system";var X=class{template={type:"position-logger",group:"Positions",data:{title:"Position Logger"},handles:[{position:_o.Left,dataType:"position",connection:"target"}]}};import{Position as re}from"@xyflow/system";var Y=class{template={type:"noise-blend",group:"Noise Selectors",data:{title:"Noise Blend"},handles:[{position:re.Left,dataType:"module",connection:"target",label:"Source Modules",dataId:"source",maxConnections:2,minConnections:2},{position:re.Left,dataType:"module",dataId:"control",connection:"target",label:"Control Module",maxConnections:1},{position:re.Right,dataType:"module",dataId:"output",connection:"source"}]}};import{Position as ie}from"@xyflow/system";var Z=class{template={type:"noise-select",group:"Noise Selectors",data:{title:"Noise Select",edgeFalloff:0,lowerBound:-1,upperBound:1},handles:[{position:ie.Left,dataType:"module",dataId:"source",connection:"target",label:"Source Modules",maxConnections:2,minConnections:2},{position:ie.Left,dataType:"module",dataId:"control",connection:"target",label:"Control Module",maxConnections:1},{position:ie.Right,dataType:"module",dataId:"output",connection:"source"}]}};import{Position as T}from"@xyflow/system";var q=class{template={type:"noise-displace",group:"Noise Transformers",data:{title:"Noise Displace"},handles:[{position:T.Left,connection:"target",label:"Source Module",dataType:"module",dataId:"source",maxConnections:1},{position:T.Left,connection:"target",label:"X Module",dataType:"module",dataId:"x-module",maxConnections:1},{position:T.Left,connection:"target",label:"Y Module",dataType:"module",dataId:"y-module",maxConnections:1},{position:T.Left,connection:"target",label:"Z Module",dataType:"module",dataId:"z-module",maxConnections:1},{position:T.Right,dataType:"module",dataId:"output",connection:"source"}]}};import{Position as Be}from"@xyflow/system";var $=class{template={type:"noise-rotate-point",group:"Noise Transformers",data:{title:"Noise Rotate Point",xAngle:0,yAngle:0,zAngle:0},handles:[{position:Be.Left,dataType:"module",connection:"target",label:"Source Module",maxConnections:1},{position:Be.Right,dataType:"module",connection:"source"}]}};import{Position as ke}from"@xyflow/system";var K=class{template={type:"noise-scale-point",group:"Noise Transformers",data:{title:"Noise Scale Point",xScale:1,yScale:1,zScale:1},handles:[{position:ke.Left,dataType:"module",connection:"target",label:"Source Module",maxConnections:1},{position:ke.Right,dataType:"module",connection:"source"}]}};import{Position as Ge}from"@xyflow/system";var W=class{template={type:"noise-translate-point",group:"Noise Transformers",data:{title:"Noise Translate Point",translateX:0,translateY:0,translateZ:0},handles:[{position:Ge.Left,dataType:"module",connection:"target",label:"Source Module",maxConnections:1},{position:Ge.Right,dataType:"module",connection:"source"}]}};import{CoreHandleType as Jo}from"@awesome-flow/core/abstract";import{Position as ne}from"@xyflow/system";var _=class{template={type:"noise-turbulence",group:"Noise Transformers",data:{title:"Noise Turbulence",frequency:1,power:1,roughness:1,seed:0},handles:[{position:ne.Left,dataType:"module",connection:"target",label:"Source Module",maxConnections:1},{position:ne.Left,dataType:Jo.variableProperty,label:"Variable Properties",connection:"target"},{position:ne.Right,dataType:"module",connection:"source"}]}};var wC={"noise-output":new A,"noise-billow":new D,"noise-checkerboard":new h,"noise-normalize":new U,"noise-logger":new H,"noise-constant":new P,position:new w,"position-logger":new X,grid:new v,"texture-data":new O,"noise-cylinders":new x,"noise-perlin":new I,"noise-ridged-multi":new b,"noise-spheres":new M,"noise-voronoi":new S,"noise-combiner":new z,"noise-clamp":new G,"noise-abs":new k,"noise-curve":new R,"noise-exponent":new F,"noise-invert":new L,"noise-scale-bias":new V,"noise-terrace":new E,"noise-blend":new Y,"noise-select":new Z,"noise-displace":new q,"noise-rotate-point":new $,"noise-scale-point":new K,"noise-translate-point":new W,"noise-turbulence":new _,"group-module":new B};import{jsx as Re,jsxs as Fe}from"react/jsx-runtime";function it({id:e,selected:u,data:i,type:N}){let[s,m]=rt(0),r=jo(),n=at(g=>{let c=g.position,d=g.module;if(c?.length&&d?.length&&d[0]?.module){let{module:p}=d[0],f=[];for(let y of c)for(let l of y.positions){let Le=p.getValue(l.x,l.y,l.z);f.push({position:l,value:Le})}r(e,{noise:f,module:p}),m(f.length)}},[]);return Fe(et,{id:e,selected:u,data:i,type:N,children:[Re(Qo,{nodeId:e,handles:i.handles,handleKey:"dataType",onDataUpdated:n,type:"target",resetComputedData:!0}),Fe(tt,{mt:5,children:["Noise points: ",s]}),Re(ot,{handles:i.handles,nodeId:e,type:"target"})]})}var ze=it;export{se as NoiseLoggerNode,ze as NoiseOutputNode,de as NoiseRawTextureNode,ue as PositionsLoggerNode};
|