@awesome-flow/noise 0.6.0 → 0.7.0
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 +663 -734
- package/dist/abstract/index.d.cts +6 -12
- package/dist/abstract/index.d.ts +6 -12
- package/dist/abstract/index.js +449 -522
- package/dist/{index-BungWYrh.d.cts → index-CfiOpOzX.d.cts} +1 -1
- package/dist/{index-DsQSjZC5.d.ts → index-mlK0X4O1.d.ts} +1 -1
- package/dist/modules/index.cjs +4 -30
- package/dist/modules/index.d.cts +2 -10
- package/dist/modules/index.d.ts +2 -10
- package/dist/modules/index.js +2 -17
- package/dist/{node-props-BbqbXDXn.d.cts → node-props-CAV2WNDN.d.cts} +3 -7
- package/dist/{node-props-BbqbXDXn.d.ts → node-props-CAV2WNDN.d.ts} +3 -7
- package/dist/nodes/generators/index.cjs +71 -114
- package/dist/nodes/generators/index.d.cts +3 -8
- package/dist/nodes/generators/index.d.ts +3 -8
- package/dist/nodes/generators/index.js +47 -79
- package/dist/nodes/index.cjs +604 -675
- package/dist/nodes/index.d.cts +3 -6
- package/dist/nodes/index.d.ts +3 -6
- package/dist/nodes/index.js +394 -466
- package/dist/nodes/modifiers/index.cjs +37 -52
- package/dist/nodes/modifiers/index.d.cts +2 -5
- package/dist/nodes/modifiers/index.d.ts +2 -5
- package/dist/nodes/modifiers/index.js +23 -38
- package/dist/nodes/output/index.cjs +239 -285
- package/dist/nodes/output/index.js +252 -290
- package/dist/nodes/selectors/index.cjs +230 -280
- package/dist/nodes/selectors/index.d.cts +2 -5
- package/dist/nodes/selectors/index.d.ts +2 -5
- package/dist/nodes/selectors/index.js +248 -290
- package/dist/nodes/transformers/index.cjs +10 -10
- package/dist/nodes/transformers/index.d.cts +2 -5
- package/dist/nodes/transformers/index.d.ts +2 -5
- package/dist/nodes/transformers/index.js +5 -5
- package/dist/templates/generators/index.cjs +201 -253
- package/dist/templates/generators/index.d.cts +3 -10
- package/dist/templates/generators/index.d.ts +3 -10
- package/dist/templates/generators/index.js +236 -279
- package/dist/templates/groups/index.cjs +201 -251
- package/dist/templates/groups/index.js +236 -278
- package/dist/templates/index.cjs +201 -253
- package/dist/templates/index.d.cts +4 -7
- package/dist/templates/index.d.ts +4 -7
- package/dist/templates/index.js +236 -279
- package/dist/templates/modifiers/index.cjs +201 -251
- package/dist/templates/modifiers/index.d.cts +2 -5
- package/dist/templates/modifiers/index.d.ts +2 -5
- package/dist/templates/modifiers/index.js +236 -278
- package/dist/templates/output/index.cjs +201 -251
- package/dist/templates/output/index.js +236 -278
- package/dist/templates/selectors/index.cjs +201 -251
- package/dist/templates/selectors/index.d.cts +2 -5
- package/dist/templates/selectors/index.d.ts +2 -5
- package/dist/templates/selectors/index.js +236 -278
- package/dist/templates/transformers/index.cjs +201 -251
- package/dist/templates/transformers/index.d.cts +3 -6
- package/dist/templates/transformers/index.d.ts +3 -6
- package/dist/templates/transformers/index.js +236 -278
- package/package.json +6 -4
package/dist/nodes/index.js
CHANGED
|
@@ -29,38 +29,28 @@ var require_fast_deep_equal = __commonJS({
|
|
|
29
29
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
30
30
|
"use strict";
|
|
31
31
|
module.exports = function equal(a, b) {
|
|
32
|
-
if (a === b)
|
|
33
|
-
return true;
|
|
32
|
+
if (a === b) return true;
|
|
34
33
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
35
|
-
if (a.constructor !== b.constructor)
|
|
36
|
-
return false;
|
|
34
|
+
if (a.constructor !== b.constructor) return false;
|
|
37
35
|
var length, i, keys;
|
|
38
36
|
if (Array.isArray(a)) {
|
|
39
37
|
length = a.length;
|
|
40
|
-
if (length != b.length)
|
|
41
|
-
return false;
|
|
38
|
+
if (length != b.length) return false;
|
|
42
39
|
for (i = length; i-- !== 0; )
|
|
43
|
-
if (!equal(a[i], b[i]))
|
|
44
|
-
return false;
|
|
40
|
+
if (!equal(a[i], b[i])) return false;
|
|
45
41
|
return true;
|
|
46
42
|
}
|
|
47
|
-
if (a.constructor === RegExp)
|
|
48
|
-
|
|
49
|
-
if (a.
|
|
50
|
-
return a.valueOf() === b.valueOf();
|
|
51
|
-
if (a.toString !== Object.prototype.toString)
|
|
52
|
-
return a.toString() === b.toString();
|
|
43
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
44
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
45
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
53
46
|
keys = Object.keys(a);
|
|
54
47
|
length = keys.length;
|
|
55
|
-
if (length !== Object.keys(b).length)
|
|
56
|
-
return false;
|
|
48
|
+
if (length !== Object.keys(b).length) return false;
|
|
57
49
|
for (i = length; i-- !== 0; )
|
|
58
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
59
|
-
return false;
|
|
50
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
60
51
|
for (i = length; i-- !== 0; ) {
|
|
61
52
|
var key = keys[i];
|
|
62
|
-
if (!equal(a[key], b[key]))
|
|
63
|
-
return false;
|
|
53
|
+
if (!equal(a[key], b[key])) return false;
|
|
64
54
|
}
|
|
65
55
|
return true;
|
|
66
56
|
}
|
|
@@ -72,7 +62,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
72
62
|
// src/nodes/generators/noise-billow-node.tsx
|
|
73
63
|
import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
74
64
|
import { useCallback, useMemo } from "react";
|
|
75
|
-
import { Billow } from "libnoise-ts
|
|
65
|
+
import { Billow } from "libnoise-simplex-ts";
|
|
76
66
|
import { useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
|
|
77
67
|
import { NodePropertyVariables } from "@awesome-flow/core/components";
|
|
78
68
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -98,7 +88,7 @@ var noise_billow_node_default = NoiseBillowNode;
|
|
|
98
88
|
// src/nodes/generators/noise-checkerboard-node.tsx
|
|
99
89
|
import { NodeContainer as NodeContainer2 } from "@awesome-flow/core/layout";
|
|
100
90
|
import { useEffect, useMemo as useMemo2 } from "react";
|
|
101
|
-
import { Checkerboard } from "libnoise-ts
|
|
91
|
+
import { Checkerboard } from "libnoise-simplex-ts";
|
|
102
92
|
import { useUpdateNodeComputedData as useUpdateNodeComputedData2 } from "@awesome-flow/core/hooks";
|
|
103
93
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
104
94
|
function NoiseCheckerboardNode({ id, selected, data, type }) {
|
|
@@ -116,7 +106,7 @@ import { NodeContainer as NodeContainer3 } from "@awesome-flow/core/layout";
|
|
|
116
106
|
import { useEffect as useEffect2, useMemo as useMemo3, useState } from "react";
|
|
117
107
|
import { Group, NumberInput, Stack } from "@mantine/core";
|
|
118
108
|
import { useUpdateNodeComputedData as useUpdateNodeComputedData3, useUpdateNodeData } from "@awesome-flow/core/hooks";
|
|
119
|
-
import { Const } from "libnoise-ts
|
|
109
|
+
import { Const } from "libnoise-simplex-ts";
|
|
120
110
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
121
111
|
function NoiseConstNode({ id, selected, data, type }) {
|
|
122
112
|
const [min, setMin] = useState(data.min);
|
|
@@ -156,7 +146,7 @@ var noise_const_node_default = NoiseConstNode;
|
|
|
156
146
|
// src/nodes/generators/noise-cylinders-node.tsx
|
|
157
147
|
import { NodeContainer as NodeContainer4, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
|
|
158
148
|
import { useCallback as useCallback2, useMemo as useMemo4 } from "react";
|
|
159
|
-
import { Cylinders } from "libnoise-ts
|
|
149
|
+
import { Cylinders } from "libnoise-simplex-ts";
|
|
160
150
|
import { useUpdateNodeComputedData as useUpdateNodeComputedData4 } from "@awesome-flow/core/hooks";
|
|
161
151
|
import { NodePropertyVariables as NodePropertyVariables2 } from "@awesome-flow/core/components";
|
|
162
152
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -182,7 +172,7 @@ var noise_cylinders_node_default = NoiseCylindersNode;
|
|
|
182
172
|
// src/nodes/generators/noise-perlin-node.tsx
|
|
183
173
|
import { NodeContainer as NodeContainer5, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
|
|
184
174
|
import { useCallback as useCallback3, useMemo as useMemo5 } from "react";
|
|
185
|
-
import { Perlin } from "libnoise-ts
|
|
175
|
+
import { Perlin } from "libnoise-simplex-ts";
|
|
186
176
|
import { useUpdateNodeComputedData as useUpdateNodeComputedData5 } from "@awesome-flow/core/hooks";
|
|
187
177
|
import { NodePropertyVariables as NodePropertyVariables3 } from "@awesome-flow/core/components";
|
|
188
178
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -208,7 +198,7 @@ var noise_perlin_node_default = NoisePerlinNode;
|
|
|
208
198
|
// src/nodes/generators/noise-ridgedmulti-node.tsx
|
|
209
199
|
import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
|
|
210
200
|
import { useCallback as useCallback4, useMemo as useMemo6 } from "react";
|
|
211
|
-
import { RidgedMulti } from "libnoise-ts
|
|
201
|
+
import { RidgedMulti } from "libnoise-simplex-ts";
|
|
212
202
|
import { useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
|
|
213
203
|
import { NodePropertyVariables as NodePropertyVariables4 } from "@awesome-flow/core/components";
|
|
214
204
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
@@ -226,67 +216,36 @@ function NoiseRidgedMultiNode({ id, selected, data, type }) {
|
|
|
226
216
|
}
|
|
227
217
|
var noise_ridgedmulti_node_default = NoiseRidgedMultiNode;
|
|
228
218
|
|
|
229
|
-
// src/nodes/generators/noise-simplex-node.tsx
|
|
230
|
-
import { NodeContainer as NodeContainer7 } from "@awesome-flow/core/layout";
|
|
231
|
-
import { useEffect as useEffect3, useMemo as useMemo7 } from "react";
|
|
232
|
-
import { useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
|
|
233
|
-
|
|
234
|
-
// src/modules/simplex-module.ts
|
|
235
|
-
import Module from "libnoise-ts/module/Module";
|
|
236
|
-
import { createNoise3D } from "simplex-noise";
|
|
237
|
-
var SimplexModule = class extends Module {
|
|
238
|
-
noise;
|
|
239
|
-
constructor(random) {
|
|
240
|
-
super();
|
|
241
|
-
this.noise = createNoise3D(random);
|
|
242
|
-
}
|
|
243
|
-
getValue(x, y, z) {
|
|
244
|
-
return this.noise(x, y, z);
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
// src/nodes/generators/noise-simplex-node.tsx
|
|
249
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
250
|
-
function NoiseSimplexNode({ id, selected, data, type }) {
|
|
251
|
-
const updateComputedData = useUpdateNodeComputedData7();
|
|
252
|
-
const module = useMemo7(() => new SimplexModule(), []);
|
|
253
|
-
useEffect3(() => {
|
|
254
|
-
updateComputedData(id, { module });
|
|
255
|
-
}, []);
|
|
256
|
-
return /* @__PURE__ */ jsx7(NodeContainer7, { id, selected, data, type });
|
|
257
|
-
}
|
|
258
|
-
var noise_simplex_node_default = NoiseSimplexNode;
|
|
259
|
-
|
|
260
219
|
// src/nodes/generators/noise-spheres-node.tsx
|
|
261
|
-
import { NodeContainer as
|
|
262
|
-
import { useCallback as useCallback5, useMemo as
|
|
263
|
-
import { Spheres } from "libnoise-ts
|
|
264
|
-
import { useUpdateNodeComputedData as
|
|
220
|
+
import { NodeContainer as NodeContainer7, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
|
|
221
|
+
import { useCallback as useCallback5, useMemo as useMemo7 } from "react";
|
|
222
|
+
import { Spheres } from "libnoise-simplex-ts";
|
|
223
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
|
|
265
224
|
import { NodePropertyVariables as NodePropertyVariables5 } from "@awesome-flow/core/components";
|
|
266
|
-
import { jsx as
|
|
225
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
267
226
|
function NoiseSpheresNode({ id, selected, data, type }) {
|
|
268
|
-
const updateComputedData =
|
|
269
|
-
const module =
|
|
227
|
+
const updateComputedData = useUpdateNodeComputedData7();
|
|
228
|
+
const module = useMemo7(() => new Spheres(), []);
|
|
270
229
|
const onPropertiesChange = useCallback5((properties) => {
|
|
271
230
|
Object.keys(properties).forEach((k) => module[k] = properties[k].value);
|
|
272
231
|
updateComputedData(id, { module });
|
|
273
232
|
}, []);
|
|
274
|
-
return /* @__PURE__ */ jsxs6(
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ jsxs6(NodeContainer7, { id, selected, data, type, children: [
|
|
234
|
+
/* @__PURE__ */ jsx7(NodePropertyVariables5, { data, nodeId: id, onPropertiesChange }),
|
|
235
|
+
/* @__PURE__ */ jsx7(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
|
|
277
236
|
] });
|
|
278
237
|
}
|
|
279
238
|
var noise_spheres_node_default = NoiseSpheresNode;
|
|
280
239
|
|
|
281
240
|
// src/nodes/generators/noise-voronoi-node.tsx
|
|
282
|
-
import { NodeContainer as
|
|
241
|
+
import { NodeContainer as NodeContainer8, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
|
|
283
242
|
import { useCallback as useCallback6 } from "react";
|
|
284
|
-
import { Voronoi } from "libnoise-ts
|
|
285
|
-
import { useUpdateNodeComputedData as
|
|
243
|
+
import { Voronoi } from "libnoise-simplex-ts";
|
|
244
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData8 } from "@awesome-flow/core/hooks";
|
|
286
245
|
import { NodePropertyVariables as NodePropertyVariables6 } from "@awesome-flow/core/components";
|
|
287
|
-
import { jsx as
|
|
246
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
288
247
|
function NoiseVoronoiNode({ id, selected, data, type }) {
|
|
289
|
-
const updateComputedData =
|
|
248
|
+
const updateComputedData = useUpdateNodeComputedData8();
|
|
290
249
|
const onPropertiesChange = useCallback6(
|
|
291
250
|
(properties) => {
|
|
292
251
|
const module = new Voronoi(
|
|
@@ -299,27 +258,27 @@ function NoiseVoronoiNode({ id, selected, data, type }) {
|
|
|
299
258
|
},
|
|
300
259
|
[]
|
|
301
260
|
);
|
|
302
|
-
return /* @__PURE__ */ jsxs7(
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ jsxs7(NodeContainer8, { id, selected, data, type, children: [
|
|
262
|
+
/* @__PURE__ */ jsx8(NodePropertyVariables6, { data, nodeId: id, onPropertiesChange }),
|
|
263
|
+
/* @__PURE__ */ jsx8(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
|
|
305
264
|
] });
|
|
306
265
|
}
|
|
307
266
|
var noise_voronoi_node_default = NoiseVoronoiNode;
|
|
308
267
|
|
|
309
268
|
// src/nodes/generators/position-const-node.tsx
|
|
310
|
-
import { NodeContainer as
|
|
311
|
-
import { useEffect as
|
|
269
|
+
import { NodeContainer as NodeContainer9 } from "@awesome-flow/core/layout";
|
|
270
|
+
import { useEffect as useEffect3, useState as useState2 } from "react";
|
|
312
271
|
import { Group as Group2, NumberInput as NumberInput2, Stack as Stack2 } from "@mantine/core";
|
|
313
|
-
import { useUpdateNodeComputedData as
|
|
314
|
-
import { jsx as
|
|
272
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData9, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
|
|
273
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
315
274
|
function PositionConstNode({ id, selected, data, type }) {
|
|
316
275
|
const position = data.position ?? { x: 0, y: 0, z: 0 };
|
|
317
276
|
const [x, setX] = useState2(position.x);
|
|
318
277
|
const [y, setY] = useState2(position.y);
|
|
319
278
|
const [z, setZ] = useState2(position.z);
|
|
320
279
|
const updateNodeData = useUpdateNodeData2();
|
|
321
|
-
const updateComputedData =
|
|
322
|
-
|
|
280
|
+
const updateComputedData = useUpdateNodeComputedData9();
|
|
281
|
+
useEffect3(() => {
|
|
323
282
|
const position2 = { x, y, z };
|
|
324
283
|
updateNodeData(id, {
|
|
325
284
|
position: position2
|
|
@@ -328,47 +287,47 @@ function PositionConstNode({ id, selected, data, type }) {
|
|
|
328
287
|
positions: [position2]
|
|
329
288
|
});
|
|
330
289
|
}, [x, y, z]);
|
|
331
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ jsx9(NodeContainer9, { id, selected, data, type, children: /* @__PURE__ */ jsxs8(Stack2, { children: [
|
|
332
291
|
/* @__PURE__ */ jsxs8(Group2, { children: [
|
|
333
292
|
"x: ",
|
|
334
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ jsx9(NumberInput2, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
|
|
335
294
|
] }),
|
|
336
295
|
/* @__PURE__ */ jsxs8(Group2, { children: [
|
|
337
296
|
"y: ",
|
|
338
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ jsx9(NumberInput2, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
|
|
339
298
|
] }),
|
|
340
299
|
/* @__PURE__ */ jsxs8(Group2, { children: [
|
|
341
300
|
"z: ",
|
|
342
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ jsx9(NumberInput2, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
|
|
343
302
|
] })
|
|
344
303
|
] }) });
|
|
345
304
|
}
|
|
346
305
|
var position_const_node_default = PositionConstNode;
|
|
347
306
|
|
|
348
307
|
// src/nodes/generators/position-grid-node.tsx
|
|
349
|
-
import { NodeContainer as
|
|
350
|
-
import { useEffect as
|
|
308
|
+
import { NodeContainer as NodeContainer10 } from "@awesome-flow/core/layout";
|
|
309
|
+
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
351
310
|
import { Group as Group3, NumberInput as NumberInput3, Stack as Stack3 } from "@mantine/core";
|
|
352
|
-
import { useUpdateNodeComputedData as
|
|
353
|
-
import { jsx as
|
|
311
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData10, useUpdateNodeData as useUpdateNodeData3 } from "@awesome-flow/core/hooks";
|
|
312
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
354
313
|
function PositionGridNode({ id, selected, data, type }) {
|
|
355
314
|
const [x, setX] = useState3(data.center?.x);
|
|
356
315
|
const [y, setY] = useState3(data.center?.y);
|
|
357
316
|
const [z, setZ] = useState3(data.center?.z);
|
|
358
317
|
const [radius, setRadius] = useState3(data.radius);
|
|
359
318
|
const updateNodeData = useUpdateNodeData3();
|
|
360
|
-
const updateComputedData =
|
|
361
|
-
|
|
319
|
+
const updateComputedData = useUpdateNodeComputedData10();
|
|
320
|
+
useEffect4(() => {
|
|
362
321
|
updateNodeData(id, {
|
|
363
322
|
center: { x, y, z }
|
|
364
323
|
});
|
|
365
324
|
}, [x, y, z]);
|
|
366
|
-
|
|
325
|
+
useEffect4(() => {
|
|
367
326
|
updateNodeData(id, {
|
|
368
327
|
radius
|
|
369
328
|
});
|
|
370
329
|
}, [radius]);
|
|
371
|
-
|
|
330
|
+
useEffect4(() => {
|
|
372
331
|
const positions = [];
|
|
373
332
|
for (let i = -radius; i < radius; i++) {
|
|
374
333
|
for (let j = -radius; j < radius; j++) {
|
|
@@ -379,40 +338,40 @@ function PositionGridNode({ id, selected, data, type }) {
|
|
|
379
338
|
positions
|
|
380
339
|
});
|
|
381
340
|
}, [x, y, z, radius]);
|
|
382
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ jsx10(NodeContainer10, { id, selected, data, type, children: /* @__PURE__ */ jsxs9(Stack3, { children: [
|
|
383
342
|
/* @__PURE__ */ jsxs9(Group3, { children: [
|
|
384
343
|
"x: ",
|
|
385
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ jsx10(NumberInput3, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
|
|
386
345
|
] }),
|
|
387
346
|
/* @__PURE__ */ jsxs9(Group3, { children: [
|
|
388
347
|
"y: ",
|
|
389
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ jsx10(NumberInput3, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
|
|
390
349
|
] }),
|
|
391
350
|
/* @__PURE__ */ jsxs9(Group3, { children: [
|
|
392
351
|
"z: ",
|
|
393
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ jsx10(NumberInput3, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
|
|
394
353
|
] }),
|
|
395
354
|
/* @__PURE__ */ jsxs9(Group3, { children: [
|
|
396
355
|
"r: ",
|
|
397
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ jsx10(NumberInput3, { size: "xs", w: 100, value: radius, onChange: (e) => setRadius(Number(e)) })
|
|
398
357
|
] })
|
|
399
358
|
] }) });
|
|
400
359
|
}
|
|
401
360
|
var position_grid_node_default = PositionGridNode;
|
|
402
361
|
|
|
403
362
|
// src/nodes/groups/module-group-node.tsx
|
|
404
|
-
import { NodeContainer as
|
|
363
|
+
import { NodeContainer as NodeContainer11, NodeCollapse, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
|
|
405
364
|
import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
|
|
406
|
-
import { useCallback as useCallback7, useEffect as
|
|
365
|
+
import { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo8 } from "react";
|
|
407
366
|
import { shallow } from "zustand/shallow";
|
|
408
367
|
import { Badge, Group as Group4 } from "@mantine/core";
|
|
409
368
|
import {
|
|
410
369
|
useFlowStore,
|
|
411
370
|
useIncomingComputedData,
|
|
412
371
|
useInteractiveStore,
|
|
413
|
-
useUpdateNodeComputedData as
|
|
372
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData11
|
|
414
373
|
} from "@awesome-flow/core/hooks";
|
|
415
|
-
import { jsx as
|
|
374
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
416
375
|
function ModuleGroupNode({
|
|
417
376
|
id,
|
|
418
377
|
selected,
|
|
@@ -433,10 +392,10 @@ function ModuleGroupNode({
|
|
|
433
392
|
useCallback7((state) => state.nodeIntersectionTargets[id], [id]),
|
|
434
393
|
shallow
|
|
435
394
|
);
|
|
436
|
-
|
|
395
|
+
useEffect5(() => {
|
|
437
396
|
updateNodeInternals(id);
|
|
438
397
|
}, [width, height]);
|
|
439
|
-
|
|
398
|
+
useEffect5(() => {
|
|
440
399
|
triggerNodeChanges([
|
|
441
400
|
{
|
|
442
401
|
id,
|
|
@@ -448,33 +407,33 @@ function ModuleGroupNode({
|
|
|
448
407
|
const onCollapsed = useCallback7((collapsed) => {
|
|
449
408
|
setGroupCollapsed(id, collapsed);
|
|
450
409
|
}, []);
|
|
451
|
-
const size =
|
|
410
|
+
const size = useMemo8(() => {
|
|
452
411
|
return {
|
|
453
412
|
width: data.initialSize?.width || 100,
|
|
454
413
|
height: data.initialSize?.height || 50
|
|
455
414
|
};
|
|
456
415
|
}, [data.initialSize]);
|
|
457
416
|
const incomingModules = useIncomingComputedData(id);
|
|
458
|
-
const updateComputedData =
|
|
459
|
-
|
|
417
|
+
const updateComputedData = useUpdateNodeComputedData11();
|
|
418
|
+
useEffect5(() => {
|
|
460
419
|
if (incomingModules?.length) {
|
|
461
420
|
const { module } = incomingModules[0];
|
|
462
421
|
updateComputedData(id, { module });
|
|
463
422
|
}
|
|
464
423
|
}, [incomingModules]);
|
|
465
424
|
return /* @__PURE__ */ jsxs10(
|
|
466
|
-
|
|
425
|
+
NodeContainer11,
|
|
467
426
|
{
|
|
468
427
|
id,
|
|
469
428
|
selected,
|
|
470
429
|
data,
|
|
471
|
-
title: /* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
430
|
+
title: /* @__PURE__ */ jsx11(Group4, { justify: "space-between", children: /* @__PURE__ */ jsxs10(Group4, { gap: "xs", children: [
|
|
431
|
+
/* @__PURE__ */ jsx11(Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
|
|
432
|
+
/* @__PURE__ */ jsx11(NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
|
|
474
433
|
] }) }),
|
|
475
434
|
type,
|
|
476
435
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ jsx11(
|
|
478
437
|
NodeResizer,
|
|
479
438
|
{
|
|
480
439
|
nodeId: id,
|
|
@@ -483,7 +442,7 @@ function ModuleGroupNode({
|
|
|
483
442
|
isVisible: selected && !data.isCollapsed
|
|
484
443
|
}
|
|
485
444
|
),
|
|
486
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ jsx11(NodeTrackConnections7, { handles: data.handles, nodeId: id, type: "target" })
|
|
487
446
|
]
|
|
488
447
|
}
|
|
489
448
|
);
|
|
@@ -491,51 +450,51 @@ function ModuleGroupNode({
|
|
|
491
450
|
var module_group_node_default = ModuleGroupNode;
|
|
492
451
|
|
|
493
452
|
// src/nodes/modifiers/noise-abs-node.tsx
|
|
494
|
-
import { NodeContainer as
|
|
495
|
-
import { useEffect as
|
|
496
|
-
import { useIncomingComputedData as useIncomingComputedData2, useUpdateNodeComputedData as
|
|
497
|
-
import { Abs } from "libnoise-ts
|
|
498
|
-
import { jsx as
|
|
453
|
+
import { NodeContainer as NodeContainer12, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
|
|
454
|
+
import { useEffect as useEffect6 } from "react";
|
|
455
|
+
import { useIncomingComputedData as useIncomingComputedData2, useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
|
|
456
|
+
import { Abs } from "libnoise-simplex-ts";
|
|
457
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
499
458
|
function NoiseAbsNode({ id, selected, data, type }) {
|
|
500
459
|
const incoming = useIncomingComputedData2(id);
|
|
501
|
-
const updateComputedData =
|
|
502
|
-
|
|
460
|
+
const updateComputedData = useUpdateNodeComputedData12();
|
|
461
|
+
useEffect6(() => {
|
|
503
462
|
if (incoming?.length > 0) {
|
|
504
463
|
const module = new Abs(incoming[0].module);
|
|
505
464
|
updateComputedData(id, { module });
|
|
506
465
|
}
|
|
507
466
|
}, [incoming]);
|
|
508
|
-
return /* @__PURE__ */
|
|
467
|
+
return /* @__PURE__ */ jsx12(NodeContainer12, { id, selected, data, type, children: /* @__PURE__ */ jsx12(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "target" }) });
|
|
509
468
|
}
|
|
510
469
|
var noise_abs_node_default = NoiseAbsNode;
|
|
511
470
|
|
|
512
471
|
// src/nodes/modifiers/noise-clamp-node.tsx
|
|
513
|
-
import { NodeContainer as
|
|
514
|
-
import { useEffect as
|
|
472
|
+
import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
|
|
473
|
+
import { useEffect as useEffect7, useState as useState4 } from "react";
|
|
515
474
|
import { Group as Group5, NumberInput as NumberInput4, Stack as Stack4 } from "@mantine/core";
|
|
516
475
|
import {
|
|
517
476
|
useIncomingComputedData as useIncomingComputedData3,
|
|
518
|
-
useUpdateNodeComputedData as
|
|
477
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData13,
|
|
519
478
|
useUpdateNodeData as useUpdateNodeData4
|
|
520
479
|
} from "@awesome-flow/core/hooks";
|
|
521
|
-
import { Clamp } from "libnoise-ts
|
|
522
|
-
import { jsx as
|
|
480
|
+
import { Clamp } from "libnoise-simplex-ts";
|
|
481
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
523
482
|
function NoiseClampNode({ id, selected, data, type }) {
|
|
524
483
|
const [lowerBound, setLowerBound] = useState4(data.lowerBound);
|
|
525
484
|
const [upperBound, setUpperBound] = useState4(data.upperBound);
|
|
526
485
|
const incoming = useIncomingComputedData3(id);
|
|
527
486
|
const updateNodeData = useUpdateNodeData4();
|
|
528
|
-
const updateComputedData =
|
|
529
|
-
|
|
487
|
+
const updateComputedData = useUpdateNodeComputedData13();
|
|
488
|
+
useEffect7(() => {
|
|
530
489
|
if (incoming?.length) {
|
|
531
490
|
const module = new Clamp(incoming[0].module, lowerBound, upperBound);
|
|
532
491
|
updateComputedData(id, { module });
|
|
533
492
|
}
|
|
534
493
|
updateNodeData(id, { lowerBound, upperBound });
|
|
535
494
|
}, [incoming, lowerBound, upperBound]);
|
|
536
|
-
return /* @__PURE__ */ jsxs11(
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
/* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ jsxs11(NodeContainer13, { id, selected, data, type, children: [
|
|
496
|
+
/* @__PURE__ */ jsx13(Stack4, { children: /* @__PURE__ */ jsxs11(Group5, { children: [
|
|
497
|
+
/* @__PURE__ */ jsx13(
|
|
539
498
|
NumberInput4,
|
|
540
499
|
{
|
|
541
500
|
size: "xs",
|
|
@@ -545,7 +504,7 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
545
504
|
step: 0.1
|
|
546
505
|
}
|
|
547
506
|
),
|
|
548
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ jsx13(
|
|
549
508
|
NumberInput4,
|
|
550
509
|
{
|
|
551
510
|
size: "xs",
|
|
@@ -556,17 +515,17 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
556
515
|
}
|
|
557
516
|
)
|
|
558
517
|
] }) }),
|
|
559
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ jsx13(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" })
|
|
560
519
|
] });
|
|
561
520
|
}
|
|
562
521
|
var noise_clamp_node_default = NoiseClampNode;
|
|
563
522
|
|
|
564
523
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
565
|
-
import { NodeCombobox, NodeContainer as
|
|
566
|
-
import { useCallback as useCallback8, useEffect as
|
|
524
|
+
import { NodeCombobox, NodeContainer as NodeContainer14, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
|
|
525
|
+
import { useCallback as useCallback8, useEffect as useEffect8 } from "react";
|
|
567
526
|
import {
|
|
568
527
|
useIncomingComputedData as useIncomingComputedData4,
|
|
569
|
-
useUpdateNodeComputedData as
|
|
528
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData14,
|
|
570
529
|
useUpdateNodeData as useUpdateNodeData5
|
|
571
530
|
} from "@awesome-flow/core/hooks";
|
|
572
531
|
import {
|
|
@@ -578,7 +537,7 @@ import {
|
|
|
578
537
|
} from "@tabler/icons-react";
|
|
579
538
|
|
|
580
539
|
// src/abstract/operations.ts
|
|
581
|
-
import { Add, Max, Min, Multiply, Power } from "libnoise-ts
|
|
540
|
+
import { Add, Max, Min, Multiply, Power } from "libnoise-simplex-ts";
|
|
582
541
|
var noiseCombineModuleMap = {
|
|
583
542
|
["add" /* add */]: Add,
|
|
584
543
|
["max" /* max */]: Max,
|
|
@@ -588,19 +547,19 @@ var noiseCombineModuleMap = {
|
|
|
588
547
|
};
|
|
589
548
|
|
|
590
549
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
591
|
-
import { jsx as
|
|
550
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
592
551
|
var options = {
|
|
593
|
-
add: /* @__PURE__ */
|
|
594
|
-
min: /* @__PURE__ */
|
|
595
|
-
max: /* @__PURE__ */
|
|
596
|
-
multiply: /* @__PURE__ */
|
|
597
|
-
power: /* @__PURE__ */
|
|
552
|
+
add: /* @__PURE__ */ jsx14(IconPlus, {}),
|
|
553
|
+
min: /* @__PURE__ */ jsx14(IconChevronLeft, {}),
|
|
554
|
+
max: /* @__PURE__ */ jsx14(IconChevronRight, {}),
|
|
555
|
+
multiply: /* @__PURE__ */ jsx14(IconAsterisk, {}),
|
|
556
|
+
power: /* @__PURE__ */ jsx14(IconChevronUp, {})
|
|
598
557
|
};
|
|
599
558
|
function NoiseCombineNode({ id, selected, data, type }) {
|
|
600
559
|
const updateNodeData = useUpdateNodeData5();
|
|
601
|
-
const updateComputedData =
|
|
560
|
+
const updateComputedData = useUpdateNodeComputedData14();
|
|
602
561
|
const incoming = useIncomingComputedData4(id);
|
|
603
|
-
|
|
562
|
+
useEffect8(() => {
|
|
604
563
|
const ModuleFactory = noiseCombineModuleMap[data.operation];
|
|
605
564
|
if (incoming?.length > 1) {
|
|
606
565
|
const module = new ModuleFactory(incoming[0].module, incoming[1].module);
|
|
@@ -610,19 +569,19 @@ function NoiseCombineNode({ id, selected, data, type }) {
|
|
|
610
569
|
const onChange = useCallback8((operation) => {
|
|
611
570
|
updateNodeData(id, { operation });
|
|
612
571
|
}, []);
|
|
613
|
-
return /* @__PURE__ */ jsxs12(
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
572
|
+
return /* @__PURE__ */ jsxs12(NodeContainer14, { id, selected, data, type, children: [
|
|
573
|
+
/* @__PURE__ */ jsx14(NodeCombobox, { options, selected: data.operation, onChange, width: 150 }),
|
|
574
|
+
/* @__PURE__ */ jsx14(NodeTrackConnections10, { handles: data.handles, nodeId: id, type: "target" })
|
|
616
575
|
] });
|
|
617
576
|
}
|
|
618
577
|
var noise_combine_node_default = NoiseCombineNode;
|
|
619
578
|
|
|
620
579
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
621
|
-
import { NodeContainer as
|
|
580
|
+
import { NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
|
|
622
581
|
import { ActionIcon, Button, Group as Group6, NumberInput as NumberInput5, Space } from "@mantine/core";
|
|
623
582
|
import {
|
|
624
583
|
useIncomingComputedData as useIncomingComputedData5,
|
|
625
|
-
useUpdateNodeComputedData as
|
|
584
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData15,
|
|
626
585
|
useUpdateNodeData as useUpdateNodeData6
|
|
627
586
|
} from "@awesome-flow/core/hooks";
|
|
628
587
|
|
|
@@ -630,7 +589,7 @@ import {
|
|
|
630
589
|
import { useState as useState8, useCallback as useCallback14 } from "react";
|
|
631
590
|
|
|
632
591
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
|
|
633
|
-
import { useLayoutEffect, useEffect as
|
|
592
|
+
import { useLayoutEffect, useEffect as useEffect9 } from "react";
|
|
634
593
|
function validateFormName(name) {
|
|
635
594
|
if (!/^[0-9a-zA-Z-]+$/.test(name)) {
|
|
636
595
|
throw new Error(
|
|
@@ -638,7 +597,7 @@ function validateFormName(name) {
|
|
|
638
597
|
);
|
|
639
598
|
}
|
|
640
599
|
}
|
|
641
|
-
var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect :
|
|
600
|
+
var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect9;
|
|
642
601
|
function useFormEvent(eventKey, handler) {
|
|
643
602
|
useIsomorphicEffect(() => {
|
|
644
603
|
if (eventKey) {
|
|
@@ -882,16 +841,13 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
882
841
|
|
|
883
842
|
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
884
843
|
function set(obj, key, val) {
|
|
885
|
-
if (typeof val.value === "object")
|
|
886
|
-
val.value = klona(val.value);
|
|
844
|
+
if (typeof val.value === "object") val.value = klona(val.value);
|
|
887
845
|
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
|
888
846
|
Object.defineProperty(obj, key, val);
|
|
889
|
-
} else
|
|
890
|
-
obj[key] = val.value;
|
|
847
|
+
} else obj[key] = val.value;
|
|
891
848
|
}
|
|
892
849
|
function klona(x) {
|
|
893
|
-
if (typeof x !== "object")
|
|
894
|
-
return x;
|
|
850
|
+
if (typeof x !== "object") return x;
|
|
895
851
|
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
|
896
852
|
if (str === "[object Object]") {
|
|
897
853
|
tmp = Object.create(x.__proto__ || null);
|
|
@@ -923,8 +879,7 @@ function klona(x) {
|
|
|
923
879
|
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
|
924
880
|
}
|
|
925
881
|
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
|
926
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k])
|
|
927
|
-
continue;
|
|
882
|
+
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
|
928
883
|
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
|
929
884
|
}
|
|
930
885
|
}
|
|
@@ -1239,7 +1194,7 @@ function useFormValues({
|
|
|
1239
1194
|
}
|
|
1240
1195
|
|
|
1241
1196
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
|
|
1242
|
-
import { useRef as useRef4, useCallback as useCallback13, useEffect as
|
|
1197
|
+
import { useRef as useRef4, useCallback as useCallback13, useEffect as useEffect10 } from "react";
|
|
1243
1198
|
function useFormWatch({
|
|
1244
1199
|
$status
|
|
1245
1200
|
}) {
|
|
@@ -1247,7 +1202,7 @@ function useFormWatch({
|
|
|
1247
1202
|
{}
|
|
1248
1203
|
);
|
|
1249
1204
|
const watch = useCallback13((path, callback) => {
|
|
1250
|
-
|
|
1205
|
+
useEffect10(() => {
|
|
1251
1206
|
subscribers.current[path] = subscribers.current[path] || [];
|
|
1252
1207
|
subscribers.current[path].push(callback);
|
|
1253
1208
|
return () => {
|
|
@@ -1536,17 +1491,16 @@ function useForm({
|
|
|
1536
1491
|
}
|
|
1537
1492
|
|
|
1538
1493
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
1539
|
-
import { useCallback as useCallback15, useEffect as
|
|
1540
|
-
import { Curve } from "libnoise-ts
|
|
1541
|
-
import { Tuple } from "libnoise-ts/util";
|
|
1494
|
+
import { useCallback as useCallback15, useEffect as useEffect11, useState as useState9 } from "react";
|
|
1495
|
+
import { Curve, Tuple } from "libnoise-simplex-ts";
|
|
1542
1496
|
import { IconX } from "@tabler/icons-react";
|
|
1543
1497
|
import { randomId } from "@mantine/hooks";
|
|
1544
1498
|
import { NodeState } from "@awesome-flow/core/abstract";
|
|
1545
|
-
import { Fragment, jsx as
|
|
1499
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1546
1500
|
function NoiseCurveNode({ id, selected, data, type }) {
|
|
1547
1501
|
const incoming = useIncomingComputedData5(id);
|
|
1548
1502
|
const updateNodeData = useUpdateNodeData6();
|
|
1549
|
-
const updateComputedData =
|
|
1503
|
+
const updateComputedData = useUpdateNodeComputedData15();
|
|
1550
1504
|
const [values, setValues] = useState9([]);
|
|
1551
1505
|
const form = useForm({
|
|
1552
1506
|
mode: "uncontrolled",
|
|
@@ -1575,11 +1529,11 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1575
1529
|
form.validate();
|
|
1576
1530
|
}, [])
|
|
1577
1531
|
});
|
|
1578
|
-
|
|
1532
|
+
useEffect11(() => {
|
|
1579
1533
|
const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: randomId() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: randomId() }));
|
|
1580
1534
|
form.initialize({ points });
|
|
1581
1535
|
}, []);
|
|
1582
|
-
|
|
1536
|
+
useEffect11(() => {
|
|
1583
1537
|
if (incoming?.length && values?.length >= 4) {
|
|
1584
1538
|
const module = new Curve(
|
|
1585
1539
|
incoming[0].module,
|
|
@@ -1589,7 +1543,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1589
1543
|
}
|
|
1590
1544
|
}, [values, incoming]);
|
|
1591
1545
|
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs13(Group6, { mt: "xs", children: [
|
|
1592
|
-
/* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ jsx15(
|
|
1593
1547
|
NumberInput5,
|
|
1594
1548
|
{
|
|
1595
1549
|
size: "xs",
|
|
@@ -1600,7 +1554,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1600
1554
|
},
|
|
1601
1555
|
form.key(`points.${index}.input`)
|
|
1602
1556
|
),
|
|
1603
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ jsx15(
|
|
1604
1558
|
NumberInput5,
|
|
1605
1559
|
{
|
|
1606
1560
|
size: "xs",
|
|
@@ -1611,22 +1565,22 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1611
1565
|
},
|
|
1612
1566
|
form.key(`points.${index}.output`)
|
|
1613
1567
|
),
|
|
1614
|
-
data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */
|
|
1568
|
+
data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx15(
|
|
1615
1569
|
ActionIcon,
|
|
1616
1570
|
{
|
|
1617
1571
|
color: "red",
|
|
1618
1572
|
variant: "outline",
|
|
1619
1573
|
size: "sm",
|
|
1620
1574
|
onClick: () => form.removeListItem("points", index),
|
|
1621
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ jsx15(IconX, { size: "1rem" })
|
|
1622
1576
|
}
|
|
1623
1577
|
)
|
|
1624
1578
|
] }, item.key));
|
|
1625
|
-
return /* @__PURE__ */ jsxs13(
|
|
1579
|
+
return /* @__PURE__ */ jsxs13(NodeContainer15, { id, selected, type, data, children: [
|
|
1626
1580
|
fields,
|
|
1627
1581
|
data.state === NodeState.edit && /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
1628
|
-
/* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ jsx15(Space, { h: 10 }),
|
|
1583
|
+
/* @__PURE__ */ jsx15(
|
|
1630
1584
|
Button,
|
|
1631
1585
|
{
|
|
1632
1586
|
variant: "outline",
|
|
@@ -1637,38 +1591,38 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1637
1591
|
}
|
|
1638
1592
|
)
|
|
1639
1593
|
] }),
|
|
1640
|
-
/* @__PURE__ */
|
|
1594
|
+
/* @__PURE__ */ jsx15(NodeTrackConnections11, { handles: data.handles, nodeId: id, type: "target" })
|
|
1641
1595
|
] });
|
|
1642
1596
|
}
|
|
1643
1597
|
var noise_curve_node_default = NoiseCurveNode;
|
|
1644
1598
|
|
|
1645
1599
|
// src/nodes/modifiers/noise-exponent-node.tsx
|
|
1646
|
-
import { NodeContainer as
|
|
1647
|
-
import { useEffect as
|
|
1600
|
+
import { NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
|
|
1601
|
+
import { useEffect as useEffect12, useState as useState10 } from "react";
|
|
1648
1602
|
import { Group as Group7, NumberInput as NumberInput6, Stack as Stack5 } from "@mantine/core";
|
|
1649
1603
|
import {
|
|
1650
1604
|
useIncomingComputedData as useIncomingComputedData6,
|
|
1651
|
-
useUpdateNodeComputedData as
|
|
1605
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData16,
|
|
1652
1606
|
useUpdateNodeData as useUpdateNodeData7
|
|
1653
1607
|
} from "@awesome-flow/core/hooks";
|
|
1654
|
-
import { Exponent } from "libnoise-ts
|
|
1655
|
-
import { jsx as
|
|
1608
|
+
import { Exponent } from "libnoise-simplex-ts";
|
|
1609
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1656
1610
|
function NoiseExponentNode({ id, selected, data, type }) {
|
|
1657
1611
|
const [exponent, setExponent] = useState10(data.exponent);
|
|
1658
1612
|
const incoming = useIncomingComputedData6(id);
|
|
1659
1613
|
const updateNodeData = useUpdateNodeData7();
|
|
1660
|
-
const updateComputedData =
|
|
1661
|
-
|
|
1614
|
+
const updateComputedData = useUpdateNodeComputedData16();
|
|
1615
|
+
useEffect12(() => {
|
|
1662
1616
|
if (incoming?.length > 0) {
|
|
1663
1617
|
const module = new Exponent(incoming[0].module, exponent);
|
|
1664
1618
|
updateComputedData(id, { module });
|
|
1665
1619
|
}
|
|
1666
1620
|
updateNodeData(id, { exponent });
|
|
1667
1621
|
}, [incoming, exponent]);
|
|
1668
|
-
return /* @__PURE__ */ jsxs14(
|
|
1669
|
-
/* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ jsxs14(NodeContainer16, { id, selected, data, type, children: [
|
|
1623
|
+
/* @__PURE__ */ jsx16(Stack5, { children: /* @__PURE__ */ jsxs14(Group7, { children: [
|
|
1670
1624
|
"Exponent:",
|
|
1671
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsx16(
|
|
1672
1626
|
NumberInput6,
|
|
1673
1627
|
{
|
|
1674
1628
|
size: "xs",
|
|
@@ -1678,42 +1632,42 @@ function NoiseExponentNode({ id, selected, data, type }) {
|
|
|
1678
1632
|
}
|
|
1679
1633
|
)
|
|
1680
1634
|
] }) }),
|
|
1681
|
-
/* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ jsx16(NodeTrackConnections12, { handles: data.handles, nodeId: id, type: "target" })
|
|
1682
1636
|
] });
|
|
1683
1637
|
}
|
|
1684
1638
|
var noise_exponent_node_default = NoiseExponentNode;
|
|
1685
1639
|
|
|
1686
1640
|
// src/nodes/modifiers/noise-invert-node.tsx
|
|
1687
|
-
import { NodeContainer as
|
|
1688
|
-
import { useEffect as
|
|
1689
|
-
import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as
|
|
1690
|
-
import { Invert } from "libnoise-ts
|
|
1691
|
-
import { jsx as
|
|
1641
|
+
import { NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
|
|
1642
|
+
import { useEffect as useEffect13 } from "react";
|
|
1643
|
+
import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData17 } from "@awesome-flow/core/hooks";
|
|
1644
|
+
import { Invert } from "libnoise-simplex-ts";
|
|
1645
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1692
1646
|
function NoiseInvertNode({ id, selected, data, type }) {
|
|
1693
1647
|
const incoming = useIncomingComputedData7(id);
|
|
1694
|
-
const updateComputedData =
|
|
1695
|
-
|
|
1648
|
+
const updateComputedData = useUpdateNodeComputedData17();
|
|
1649
|
+
useEffect13(() => {
|
|
1696
1650
|
if (incoming?.length > 0) {
|
|
1697
1651
|
const module = new Invert(incoming[0].module);
|
|
1698
1652
|
updateComputedData(id, { module });
|
|
1699
1653
|
}
|
|
1700
1654
|
}, [incoming]);
|
|
1701
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ jsx17(NodeContainer17, { id, selected, data, type, children: /* @__PURE__ */ jsx17(NodeTrackConnections13, { handles: data.handles, nodeId: id, type: "target" }) });
|
|
1702
1656
|
}
|
|
1703
1657
|
var noise_invert_node_default = NoiseInvertNode;
|
|
1704
1658
|
|
|
1705
1659
|
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
1706
|
-
import { NodeContainer as
|
|
1707
|
-
import { useEffect as
|
|
1660
|
+
import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
|
|
1661
|
+
import { useEffect as useEffect14, useState as useState11 } from "react";
|
|
1708
1662
|
import { Group as Group8, NumberInput as NumberInput7, Stack as Stack6 } from "@mantine/core";
|
|
1709
1663
|
import {
|
|
1710
1664
|
useIncomingComputedData as useIncomingComputedData8,
|
|
1711
|
-
useUpdateNodeComputedData as
|
|
1665
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData18,
|
|
1712
1666
|
useUpdateNodeData as useUpdateNodeData8
|
|
1713
1667
|
} from "@awesome-flow/core/hooks";
|
|
1714
1668
|
|
|
1715
1669
|
// src/modules/normalize-noise-module.ts
|
|
1716
|
-
import ModifierModule from "libnoise-ts
|
|
1670
|
+
import { ModifierModule } from "libnoise-simplex-ts";
|
|
1717
1671
|
var NormalizeNoiseModule = class extends ModifierModule {
|
|
1718
1672
|
constructor(source, lowerBound, upperBound) {
|
|
1719
1673
|
super(source);
|
|
@@ -1729,14 +1683,14 @@ function normalize(value, min, max) {
|
|
|
1729
1683
|
}
|
|
1730
1684
|
|
|
1731
1685
|
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
1732
|
-
import { jsx as
|
|
1686
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1733
1687
|
function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
1734
1688
|
const [intervalStart, setIntervalStart] = useState11(data.intervalStart);
|
|
1735
1689
|
const [intervalEnd, setIntervalEnd] = useState11(data.intervalEnd);
|
|
1736
1690
|
const incoming = useIncomingComputedData8(id);
|
|
1737
1691
|
const updateNodeData = useUpdateNodeData8();
|
|
1738
|
-
const updateComputedData =
|
|
1739
|
-
|
|
1692
|
+
const updateComputedData = useUpdateNodeComputedData18();
|
|
1693
|
+
useEffect14(() => {
|
|
1740
1694
|
if (incoming?.length) {
|
|
1741
1695
|
const source = incoming[0].module;
|
|
1742
1696
|
const module = new NormalizeNoiseModule(source, intervalStart, intervalEnd);
|
|
@@ -1744,9 +1698,9 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
1744
1698
|
}
|
|
1745
1699
|
updateNodeData(id, { intervalStart, intervalEnd });
|
|
1746
1700
|
}, [incoming, intervalStart, intervalEnd]);
|
|
1747
|
-
return /* @__PURE__ */ jsxs15(
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsxs15(NodeContainer18, { id, selected, data, type, children: [
|
|
1702
|
+
/* @__PURE__ */ jsx18(Stack6, { children: /* @__PURE__ */ jsxs15(Group8, { children: [
|
|
1703
|
+
/* @__PURE__ */ jsx18(
|
|
1750
1704
|
NumberInput7,
|
|
1751
1705
|
{
|
|
1752
1706
|
size: "xs",
|
|
@@ -1755,7 +1709,7 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
1755
1709
|
onChange: (e) => setIntervalStart(Number(e))
|
|
1756
1710
|
}
|
|
1757
1711
|
),
|
|
1758
|
-
/* @__PURE__ */
|
|
1712
|
+
/* @__PURE__ */ jsx18(
|
|
1759
1713
|
NumberInput7,
|
|
1760
1714
|
{
|
|
1761
1715
|
size: "xs",
|
|
@@ -1765,40 +1719,40 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
1765
1719
|
}
|
|
1766
1720
|
)
|
|
1767
1721
|
] }) }),
|
|
1768
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx18(NodeTrackConnections14, { handles: data.handles, nodeId: id, type: "target" })
|
|
1769
1723
|
] });
|
|
1770
1724
|
}
|
|
1771
1725
|
var noise_normalize_node_default = NoiseNormalizeNode;
|
|
1772
1726
|
|
|
1773
1727
|
// src/nodes/modifiers/noise-scale-bias-node.tsx
|
|
1774
|
-
import { NodeContainer as
|
|
1775
|
-
import { useEffect as
|
|
1728
|
+
import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
|
|
1729
|
+
import { useEffect as useEffect15, useState as useState12 } from "react";
|
|
1776
1730
|
import { Group as Group9, NumberInput as NumberInput8, Stack as Stack7 } from "@mantine/core";
|
|
1777
1731
|
import {
|
|
1778
1732
|
useIncomingComputedData as useIncomingComputedData9,
|
|
1779
|
-
useUpdateNodeComputedData as
|
|
1733
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData19,
|
|
1780
1734
|
useUpdateNodeData as useUpdateNodeData9
|
|
1781
1735
|
} from "@awesome-flow/core/hooks";
|
|
1782
|
-
import { ScaleBias } from "libnoise-ts
|
|
1783
|
-
import { jsx as
|
|
1736
|
+
import { ScaleBias } from "libnoise-simplex-ts";
|
|
1737
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1784
1738
|
function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
1785
1739
|
const [scale, setScale] = useState12(data.scale);
|
|
1786
1740
|
const [bias, setBias] = useState12(data.bias);
|
|
1787
1741
|
const incoming = useIncomingComputedData9(id);
|
|
1788
1742
|
const updateNodeData = useUpdateNodeData9();
|
|
1789
|
-
const updateComputedData =
|
|
1790
|
-
|
|
1743
|
+
const updateComputedData = useUpdateNodeComputedData19();
|
|
1744
|
+
useEffect15(() => {
|
|
1791
1745
|
if (incoming?.length > 0) {
|
|
1792
1746
|
const module = new ScaleBias(incoming[0].module, scale, bias);
|
|
1793
1747
|
updateComputedData(id, { module });
|
|
1794
1748
|
}
|
|
1795
1749
|
updateNodeData(id, { scale, bias });
|
|
1796
1750
|
}, [incoming, scale, bias]);
|
|
1797
|
-
return /* @__PURE__ */ jsxs16(
|
|
1751
|
+
return /* @__PURE__ */ jsxs16(NodeContainer19, { id, selected, data, type, children: [
|
|
1798
1752
|
/* @__PURE__ */ jsxs16(Stack7, { children: [
|
|
1799
1753
|
/* @__PURE__ */ jsxs16(Group9, { children: [
|
|
1800
1754
|
"Scale:",
|
|
1801
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ jsx19(
|
|
1802
1756
|
NumberInput8,
|
|
1803
1757
|
{
|
|
1804
1758
|
size: "xs",
|
|
@@ -1811,7 +1765,7 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1811
1765
|
] }),
|
|
1812
1766
|
/* @__PURE__ */ jsxs16(Group9, { children: [
|
|
1813
1767
|
"Bias:",
|
|
1814
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ jsx19(
|
|
1815
1769
|
NumberInput8,
|
|
1816
1770
|
{
|
|
1817
1771
|
size: "xs",
|
|
@@ -1823,29 +1777,29 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1823
1777
|
)
|
|
1824
1778
|
] })
|
|
1825
1779
|
] }),
|
|
1826
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ jsx19(NodeTrackConnections15, { handles: data.handles, nodeId: id, type: "target" })
|
|
1827
1781
|
] });
|
|
1828
1782
|
}
|
|
1829
1783
|
var noise_scale_bias_node_default = NoiseScaleBiasNode;
|
|
1830
1784
|
|
|
1831
1785
|
// src/nodes/modifiers/noise-terrace-node.tsx
|
|
1832
|
-
import { NodeContainer as
|
|
1786
|
+
import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
|
|
1833
1787
|
import { ActionIcon as ActionIcon2, Button as Button2, Group as Group10, NumberInput as NumberInput9, Space as Space2 } from "@mantine/core";
|
|
1834
1788
|
import {
|
|
1835
1789
|
useIncomingComputedData as useIncomingComputedData10,
|
|
1836
|
-
useUpdateNodeComputedData as
|
|
1790
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData20,
|
|
1837
1791
|
useUpdateNodeData as useUpdateNodeData10
|
|
1838
1792
|
} from "@awesome-flow/core/hooks";
|
|
1839
|
-
import { useCallback as useCallback16, useEffect as
|
|
1840
|
-
import { Terrace } from "libnoise-ts
|
|
1793
|
+
import { useCallback as useCallback16, useEffect as useEffect16, useState as useState13 } from "react";
|
|
1794
|
+
import { Terrace } from "libnoise-simplex-ts";
|
|
1841
1795
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
1842
1796
|
import { randomId as randomId2 } from "@mantine/hooks";
|
|
1843
1797
|
import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
|
|
1844
|
-
import { Fragment as Fragment2, jsx as
|
|
1798
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1845
1799
|
function NoiseTerraceNode({ id, selected, data, type }) {
|
|
1846
1800
|
const incoming = useIncomingComputedData10(id);
|
|
1847
1801
|
const updateNodeData = useUpdateNodeData10();
|
|
1848
|
-
const updateComputedData =
|
|
1802
|
+
const updateComputedData = useUpdateNodeComputedData20();
|
|
1849
1803
|
const [values, setValues] = useState13([]);
|
|
1850
1804
|
const form = useForm({
|
|
1851
1805
|
mode: "uncontrolled",
|
|
@@ -1863,18 +1817,18 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1863
1817
|
form.validate();
|
|
1864
1818
|
}, [])
|
|
1865
1819
|
});
|
|
1866
|
-
|
|
1820
|
+
useEffect16(() => {
|
|
1867
1821
|
const points = data.points?.length ? data.points.map((v) => ({ value: v, key: randomId2() })) : [1, 2].map(() => ({ value: 0, key: randomId2() }));
|
|
1868
1822
|
form.initialize({ points });
|
|
1869
1823
|
}, []);
|
|
1870
|
-
|
|
1824
|
+
useEffect16(() => {
|
|
1871
1825
|
if (incoming?.length && values?.length >= 2) {
|
|
1872
1826
|
const module = new Terrace(incoming[0].module, values);
|
|
1873
1827
|
updateComputedData(id, { module });
|
|
1874
1828
|
}
|
|
1875
1829
|
}, [values, incoming]);
|
|
1876
1830
|
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs17(Group10, { mt: "xs", children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ jsx20(
|
|
1878
1832
|
NumberInput9,
|
|
1879
1833
|
{
|
|
1880
1834
|
size: "xs",
|
|
@@ -1884,22 +1838,22 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1884
1838
|
},
|
|
1885
1839
|
form.key(`points.${index}.value`)
|
|
1886
1840
|
),
|
|
1887
|
-
data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */
|
|
1841
|
+
data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */ jsx20(
|
|
1888
1842
|
ActionIcon2,
|
|
1889
1843
|
{
|
|
1890
1844
|
color: "red",
|
|
1891
1845
|
variant: "outline",
|
|
1892
1846
|
size: "sm",
|
|
1893
1847
|
onClick: () => form.removeListItem("points", index),
|
|
1894
|
-
children: /* @__PURE__ */
|
|
1848
|
+
children: /* @__PURE__ */ jsx20(IconX2, { size: "1rem" })
|
|
1895
1849
|
}
|
|
1896
1850
|
)
|
|
1897
1851
|
] }, item.key));
|
|
1898
|
-
return /* @__PURE__ */ jsxs17(
|
|
1852
|
+
return /* @__PURE__ */ jsxs17(NodeContainer20, { id, selected, type, data, children: [
|
|
1899
1853
|
fields,
|
|
1900
1854
|
data.state === NodeState2.edit && /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
1901
|
-
/* @__PURE__ */
|
|
1902
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ jsx20(Space2, { h: 10 }),
|
|
1856
|
+
/* @__PURE__ */ jsx20(
|
|
1903
1857
|
Button2,
|
|
1904
1858
|
{
|
|
1905
1859
|
variant: "outline",
|
|
@@ -1910,27 +1864,27 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1910
1864
|
}
|
|
1911
1865
|
)
|
|
1912
1866
|
] }),
|
|
1913
|
-
/* @__PURE__ */
|
|
1867
|
+
/* @__PURE__ */ jsx20(NodeTrackConnections16, { handles: data.handles, nodeId: id, type: "target" })
|
|
1914
1868
|
] });
|
|
1915
1869
|
}
|
|
1916
1870
|
var noise_terrace_node_default = NoiseTerraceNode;
|
|
1917
1871
|
|
|
1918
1872
|
// src/nodes/output/noise-logger-node.tsx
|
|
1919
|
-
import { NodeContainer as
|
|
1920
|
-
import { useMemo as
|
|
1873
|
+
import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
|
|
1874
|
+
import { useMemo as useMemo9 } from "react";
|
|
1921
1875
|
import { Divider, Stack as Stack8, Text } from "@mantine/core";
|
|
1922
1876
|
import { useIncomingComputedData as useIncomingComputedData11 } from "@awesome-flow/core/hooks";
|
|
1923
|
-
import { jsx as
|
|
1877
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1924
1878
|
function NoiseLoggerNode({ id, selected, data, type }) {
|
|
1925
1879
|
const incoming = useIncomingComputedData11(id);
|
|
1926
|
-
const noise =
|
|
1927
|
-
return /* @__PURE__ */ jsxs18(
|
|
1880
|
+
const noise = useMemo9(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
1881
|
+
return /* @__PURE__ */ jsxs18(NodeContainer21, { id, selected, data, type, children: [
|
|
1928
1882
|
/* @__PURE__ */ jsxs18(Text, { children: [
|
|
1929
1883
|
"Size: ",
|
|
1930
1884
|
noise?.length || 0
|
|
1931
1885
|
] }),
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsx21(Divider, { h: 5 }),
|
|
1887
|
+
/* @__PURE__ */ jsx21(Stack8, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs18(Text, { children: [
|
|
1934
1888
|
v.position?.x,
|
|
1935
1889
|
":",
|
|
1936
1890
|
v.position?.y,
|
|
@@ -1939,31 +1893,31 @@ function NoiseLoggerNode({ id, selected, data, type }) {
|
|
|
1939
1893
|
": ",
|
|
1940
1894
|
v.value
|
|
1941
1895
|
] }, i)) }),
|
|
1942
|
-
/* @__PURE__ */
|
|
1896
|
+
/* @__PURE__ */ jsx21(NodeTrackConnections17, { handles: data.handles, nodeId: id, type: "target" })
|
|
1943
1897
|
] });
|
|
1944
1898
|
}
|
|
1945
1899
|
var noise_logger_node_default = NoiseLoggerNode;
|
|
1946
1900
|
|
|
1947
1901
|
// src/nodes/output/noise-output-node.tsx
|
|
1948
|
-
import { NodeContainer as
|
|
1902
|
+
import { NodeContainer as NodeContainer31, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
|
|
1949
1903
|
import { useCallback as useCallback21, useState as useState20 } from "react";
|
|
1950
|
-
import { useUpdateNodeComputedData as
|
|
1904
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
|
|
1951
1905
|
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus4 } from "@awesome-flow/core/components";
|
|
1952
1906
|
import { Text as Text3 } from "@mantine/core";
|
|
1953
1907
|
|
|
1954
1908
|
// src/nodes/output/noise-raw-texture-node.tsx
|
|
1955
|
-
import { NodeContainer as
|
|
1956
|
-
import { useEffect as
|
|
1957
|
-
import { useIncomingComputedData as useIncomingComputedData12, useUpdateNodeComputedData as
|
|
1909
|
+
import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
|
|
1910
|
+
import { useEffect as useEffect17, useMemo as useMemo10, useState as useState14 } from "react";
|
|
1911
|
+
import { useIncomingComputedData as useIncomingComputedData12, useUpdateNodeComputedData as useUpdateNodeComputedData21 } from "@awesome-flow/core/hooks";
|
|
1958
1912
|
import { Group as Group11, Stack as Stack9 } from "@mantine/core";
|
|
1959
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1960
1914
|
function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
1961
|
-
const updateComputedData =
|
|
1915
|
+
const updateComputedData = useUpdateNodeComputedData21();
|
|
1962
1916
|
const [dataLength, setDataLength] = useState14(0);
|
|
1963
1917
|
const [resolution, setResolution] = useState14(0);
|
|
1964
1918
|
const incoming = useIncomingComputedData12(id);
|
|
1965
|
-
const noise =
|
|
1966
|
-
|
|
1919
|
+
const noise = useMemo10(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
1920
|
+
useEffect17(() => {
|
|
1967
1921
|
if (noise?.length) {
|
|
1968
1922
|
const size = Math.ceil(Math.sqrt(noise.length));
|
|
1969
1923
|
const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
|
|
@@ -1971,10 +1925,14 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
1971
1925
|
dataArray.set(colors);
|
|
1972
1926
|
setResolution(size);
|
|
1973
1927
|
setDataLength(dataArray.length);
|
|
1974
|
-
updateComputedData(id, {
|
|
1928
|
+
updateComputedData(id, {
|
|
1929
|
+
textureData: dataArray,
|
|
1930
|
+
textureResolutionX: size,
|
|
1931
|
+
textureResolutionY: size
|
|
1932
|
+
});
|
|
1975
1933
|
}
|
|
1976
1934
|
}, [noise]);
|
|
1977
|
-
return /* @__PURE__ */ jsxs19(
|
|
1935
|
+
return /* @__PURE__ */ jsxs19(NodeContainer22, { id, selected, data, type, children: [
|
|
1978
1936
|
/* @__PURE__ */ jsxs19(Stack9, { children: [
|
|
1979
1937
|
/* @__PURE__ */ jsxs19(Group11, { children: [
|
|
1980
1938
|
"Resolution: ",
|
|
@@ -1995,49 +1953,49 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
1995
1953
|
dataLength
|
|
1996
1954
|
] })
|
|
1997
1955
|
] }),
|
|
1998
|
-
/* @__PURE__ */
|
|
1956
|
+
/* @__PURE__ */ jsx22(NodeTrackConnections18, { handles: data.handles, nodeId: id, type: "target" })
|
|
1999
1957
|
] });
|
|
2000
1958
|
}
|
|
2001
1959
|
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
2002
1960
|
|
|
2003
1961
|
// src/nodes/output/positions-logger-node.tsx
|
|
2004
|
-
import { NodeContainer as
|
|
2005
|
-
import { useMemo as
|
|
1962
|
+
import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
|
|
1963
|
+
import { useMemo as useMemo11 } from "react";
|
|
2006
1964
|
import { Divider as Divider2, Stack as Stack10, Text as Text2 } from "@mantine/core";
|
|
2007
1965
|
import { useIncomingComputedData as useIncomingComputedData13 } from "@awesome-flow/core/hooks";
|
|
2008
|
-
import { jsx as
|
|
1966
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2009
1967
|
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
2010
1968
|
const incoming = useIncomingComputedData13(id);
|
|
2011
|
-
const positions =
|
|
1969
|
+
const positions = useMemo11(() => {
|
|
2012
1970
|
return incoming?.map((p) => p.positions).flat();
|
|
2013
1971
|
}, [incoming]);
|
|
2014
|
-
return /* @__PURE__ */ jsxs20(
|
|
1972
|
+
return /* @__PURE__ */ jsxs20(NodeContainer23, { id, selected, data, type, children: [
|
|
2015
1973
|
/* @__PURE__ */ jsxs20(Text2, { children: [
|
|
2016
1974
|
"Size: ",
|
|
2017
1975
|
positions?.length || 0
|
|
2018
1976
|
] }),
|
|
2019
|
-
/* @__PURE__ */
|
|
2020
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx23(Divider2, { h: 5 }),
|
|
1978
|
+
/* @__PURE__ */ jsx23(Stack10, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs20(Text2, { children: [
|
|
2021
1979
|
v.x,
|
|
2022
1980
|
":",
|
|
2023
1981
|
v.y,
|
|
2024
1982
|
":",
|
|
2025
1983
|
v.z
|
|
2026
1984
|
] }, i)) }),
|
|
2027
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx23(NodeTrackConnections19, { handles: data.handles, nodeId: id, type: "target" })
|
|
2028
1986
|
] });
|
|
2029
1987
|
}
|
|
2030
1988
|
var positions_logger_node_default = PositionsLoggerNode;
|
|
2031
1989
|
|
|
2032
1990
|
// src/nodes/selectors/noise-blend-node.tsx
|
|
2033
|
-
import { NodeContainer as
|
|
1991
|
+
import { NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
|
|
2034
1992
|
import { useCallback as useCallback17 } from "react";
|
|
2035
|
-
import { useUpdateNodeComputedData as
|
|
2036
|
-
import { Blend } from "libnoise-ts
|
|
1993
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData22 } from "@awesome-flow/core/hooks";
|
|
1994
|
+
import { Blend } from "libnoise-simplex-ts";
|
|
2037
1995
|
import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
|
|
2038
|
-
import { jsx as
|
|
1996
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2039
1997
|
function NoiseBlendNode({ id, selected, data, type }) {
|
|
2040
|
-
const updateComputedData =
|
|
1998
|
+
const updateComputedData = useUpdateNodeComputedData22();
|
|
2041
1999
|
const onDataUpdated = useCallback17(
|
|
2042
2000
|
(incomingData) => {
|
|
2043
2001
|
const incomingSources = incomingData["source" /* source */];
|
|
@@ -2053,8 +2011,8 @@ function NoiseBlendNode({ id, selected, data, type }) {
|
|
|
2053
2011
|
},
|
|
2054
2012
|
[]
|
|
2055
2013
|
);
|
|
2056
|
-
return /* @__PURE__ */ jsxs21(
|
|
2057
|
-
/* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsxs21(NodeContainer24, { id, selected, data, type, children: [
|
|
2015
|
+
/* @__PURE__ */ jsx24(
|
|
2058
2016
|
HandlesIncomingDataStatus,
|
|
2059
2017
|
{
|
|
2060
2018
|
nodeId: id,
|
|
@@ -2065,26 +2023,26 @@ function NoiseBlendNode({ id, selected, data, type }) {
|
|
|
2065
2023
|
resetComputedData: true
|
|
2066
2024
|
}
|
|
2067
2025
|
),
|
|
2068
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsx24(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
|
|
2069
2027
|
] });
|
|
2070
2028
|
}
|
|
2071
2029
|
var noise_blend_node_default = NoiseBlendNode;
|
|
2072
2030
|
|
|
2073
2031
|
// src/nodes/selectors/noise-select-node.tsx
|
|
2074
|
-
import { NodeContainer as
|
|
2075
|
-
import { useCallback as useCallback18, useEffect as
|
|
2076
|
-
import { useUpdateNodeComputedData as
|
|
2077
|
-
import { Select } from "libnoise-ts
|
|
2032
|
+
import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
|
|
2033
|
+
import { useCallback as useCallback18, useEffect as useEffect18, useState as useState15 } from "react";
|
|
2034
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData23, useUpdateNodeData as useUpdateNodeData11 } from "@awesome-flow/core/hooks";
|
|
2035
|
+
import { Select } from "libnoise-simplex-ts";
|
|
2078
2036
|
import { Group as Group12, NumberInput as NumberInput10, Stack as Stack11 } from "@mantine/core";
|
|
2079
2037
|
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
|
|
2080
|
-
import { jsx as
|
|
2038
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2081
2039
|
function NoiseSelectNode({ id, selected, data, type }) {
|
|
2082
2040
|
const [edgeFalloff, setEdgeFalloff] = useState15(data.edgeFalloff);
|
|
2083
2041
|
const [lowerBound, setLowerBound] = useState15(data.lowerBound);
|
|
2084
2042
|
const [upperBound, setUpperBound] = useState15(data.upperBound);
|
|
2085
2043
|
const updateNodeData = useUpdateNodeData11();
|
|
2086
|
-
const updateComputedData =
|
|
2087
|
-
|
|
2044
|
+
const updateComputedData = useUpdateNodeComputedData23();
|
|
2045
|
+
useEffect18(() => {
|
|
2088
2046
|
updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
|
|
2089
2047
|
}, [edgeFalloff, lowerBound, upperBound]);
|
|
2090
2048
|
const onDataUpdated = useCallback18(
|
|
@@ -2105,11 +2063,11 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2105
2063
|
},
|
|
2106
2064
|
[]
|
|
2107
2065
|
);
|
|
2108
|
-
return /* @__PURE__ */ jsxs22(
|
|
2066
|
+
return /* @__PURE__ */ jsxs22(NodeContainer25, { id, selected, data, type, children: [
|
|
2109
2067
|
/* @__PURE__ */ jsxs22(Stack11, { children: [
|
|
2110
2068
|
/* @__PURE__ */ jsxs22(Group12, { children: [
|
|
2111
2069
|
"Edge Falloff:",
|
|
2112
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ jsx25(
|
|
2113
2071
|
NumberInput10,
|
|
2114
2072
|
{
|
|
2115
2073
|
size: "xs",
|
|
@@ -2122,7 +2080,7 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2122
2080
|
] }),
|
|
2123
2081
|
/* @__PURE__ */ jsxs22(Group12, { children: [
|
|
2124
2082
|
"Lower Bound:",
|
|
2125
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ jsx25(
|
|
2126
2084
|
NumberInput10,
|
|
2127
2085
|
{
|
|
2128
2086
|
size: "xs",
|
|
@@ -2135,7 +2093,7 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2135
2093
|
] }),
|
|
2136
2094
|
/* @__PURE__ */ jsxs22(Group12, { children: [
|
|
2137
2095
|
"Upper Bound:",
|
|
2138
|
-
/* @__PURE__ */
|
|
2096
|
+
/* @__PURE__ */ jsx25(
|
|
2139
2097
|
NumberInput10,
|
|
2140
2098
|
{
|
|
2141
2099
|
size: "xs",
|
|
@@ -2146,7 +2104,7 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2146
2104
|
}
|
|
2147
2105
|
)
|
|
2148
2106
|
] }),
|
|
2149
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx25(
|
|
2150
2108
|
HandlesIncomingDataStatus2,
|
|
2151
2109
|
{
|
|
2152
2110
|
nodeId: id,
|
|
@@ -2158,20 +2116,20 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2158
2116
|
}
|
|
2159
2117
|
)
|
|
2160
2118
|
] }),
|
|
2161
|
-
/* @__PURE__ */
|
|
2119
|
+
/* @__PURE__ */ jsx25(NodeTrackConnections21, { handles: data.handles, nodeId: id, type: "target" })
|
|
2162
2120
|
] });
|
|
2163
2121
|
}
|
|
2164
2122
|
var noise_select_node_default = NoiseSelectNode;
|
|
2165
2123
|
|
|
2166
2124
|
// src/nodes/transformers/noise-displace-node.tsx
|
|
2167
|
-
import { NodeContainer as
|
|
2125
|
+
import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
|
|
2168
2126
|
import { useCallback as useCallback19 } from "react";
|
|
2169
|
-
import { useUpdateNodeComputedData as
|
|
2170
|
-
import { Displace } from "libnoise-ts
|
|
2127
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData24 } from "@awesome-flow/core/hooks";
|
|
2128
|
+
import { Displace } from "libnoise-simplex-ts";
|
|
2171
2129
|
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
|
|
2172
|
-
import { jsx as
|
|
2130
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2173
2131
|
function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
2174
|
-
const updateComputedData =
|
|
2132
|
+
const updateComputedData = useUpdateNodeComputedData24();
|
|
2175
2133
|
const onDataUpdated = useCallback19(
|
|
2176
2134
|
(handleData) => {
|
|
2177
2135
|
const sourceModule = handleData["source" /* sourceModule */];
|
|
@@ -2190,8 +2148,8 @@ function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
|
2190
2148
|
},
|
|
2191
2149
|
[]
|
|
2192
2150
|
);
|
|
2193
|
-
return /* @__PURE__ */ jsxs23(
|
|
2194
|
-
/* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsxs23(NodeContainer26, { id, selected, data, type, children: [
|
|
2152
|
+
/* @__PURE__ */ jsx26(
|
|
2195
2153
|
HandlesIncomingDataStatus3,
|
|
2196
2154
|
{
|
|
2197
2155
|
nodeId: id,
|
|
@@ -2202,22 +2160,22 @@ function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
|
2202
2160
|
resetComputedData: true
|
|
2203
2161
|
}
|
|
2204
2162
|
),
|
|
2205
|
-
/* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ jsx26(NodeTrackConnections22, { handles: data.handles, nodeId: id, type: "target" })
|
|
2206
2164
|
] });
|
|
2207
2165
|
}
|
|
2208
2166
|
var noise_displace_node_default = NoiseDisplaceNode;
|
|
2209
2167
|
|
|
2210
2168
|
// src/nodes/transformers/noise-rotate-point-node.tsx
|
|
2211
|
-
import { NodeContainer as
|
|
2212
|
-
import { useEffect as
|
|
2169
|
+
import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
|
|
2170
|
+
import { useEffect as useEffect19, useState as useState16 } from "react";
|
|
2213
2171
|
import {
|
|
2214
2172
|
useIncomingComputedData as useIncomingComputedData14,
|
|
2215
|
-
useUpdateNodeComputedData as
|
|
2173
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData25,
|
|
2216
2174
|
useUpdateNodeData as useUpdateNodeData12
|
|
2217
2175
|
} from "@awesome-flow/core/hooks";
|
|
2218
2176
|
import { Group as Group13, NumberInput as NumberInput11, Stack as Stack12 } from "@mantine/core";
|
|
2219
|
-
import { RotatePoint } from "libnoise-ts
|
|
2220
|
-
import { jsx as
|
|
2177
|
+
import { RotatePoint } from "libnoise-simplex-ts";
|
|
2178
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2221
2179
|
function NoiseRotatePointNode({
|
|
2222
2180
|
id,
|
|
2223
2181
|
selected,
|
|
@@ -2229,19 +2187,19 @@ function NoiseRotatePointNode({
|
|
|
2229
2187
|
const [zAngle, setZAngle] = useState16(data.zAngle);
|
|
2230
2188
|
const incoming = useIncomingComputedData14(id);
|
|
2231
2189
|
const updateNodeData = useUpdateNodeData12();
|
|
2232
|
-
const updateComputedData =
|
|
2233
|
-
|
|
2190
|
+
const updateComputedData = useUpdateNodeComputedData25();
|
|
2191
|
+
useEffect19(() => {
|
|
2234
2192
|
if (incoming?.length) {
|
|
2235
2193
|
const module = new RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
|
|
2236
2194
|
updateComputedData(id, { module });
|
|
2237
2195
|
}
|
|
2238
2196
|
updateNodeData(id, { xAngle, yAngle, zAngle });
|
|
2239
2197
|
}, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
|
|
2240
|
-
return /* @__PURE__ */ jsxs24(
|
|
2198
|
+
return /* @__PURE__ */ jsxs24(NodeContainer27, { id, selected, data, type, children: [
|
|
2241
2199
|
/* @__PURE__ */ jsxs24(Stack12, { children: [
|
|
2242
2200
|
/* @__PURE__ */ jsxs24(Group13, { children: [
|
|
2243
2201
|
"X Angle:",
|
|
2244
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ jsx27(
|
|
2245
2203
|
NumberInput11,
|
|
2246
2204
|
{
|
|
2247
2205
|
size: "xs",
|
|
@@ -2254,7 +2212,7 @@ function NoiseRotatePointNode({
|
|
|
2254
2212
|
] }),
|
|
2255
2213
|
/* @__PURE__ */ jsxs24(Group13, { children: [
|
|
2256
2214
|
"Y Angle:",
|
|
2257
|
-
/* @__PURE__ */
|
|
2215
|
+
/* @__PURE__ */ jsx27(
|
|
2258
2216
|
NumberInput11,
|
|
2259
2217
|
{
|
|
2260
2218
|
size: "xs",
|
|
@@ -2267,7 +2225,7 @@ function NoiseRotatePointNode({
|
|
|
2267
2225
|
] }),
|
|
2268
2226
|
/* @__PURE__ */ jsxs24(Group13, { children: [
|
|
2269
2227
|
"Z Angle:",
|
|
2270
|
-
/* @__PURE__ */
|
|
2228
|
+
/* @__PURE__ */ jsx27(
|
|
2271
2229
|
NumberInput11,
|
|
2272
2230
|
{
|
|
2273
2231
|
size: "xs",
|
|
@@ -2279,22 +2237,22 @@ function NoiseRotatePointNode({
|
|
|
2279
2237
|
)
|
|
2280
2238
|
] })
|
|
2281
2239
|
] }),
|
|
2282
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ jsx27(NodeTrackConnections23, { handles: data.handles, nodeId: id, type: "target" })
|
|
2283
2241
|
] });
|
|
2284
2242
|
}
|
|
2285
2243
|
var noise_rotate_point_node_default = NoiseRotatePointNode;
|
|
2286
2244
|
|
|
2287
2245
|
// src/nodes/transformers/noise-scale-point-node.tsx
|
|
2288
|
-
import { NodeContainer as
|
|
2289
|
-
import { useEffect as
|
|
2246
|
+
import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
|
|
2247
|
+
import { useEffect as useEffect20, useState as useState17 } from "react";
|
|
2290
2248
|
import {
|
|
2291
2249
|
useIncomingComputedData as useIncomingComputedData15,
|
|
2292
|
-
useUpdateNodeComputedData as
|
|
2250
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData26,
|
|
2293
2251
|
useUpdateNodeData as useUpdateNodeData13
|
|
2294
2252
|
} from "@awesome-flow/core/hooks";
|
|
2295
2253
|
import { Group as Group14, NumberInput as NumberInput12, Stack as Stack13 } from "@mantine/core";
|
|
2296
|
-
import { ScalePoint } from "libnoise-ts
|
|
2297
|
-
import { jsx as
|
|
2254
|
+
import { ScalePoint } from "libnoise-simplex-ts";
|
|
2255
|
+
import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2298
2256
|
function NoiseScalePointNode({
|
|
2299
2257
|
id,
|
|
2300
2258
|
selected,
|
|
@@ -2306,19 +2264,19 @@ function NoiseScalePointNode({
|
|
|
2306
2264
|
const [zScale, setZScale] = useState17(data.zScale);
|
|
2307
2265
|
const incoming = useIncomingComputedData15(id);
|
|
2308
2266
|
const updateNodeData = useUpdateNodeData13();
|
|
2309
|
-
const updateComputedData =
|
|
2310
|
-
|
|
2267
|
+
const updateComputedData = useUpdateNodeComputedData26();
|
|
2268
|
+
useEffect20(() => {
|
|
2311
2269
|
if (incoming?.length) {
|
|
2312
2270
|
const module = new ScalePoint(incoming[0].module, xScale, yScale, zScale);
|
|
2313
2271
|
updateComputedData(id, { module });
|
|
2314
2272
|
}
|
|
2315
2273
|
updateNodeData(id, { xScale, yScale, zScale });
|
|
2316
2274
|
}, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
|
|
2317
|
-
return /* @__PURE__ */ jsxs25(
|
|
2275
|
+
return /* @__PURE__ */ jsxs25(NodeContainer28, { id, selected, data, type, children: [
|
|
2318
2276
|
/* @__PURE__ */ jsxs25(Stack13, { children: [
|
|
2319
2277
|
/* @__PURE__ */ jsxs25(Group14, { children: [
|
|
2320
2278
|
"X Scale:",
|
|
2321
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx28(
|
|
2322
2280
|
NumberInput12,
|
|
2323
2281
|
{
|
|
2324
2282
|
size: "xs",
|
|
@@ -2331,7 +2289,7 @@ function NoiseScalePointNode({
|
|
|
2331
2289
|
] }),
|
|
2332
2290
|
/* @__PURE__ */ jsxs25(Group14, { children: [
|
|
2333
2291
|
"Y Scale:",
|
|
2334
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ jsx28(
|
|
2335
2293
|
NumberInput12,
|
|
2336
2294
|
{
|
|
2337
2295
|
size: "xs",
|
|
@@ -2344,7 +2302,7 @@ function NoiseScalePointNode({
|
|
|
2344
2302
|
] }),
|
|
2345
2303
|
/* @__PURE__ */ jsxs25(Group14, { children: [
|
|
2346
2304
|
"Z Scale:",
|
|
2347
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ jsx28(
|
|
2348
2306
|
NumberInput12,
|
|
2349
2307
|
{
|
|
2350
2308
|
size: "xs",
|
|
@@ -2356,22 +2314,22 @@ function NoiseScalePointNode({
|
|
|
2356
2314
|
)
|
|
2357
2315
|
] })
|
|
2358
2316
|
] }),
|
|
2359
|
-
/* @__PURE__ */
|
|
2317
|
+
/* @__PURE__ */ jsx28(NodeTrackConnections24, { handles: data.handles, nodeId: id, type: "target" })
|
|
2360
2318
|
] });
|
|
2361
2319
|
}
|
|
2362
2320
|
var noise_scale_point_node_default = NoiseScalePointNode;
|
|
2363
2321
|
|
|
2364
2322
|
// src/nodes/transformers/noise-translate-point-node.tsx
|
|
2365
|
-
import { NodeContainer as
|
|
2366
|
-
import { useEffect as
|
|
2323
|
+
import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
|
|
2324
|
+
import { useEffect as useEffect21, useState as useState18 } from "react";
|
|
2367
2325
|
import {
|
|
2368
2326
|
useIncomingComputedData as useIncomingComputedData16,
|
|
2369
|
-
useUpdateNodeComputedData as
|
|
2327
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData27,
|
|
2370
2328
|
useUpdateNodeData as useUpdateNodeData14
|
|
2371
2329
|
} from "@awesome-flow/core/hooks";
|
|
2372
2330
|
import { Group as Group15, NumberInput as NumberInput13, Stack as Stack14 } from "@mantine/core";
|
|
2373
|
-
import { TranslatePoint } from "libnoise-ts
|
|
2374
|
-
import { jsx as
|
|
2331
|
+
import { TranslatePoint } from "libnoise-simplex-ts";
|
|
2332
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2375
2333
|
function NoiseTranslatePointNode({
|
|
2376
2334
|
id,
|
|
2377
2335
|
selected,
|
|
@@ -2383,19 +2341,19 @@ function NoiseTranslatePointNode({
|
|
|
2383
2341
|
const [translateZ, setTranslateZ] = useState18(data.translateZ);
|
|
2384
2342
|
const incoming = useIncomingComputedData16(id);
|
|
2385
2343
|
const updateNodeData = useUpdateNodeData14();
|
|
2386
|
-
const updateComputedData =
|
|
2387
|
-
|
|
2344
|
+
const updateComputedData = useUpdateNodeComputedData27();
|
|
2345
|
+
useEffect21(() => {
|
|
2388
2346
|
if (incoming?.length) {
|
|
2389
2347
|
const module = new TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
|
|
2390
2348
|
updateComputedData(id, { module });
|
|
2391
2349
|
}
|
|
2392
2350
|
updateNodeData(id, { translateX, translateY, translateZ });
|
|
2393
2351
|
}, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
|
|
2394
|
-
return /* @__PURE__ */ jsxs26(
|
|
2352
|
+
return /* @__PURE__ */ jsxs26(NodeContainer29, { id, selected, data, type, children: [
|
|
2395
2353
|
/* @__PURE__ */ jsxs26(Stack14, { children: [
|
|
2396
2354
|
/* @__PURE__ */ jsxs26(Group15, { children: [
|
|
2397
2355
|
"Translate X:",
|
|
2398
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ jsx29(
|
|
2399
2357
|
NumberInput13,
|
|
2400
2358
|
{
|
|
2401
2359
|
size: "xs",
|
|
@@ -2408,7 +2366,7 @@ function NoiseTranslatePointNode({
|
|
|
2408
2366
|
] }),
|
|
2409
2367
|
/* @__PURE__ */ jsxs26(Group15, { children: [
|
|
2410
2368
|
"Translate Y:",
|
|
2411
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx29(
|
|
2412
2370
|
NumberInput13,
|
|
2413
2371
|
{
|
|
2414
2372
|
size: "xs",
|
|
@@ -2421,7 +2379,7 @@ function NoiseTranslatePointNode({
|
|
|
2421
2379
|
] }),
|
|
2422
2380
|
/* @__PURE__ */ jsxs26(Group15, { children: [
|
|
2423
2381
|
"Translate Z:",
|
|
2424
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ jsx29(
|
|
2425
2383
|
NumberInput13,
|
|
2426
2384
|
{
|
|
2427
2385
|
size: "xs",
|
|
@@ -2433,18 +2391,18 @@ function NoiseTranslatePointNode({
|
|
|
2433
2391
|
)
|
|
2434
2392
|
] })
|
|
2435
2393
|
] }),
|
|
2436
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ jsx29(NodeTrackConnections25, { handles: data.handles, nodeId: id, type: "target" })
|
|
2437
2395
|
] });
|
|
2438
2396
|
}
|
|
2439
2397
|
var noise_translate_point_node_default = NoiseTranslatePointNode;
|
|
2440
2398
|
|
|
2441
2399
|
// src/nodes/transformers/noise-turbulence-node .tsx
|
|
2442
|
-
import { NodeContainer as
|
|
2443
|
-
import { useCallback as useCallback20, useEffect as
|
|
2444
|
-
import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as
|
|
2445
|
-
import { Turbulence } from "libnoise-ts
|
|
2400
|
+
import { NodeContainer as NodeContainer30, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
|
|
2401
|
+
import { useCallback as useCallback20, useEffect as useEffect22, useState as useState19 } from "react";
|
|
2402
|
+
import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as useUpdateNodeComputedData28 } from "@awesome-flow/core/hooks";
|
|
2403
|
+
import { Turbulence } from "libnoise-simplex-ts";
|
|
2446
2404
|
import { NodePropertyVariables as NodePropertyVariables7 } from "@awesome-flow/core/components";
|
|
2447
|
-
import { jsx as
|
|
2405
|
+
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2448
2406
|
function NoiseTurbulenceNode({
|
|
2449
2407
|
id,
|
|
2450
2408
|
selected,
|
|
@@ -2453,11 +2411,11 @@ function NoiseTurbulenceNode({
|
|
|
2453
2411
|
}) {
|
|
2454
2412
|
const [properties, setProperties] = useState19(null);
|
|
2455
2413
|
const incoming = useIncomingComputedData17(id);
|
|
2456
|
-
const updateComputedData =
|
|
2414
|
+
const updateComputedData = useUpdateNodeComputedData28();
|
|
2457
2415
|
const onPropertiesChange = useCallback20((props) => {
|
|
2458
2416
|
setProperties(props);
|
|
2459
2417
|
}, []);
|
|
2460
|
-
|
|
2418
|
+
useEffect22(() => {
|
|
2461
2419
|
if (incoming?.length && properties) {
|
|
2462
2420
|
const module = new Turbulence(
|
|
2463
2421
|
incoming[0].module,
|
|
@@ -2469,9 +2427,9 @@ function NoiseTurbulenceNode({
|
|
|
2469
2427
|
updateComputedData(id, { module });
|
|
2470
2428
|
}
|
|
2471
2429
|
}, [id, incoming, properties]);
|
|
2472
|
-
return /* @__PURE__ */ jsxs27(
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ jsxs27(NodeContainer30, { id, selected, data, type, children: [
|
|
2431
|
+
/* @__PURE__ */ jsx30(NodePropertyVariables7, { data, nodeId: id, onPropertiesChange }),
|
|
2432
|
+
/* @__PURE__ */ jsx30(NodeTrackConnections26, { handles: data.handles, nodeId: id, type: "target" })
|
|
2475
2433
|
] });
|
|
2476
2434
|
}
|
|
2477
2435
|
var noise_turbulence_node_default = NoiseTurbulenceNode;
|
|
@@ -2604,36 +2562,9 @@ var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
|
2604
2562
|
};
|
|
2605
2563
|
};
|
|
2606
2564
|
|
|
2607
|
-
// src/templates/generators/noise-simplex-template.ts
|
|
2608
|
-
import {
|
|
2609
|
-
CoreHandleType as CoreHandleType4
|
|
2610
|
-
} from "@awesome-flow/core/abstract";
|
|
2611
|
-
import { Position as Position6 } from "@xyflow/system";
|
|
2612
|
-
var NoiseSimplexNodeTemplateFactory = class {
|
|
2613
|
-
template = {
|
|
2614
|
-
type: "noise-simplex" /* noiseSimplex */,
|
|
2615
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
2616
|
-
data: {
|
|
2617
|
-
title: "Simplex Noise"
|
|
2618
|
-
},
|
|
2619
|
-
handles: [
|
|
2620
|
-
{
|
|
2621
|
-
position: Position6.Left,
|
|
2622
|
-
dataType: CoreHandleType4.variableProperty,
|
|
2623
|
-
connection: "target"
|
|
2624
|
-
},
|
|
2625
|
-
{
|
|
2626
|
-
position: Position6.Right,
|
|
2627
|
-
dataType: "module" /* module */,
|
|
2628
|
-
connection: "source"
|
|
2629
|
-
}
|
|
2630
|
-
]
|
|
2631
|
-
};
|
|
2632
|
-
};
|
|
2633
|
-
|
|
2634
2565
|
// src/templates/generators/noise-spheres-template.ts
|
|
2635
|
-
import { CoreHandleType as
|
|
2636
|
-
import { Position as
|
|
2566
|
+
import { CoreHandleType as CoreHandleType4 } from "@awesome-flow/core/abstract";
|
|
2567
|
+
import { Position as Position6 } from "@xyflow/system";
|
|
2637
2568
|
var NoiseSpheresNodeTemplateFactory = class {
|
|
2638
2569
|
template = {
|
|
2639
2570
|
type: "noise-spheres" /* noiseSpheres */,
|
|
@@ -2644,12 +2575,12 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2644
2575
|
},
|
|
2645
2576
|
handles: [
|
|
2646
2577
|
{
|
|
2647
|
-
position:
|
|
2648
|
-
dataType:
|
|
2578
|
+
position: Position6.Left,
|
|
2579
|
+
dataType: CoreHandleType4.variableProperty,
|
|
2649
2580
|
connection: "target"
|
|
2650
2581
|
},
|
|
2651
2582
|
{
|
|
2652
|
-
position:
|
|
2583
|
+
position: Position6.Right,
|
|
2653
2584
|
dataType: "module" /* module */,
|
|
2654
2585
|
connection: "source"
|
|
2655
2586
|
}
|
|
@@ -2658,8 +2589,8 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2658
2589
|
};
|
|
2659
2590
|
|
|
2660
2591
|
// src/templates/generators/noise-voronoi-template.ts
|
|
2661
|
-
import { CoreHandleType as
|
|
2662
|
-
import { Position as
|
|
2592
|
+
import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
|
|
2593
|
+
import { Position as Position7 } from "@xyflow/system";
|
|
2663
2594
|
var NoiseVoronoiNodeTemplateFactory = class {
|
|
2664
2595
|
template = {
|
|
2665
2596
|
type: "noise-voronoi" /* noiseVoronoi */,
|
|
@@ -2673,12 +2604,12 @@ var NoiseVoronoiNodeTemplateFactory = class {
|
|
|
2673
2604
|
},
|
|
2674
2605
|
handles: [
|
|
2675
2606
|
{
|
|
2676
|
-
position:
|
|
2677
|
-
dataType:
|
|
2607
|
+
position: Position7.Left,
|
|
2608
|
+
dataType: CoreHandleType5.variableProperty,
|
|
2678
2609
|
connection: "target"
|
|
2679
2610
|
},
|
|
2680
2611
|
{
|
|
2681
|
-
position:
|
|
2612
|
+
position: Position7.Right,
|
|
2682
2613
|
dataType: "module" /* module */,
|
|
2683
2614
|
connection: "source"
|
|
2684
2615
|
}
|
|
@@ -2687,7 +2618,7 @@ var NoiseVoronoiNodeTemplateFactory = class {
|
|
|
2687
2618
|
};
|
|
2688
2619
|
|
|
2689
2620
|
// src/templates/generators/position-const-template.ts
|
|
2690
|
-
import { Position as
|
|
2621
|
+
import { Position as Position8 } from "@xyflow/system";
|
|
2691
2622
|
var PositionConstNodeTemplateFactory = class {
|
|
2692
2623
|
template = {
|
|
2693
2624
|
type: "position" /* position */,
|
|
@@ -2698,7 +2629,7 @@ var PositionConstNodeTemplateFactory = class {
|
|
|
2698
2629
|
},
|
|
2699
2630
|
handles: [
|
|
2700
2631
|
{
|
|
2701
|
-
position:
|
|
2632
|
+
position: Position8.Right,
|
|
2702
2633
|
dataType: "position" /* position */,
|
|
2703
2634
|
connection: "source"
|
|
2704
2635
|
}
|
|
@@ -2707,7 +2638,7 @@ var PositionConstNodeTemplateFactory = class {
|
|
|
2707
2638
|
};
|
|
2708
2639
|
|
|
2709
2640
|
// src/templates/generators/position-grid-template.ts
|
|
2710
|
-
import { Position as
|
|
2641
|
+
import { Position as Position9 } from "@xyflow/system";
|
|
2711
2642
|
var PositionGridNodeTemplateFactory = class {
|
|
2712
2643
|
template = {
|
|
2713
2644
|
type: "grid" /* grid */,
|
|
@@ -2719,7 +2650,7 @@ var PositionGridNodeTemplateFactory = class {
|
|
|
2719
2650
|
},
|
|
2720
2651
|
handles: [
|
|
2721
2652
|
{
|
|
2722
|
-
position:
|
|
2653
|
+
position: Position9.Right,
|
|
2723
2654
|
dataType: "position" /* position */,
|
|
2724
2655
|
connection: "source"
|
|
2725
2656
|
}
|
|
@@ -2729,7 +2660,7 @@ var PositionGridNodeTemplateFactory = class {
|
|
|
2729
2660
|
|
|
2730
2661
|
// src/templates/modifiers/noise-normalize-template.ts
|
|
2731
2662
|
import { IDGenerator } from "@awesome-flow/core/utils";
|
|
2732
|
-
import { Position as
|
|
2663
|
+
import { Position as Position10 } from "@xyflow/system";
|
|
2733
2664
|
var NoiseNormalizeNodeTemplateFactory = class {
|
|
2734
2665
|
template = {
|
|
2735
2666
|
id: IDGenerator.template(),
|
|
@@ -2742,13 +2673,13 @@ var NoiseNormalizeNodeTemplateFactory = class {
|
|
|
2742
2673
|
},
|
|
2743
2674
|
handles: [
|
|
2744
2675
|
{
|
|
2745
|
-
position:
|
|
2676
|
+
position: Position10.Left,
|
|
2746
2677
|
dataType: "module" /* module */,
|
|
2747
2678
|
connection: "target",
|
|
2748
2679
|
maxConnections: 1
|
|
2749
2680
|
},
|
|
2750
2681
|
{
|
|
2751
|
-
position:
|
|
2682
|
+
position: Position10.Right,
|
|
2752
2683
|
dataType: "module" /* module */,
|
|
2753
2684
|
connection: "source"
|
|
2754
2685
|
}
|
|
@@ -2757,7 +2688,7 @@ var NoiseNormalizeNodeTemplateFactory = class {
|
|
|
2757
2688
|
};
|
|
2758
2689
|
|
|
2759
2690
|
// src/templates/output/noise-logger-template.ts
|
|
2760
|
-
import { Position as
|
|
2691
|
+
import { Position as Position11 } from "@xyflow/system";
|
|
2761
2692
|
var NoiseLoggerNodeTemplateFactory = class {
|
|
2762
2693
|
template = {
|
|
2763
2694
|
type: "noise-logger" /* noiseLogger */,
|
|
@@ -2767,7 +2698,7 @@ var NoiseLoggerNodeTemplateFactory = class {
|
|
|
2767
2698
|
},
|
|
2768
2699
|
handles: [
|
|
2769
2700
|
{
|
|
2770
|
-
position:
|
|
2701
|
+
position: Position11.Left,
|
|
2771
2702
|
dataType: "noise" /* noise */,
|
|
2772
2703
|
connection: "target"
|
|
2773
2704
|
}
|
|
@@ -2776,7 +2707,7 @@ var NoiseLoggerNodeTemplateFactory = class {
|
|
|
2776
2707
|
};
|
|
2777
2708
|
|
|
2778
2709
|
// src/templates/output/noise-raw-texture-template.ts
|
|
2779
|
-
import { Position as
|
|
2710
|
+
import { Position as Position12 } from "@xyflow/system";
|
|
2780
2711
|
var NoiseRawTextureTemplateFactory = class {
|
|
2781
2712
|
template = {
|
|
2782
2713
|
type: "texture-data" /* textureData */,
|
|
@@ -2786,13 +2717,13 @@ var NoiseRawTextureTemplateFactory = class {
|
|
|
2786
2717
|
},
|
|
2787
2718
|
handles: [
|
|
2788
2719
|
{
|
|
2789
|
-
position:
|
|
2720
|
+
position: Position12.Left,
|
|
2790
2721
|
dataType: "noise" /* noise */,
|
|
2791
2722
|
connection: "target",
|
|
2792
2723
|
maxConnections: 1
|
|
2793
2724
|
},
|
|
2794
2725
|
{
|
|
2795
|
-
position:
|
|
2726
|
+
position: Position12.Right,
|
|
2796
2727
|
dataType: "texture" /* texture */,
|
|
2797
2728
|
connection: "source"
|
|
2798
2729
|
}
|
|
@@ -2801,7 +2732,7 @@ var NoiseRawTextureTemplateFactory = class {
|
|
|
2801
2732
|
};
|
|
2802
2733
|
|
|
2803
2734
|
// src/templates/output/position-logger-template.ts
|
|
2804
|
-
import { Position as
|
|
2735
|
+
import { Position as Position13 } from "@xyflow/system";
|
|
2805
2736
|
var PositionLoggerNodeTemplateFactory = class {
|
|
2806
2737
|
template = {
|
|
2807
2738
|
type: "position-logger" /* positionLogger */,
|
|
@@ -2811,7 +2742,7 @@ var PositionLoggerNodeTemplateFactory = class {
|
|
|
2811
2742
|
},
|
|
2812
2743
|
handles: [
|
|
2813
2744
|
{
|
|
2814
|
-
position:
|
|
2745
|
+
position: Position13.Left,
|
|
2815
2746
|
dataType: "position" /* position */,
|
|
2816
2747
|
connection: "target"
|
|
2817
2748
|
}
|
|
@@ -2820,7 +2751,7 @@ var PositionLoggerNodeTemplateFactory = class {
|
|
|
2820
2751
|
};
|
|
2821
2752
|
|
|
2822
2753
|
// src/templates/modifiers/noise-combine-template.ts
|
|
2823
|
-
import { Position as
|
|
2754
|
+
import { Position as Position14 } from "@xyflow/system";
|
|
2824
2755
|
var NoiseCombineNodeTemplateFactory = class {
|
|
2825
2756
|
template = {
|
|
2826
2757
|
type: "noise-combiner" /* noiseCombine */,
|
|
@@ -2831,13 +2762,13 @@ var NoiseCombineNodeTemplateFactory = class {
|
|
|
2831
2762
|
},
|
|
2832
2763
|
handles: [
|
|
2833
2764
|
{
|
|
2834
|
-
position:
|
|
2765
|
+
position: Position14.Left,
|
|
2835
2766
|
dataType: "module" /* module */,
|
|
2836
2767
|
connection: "target",
|
|
2837
2768
|
maxConnections: 2
|
|
2838
2769
|
},
|
|
2839
2770
|
{
|
|
2840
|
-
position:
|
|
2771
|
+
position: Position14.Right,
|
|
2841
2772
|
dataType: "module" /* module */,
|
|
2842
2773
|
connection: "source"
|
|
2843
2774
|
}
|
|
@@ -2846,7 +2777,7 @@ var NoiseCombineNodeTemplateFactory = class {
|
|
|
2846
2777
|
};
|
|
2847
2778
|
|
|
2848
2779
|
// src/templates/modifiers/noise-clamp-template.ts
|
|
2849
|
-
import { Position as
|
|
2780
|
+
import { Position as Position15 } from "@xyflow/system";
|
|
2850
2781
|
var NoiseClampNodeTemplateFactory = class {
|
|
2851
2782
|
template = {
|
|
2852
2783
|
type: "noise-clamp" /* noiseClamp */,
|
|
@@ -2858,13 +2789,13 @@ var NoiseClampNodeTemplateFactory = class {
|
|
|
2858
2789
|
},
|
|
2859
2790
|
handles: [
|
|
2860
2791
|
{
|
|
2861
|
-
position:
|
|
2792
|
+
position: Position15.Left,
|
|
2862
2793
|
dataType: "module" /* module */,
|
|
2863
2794
|
connection: "target",
|
|
2864
2795
|
maxConnections: 1
|
|
2865
2796
|
},
|
|
2866
2797
|
{
|
|
2867
|
-
position:
|
|
2798
|
+
position: Position15.Right,
|
|
2868
2799
|
dataType: "module" /* module */,
|
|
2869
2800
|
connection: "source"
|
|
2870
2801
|
}
|
|
@@ -2873,7 +2804,7 @@ var NoiseClampNodeTemplateFactory = class {
|
|
|
2873
2804
|
};
|
|
2874
2805
|
|
|
2875
2806
|
// src/templates/modifiers/noise-abs-template.ts
|
|
2876
|
-
import { Position as
|
|
2807
|
+
import { Position as Position16 } from "@xyflow/system";
|
|
2877
2808
|
var NoiseAbsNodeTemplateFactory = class {
|
|
2878
2809
|
template = {
|
|
2879
2810
|
type: "noise-abs" /* noiseAbs */,
|
|
@@ -2883,13 +2814,13 @@ var NoiseAbsNodeTemplateFactory = class {
|
|
|
2883
2814
|
},
|
|
2884
2815
|
handles: [
|
|
2885
2816
|
{
|
|
2886
|
-
position:
|
|
2817
|
+
position: Position16.Left,
|
|
2887
2818
|
dataType: "module" /* module */,
|
|
2888
2819
|
connection: "target",
|
|
2889
2820
|
maxConnections: 1
|
|
2890
2821
|
},
|
|
2891
2822
|
{
|
|
2892
|
-
position:
|
|
2823
|
+
position: Position16.Right,
|
|
2893
2824
|
dataType: "module" /* module */,
|
|
2894
2825
|
connection: "source"
|
|
2895
2826
|
}
|
|
@@ -2898,7 +2829,7 @@ var NoiseAbsNodeTemplateFactory = class {
|
|
|
2898
2829
|
};
|
|
2899
2830
|
|
|
2900
2831
|
// src/templates/output/noise-output-template.ts
|
|
2901
|
-
import { Position as
|
|
2832
|
+
import { Position as Position17 } from "@xyflow/system";
|
|
2902
2833
|
var NoiseOutputNodeTemplateFactory = class {
|
|
2903
2834
|
template = {
|
|
2904
2835
|
type: "noise-output" /* noiseOutput */,
|
|
@@ -2908,18 +2839,18 @@ var NoiseOutputNodeTemplateFactory = class {
|
|
|
2908
2839
|
},
|
|
2909
2840
|
handles: [
|
|
2910
2841
|
{
|
|
2911
|
-
position:
|
|
2842
|
+
position: Position17.Left,
|
|
2912
2843
|
dataType: "position" /* position */,
|
|
2913
2844
|
connection: "target"
|
|
2914
2845
|
},
|
|
2915
2846
|
{
|
|
2916
|
-
position:
|
|
2847
|
+
position: Position17.Left,
|
|
2917
2848
|
dataType: "module" /* module */,
|
|
2918
2849
|
connection: "target",
|
|
2919
2850
|
maxConnections: 1
|
|
2920
2851
|
},
|
|
2921
2852
|
{
|
|
2922
|
-
position:
|
|
2853
|
+
position: Position17.Right,
|
|
2923
2854
|
dataType: "noise" /* noise */,
|
|
2924
2855
|
connection: "source"
|
|
2925
2856
|
}
|
|
@@ -2928,8 +2859,7 @@ var NoiseOutputNodeTemplateFactory = class {
|
|
|
2928
2859
|
};
|
|
2929
2860
|
|
|
2930
2861
|
// src/templates/modifiers/noise-curve-template.ts
|
|
2931
|
-
import {
|
|
2932
|
-
import { Position as Position19 } from "@xyflow/system";
|
|
2862
|
+
import { Position as Position18 } from "@xyflow/system";
|
|
2933
2863
|
var NoiseCurveNodeTemplateFactory = class {
|
|
2934
2864
|
template = {
|
|
2935
2865
|
type: "noise-curve" /* noiseCurve */,
|
|
@@ -2940,18 +2870,18 @@ var NoiseCurveNodeTemplateFactory = class {
|
|
|
2940
2870
|
},
|
|
2941
2871
|
handles: [
|
|
2942
2872
|
{
|
|
2943
|
-
position:
|
|
2873
|
+
position: Position18.Left,
|
|
2944
2874
|
dataType: "module" /* module */,
|
|
2945
2875
|
connection: "target",
|
|
2946
2876
|
maxConnections: 1
|
|
2947
2877
|
},
|
|
2878
|
+
// {
|
|
2879
|
+
// position: Position.Left,
|
|
2880
|
+
// dataType: CoreHandleType.variableProperty,
|
|
2881
|
+
// connection: 'target',
|
|
2882
|
+
// },
|
|
2948
2883
|
{
|
|
2949
|
-
position:
|
|
2950
|
-
dataType: CoreHandleType7.variableProperty,
|
|
2951
|
-
connection: "target"
|
|
2952
|
-
},
|
|
2953
|
-
{
|
|
2954
|
-
position: Position19.Right,
|
|
2884
|
+
position: Position18.Right,
|
|
2955
2885
|
dataType: "module" /* module */,
|
|
2956
2886
|
connection: "source"
|
|
2957
2887
|
}
|
|
@@ -2960,7 +2890,7 @@ var NoiseCurveNodeTemplateFactory = class {
|
|
|
2960
2890
|
};
|
|
2961
2891
|
|
|
2962
2892
|
// src/templates/modifiers/noise-exponent-template.ts
|
|
2963
|
-
import { Position as
|
|
2893
|
+
import { Position as Position19 } from "@xyflow/system";
|
|
2964
2894
|
var NoiseExponentNodeTemplateFactory = class {
|
|
2965
2895
|
template = {
|
|
2966
2896
|
type: "noise-exponent" /* noiseExponent */,
|
|
@@ -2971,13 +2901,13 @@ var NoiseExponentNodeTemplateFactory = class {
|
|
|
2971
2901
|
},
|
|
2972
2902
|
handles: [
|
|
2973
2903
|
{
|
|
2974
|
-
position:
|
|
2904
|
+
position: Position19.Left,
|
|
2975
2905
|
dataType: "module" /* module */,
|
|
2976
2906
|
connection: "target",
|
|
2977
2907
|
maxConnections: 1
|
|
2978
2908
|
},
|
|
2979
2909
|
{
|
|
2980
|
-
position:
|
|
2910
|
+
position: Position19.Right,
|
|
2981
2911
|
dataType: "module" /* module */,
|
|
2982
2912
|
connection: "source"
|
|
2983
2913
|
}
|
|
@@ -2986,7 +2916,7 @@ var NoiseExponentNodeTemplateFactory = class {
|
|
|
2986
2916
|
};
|
|
2987
2917
|
|
|
2988
2918
|
// src/templates/modifiers/noise-invert-template.ts
|
|
2989
|
-
import { Position as
|
|
2919
|
+
import { Position as Position20 } from "@xyflow/system";
|
|
2990
2920
|
var NoiseInvertNodeTemplateFactory = class {
|
|
2991
2921
|
template = {
|
|
2992
2922
|
type: "noise-invert" /* noiseInvert */,
|
|
@@ -2996,13 +2926,13 @@ var NoiseInvertNodeTemplateFactory = class {
|
|
|
2996
2926
|
},
|
|
2997
2927
|
handles: [
|
|
2998
2928
|
{
|
|
2999
|
-
position:
|
|
2929
|
+
position: Position20.Left,
|
|
3000
2930
|
dataType: "module" /* module */,
|
|
3001
2931
|
connection: "target",
|
|
3002
2932
|
maxConnections: 1
|
|
3003
2933
|
},
|
|
3004
2934
|
{
|
|
3005
|
-
position:
|
|
2935
|
+
position: Position20.Right,
|
|
3006
2936
|
dataType: "module" /* module */,
|
|
3007
2937
|
connection: "source"
|
|
3008
2938
|
}
|
|
@@ -3011,7 +2941,7 @@ var NoiseInvertNodeTemplateFactory = class {
|
|
|
3011
2941
|
};
|
|
3012
2942
|
|
|
3013
2943
|
// src/templates/modifiers/noise-scalebias-template.ts
|
|
3014
|
-
import { Position as
|
|
2944
|
+
import { Position as Position21 } from "@xyflow/system";
|
|
3015
2945
|
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
3016
2946
|
template = {
|
|
3017
2947
|
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
@@ -3023,13 +2953,13 @@ var NoiseScaleBiasNodeTemplateFactory = class {
|
|
|
3023
2953
|
},
|
|
3024
2954
|
handles: [
|
|
3025
2955
|
{
|
|
3026
|
-
position:
|
|
2956
|
+
position: Position21.Left,
|
|
3027
2957
|
dataType: "module" /* module */,
|
|
3028
2958
|
connection: "target",
|
|
3029
2959
|
maxConnections: 1
|
|
3030
2960
|
},
|
|
3031
2961
|
{
|
|
3032
|
-
position:
|
|
2962
|
+
position: Position21.Right,
|
|
3033
2963
|
dataType: "module" /* module */,
|
|
3034
2964
|
connection: "source"
|
|
3035
2965
|
}
|
|
@@ -3038,7 +2968,7 @@ var NoiseScaleBiasNodeTemplateFactory = class {
|
|
|
3038
2968
|
};
|
|
3039
2969
|
|
|
3040
2970
|
// src/templates/modifiers/noise-terrace-template.ts
|
|
3041
|
-
import { Position as
|
|
2971
|
+
import { Position as Position22 } from "@xyflow/system";
|
|
3042
2972
|
var NoiseTerraceNodeTemplateFactory = class {
|
|
3043
2973
|
template = {
|
|
3044
2974
|
type: "noise-terrace" /* noiseTerrace */,
|
|
@@ -3049,13 +2979,13 @@ var NoiseTerraceNodeTemplateFactory = class {
|
|
|
3049
2979
|
},
|
|
3050
2980
|
handles: [
|
|
3051
2981
|
{
|
|
3052
|
-
position:
|
|
2982
|
+
position: Position22.Left,
|
|
3053
2983
|
dataType: "module" /* module */,
|
|
3054
2984
|
connection: "target",
|
|
3055
2985
|
maxConnections: 1
|
|
3056
2986
|
},
|
|
3057
2987
|
{
|
|
3058
|
-
position:
|
|
2988
|
+
position: Position22.Right,
|
|
3059
2989
|
dataType: "module" /* module */,
|
|
3060
2990
|
connection: "source"
|
|
3061
2991
|
}
|
|
@@ -3064,7 +2994,7 @@ var NoiseTerraceNodeTemplateFactory = class {
|
|
|
3064
2994
|
};
|
|
3065
2995
|
|
|
3066
2996
|
// src/templates/selectors/noise-blend-template.ts
|
|
3067
|
-
import { Position as
|
|
2997
|
+
import { Position as Position23 } from "@xyflow/system";
|
|
3068
2998
|
var NoiseBlendNodeTemplateFactory = class {
|
|
3069
2999
|
template = {
|
|
3070
3000
|
type: "noise-blend" /* noiseBlend */,
|
|
@@ -3074,7 +3004,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3074
3004
|
},
|
|
3075
3005
|
handles: [
|
|
3076
3006
|
{
|
|
3077
|
-
position:
|
|
3007
|
+
position: Position23.Left,
|
|
3078
3008
|
dataType: "module" /* module */,
|
|
3079
3009
|
connection: "target",
|
|
3080
3010
|
label: "Source Modules",
|
|
@@ -3083,7 +3013,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3083
3013
|
minConnections: 2
|
|
3084
3014
|
},
|
|
3085
3015
|
{
|
|
3086
|
-
position:
|
|
3016
|
+
position: Position23.Left,
|
|
3087
3017
|
dataType: "module" /* module */,
|
|
3088
3018
|
dataId: "control" /* control */,
|
|
3089
3019
|
connection: "target",
|
|
@@ -3091,7 +3021,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3091
3021
|
maxConnections: 1
|
|
3092
3022
|
},
|
|
3093
3023
|
{
|
|
3094
|
-
position:
|
|
3024
|
+
position: Position23.Right,
|
|
3095
3025
|
dataType: "module" /* module */,
|
|
3096
3026
|
dataId: "output" /* output */,
|
|
3097
3027
|
connection: "source"
|
|
@@ -3101,7 +3031,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3101
3031
|
};
|
|
3102
3032
|
|
|
3103
3033
|
// src/templates/selectors/noise-select-template.ts
|
|
3104
|
-
import { Position as
|
|
3034
|
+
import { Position as Position24 } from "@xyflow/system";
|
|
3105
3035
|
var NoiseSelectNodeTemplateFactory = class {
|
|
3106
3036
|
template = {
|
|
3107
3037
|
type: "noise-select" /* noiseSelect */,
|
|
@@ -3114,7 +3044,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3114
3044
|
},
|
|
3115
3045
|
handles: [
|
|
3116
3046
|
{
|
|
3117
|
-
position:
|
|
3047
|
+
position: Position24.Left,
|
|
3118
3048
|
dataType: "module" /* module */,
|
|
3119
3049
|
dataId: "source" /* source */,
|
|
3120
3050
|
connection: "target",
|
|
@@ -3123,7 +3053,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3123
3053
|
minConnections: 2
|
|
3124
3054
|
},
|
|
3125
3055
|
{
|
|
3126
|
-
position:
|
|
3056
|
+
position: Position24.Left,
|
|
3127
3057
|
dataType: "module" /* module */,
|
|
3128
3058
|
dataId: "control" /* control */,
|
|
3129
3059
|
connection: "target",
|
|
@@ -3131,7 +3061,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3131
3061
|
maxConnections: 1
|
|
3132
3062
|
},
|
|
3133
3063
|
{
|
|
3134
|
-
position:
|
|
3064
|
+
position: Position24.Right,
|
|
3135
3065
|
dataType: "module" /* module */,
|
|
3136
3066
|
dataId: "output" /* output */,
|
|
3137
3067
|
connection: "source"
|
|
@@ -3141,7 +3071,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3141
3071
|
};
|
|
3142
3072
|
|
|
3143
3073
|
// src/templates/transformers/noise-displace-template.ts
|
|
3144
|
-
import { Position as
|
|
3074
|
+
import { Position as Position25 } from "@xyflow/system";
|
|
3145
3075
|
var NoiseDisplaceNodeTemplateFactory = class {
|
|
3146
3076
|
template = {
|
|
3147
3077
|
type: "noise-displace" /* noiseDisplace */,
|
|
@@ -3151,7 +3081,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3151
3081
|
},
|
|
3152
3082
|
handles: [
|
|
3153
3083
|
{
|
|
3154
|
-
position:
|
|
3084
|
+
position: Position25.Left,
|
|
3155
3085
|
connection: "target",
|
|
3156
3086
|
label: "Source Module",
|
|
3157
3087
|
dataType: "module" /* module */,
|
|
@@ -3159,7 +3089,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3159
3089
|
maxConnections: 1
|
|
3160
3090
|
},
|
|
3161
3091
|
{
|
|
3162
|
-
position:
|
|
3092
|
+
position: Position25.Left,
|
|
3163
3093
|
connection: "target",
|
|
3164
3094
|
label: "X Module",
|
|
3165
3095
|
dataType: "module" /* module */,
|
|
@@ -3167,7 +3097,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3167
3097
|
maxConnections: 1
|
|
3168
3098
|
},
|
|
3169
3099
|
{
|
|
3170
|
-
position:
|
|
3100
|
+
position: Position25.Left,
|
|
3171
3101
|
connection: "target",
|
|
3172
3102
|
label: "Y Module",
|
|
3173
3103
|
dataType: "module" /* module */,
|
|
@@ -3175,7 +3105,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3175
3105
|
maxConnections: 1
|
|
3176
3106
|
},
|
|
3177
3107
|
{
|
|
3178
|
-
position:
|
|
3108
|
+
position: Position25.Left,
|
|
3179
3109
|
connection: "target",
|
|
3180
3110
|
label: "Z Module",
|
|
3181
3111
|
dataType: "module" /* module */,
|
|
@@ -3183,7 +3113,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3183
3113
|
maxConnections: 1
|
|
3184
3114
|
},
|
|
3185
3115
|
{
|
|
3186
|
-
position:
|
|
3116
|
+
position: Position25.Right,
|
|
3187
3117
|
dataType: "module" /* module */,
|
|
3188
3118
|
dataId: "output" /* output */,
|
|
3189
3119
|
connection: "source"
|
|
@@ -3193,7 +3123,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3193
3123
|
};
|
|
3194
3124
|
|
|
3195
3125
|
// src/templates/transformers/noise-rotate-point-template.ts
|
|
3196
|
-
import { Position as
|
|
3126
|
+
import { Position as Position26 } from "@xyflow/system";
|
|
3197
3127
|
var NoiseRotatePointNodeTemplateFactory = class {
|
|
3198
3128
|
template = {
|
|
3199
3129
|
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
@@ -3206,14 +3136,14 @@ var NoiseRotatePointNodeTemplateFactory = class {
|
|
|
3206
3136
|
},
|
|
3207
3137
|
handles: [
|
|
3208
3138
|
{
|
|
3209
|
-
position:
|
|
3139
|
+
position: Position26.Left,
|
|
3210
3140
|
dataType: "module" /* module */,
|
|
3211
3141
|
connection: "target",
|
|
3212
3142
|
label: "Source Module",
|
|
3213
3143
|
maxConnections: 1
|
|
3214
3144
|
},
|
|
3215
3145
|
{
|
|
3216
|
-
position:
|
|
3146
|
+
position: Position26.Right,
|
|
3217
3147
|
dataType: "module" /* module */,
|
|
3218
3148
|
connection: "source"
|
|
3219
3149
|
}
|
|
@@ -3222,7 +3152,7 @@ var NoiseRotatePointNodeTemplateFactory = class {
|
|
|
3222
3152
|
};
|
|
3223
3153
|
|
|
3224
3154
|
// src/templates/transformers/noise-scale-point-template.ts
|
|
3225
|
-
import { Position as
|
|
3155
|
+
import { Position as Position27 } from "@xyflow/system";
|
|
3226
3156
|
var NoiseScalePointNodeTemplateFactory = class {
|
|
3227
3157
|
template = {
|
|
3228
3158
|
type: "noise-scale-point" /* noiseScalePoint */,
|
|
@@ -3235,14 +3165,14 @@ var NoiseScalePointNodeTemplateFactory = class {
|
|
|
3235
3165
|
},
|
|
3236
3166
|
handles: [
|
|
3237
3167
|
{
|
|
3238
|
-
position:
|
|
3168
|
+
position: Position27.Left,
|
|
3239
3169
|
dataType: "module" /* module */,
|
|
3240
3170
|
connection: "target",
|
|
3241
3171
|
label: "Source Module",
|
|
3242
3172
|
maxConnections: 1
|
|
3243
3173
|
},
|
|
3244
3174
|
{
|
|
3245
|
-
position:
|
|
3175
|
+
position: Position27.Right,
|
|
3246
3176
|
dataType: "module" /* module */,
|
|
3247
3177
|
connection: "source"
|
|
3248
3178
|
}
|
|
@@ -3251,7 +3181,7 @@ var NoiseScalePointNodeTemplateFactory = class {
|
|
|
3251
3181
|
};
|
|
3252
3182
|
|
|
3253
3183
|
// src/templates/transformers/noise-translate-point-template.ts
|
|
3254
|
-
import { Position as
|
|
3184
|
+
import { Position as Position28 } from "@xyflow/system";
|
|
3255
3185
|
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
3256
3186
|
template = {
|
|
3257
3187
|
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
@@ -3264,14 +3194,14 @@ var NoiseTranslatePointNodeTemplateFactory = class {
|
|
|
3264
3194
|
},
|
|
3265
3195
|
handles: [
|
|
3266
3196
|
{
|
|
3267
|
-
position:
|
|
3197
|
+
position: Position28.Left,
|
|
3268
3198
|
dataType: "module" /* module */,
|
|
3269
3199
|
connection: "target",
|
|
3270
3200
|
label: "Source Module",
|
|
3271
3201
|
maxConnections: 1
|
|
3272
3202
|
},
|
|
3273
3203
|
{
|
|
3274
|
-
position:
|
|
3204
|
+
position: Position28.Right,
|
|
3275
3205
|
dataType: "module" /* module */,
|
|
3276
3206
|
connection: "source"
|
|
3277
3207
|
}
|
|
@@ -3280,8 +3210,8 @@ var NoiseTranslatePointNodeTemplateFactory = class {
|
|
|
3280
3210
|
};
|
|
3281
3211
|
|
|
3282
3212
|
// src/templates/transformers/noise-turbulence-template.ts
|
|
3283
|
-
import { CoreHandleType as
|
|
3284
|
-
import { Position as
|
|
3213
|
+
import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
|
|
3214
|
+
import { Position as Position29 } from "@xyflow/system";
|
|
3285
3215
|
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
3286
3216
|
template = {
|
|
3287
3217
|
type: "noise-turbulence" /* noiseTurbulence */,
|
|
@@ -3295,20 +3225,20 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3295
3225
|
},
|
|
3296
3226
|
handles: [
|
|
3297
3227
|
{
|
|
3298
|
-
position:
|
|
3228
|
+
position: Position29.Left,
|
|
3299
3229
|
dataType: "module" /* module */,
|
|
3300
3230
|
connection: "target",
|
|
3301
3231
|
label: "Source Module",
|
|
3302
3232
|
maxConnections: 1
|
|
3303
3233
|
},
|
|
3304
3234
|
{
|
|
3305
|
-
position:
|
|
3306
|
-
dataType:
|
|
3235
|
+
position: Position29.Left,
|
|
3236
|
+
dataType: CoreHandleType6.variableProperty,
|
|
3307
3237
|
label: "Variable Properties",
|
|
3308
3238
|
connection: "target"
|
|
3309
3239
|
},
|
|
3310
3240
|
{
|
|
3311
|
-
position:
|
|
3241
|
+
position: Position29.Right,
|
|
3312
3242
|
dataType: "module" /* module */,
|
|
3313
3243
|
connection: "source"
|
|
3314
3244
|
}
|
|
@@ -3317,9 +3247,9 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3317
3247
|
};
|
|
3318
3248
|
|
|
3319
3249
|
// src/templates/generators/noise-billow-template.ts
|
|
3320
|
-
import { CoreHandleType as
|
|
3250
|
+
import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
|
|
3321
3251
|
import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
|
|
3322
|
-
import { Position as
|
|
3252
|
+
import { Position as Position30 } from "@xyflow/system";
|
|
3323
3253
|
var NoiseBillowNodeTemplateFactory = class {
|
|
3324
3254
|
template = {
|
|
3325
3255
|
id: IDGenerator2.template(),
|
|
@@ -3335,12 +3265,12 @@ var NoiseBillowNodeTemplateFactory = class {
|
|
|
3335
3265
|
},
|
|
3336
3266
|
handles: [
|
|
3337
3267
|
{
|
|
3338
|
-
position:
|
|
3339
|
-
dataType:
|
|
3268
|
+
position: Position30.Left,
|
|
3269
|
+
dataType: CoreHandleType7.variableProperty,
|
|
3340
3270
|
connection: "target"
|
|
3341
3271
|
},
|
|
3342
3272
|
{
|
|
3343
|
-
position:
|
|
3273
|
+
position: Position30.Right,
|
|
3344
3274
|
dataType: "module" /* module */,
|
|
3345
3275
|
connection: "source"
|
|
3346
3276
|
}
|
|
@@ -3353,7 +3283,7 @@ import {
|
|
|
3353
3283
|
CoreTemplateGroup
|
|
3354
3284
|
} from "@awesome-flow/core/abstract";
|
|
3355
3285
|
import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
|
|
3356
|
-
import { Position as
|
|
3286
|
+
import { Position as Position31 } from "@xyflow/system";
|
|
3357
3287
|
var ModuleGroupNodeTemplateFactory = class {
|
|
3358
3288
|
template = {
|
|
3359
3289
|
id: IDGenerator3.template(),
|
|
@@ -3373,14 +3303,14 @@ var ModuleGroupNodeTemplateFactory = class {
|
|
|
3373
3303
|
},
|
|
3374
3304
|
handles: [
|
|
3375
3305
|
{
|
|
3376
|
-
position:
|
|
3306
|
+
position: Position31.Bottom,
|
|
3377
3307
|
dataType: "module" /* module */,
|
|
3378
3308
|
connection: "target",
|
|
3379
3309
|
maxConnections: 1,
|
|
3380
3310
|
hideOnCollapse: true
|
|
3381
3311
|
},
|
|
3382
3312
|
{
|
|
3383
|
-
position:
|
|
3313
|
+
position: Position31.Right,
|
|
3384
3314
|
dataType: "module" /* module */,
|
|
3385
3315
|
connection: "source"
|
|
3386
3316
|
}
|
|
@@ -3391,7 +3321,6 @@ var ModuleGroupNodeTemplateFactory = class {
|
|
|
3391
3321
|
// src/abstract/node-types.ts
|
|
3392
3322
|
var noiseNodeTemplates = {
|
|
3393
3323
|
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
3394
|
-
["noise-simplex" /* noiseSimplex */]: new NoiseSimplexNodeTemplateFactory(),
|
|
3395
3324
|
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
3396
3325
|
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
3397
3326
|
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|
|
@@ -3425,10 +3354,10 @@ var noiseNodeTemplates = {
|
|
|
3425
3354
|
};
|
|
3426
3355
|
|
|
3427
3356
|
// src/nodes/output/noise-output-node.tsx
|
|
3428
|
-
import { jsx as
|
|
3357
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3429
3358
|
function NoiseOutputNode({ id, selected, data, type }) {
|
|
3430
3359
|
const [size, setSize] = useState20(0);
|
|
3431
|
-
const updateComputedData =
|
|
3360
|
+
const updateComputedData = useUpdateNodeComputedData29();
|
|
3432
3361
|
const onDataUpdated = useCallback21(
|
|
3433
3362
|
(handleData) => {
|
|
3434
3363
|
const incomingPositions = handleData["position" /* position */];
|
|
@@ -3451,8 +3380,8 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
3451
3380
|
},
|
|
3452
3381
|
[]
|
|
3453
3382
|
);
|
|
3454
|
-
return /* @__PURE__ */ jsxs28(
|
|
3455
|
-
/* @__PURE__ */
|
|
3383
|
+
return /* @__PURE__ */ jsxs28(NodeContainer31, { id, selected, data, type, children: [
|
|
3384
|
+
/* @__PURE__ */ jsx31(
|
|
3456
3385
|
HandlesIncomingDataStatus4,
|
|
3457
3386
|
{
|
|
3458
3387
|
nodeId: id,
|
|
@@ -3467,7 +3396,7 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
3467
3396
|
"Noise points: ",
|
|
3468
3397
|
size
|
|
3469
3398
|
] }),
|
|
3470
|
-
/* @__PURE__ */
|
|
3399
|
+
/* @__PURE__ */ jsx31(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
|
|
3471
3400
|
] });
|
|
3472
3401
|
}
|
|
3473
3402
|
var noise_output_node_default = NoiseOutputNode;
|
|
@@ -3495,7 +3424,6 @@ export {
|
|
|
3495
3424
|
noise_scale_bias_node_default as NoiseScaleBiasNode,
|
|
3496
3425
|
noise_scale_point_node_default as NoiseScalePointNode,
|
|
3497
3426
|
noise_select_node_default as NoiseSelectNode,
|
|
3498
|
-
noise_simplex_node_default as NoiseSimplexNode,
|
|
3499
3427
|
noise_spheres_node_default as NoiseSpheresNode,
|
|
3500
3428
|
noise_terrace_node_default as NoiseTerraceNode,
|
|
3501
3429
|
noise_translate_point_node_default as NoiseTranslatePointNode,
|