@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/abstract/index.cjs
CHANGED
|
@@ -34,38 +34,28 @@ var require_fast_deep_equal = __commonJS({
|
|
|
34
34
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) {
|
|
35
35
|
"use strict";
|
|
36
36
|
module2.exports = function equal(a, b) {
|
|
37
|
-
if (a === b)
|
|
38
|
-
return true;
|
|
37
|
+
if (a === b) return true;
|
|
39
38
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
40
|
-
if (a.constructor !== b.constructor)
|
|
41
|
-
return false;
|
|
39
|
+
if (a.constructor !== b.constructor) return false;
|
|
42
40
|
var length, i, keys;
|
|
43
41
|
if (Array.isArray(a)) {
|
|
44
42
|
length = a.length;
|
|
45
|
-
if (length != b.length)
|
|
46
|
-
return false;
|
|
43
|
+
if (length != b.length) return false;
|
|
47
44
|
for (i = length; i-- !== 0; )
|
|
48
|
-
if (!equal(a[i], b[i]))
|
|
49
|
-
return false;
|
|
45
|
+
if (!equal(a[i], b[i])) return false;
|
|
50
46
|
return true;
|
|
51
47
|
}
|
|
52
|
-
if (a.constructor === RegExp)
|
|
53
|
-
|
|
54
|
-
if (a.
|
|
55
|
-
return a.valueOf() === b.valueOf();
|
|
56
|
-
if (a.toString !== Object.prototype.toString)
|
|
57
|
-
return a.toString() === b.toString();
|
|
48
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
49
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
50
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
58
51
|
keys = Object.keys(a);
|
|
59
52
|
length = keys.length;
|
|
60
|
-
if (length !== Object.keys(b).length)
|
|
61
|
-
return false;
|
|
53
|
+
if (length !== Object.keys(b).length) return false;
|
|
62
54
|
for (i = length; i-- !== 0; )
|
|
63
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
64
|
-
return false;
|
|
55
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
65
56
|
for (i = length; i-- !== 0; ) {
|
|
66
57
|
var key = keys[i];
|
|
67
|
-
if (!equal(a[key], b[key]))
|
|
68
|
-
return false;
|
|
58
|
+
if (!equal(a[key], b[key])) return false;
|
|
69
59
|
}
|
|
70
60
|
return true;
|
|
71
61
|
}
|
|
@@ -112,51 +102,20 @@ var NoiseSourceControlHandle = /* @__PURE__ */ ((NoiseSourceControlHandle2) => {
|
|
|
112
102
|
return NoiseSourceControlHandle2;
|
|
113
103
|
})(NoiseSourceControlHandle || {});
|
|
114
104
|
|
|
115
|
-
// src/nodes/generators/
|
|
105
|
+
// src/nodes/generators/position-const-node.tsx
|
|
116
106
|
var import_layout = require("@awesome-flow/core/layout");
|
|
117
107
|
var import_react = require("react");
|
|
108
|
+
var import_core = require("@mantine/core");
|
|
118
109
|
var import_hooks = require("@awesome-flow/core/hooks");
|
|
119
|
-
|
|
120
|
-
// src/modules/simplex-module.ts
|
|
121
|
-
var import_Module = __toESM(require("libnoise-ts/module/Module"), 1);
|
|
122
|
-
var import_simplex_noise = require("simplex-noise");
|
|
123
|
-
var SimplexModule = class extends import_Module.default {
|
|
124
|
-
noise;
|
|
125
|
-
constructor(random) {
|
|
126
|
-
super();
|
|
127
|
-
this.noise = (0, import_simplex_noise.createNoise3D)(random);
|
|
128
|
-
}
|
|
129
|
-
getValue(x, y, z) {
|
|
130
|
-
return this.noise(x, y, z);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// src/nodes/generators/noise-simplex-node.tsx
|
|
135
110
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
136
|
-
function NoiseSimplexNode({ id, selected, data, type }) {
|
|
137
|
-
const updateComputedData = (0, import_hooks.useUpdateNodeComputedData)();
|
|
138
|
-
const module2 = (0, import_react.useMemo)(() => new SimplexModule(), []);
|
|
139
|
-
(0, import_react.useEffect)(() => {
|
|
140
|
-
updateComputedData(id, { module: module2 });
|
|
141
|
-
}, []);
|
|
142
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_layout.NodeContainer, { id, selected, data, type });
|
|
143
|
-
}
|
|
144
|
-
var noise_simplex_node_default = NoiseSimplexNode;
|
|
145
|
-
|
|
146
|
-
// src/nodes/generators/position-const-node.tsx
|
|
147
|
-
var import_layout2 = require("@awesome-flow/core/layout");
|
|
148
|
-
var import_react2 = require("react");
|
|
149
|
-
var import_core = require("@mantine/core");
|
|
150
|
-
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
151
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
152
111
|
function PositionConstNode({ id, selected, data, type }) {
|
|
153
112
|
const position = data.position ?? { x: 0, y: 0, z: 0 };
|
|
154
|
-
const [x, setX] = (0,
|
|
155
|
-
const [y, setY] = (0,
|
|
156
|
-
const [z, setZ] = (0,
|
|
157
|
-
const updateNodeData = (0,
|
|
158
|
-
const updateComputedData = (0,
|
|
159
|
-
(0,
|
|
113
|
+
const [x, setX] = (0, import_react.useState)(position.x);
|
|
114
|
+
const [y, setY] = (0, import_react.useState)(position.y);
|
|
115
|
+
const [z, setZ] = (0, import_react.useState)(position.z);
|
|
116
|
+
const updateNodeData = (0, import_hooks.useUpdateNodeData)();
|
|
117
|
+
const updateComputedData = (0, import_hooks.useUpdateNodeComputedData)();
|
|
118
|
+
(0, import_react.useEffect)(() => {
|
|
160
119
|
const position2 = { x, y, z };
|
|
161
120
|
updateNodeData(id, {
|
|
162
121
|
position: position2
|
|
@@ -165,47 +124,47 @@ function PositionConstNode({ id, selected, data, type }) {
|
|
|
165
124
|
positions: [position2]
|
|
166
125
|
});
|
|
167
126
|
}, [x, y, z]);
|
|
168
|
-
return /* @__PURE__ */ (0,
|
|
169
|
-
/* @__PURE__ */ (0,
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_layout.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Stack, { children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { children: [
|
|
170
129
|
"x: ",
|
|
171
|
-
/* @__PURE__ */ (0,
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.NumberInput, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
|
|
172
131
|
] }),
|
|
173
|
-
/* @__PURE__ */ (0,
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { children: [
|
|
174
133
|
"y: ",
|
|
175
|
-
/* @__PURE__ */ (0,
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.NumberInput, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
|
|
176
135
|
] }),
|
|
177
|
-
/* @__PURE__ */ (0,
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { children: [
|
|
178
137
|
"z: ",
|
|
179
|
-
/* @__PURE__ */ (0,
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.NumberInput, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
|
|
180
139
|
] })
|
|
181
140
|
] }) });
|
|
182
141
|
}
|
|
183
142
|
var position_const_node_default = PositionConstNode;
|
|
184
143
|
|
|
185
144
|
// src/nodes/generators/position-grid-node.tsx
|
|
186
|
-
var
|
|
187
|
-
var
|
|
145
|
+
var import_layout2 = require("@awesome-flow/core/layout");
|
|
146
|
+
var import_react2 = require("react");
|
|
188
147
|
var import_core2 = require("@mantine/core");
|
|
189
|
-
var
|
|
190
|
-
var
|
|
148
|
+
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
149
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
191
150
|
function PositionGridNode({ id, selected, data, type }) {
|
|
192
|
-
const [x, setX] = (0,
|
|
193
|
-
const [y, setY] = (0,
|
|
194
|
-
const [z, setZ] = (0,
|
|
195
|
-
const [radius, setRadius] = (0,
|
|
196
|
-
const updateNodeData = (0,
|
|
197
|
-
const updateComputedData = (0,
|
|
198
|
-
(0,
|
|
151
|
+
const [x, setX] = (0, import_react2.useState)(data.center?.x);
|
|
152
|
+
const [y, setY] = (0, import_react2.useState)(data.center?.y);
|
|
153
|
+
const [z, setZ] = (0, import_react2.useState)(data.center?.z);
|
|
154
|
+
const [radius, setRadius] = (0, import_react2.useState)(data.radius);
|
|
155
|
+
const updateNodeData = (0, import_hooks2.useUpdateNodeData)();
|
|
156
|
+
const updateComputedData = (0, import_hooks2.useUpdateNodeComputedData)();
|
|
157
|
+
(0, import_react2.useEffect)(() => {
|
|
199
158
|
updateNodeData(id, {
|
|
200
159
|
center: { x, y, z }
|
|
201
160
|
});
|
|
202
161
|
}, [x, y, z]);
|
|
203
|
-
(0,
|
|
162
|
+
(0, import_react2.useEffect)(() => {
|
|
204
163
|
updateNodeData(id, {
|
|
205
164
|
radius
|
|
206
165
|
});
|
|
207
166
|
}, [radius]);
|
|
208
|
-
(0,
|
|
167
|
+
(0, import_react2.useEffect)(() => {
|
|
209
168
|
const positions = [];
|
|
210
169
|
for (let i = -radius; i < radius; i++) {
|
|
211
170
|
for (let j = -radius; j < radius; j++) {
|
|
@@ -216,36 +175,36 @@ function PositionGridNode({ id, selected, data, type }) {
|
|
|
216
175
|
positions
|
|
217
176
|
});
|
|
218
177
|
}, [x, y, z, radius]);
|
|
219
|
-
return /* @__PURE__ */ (0,
|
|
220
|
-
/* @__PURE__ */ (0,
|
|
178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_layout2.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Stack, { children: [
|
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
221
180
|
"x: ",
|
|
222
|
-
/* @__PURE__ */ (0,
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.NumberInput, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
|
|
223
182
|
] }),
|
|
224
|
-
/* @__PURE__ */ (0,
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
225
184
|
"y: ",
|
|
226
|
-
/* @__PURE__ */ (0,
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.NumberInput, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
|
|
227
186
|
] }),
|
|
228
|
-
/* @__PURE__ */ (0,
|
|
187
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
229
188
|
"z: ",
|
|
230
|
-
/* @__PURE__ */ (0,
|
|
189
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.NumberInput, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
|
|
231
190
|
] }),
|
|
232
|
-
/* @__PURE__ */ (0,
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
233
192
|
"r: ",
|
|
234
|
-
/* @__PURE__ */ (0,
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.NumberInput, { size: "xs", w: 100, value: radius, onChange: (e) => setRadius(Number(e)) })
|
|
235
194
|
] })
|
|
236
195
|
] }) });
|
|
237
196
|
}
|
|
238
197
|
var position_grid_node_default = PositionGridNode;
|
|
239
198
|
|
|
240
199
|
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
241
|
-
var
|
|
242
|
-
var
|
|
200
|
+
var import_layout3 = require("@awesome-flow/core/layout");
|
|
201
|
+
var import_react3 = require("react");
|
|
243
202
|
var import_core3 = require("@mantine/core");
|
|
244
|
-
var
|
|
203
|
+
var import_hooks3 = require("@awesome-flow/core/hooks");
|
|
245
204
|
|
|
246
205
|
// src/modules/normalize-noise-module.ts
|
|
247
|
-
var
|
|
248
|
-
var NormalizeNoiseModule = class extends
|
|
206
|
+
var import_libnoise_simplex_ts = require("libnoise-simplex-ts");
|
|
207
|
+
var NormalizeNoiseModule = class extends import_libnoise_simplex_ts.ModifierModule {
|
|
249
208
|
constructor(source, lowerBound, upperBound) {
|
|
250
209
|
super(source);
|
|
251
210
|
this.lowerBound = lowerBound;
|
|
@@ -260,14 +219,14 @@ function normalize(value, min, max) {
|
|
|
260
219
|
}
|
|
261
220
|
|
|
262
221
|
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
263
|
-
var
|
|
222
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
264
223
|
function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
265
|
-
const [intervalStart, setIntervalStart] = (0,
|
|
266
|
-
const [intervalEnd, setIntervalEnd] = (0,
|
|
267
|
-
const incoming = (0,
|
|
268
|
-
const updateNodeData = (0,
|
|
269
|
-
const updateComputedData = (0,
|
|
270
|
-
(0,
|
|
224
|
+
const [intervalStart, setIntervalStart] = (0, import_react3.useState)(data.intervalStart);
|
|
225
|
+
const [intervalEnd, setIntervalEnd] = (0, import_react3.useState)(data.intervalEnd);
|
|
226
|
+
const incoming = (0, import_hooks3.useIncomingComputedData)(id);
|
|
227
|
+
const updateNodeData = (0, import_hooks3.useUpdateNodeData)();
|
|
228
|
+
const updateComputedData = (0, import_hooks3.useUpdateNodeComputedData)();
|
|
229
|
+
(0, import_react3.useEffect)(() => {
|
|
271
230
|
if (incoming?.length) {
|
|
272
231
|
const source = incoming[0].module;
|
|
273
232
|
const module2 = new NormalizeNoiseModule(source, intervalStart, intervalEnd);
|
|
@@ -275,9 +234,9 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
275
234
|
}
|
|
276
235
|
updateNodeData(id, { intervalStart, intervalEnd });
|
|
277
236
|
}, [incoming, intervalStart, intervalEnd]);
|
|
278
|
-
return /* @__PURE__ */ (0,
|
|
279
|
-
/* @__PURE__ */ (0,
|
|
280
|
-
/* @__PURE__ */ (0,
|
|
237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_layout3.NodeContainer, { id, selected, data, type, children: [
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Group, { children: [
|
|
239
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
281
240
|
import_core3.NumberInput,
|
|
282
241
|
{
|
|
283
242
|
size: "xs",
|
|
@@ -286,7 +245,7 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
286
245
|
onChange: (e) => setIntervalStart(Number(e))
|
|
287
246
|
}
|
|
288
247
|
),
|
|
289
|
-
/* @__PURE__ */ (0,
|
|
248
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
290
249
|
import_core3.NumberInput,
|
|
291
250
|
{
|
|
292
251
|
size: "xs",
|
|
@@ -296,38 +255,38 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
|
|
|
296
255
|
}
|
|
297
256
|
)
|
|
298
257
|
] }) }),
|
|
299
|
-
/* @__PURE__ */ (0,
|
|
258
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_layout3.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
300
259
|
] });
|
|
301
260
|
}
|
|
302
261
|
var noise_normalize_node_default = NoiseNormalizeNode;
|
|
303
262
|
|
|
304
263
|
// src/nodes/generators/noise-const-node.tsx
|
|
305
|
-
var
|
|
306
|
-
var
|
|
264
|
+
var import_layout4 = require("@awesome-flow/core/layout");
|
|
265
|
+
var import_react4 = require("react");
|
|
307
266
|
var import_core4 = require("@mantine/core");
|
|
308
|
-
var
|
|
309
|
-
var
|
|
310
|
-
var
|
|
267
|
+
var import_hooks4 = require("@awesome-flow/core/hooks");
|
|
268
|
+
var import_libnoise_simplex_ts2 = require("libnoise-simplex-ts");
|
|
269
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
311
270
|
function NoiseConstNode({ id, selected, data, type }) {
|
|
312
|
-
const [min, setMin] = (0,
|
|
313
|
-
const [max, setMax] = (0,
|
|
314
|
-
const [noise, setNoise] = (0,
|
|
315
|
-
const updateNodeData = (0,
|
|
316
|
-
const updateComputedData = (0,
|
|
317
|
-
const module2 = (0,
|
|
318
|
-
(0,
|
|
271
|
+
const [min, setMin] = (0, import_react4.useState)(data.min);
|
|
272
|
+
const [max, setMax] = (0, import_react4.useState)(data.max);
|
|
273
|
+
const [noise, setNoise] = (0, import_react4.useState)(data.noise);
|
|
274
|
+
const updateNodeData = (0, import_hooks4.useUpdateNodeData)();
|
|
275
|
+
const updateComputedData = (0, import_hooks4.useUpdateNodeComputedData)();
|
|
276
|
+
const module2 = (0, import_react4.useMemo)(() => new import_libnoise_simplex_ts2.Const(), []);
|
|
277
|
+
(0, import_react4.useEffect)(() => {
|
|
319
278
|
module2.value = noise;
|
|
320
279
|
updateNodeData(id, { noise, min, max });
|
|
321
280
|
updateComputedData(id, { module: module2 });
|
|
322
281
|
}, [noise, min, max, module2, updateNodeData, id, updateComputedData]);
|
|
323
|
-
return /* @__PURE__ */ (0,
|
|
324
|
-
/* @__PURE__ */ (0,
|
|
325
|
-
/* @__PURE__ */ (0,
|
|
326
|
-
/* @__PURE__ */ (0,
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_layout4.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Stack, { children: [
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { children: [
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.NumberInput, { size: "xs", w: 100, value: min, onChange: (e) => setMin(Number(e)) }),
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.NumberInput, { size: "xs", w: 100, value: max, onChange: (e) => setMax(Number(e)) })
|
|
327
286
|
] }),
|
|
328
|
-
/* @__PURE__ */ (0,
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { children: [
|
|
329
288
|
"noise:",
|
|
330
|
-
/* @__PURE__ */ (0,
|
|
289
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
331
290
|
import_core4.NumberInput,
|
|
332
291
|
{
|
|
333
292
|
size: "xs",
|
|
@@ -344,16 +303,16 @@ function NoiseConstNode({ id, selected, data, type }) {
|
|
|
344
303
|
var noise_const_node_default = NoiseConstNode;
|
|
345
304
|
|
|
346
305
|
// src/nodes/generators/noise-billow-node.tsx
|
|
347
|
-
var
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
-
var
|
|
306
|
+
var import_layout5 = require("@awesome-flow/core/layout");
|
|
307
|
+
var import_react5 = require("react");
|
|
308
|
+
var import_libnoise_simplex_ts3 = require("libnoise-simplex-ts");
|
|
309
|
+
var import_hooks5 = require("@awesome-flow/core/hooks");
|
|
351
310
|
var import_components = require("@awesome-flow/core/components");
|
|
352
|
-
var
|
|
311
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
353
312
|
function NoiseBillowNode({ id, selected, data, type }) {
|
|
354
|
-
const updateComputedData = (0,
|
|
355
|
-
const module2 = (0,
|
|
356
|
-
const onPropertiesChange = (0,
|
|
313
|
+
const updateComputedData = (0, import_hooks5.useUpdateNodeComputedData)();
|
|
314
|
+
const module2 = (0, import_react5.useMemo)(() => new import_libnoise_simplex_ts3.Billow(), []);
|
|
315
|
+
const onPropertiesChange = (0, import_react5.useCallback)(
|
|
357
316
|
(properties) => {
|
|
358
317
|
Object.keys(properties).forEach((k) => {
|
|
359
318
|
module2[k] = properties[k].value;
|
|
@@ -362,29 +321,29 @@ function NoiseBillowNode({ id, selected, data, type }) {
|
|
|
362
321
|
},
|
|
363
322
|
[id, module2, updateComputedData]
|
|
364
323
|
);
|
|
365
|
-
return /* @__PURE__ */ (0,
|
|
366
|
-
/* @__PURE__ */ (0,
|
|
367
|
-
/* @__PURE__ */ (0,
|
|
324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_layout5.NodeContainer, { id, selected, data, type, children: [
|
|
325
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_components.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
326
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_layout5.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
368
327
|
] });
|
|
369
328
|
}
|
|
370
329
|
var noise_billow_node_default = NoiseBillowNode;
|
|
371
330
|
|
|
372
331
|
// src/nodes/output/noise-logger-node.tsx
|
|
373
|
-
var
|
|
374
|
-
var
|
|
332
|
+
var import_layout6 = require("@awesome-flow/core/layout");
|
|
333
|
+
var import_react6 = require("react");
|
|
375
334
|
var import_core5 = require("@mantine/core");
|
|
376
|
-
var
|
|
377
|
-
var
|
|
335
|
+
var import_hooks6 = require("@awesome-flow/core/hooks");
|
|
336
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
378
337
|
function NoiseLoggerNode({ id, selected, data, type }) {
|
|
379
|
-
const incoming = (0,
|
|
380
|
-
const noise = (0,
|
|
381
|
-
return /* @__PURE__ */ (0,
|
|
382
|
-
/* @__PURE__ */ (0,
|
|
338
|
+
const incoming = (0, import_hooks6.useIncomingComputedData)(id);
|
|
339
|
+
const noise = (0, import_react6.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_layout6.NodeContainer, { id, selected, data, type, children: [
|
|
341
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core5.Text, { children: [
|
|
383
342
|
"Size: ",
|
|
384
343
|
noise?.length || 0
|
|
385
344
|
] }),
|
|
386
|
-
/* @__PURE__ */ (0,
|
|
387
|
-
/* @__PURE__ */ (0,
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core5.Divider, { h: 5 }),
|
|
346
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core5.Stack, { children: noise?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core5.Text, { children: [
|
|
388
347
|
v.position?.x,
|
|
389
348
|
":",
|
|
390
349
|
v.position?.y,
|
|
@@ -393,24 +352,24 @@ function NoiseLoggerNode({ id, selected, data, type }) {
|
|
|
393
352
|
": ",
|
|
394
353
|
v.value
|
|
395
354
|
] }, i)) }),
|
|
396
|
-
/* @__PURE__ */ (0,
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_layout6.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
397
356
|
] });
|
|
398
357
|
}
|
|
399
358
|
var noise_logger_node_default = NoiseLoggerNode;
|
|
400
359
|
|
|
401
360
|
// src/nodes/output/noise-raw-texture-node.tsx
|
|
402
|
-
var
|
|
403
|
-
var
|
|
404
|
-
var
|
|
361
|
+
var import_layout7 = require("@awesome-flow/core/layout");
|
|
362
|
+
var import_react7 = require("react");
|
|
363
|
+
var import_hooks7 = require("@awesome-flow/core/hooks");
|
|
405
364
|
var import_core6 = require("@mantine/core");
|
|
406
|
-
var
|
|
365
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
407
366
|
function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
408
|
-
const updateComputedData = (0,
|
|
409
|
-
const [dataLength, setDataLength] = (0,
|
|
410
|
-
const [resolution, setResolution] = (0,
|
|
411
|
-
const incoming = (0,
|
|
412
|
-
const noise = (0,
|
|
413
|
-
(0,
|
|
367
|
+
const updateComputedData = (0, import_hooks7.useUpdateNodeComputedData)();
|
|
368
|
+
const [dataLength, setDataLength] = (0, import_react7.useState)(0);
|
|
369
|
+
const [resolution, setResolution] = (0, import_react7.useState)(0);
|
|
370
|
+
const incoming = (0, import_hooks7.useIncomingComputedData)(id);
|
|
371
|
+
const noise = (0, import_react7.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
372
|
+
(0, import_react7.useEffect)(() => {
|
|
414
373
|
if (noise?.length) {
|
|
415
374
|
const size = Math.ceil(Math.sqrt(noise.length));
|
|
416
375
|
const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
|
|
@@ -418,22 +377,26 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
418
377
|
dataArray.set(colors);
|
|
419
378
|
setResolution(size);
|
|
420
379
|
setDataLength(dataArray.length);
|
|
421
|
-
updateComputedData(id, {
|
|
380
|
+
updateComputedData(id, {
|
|
381
|
+
textureData: dataArray,
|
|
382
|
+
textureResolutionX: size,
|
|
383
|
+
textureResolutionY: size
|
|
384
|
+
});
|
|
422
385
|
}
|
|
423
386
|
}, [noise]);
|
|
424
|
-
return /* @__PURE__ */ (0,
|
|
425
|
-
/* @__PURE__ */ (0,
|
|
426
|
-
/* @__PURE__ */ (0,
|
|
387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_layout7.NodeContainer, { id, selected, data, type, children: [
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Stack, { children: [
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Group, { children: [
|
|
427
390
|
"Resolution: ",
|
|
428
391
|
resolution,
|
|
429
392
|
"x",
|
|
430
393
|
resolution
|
|
431
394
|
] }),
|
|
432
|
-
/* @__PURE__ */ (0,
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Group, { children: [
|
|
433
396
|
"Input Length: ",
|
|
434
397
|
noise?.length || 0
|
|
435
398
|
] }),
|
|
436
|
-
/* @__PURE__ */ (0,
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Group, { children: [
|
|
437
400
|
"Output Length (",
|
|
438
401
|
resolution,
|
|
439
402
|
"*",
|
|
@@ -442,67 +405,67 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
442
405
|
dataLength
|
|
443
406
|
] })
|
|
444
407
|
] }),
|
|
445
|
-
/* @__PURE__ */ (0,
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_layout7.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
446
409
|
] });
|
|
447
410
|
}
|
|
448
411
|
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
449
412
|
|
|
450
413
|
// src/nodes/generators/noise-checkerboard-node.tsx
|
|
451
|
-
var
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
414
|
+
var import_layout8 = require("@awesome-flow/core/layout");
|
|
415
|
+
var import_react8 = require("react");
|
|
416
|
+
var import_libnoise_simplex_ts4 = require("libnoise-simplex-ts");
|
|
417
|
+
var import_hooks8 = require("@awesome-flow/core/hooks");
|
|
418
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
456
419
|
function NoiseCheckerboardNode({ id, selected, data, type }) {
|
|
457
|
-
const updateComputedData = (0,
|
|
458
|
-
const module2 = (0,
|
|
459
|
-
(0,
|
|
420
|
+
const updateComputedData = (0, import_hooks8.useUpdateNodeComputedData)();
|
|
421
|
+
const module2 = (0, import_react8.useMemo)(() => new import_libnoise_simplex_ts4.Checkerboard(), []);
|
|
422
|
+
(0, import_react8.useEffect)(() => {
|
|
460
423
|
updateComputedData(id, { module: module2 });
|
|
461
424
|
}, [id, module2, updateComputedData]);
|
|
462
|
-
return /* @__PURE__ */ (0,
|
|
425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_layout8.NodeContainer, { id, selected, data, type });
|
|
463
426
|
}
|
|
464
427
|
var noise_checkerboard_node_default = NoiseCheckerboardNode;
|
|
465
428
|
|
|
466
429
|
// src/nodes/output/positions-logger-node.tsx
|
|
467
|
-
var
|
|
468
|
-
var
|
|
430
|
+
var import_layout9 = require("@awesome-flow/core/layout");
|
|
431
|
+
var import_react9 = require("react");
|
|
469
432
|
var import_core7 = require("@mantine/core");
|
|
470
|
-
var
|
|
471
|
-
var
|
|
433
|
+
var import_hooks9 = require("@awesome-flow/core/hooks");
|
|
434
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
472
435
|
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
473
|
-
const incoming = (0,
|
|
474
|
-
const positions = (0,
|
|
436
|
+
const incoming = (0, import_hooks9.useIncomingComputedData)(id);
|
|
437
|
+
const positions = (0, import_react9.useMemo)(() => {
|
|
475
438
|
return incoming?.map((p) => p.positions).flat();
|
|
476
439
|
}, [incoming]);
|
|
477
|
-
return /* @__PURE__ */ (0,
|
|
478
|
-
/* @__PURE__ */ (0,
|
|
440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_layout9.NodeContainer, { id, selected, data, type, children: [
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core7.Text, { children: [
|
|
479
442
|
"Size: ",
|
|
480
443
|
positions?.length || 0
|
|
481
444
|
] }),
|
|
482
|
-
/* @__PURE__ */ (0,
|
|
483
|
-
/* @__PURE__ */ (0,
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core7.Divider, { h: 5 }),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core7.Stack, { children: positions?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core7.Text, { children: [
|
|
484
447
|
v.x,
|
|
485
448
|
":",
|
|
486
449
|
v.y,
|
|
487
450
|
":",
|
|
488
451
|
v.z
|
|
489
452
|
] }, i)) }),
|
|
490
|
-
/* @__PURE__ */ (0,
|
|
453
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_layout9.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
491
454
|
] });
|
|
492
455
|
}
|
|
493
456
|
var positions_logger_node_default = PositionsLoggerNode;
|
|
494
457
|
|
|
495
458
|
// src/nodes/generators/noise-cylinders-node.tsx
|
|
496
|
-
var
|
|
497
|
-
var
|
|
498
|
-
var
|
|
499
|
-
var
|
|
459
|
+
var import_layout10 = require("@awesome-flow/core/layout");
|
|
460
|
+
var import_react10 = require("react");
|
|
461
|
+
var import_libnoise_simplex_ts5 = require("libnoise-simplex-ts");
|
|
462
|
+
var import_hooks10 = require("@awesome-flow/core/hooks");
|
|
500
463
|
var import_components2 = require("@awesome-flow/core/components");
|
|
501
|
-
var
|
|
464
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
502
465
|
function NoiseCylindersNode({ id, selected, data, type }) {
|
|
503
|
-
const updateComputedData = (0,
|
|
504
|
-
const module2 = (0,
|
|
505
|
-
const onPropertiesChange = (0,
|
|
466
|
+
const updateComputedData = (0, import_hooks10.useUpdateNodeComputedData)();
|
|
467
|
+
const module2 = (0, import_react10.useMemo)(() => new import_libnoise_simplex_ts5.Cylinders(), []);
|
|
468
|
+
const onPropertiesChange = (0, import_react10.useCallback)(
|
|
506
469
|
(properties) => {
|
|
507
470
|
Object.keys(properties).forEach((k) => {
|
|
508
471
|
module2[k] = properties[k].value;
|
|
@@ -511,24 +474,24 @@ function NoiseCylindersNode({ id, selected, data, type }) {
|
|
|
511
474
|
},
|
|
512
475
|
[id, module2, updateComputedData]
|
|
513
476
|
);
|
|
514
|
-
return /* @__PURE__ */ (0,
|
|
515
|
-
/* @__PURE__ */ (0,
|
|
516
|
-
/* @__PURE__ */ (0,
|
|
477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_layout10.NodeContainer, { id, selected, data, type, children: [
|
|
478
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_components2.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
479
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_layout10.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
517
480
|
] });
|
|
518
481
|
}
|
|
519
482
|
var noise_cylinders_node_default = NoiseCylindersNode;
|
|
520
483
|
|
|
521
484
|
// src/nodes/generators/noise-perlin-node.tsx
|
|
522
|
-
var
|
|
523
|
-
var
|
|
524
|
-
var
|
|
525
|
-
var
|
|
485
|
+
var import_layout11 = require("@awesome-flow/core/layout");
|
|
486
|
+
var import_react11 = require("react");
|
|
487
|
+
var import_libnoise_simplex_ts6 = require("libnoise-simplex-ts");
|
|
488
|
+
var import_hooks11 = require("@awesome-flow/core/hooks");
|
|
526
489
|
var import_components3 = require("@awesome-flow/core/components");
|
|
527
|
-
var
|
|
490
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
528
491
|
function NoisePerlinNode({ id, selected, data, type }) {
|
|
529
|
-
const updateComputedData = (0,
|
|
530
|
-
const module2 = (0,
|
|
531
|
-
const onPropertiesChange = (0,
|
|
492
|
+
const updateComputedData = (0, import_hooks11.useUpdateNodeComputedData)();
|
|
493
|
+
const module2 = (0, import_react11.useMemo)(() => new import_libnoise_simplex_ts6.Perlin(), []);
|
|
494
|
+
const onPropertiesChange = (0, import_react11.useCallback)(
|
|
532
495
|
(properties) => {
|
|
533
496
|
Object.keys(properties).forEach((k) => {
|
|
534
497
|
module2[k] = properties[k].value;
|
|
@@ -537,67 +500,67 @@ function NoisePerlinNode({ id, selected, data, type }) {
|
|
|
537
500
|
},
|
|
538
501
|
[id, module2, updateComputedData]
|
|
539
502
|
);
|
|
540
|
-
return /* @__PURE__ */ (0,
|
|
541
|
-
/* @__PURE__ */ (0,
|
|
542
|
-
/* @__PURE__ */ (0,
|
|
503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_layout11.NodeContainer, { id, selected, data, type, children: [
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components3.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_layout11.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
543
506
|
] });
|
|
544
507
|
}
|
|
545
508
|
var noise_perlin_node_default = NoisePerlinNode;
|
|
546
509
|
|
|
547
510
|
// src/nodes/generators/noise-ridgedmulti-node.tsx
|
|
548
|
-
var
|
|
549
|
-
var
|
|
550
|
-
var
|
|
551
|
-
var
|
|
511
|
+
var import_layout12 = require("@awesome-flow/core/layout");
|
|
512
|
+
var import_react12 = require("react");
|
|
513
|
+
var import_libnoise_simplex_ts7 = require("libnoise-simplex-ts");
|
|
514
|
+
var import_hooks12 = require("@awesome-flow/core/hooks");
|
|
552
515
|
var import_components4 = require("@awesome-flow/core/components");
|
|
553
|
-
var
|
|
516
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
554
517
|
function NoiseRidgedMultiNode({ id, selected, data, type }) {
|
|
555
|
-
const updateComputedData = (0,
|
|
556
|
-
const module2 = (0,
|
|
557
|
-
const onPropertiesChange = (0,
|
|
518
|
+
const updateComputedData = (0, import_hooks12.useUpdateNodeComputedData)();
|
|
519
|
+
const module2 = (0, import_react12.useMemo)(() => new import_libnoise_simplex_ts7.RidgedMulti(), []);
|
|
520
|
+
const onPropertiesChange = (0, import_react12.useCallback)((properties) => {
|
|
558
521
|
Object.keys(properties).forEach((k) => module2[k] = properties[k].value);
|
|
559
522
|
updateComputedData(id, { module: module2 });
|
|
560
523
|
}, []);
|
|
561
|
-
return /* @__PURE__ */ (0,
|
|
562
|
-
/* @__PURE__ */ (0,
|
|
563
|
-
/* @__PURE__ */ (0,
|
|
524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_layout12.NodeContainer, { id, selected, data, type, children: [
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components4.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
526
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_layout12.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
564
527
|
] });
|
|
565
528
|
}
|
|
566
529
|
var noise_ridgedmulti_node_default = NoiseRidgedMultiNode;
|
|
567
530
|
|
|
568
531
|
// src/nodes/generators/noise-spheres-node.tsx
|
|
569
|
-
var
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
var
|
|
532
|
+
var import_layout13 = require("@awesome-flow/core/layout");
|
|
533
|
+
var import_react13 = require("react");
|
|
534
|
+
var import_libnoise_simplex_ts8 = require("libnoise-simplex-ts");
|
|
535
|
+
var import_hooks13 = require("@awesome-flow/core/hooks");
|
|
573
536
|
var import_components5 = require("@awesome-flow/core/components");
|
|
574
|
-
var
|
|
537
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
575
538
|
function NoiseSpheresNode({ id, selected, data, type }) {
|
|
576
|
-
const updateComputedData = (0,
|
|
577
|
-
const module2 = (0,
|
|
578
|
-
const onPropertiesChange = (0,
|
|
539
|
+
const updateComputedData = (0, import_hooks13.useUpdateNodeComputedData)();
|
|
540
|
+
const module2 = (0, import_react13.useMemo)(() => new import_libnoise_simplex_ts8.Spheres(), []);
|
|
541
|
+
const onPropertiesChange = (0, import_react13.useCallback)((properties) => {
|
|
579
542
|
Object.keys(properties).forEach((k) => module2[k] = properties[k].value);
|
|
580
543
|
updateComputedData(id, { module: module2 });
|
|
581
544
|
}, []);
|
|
582
|
-
return /* @__PURE__ */ (0,
|
|
583
|
-
/* @__PURE__ */ (0,
|
|
584
|
-
/* @__PURE__ */ (0,
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_layout13.NodeContainer, { id, selected, data, type, children: [
|
|
546
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components5.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_layout13.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
585
548
|
] });
|
|
586
549
|
}
|
|
587
550
|
var noise_spheres_node_default = NoiseSpheresNode;
|
|
588
551
|
|
|
589
552
|
// src/nodes/generators/noise-voronoi-node.tsx
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
553
|
+
var import_layout14 = require("@awesome-flow/core/layout");
|
|
554
|
+
var import_react14 = require("react");
|
|
555
|
+
var import_libnoise_simplex_ts9 = require("libnoise-simplex-ts");
|
|
556
|
+
var import_hooks14 = require("@awesome-flow/core/hooks");
|
|
594
557
|
var import_components6 = require("@awesome-flow/core/components");
|
|
595
|
-
var
|
|
558
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
596
559
|
function NoiseVoronoiNode({ id, selected, data, type }) {
|
|
597
|
-
const updateComputedData = (0,
|
|
598
|
-
const onPropertiesChange = (0,
|
|
560
|
+
const updateComputedData = (0, import_hooks14.useUpdateNodeComputedData)();
|
|
561
|
+
const onPropertiesChange = (0, import_react14.useCallback)(
|
|
599
562
|
(properties) => {
|
|
600
|
-
const module2 = new
|
|
563
|
+
const module2 = new import_libnoise_simplex_ts9.Voronoi(
|
|
601
564
|
properties.frequency.value,
|
|
602
565
|
properties.displacement.value,
|
|
603
566
|
properties.distance.value,
|
|
@@ -607,21 +570,21 @@ function NoiseVoronoiNode({ id, selected, data, type }) {
|
|
|
607
570
|
},
|
|
608
571
|
[]
|
|
609
572
|
);
|
|
610
|
-
return /* @__PURE__ */ (0,
|
|
611
|
-
/* @__PURE__ */ (0,
|
|
612
|
-
/* @__PURE__ */ (0,
|
|
573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_layout14.NodeContainer, { id, selected, data, type, children: [
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components6.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
575
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_layout14.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
613
576
|
] });
|
|
614
577
|
}
|
|
615
578
|
var noise_voronoi_node_default = NoiseVoronoiNode;
|
|
616
579
|
|
|
617
580
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
var
|
|
581
|
+
var import_layout15 = require("@awesome-flow/core/layout");
|
|
582
|
+
var import_react15 = require("react");
|
|
583
|
+
var import_hooks15 = require("@awesome-flow/core/hooks");
|
|
621
584
|
var import_icons_react = require("@tabler/icons-react");
|
|
622
585
|
|
|
623
586
|
// src/abstract/operations.ts
|
|
624
|
-
var
|
|
587
|
+
var import_libnoise_simplex_ts10 = require("libnoise-simplex-ts");
|
|
625
588
|
var NoiseCombineType = /* @__PURE__ */ ((NoiseCombineType3) => {
|
|
626
589
|
NoiseCombineType3["add"] = "add";
|
|
627
590
|
NoiseCombineType3["max"] = "max";
|
|
@@ -631,66 +594,66 @@ var NoiseCombineType = /* @__PURE__ */ ((NoiseCombineType3) => {
|
|
|
631
594
|
return NoiseCombineType3;
|
|
632
595
|
})(NoiseCombineType || {});
|
|
633
596
|
var noiseCombineModuleMap = {
|
|
634
|
-
["add" /* add */]:
|
|
635
|
-
["max" /* max */]:
|
|
636
|
-
["min" /* min */]:
|
|
637
|
-
["multiply" /* multiply */]:
|
|
638
|
-
["power" /* power */]:
|
|
597
|
+
["add" /* add */]: import_libnoise_simplex_ts10.Add,
|
|
598
|
+
["max" /* max */]: import_libnoise_simplex_ts10.Max,
|
|
599
|
+
["min" /* min */]: import_libnoise_simplex_ts10.Min,
|
|
600
|
+
["multiply" /* multiply */]: import_libnoise_simplex_ts10.Multiply,
|
|
601
|
+
["power" /* power */]: import_libnoise_simplex_ts10.Power
|
|
639
602
|
};
|
|
640
603
|
|
|
641
604
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
642
|
-
var
|
|
605
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
643
606
|
var options = {
|
|
644
|
-
add: /* @__PURE__ */ (0,
|
|
645
|
-
min: /* @__PURE__ */ (0,
|
|
646
|
-
max: /* @__PURE__ */ (0,
|
|
647
|
-
multiply: /* @__PURE__ */ (0,
|
|
648
|
-
power: /* @__PURE__ */ (0,
|
|
607
|
+
add: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react.IconPlus, {}),
|
|
608
|
+
min: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react.IconChevronLeft, {}),
|
|
609
|
+
max: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react.IconChevronRight, {}),
|
|
610
|
+
multiply: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react.IconAsterisk, {}),
|
|
611
|
+
power: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react.IconChevronUp, {})
|
|
649
612
|
};
|
|
650
613
|
function NoiseCombineNode({ id, selected, data, type }) {
|
|
651
|
-
const updateNodeData = (0,
|
|
652
|
-
const updateComputedData = (0,
|
|
653
|
-
const incoming = (0,
|
|
654
|
-
(0,
|
|
614
|
+
const updateNodeData = (0, import_hooks15.useUpdateNodeData)();
|
|
615
|
+
const updateComputedData = (0, import_hooks15.useUpdateNodeComputedData)();
|
|
616
|
+
const incoming = (0, import_hooks15.useIncomingComputedData)(id);
|
|
617
|
+
(0, import_react15.useEffect)(() => {
|
|
655
618
|
const ModuleFactory = noiseCombineModuleMap[data.operation];
|
|
656
619
|
if (incoming?.length > 1) {
|
|
657
620
|
const module2 = new ModuleFactory(incoming[0].module, incoming[1].module);
|
|
658
621
|
updateComputedData(id, { module: module2 });
|
|
659
622
|
}
|
|
660
623
|
}, [data.operation, incoming]);
|
|
661
|
-
const onChange = (0,
|
|
624
|
+
const onChange = (0, import_react15.useCallback)((operation) => {
|
|
662
625
|
updateNodeData(id, { operation });
|
|
663
626
|
}, []);
|
|
664
|
-
return /* @__PURE__ */ (0,
|
|
665
|
-
/* @__PURE__ */ (0,
|
|
666
|
-
/* @__PURE__ */ (0,
|
|
627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_layout15.NodeContainer, { id, selected, data, type, children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_layout15.NodeCombobox, { options, selected: data.operation, onChange, width: 150 }),
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_layout15.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
667
630
|
] });
|
|
668
631
|
}
|
|
669
632
|
var noise_combine_node_default = NoiseCombineNode;
|
|
670
633
|
|
|
671
634
|
// src/nodes/modifiers/noise-clamp-node.tsx
|
|
672
|
-
var
|
|
673
|
-
var
|
|
635
|
+
var import_layout16 = require("@awesome-flow/core/layout");
|
|
636
|
+
var import_react16 = require("react");
|
|
674
637
|
var import_core8 = require("@mantine/core");
|
|
675
|
-
var
|
|
676
|
-
var
|
|
677
|
-
var
|
|
638
|
+
var import_hooks16 = require("@awesome-flow/core/hooks");
|
|
639
|
+
var import_libnoise_simplex_ts11 = require("libnoise-simplex-ts");
|
|
640
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
678
641
|
function NoiseClampNode({ id, selected, data, type }) {
|
|
679
|
-
const [lowerBound, setLowerBound] = (0,
|
|
680
|
-
const [upperBound, setUpperBound] = (0,
|
|
681
|
-
const incoming = (0,
|
|
682
|
-
const updateNodeData = (0,
|
|
683
|
-
const updateComputedData = (0,
|
|
684
|
-
(0,
|
|
642
|
+
const [lowerBound, setLowerBound] = (0, import_react16.useState)(data.lowerBound);
|
|
643
|
+
const [upperBound, setUpperBound] = (0, import_react16.useState)(data.upperBound);
|
|
644
|
+
const incoming = (0, import_hooks16.useIncomingComputedData)(id);
|
|
645
|
+
const updateNodeData = (0, import_hooks16.useUpdateNodeData)();
|
|
646
|
+
const updateComputedData = (0, import_hooks16.useUpdateNodeComputedData)();
|
|
647
|
+
(0, import_react16.useEffect)(() => {
|
|
685
648
|
if (incoming?.length) {
|
|
686
|
-
const module2 = new
|
|
649
|
+
const module2 = new import_libnoise_simplex_ts11.Clamp(incoming[0].module, lowerBound, upperBound);
|
|
687
650
|
updateComputedData(id, { module: module2 });
|
|
688
651
|
}
|
|
689
652
|
updateNodeData(id, { lowerBound, upperBound });
|
|
690
653
|
}, [incoming, lowerBound, upperBound]);
|
|
691
|
-
return /* @__PURE__ */ (0,
|
|
692
|
-
/* @__PURE__ */ (0,
|
|
693
|
-
/* @__PURE__ */ (0,
|
|
654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_layout16.NodeContainer, { id, selected, data, type, children: [
|
|
655
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core8.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_core8.Group, { children: [
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
694
657
|
import_core8.NumberInput,
|
|
695
658
|
{
|
|
696
659
|
size: "xs",
|
|
@@ -700,7 +663,7 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
700
663
|
step: 0.1
|
|
701
664
|
}
|
|
702
665
|
),
|
|
703
|
-
/* @__PURE__ */ (0,
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
704
667
|
import_core8.NumberInput,
|
|
705
668
|
{
|
|
706
669
|
size: "xs",
|
|
@@ -711,41 +674,41 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
711
674
|
}
|
|
712
675
|
)
|
|
713
676
|
] }) }),
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_layout16.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
715
678
|
] });
|
|
716
679
|
}
|
|
717
680
|
var noise_clamp_node_default = NoiseClampNode;
|
|
718
681
|
|
|
719
682
|
// src/nodes/modifiers/noise-abs-node.tsx
|
|
720
|
-
var
|
|
721
|
-
var
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
var
|
|
683
|
+
var import_layout17 = require("@awesome-flow/core/layout");
|
|
684
|
+
var import_react17 = require("react");
|
|
685
|
+
var import_hooks17 = require("@awesome-flow/core/hooks");
|
|
686
|
+
var import_libnoise_simplex_ts12 = require("libnoise-simplex-ts");
|
|
687
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
725
688
|
function NoiseAbsNode({ id, selected, data, type }) {
|
|
726
|
-
const incoming = (0,
|
|
727
|
-
const updateComputedData = (0,
|
|
728
|
-
(0,
|
|
689
|
+
const incoming = (0, import_hooks17.useIncomingComputedData)(id);
|
|
690
|
+
const updateComputedData = (0, import_hooks17.useUpdateNodeComputedData)();
|
|
691
|
+
(0, import_react17.useEffect)(() => {
|
|
729
692
|
if (incoming?.length > 0) {
|
|
730
|
-
const module2 = new
|
|
693
|
+
const module2 = new import_libnoise_simplex_ts12.Abs(incoming[0].module);
|
|
731
694
|
updateComputedData(id, { module: module2 });
|
|
732
695
|
}
|
|
733
696
|
}, [incoming]);
|
|
734
|
-
return /* @__PURE__ */ (0,
|
|
697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_layout17.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_layout17.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
|
|
735
698
|
}
|
|
736
699
|
var noise_abs_node_default = NoiseAbsNode;
|
|
737
700
|
|
|
738
701
|
// src/nodes/output/noise-output-node.tsx
|
|
739
|
-
var
|
|
740
|
-
var
|
|
741
|
-
var
|
|
702
|
+
var import_layout18 = require("@awesome-flow/core/layout");
|
|
703
|
+
var import_react18 = require("react");
|
|
704
|
+
var import_hooks18 = require("@awesome-flow/core/hooks");
|
|
742
705
|
var import_components7 = require("@awesome-flow/core/components");
|
|
743
706
|
var import_core9 = require("@mantine/core");
|
|
744
|
-
var
|
|
707
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
745
708
|
function NoiseOutputNode({ id, selected, data, type }) {
|
|
746
|
-
const [size, setSize] = (0,
|
|
747
|
-
const updateComputedData = (0,
|
|
748
|
-
const onDataUpdated = (0,
|
|
709
|
+
const [size, setSize] = (0, import_react18.useState)(0);
|
|
710
|
+
const updateComputedData = (0, import_hooks18.useUpdateNodeComputedData)();
|
|
711
|
+
const onDataUpdated = (0, import_react18.useCallback)(
|
|
749
712
|
(handleData) => {
|
|
750
713
|
const incomingPositions = handleData["position" /* position */];
|
|
751
714
|
const incomingModule = handleData["module" /* module */];
|
|
@@ -767,8 +730,8 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
767
730
|
},
|
|
768
731
|
[]
|
|
769
732
|
);
|
|
770
|
-
return /* @__PURE__ */ (0,
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_layout18.NodeContainer, { id, selected, data, type, children: [
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
772
735
|
import_components7.HandlesIncomingDataStatus,
|
|
773
736
|
{
|
|
774
737
|
nodeId: id,
|
|
@@ -779,25 +742,25 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
779
742
|
resetComputedData: true
|
|
780
743
|
}
|
|
781
744
|
),
|
|
782
|
-
/* @__PURE__ */ (0,
|
|
745
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core9.Text, { mt: 5, children: [
|
|
783
746
|
"Noise points: ",
|
|
784
747
|
size
|
|
785
748
|
] }),
|
|
786
|
-
/* @__PURE__ */ (0,
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_layout18.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
787
750
|
] });
|
|
788
751
|
}
|
|
789
752
|
var noise_output_node_default = NoiseOutputNode;
|
|
790
753
|
|
|
791
754
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
792
|
-
var
|
|
755
|
+
var import_layout19 = require("@awesome-flow/core/layout");
|
|
793
756
|
var import_core10 = require("@mantine/core");
|
|
794
|
-
var
|
|
757
|
+
var import_hooks19 = require("@awesome-flow/core/hooks");
|
|
795
758
|
|
|
796
759
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
|
|
797
|
-
var
|
|
760
|
+
var import_react25 = require("react");
|
|
798
761
|
|
|
799
762
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
|
|
800
|
-
var
|
|
763
|
+
var import_react19 = require("react");
|
|
801
764
|
function validateFormName(name) {
|
|
802
765
|
if (!/^[0-9a-zA-Z-]+$/.test(name)) {
|
|
803
766
|
throw new Error(
|
|
@@ -805,7 +768,7 @@ function validateFormName(name) {
|
|
|
805
768
|
);
|
|
806
769
|
}
|
|
807
770
|
}
|
|
808
|
-
var useIsomorphicEffect = typeof window !== "undefined" ?
|
|
771
|
+
var useIsomorphicEffect = typeof window !== "undefined" ? import_react19.useLayoutEffect : import_react19.useEffect;
|
|
809
772
|
function useFormEvent(eventKey, handler) {
|
|
810
773
|
useIsomorphicEffect(() => {
|
|
811
774
|
if (eventKey) {
|
|
@@ -902,7 +865,7 @@ function getInputOnChange(setValue) {
|
|
|
902
865
|
}
|
|
903
866
|
|
|
904
867
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
905
|
-
var
|
|
868
|
+
var import_react20 = require("react");
|
|
906
869
|
|
|
907
870
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
|
|
908
871
|
function filterErrors(errors) {
|
|
@@ -920,17 +883,17 @@ function filterErrors(errors) {
|
|
|
920
883
|
|
|
921
884
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
922
885
|
function useFormErrors(initialErrors) {
|
|
923
|
-
const [errorsState, setErrorsState] = (0,
|
|
924
|
-
const errorsRef = (0,
|
|
925
|
-
const setErrors = (0,
|
|
886
|
+
const [errorsState, setErrorsState] = (0, import_react20.useState)(filterErrors(initialErrors));
|
|
887
|
+
const errorsRef = (0, import_react20.useRef)(errorsState);
|
|
888
|
+
const setErrors = (0, import_react20.useCallback)((errors) => {
|
|
926
889
|
setErrorsState((current) => {
|
|
927
890
|
const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
|
|
928
891
|
errorsRef.current = newErrors;
|
|
929
892
|
return newErrors;
|
|
930
893
|
});
|
|
931
894
|
}, []);
|
|
932
|
-
const clearErrors = (0,
|
|
933
|
-
const clearFieldError = (0,
|
|
895
|
+
const clearErrors = (0, import_react20.useCallback)(() => setErrors({}), []);
|
|
896
|
+
const clearFieldError = (0, import_react20.useCallback)(
|
|
934
897
|
(path) => {
|
|
935
898
|
if (errorsRef.current[path] === void 0) {
|
|
936
899
|
return;
|
|
@@ -943,7 +906,7 @@ function useFormErrors(initialErrors) {
|
|
|
943
906
|
},
|
|
944
907
|
[errorsState]
|
|
945
908
|
);
|
|
946
|
-
const setFieldError = (0,
|
|
909
|
+
const setFieldError = (0, import_react20.useCallback)(
|
|
947
910
|
(path, error) => {
|
|
948
911
|
if (error == null || error === false) {
|
|
949
912
|
clearFieldError(path);
|
|
@@ -963,7 +926,7 @@ function useFormErrors(initialErrors) {
|
|
|
963
926
|
}
|
|
964
927
|
|
|
965
928
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
|
|
966
|
-
var
|
|
929
|
+
var import_react21 = require("react");
|
|
967
930
|
|
|
968
931
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
|
|
969
932
|
function clearListState(field, state) {
|
|
@@ -1049,16 +1012,13 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
1049
1012
|
|
|
1050
1013
|
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
1051
1014
|
function set(obj, key, val) {
|
|
1052
|
-
if (typeof val.value === "object")
|
|
1053
|
-
val.value = klona(val.value);
|
|
1015
|
+
if (typeof val.value === "object") val.value = klona(val.value);
|
|
1054
1016
|
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
|
1055
1017
|
Object.defineProperty(obj, key, val);
|
|
1056
|
-
} else
|
|
1057
|
-
obj[key] = val.value;
|
|
1018
|
+
} else obj[key] = val.value;
|
|
1058
1019
|
}
|
|
1059
1020
|
function klona(x) {
|
|
1060
|
-
if (typeof x !== "object")
|
|
1061
|
-
return x;
|
|
1021
|
+
if (typeof x !== "object") return x;
|
|
1062
1022
|
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
|
1063
1023
|
if (str === "[object Object]") {
|
|
1064
1024
|
tmp = Object.create(x.__proto__ || null);
|
|
@@ -1090,8 +1050,7 @@ function klona(x) {
|
|
|
1090
1050
|
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
|
1091
1051
|
}
|
|
1092
1052
|
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
|
1093
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k])
|
|
1094
|
-
continue;
|
|
1053
|
+
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
|
1095
1054
|
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
|
1096
1055
|
}
|
|
1097
1056
|
}
|
|
@@ -1187,7 +1146,7 @@ function useFormList({
|
|
|
1187
1146
|
$errors,
|
|
1188
1147
|
$status
|
|
1189
1148
|
}) {
|
|
1190
|
-
const reorderListItem = (0,
|
|
1149
|
+
const reorderListItem = (0, import_react21.useCallback)((path, payload) => {
|
|
1191
1150
|
$status.clearFieldDirty(path);
|
|
1192
1151
|
$errors.setErrors((errs) => reorderErrors(path, payload, errs));
|
|
1193
1152
|
$values.setValues({
|
|
@@ -1195,7 +1154,7 @@ function useFormList({
|
|
|
1195
1154
|
updateState: true
|
|
1196
1155
|
});
|
|
1197
1156
|
}, []);
|
|
1198
|
-
const removeListItem = (0,
|
|
1157
|
+
const removeListItem = (0, import_react21.useCallback)((path, index) => {
|
|
1199
1158
|
$status.clearFieldDirty(path);
|
|
1200
1159
|
$errors.setErrors((errs) => changeErrorIndices(path, index, errs, -1));
|
|
1201
1160
|
$values.setValues({
|
|
@@ -1203,7 +1162,7 @@ function useFormList({
|
|
|
1203
1162
|
updateState: true
|
|
1204
1163
|
});
|
|
1205
1164
|
}, []);
|
|
1206
|
-
const insertListItem = (0,
|
|
1165
|
+
const insertListItem = (0, import_react21.useCallback)((path, item, index) => {
|
|
1207
1166
|
$status.clearFieldDirty(path);
|
|
1208
1167
|
$errors.setErrors((errs) => changeErrorIndices(path, index, errs, 1));
|
|
1209
1168
|
$values.setValues({
|
|
@@ -1215,7 +1174,7 @@ function useFormList({
|
|
|
1215
1174
|
}
|
|
1216
1175
|
|
|
1217
1176
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
|
|
1218
|
-
var
|
|
1177
|
+
var import_react22 = require("react");
|
|
1219
1178
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
1220
1179
|
|
|
1221
1180
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
|
|
@@ -1235,31 +1194,31 @@ function useFormStatus({
|
|
|
1235
1194
|
mode,
|
|
1236
1195
|
$values
|
|
1237
1196
|
}) {
|
|
1238
|
-
const [touchedState, setTouchedState] = (0,
|
|
1239
|
-
const [dirtyState, setDirtyState] = (0,
|
|
1240
|
-
const touchedRef = (0,
|
|
1241
|
-
const dirtyRef = (0,
|
|
1242
|
-
const setTouched = (0,
|
|
1197
|
+
const [touchedState, setTouchedState] = (0, import_react22.useState)(initialTouched);
|
|
1198
|
+
const [dirtyState, setDirtyState] = (0, import_react22.useState)(initialDirty);
|
|
1199
|
+
const touchedRef = (0, import_react22.useRef)(initialTouched);
|
|
1200
|
+
const dirtyRef = (0, import_react22.useRef)(initialDirty);
|
|
1201
|
+
const setTouched = (0, import_react22.useCallback)((values) => {
|
|
1243
1202
|
const resolvedValues = typeof values === "function" ? values(touchedRef.current) : values;
|
|
1244
1203
|
touchedRef.current = resolvedValues;
|
|
1245
1204
|
if (mode === "controlled") {
|
|
1246
1205
|
setTouchedState(resolvedValues);
|
|
1247
1206
|
}
|
|
1248
1207
|
}, []);
|
|
1249
|
-
const setDirty = (0,
|
|
1208
|
+
const setDirty = (0, import_react22.useCallback)((values) => {
|
|
1250
1209
|
const resolvedValues = typeof values === "function" ? values(dirtyRef.current) : values;
|
|
1251
1210
|
dirtyRef.current = resolvedValues;
|
|
1252
1211
|
if (mode === "controlled") {
|
|
1253
1212
|
setDirtyState(resolvedValues);
|
|
1254
1213
|
}
|
|
1255
1214
|
}, []);
|
|
1256
|
-
const resetTouched = (0,
|
|
1215
|
+
const resetTouched = (0, import_react22.useCallback)(() => setTouched({}), []);
|
|
1257
1216
|
const resetDirty = (values) => {
|
|
1258
1217
|
const newSnapshot = values ? { ...values, ...$values.refValues.current } : $values.refValues.current;
|
|
1259
1218
|
$values.setValuesSnapshot(newSnapshot);
|
|
1260
1219
|
setDirty({});
|
|
1261
1220
|
};
|
|
1262
|
-
const setFieldTouched = (0,
|
|
1221
|
+
const setFieldTouched = (0, import_react22.useCallback)((path, touched) => {
|
|
1263
1222
|
setTouched((currentTouched) => {
|
|
1264
1223
|
if (getStatus(currentTouched, path) === touched) {
|
|
1265
1224
|
return currentTouched;
|
|
@@ -1267,7 +1226,7 @@ function useFormStatus({
|
|
|
1267
1226
|
return { ...currentTouched, [path]: touched };
|
|
1268
1227
|
});
|
|
1269
1228
|
}, []);
|
|
1270
|
-
const setFieldDirty = (0,
|
|
1229
|
+
const setFieldDirty = (0, import_react22.useCallback)((path, dirty) => {
|
|
1271
1230
|
setDirty((currentDirty) => {
|
|
1272
1231
|
if (getStatus(currentDirty, path) === dirty) {
|
|
1273
1232
|
return currentDirty;
|
|
@@ -1275,11 +1234,11 @@ function useFormStatus({
|
|
|
1275
1234
|
return { ...currentDirty, [path]: dirty };
|
|
1276
1235
|
});
|
|
1277
1236
|
}, []);
|
|
1278
|
-
const isTouched = (0,
|
|
1237
|
+
const isTouched = (0, import_react22.useCallback)(
|
|
1279
1238
|
(path) => getStatus(touchedRef.current, path),
|
|
1280
1239
|
[]
|
|
1281
1240
|
);
|
|
1282
|
-
const clearFieldDirty = (0,
|
|
1241
|
+
const clearFieldDirty = (0, import_react22.useCallback)(
|
|
1283
1242
|
(path) => setDirty((current) => {
|
|
1284
1243
|
if (typeof path !== "string") {
|
|
1285
1244
|
return current;
|
|
@@ -1293,7 +1252,7 @@ function useFormStatus({
|
|
|
1293
1252
|
}),
|
|
1294
1253
|
[]
|
|
1295
1254
|
);
|
|
1296
|
-
const isDirty = (0,
|
|
1255
|
+
const isDirty = (0, import_react22.useCallback)((path) => {
|
|
1297
1256
|
if (path) {
|
|
1298
1257
|
const overriddenValue = getPath(path, dirtyRef.current);
|
|
1299
1258
|
if (typeof overriddenValue === "boolean") {
|
|
@@ -1309,8 +1268,8 @@ function useFormStatus({
|
|
|
1309
1268
|
}
|
|
1310
1269
|
return !(0, import_fast_deep_equal.default)($values.refValues.current, $values.valuesSnapshot.current);
|
|
1311
1270
|
}, []);
|
|
1312
|
-
const getDirty = (0,
|
|
1313
|
-
const getTouched = (0,
|
|
1271
|
+
const getDirty = (0, import_react22.useCallback)(() => dirtyRef.current, []);
|
|
1272
|
+
const getTouched = (0, import_react22.useCallback)(() => touchedRef.current, []);
|
|
1314
1273
|
return {
|
|
1315
1274
|
touchedState,
|
|
1316
1275
|
dirtyState,
|
|
@@ -1333,17 +1292,17 @@ function useFormStatus({
|
|
|
1333
1292
|
}
|
|
1334
1293
|
|
|
1335
1294
|
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
|
|
1336
|
-
var
|
|
1295
|
+
var import_react23 = require("react");
|
|
1337
1296
|
function useFormValues({
|
|
1338
1297
|
initialValues,
|
|
1339
1298
|
onValuesChange,
|
|
1340
1299
|
mode
|
|
1341
1300
|
}) {
|
|
1342
|
-
const initialized = (0,
|
|
1343
|
-
const [stateValues, setStateValues] = (0,
|
|
1344
|
-
const refValues = (0,
|
|
1345
|
-
const valuesSnapshot = (0,
|
|
1346
|
-
const setValues = (0,
|
|
1301
|
+
const initialized = (0, import_react23.useRef)(false);
|
|
1302
|
+
const [stateValues, setStateValues] = (0, import_react23.useState)(initialValues || {});
|
|
1303
|
+
const refValues = (0, import_react23.useRef)(stateValues);
|
|
1304
|
+
const valuesSnapshot = (0, import_react23.useRef)(stateValues);
|
|
1305
|
+
const setValues = (0, import_react23.useCallback)(
|
|
1347
1306
|
({
|
|
1348
1307
|
values,
|
|
1349
1308
|
subscribers,
|
|
@@ -1360,7 +1319,7 @@ function useFormValues({
|
|
|
1360
1319
|
},
|
|
1361
1320
|
[onValuesChange]
|
|
1362
1321
|
);
|
|
1363
|
-
const setFieldValue = (0,
|
|
1322
|
+
const setFieldValue = (0, import_react23.useCallback)((payload) => {
|
|
1364
1323
|
const currentValue = getPath(payload.path, refValues.current);
|
|
1365
1324
|
const updatedValue = payload.value instanceof Function ? payload.value(currentValue) : payload.value;
|
|
1366
1325
|
if (currentValue !== updatedValue) {
|
|
@@ -1372,10 +1331,10 @@ function useFormValues({
|
|
|
1372
1331
|
);
|
|
1373
1332
|
}
|
|
1374
1333
|
}, []);
|
|
1375
|
-
const setValuesSnapshot = (0,
|
|
1334
|
+
const setValuesSnapshot = (0, import_react23.useCallback)((payload) => {
|
|
1376
1335
|
valuesSnapshot.current = payload;
|
|
1377
1336
|
}, []);
|
|
1378
|
-
const initialize = (0,
|
|
1337
|
+
const initialize = (0, import_react23.useCallback)((values, onInitialize) => {
|
|
1379
1338
|
if (!initialized.current) {
|
|
1380
1339
|
initialized.current = true;
|
|
1381
1340
|
setValues({ values, updateState: mode === "controlled" });
|
|
@@ -1383,14 +1342,14 @@ function useFormValues({
|
|
|
1383
1342
|
onInitialize();
|
|
1384
1343
|
}
|
|
1385
1344
|
}, []);
|
|
1386
|
-
const resetValues = (0,
|
|
1345
|
+
const resetValues = (0, import_react23.useCallback)(() => {
|
|
1387
1346
|
setValues({
|
|
1388
1347
|
values: valuesSnapshot.current,
|
|
1389
1348
|
updateState: true,
|
|
1390
1349
|
mergeWithPreviousValues: false
|
|
1391
1350
|
});
|
|
1392
1351
|
}, []);
|
|
1393
|
-
const getValues = (0,
|
|
1352
|
+
const getValues = (0, import_react23.useCallback)(() => refValues.current, []);
|
|
1394
1353
|
return {
|
|
1395
1354
|
initialized,
|
|
1396
1355
|
stateValues,
|
|
@@ -1406,15 +1365,15 @@ function useFormValues({
|
|
|
1406
1365
|
}
|
|
1407
1366
|
|
|
1408
1367
|
// ../../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
|
|
1409
|
-
var
|
|
1368
|
+
var import_react24 = require("react");
|
|
1410
1369
|
function useFormWatch({
|
|
1411
1370
|
$status
|
|
1412
1371
|
}) {
|
|
1413
|
-
const subscribers = (0,
|
|
1372
|
+
const subscribers = (0, import_react24.useRef)(
|
|
1414
1373
|
{}
|
|
1415
1374
|
);
|
|
1416
|
-
const watch = (0,
|
|
1417
|
-
(0,
|
|
1375
|
+
const watch = (0, import_react24.useCallback)((path, callback) => {
|
|
1376
|
+
(0, import_react24.useEffect)(() => {
|
|
1418
1377
|
subscribers.current[path] = subscribers.current[path] || [];
|
|
1419
1378
|
subscribers.current[path].push(callback);
|
|
1420
1379
|
return () => {
|
|
@@ -1422,7 +1381,7 @@ function useFormWatch({
|
|
|
1422
1381
|
};
|
|
1423
1382
|
}, [callback]);
|
|
1424
1383
|
}, []);
|
|
1425
|
-
const getFieldSubscribers = (0,
|
|
1384
|
+
const getFieldSubscribers = (0, import_react24.useCallback)((path) => {
|
|
1426
1385
|
if (!subscribers.current[path]) {
|
|
1427
1386
|
return [];
|
|
1428
1387
|
}
|
|
@@ -1535,19 +1494,19 @@ function useForm({
|
|
|
1535
1494
|
const $status = useFormStatus({ initialDirty, initialTouched, $values, mode });
|
|
1536
1495
|
const $list = useFormList({ $values, $errors, $status });
|
|
1537
1496
|
const $watch = useFormWatch({ $status });
|
|
1538
|
-
const [formKey, setFormKey] = (0,
|
|
1539
|
-
const [fieldKeys, setFieldKeys] = (0,
|
|
1540
|
-
const reset = (0,
|
|
1497
|
+
const [formKey, setFormKey] = (0, import_react25.useState)(0);
|
|
1498
|
+
const [fieldKeys, setFieldKeys] = (0, import_react25.useState)({});
|
|
1499
|
+
const reset = (0, import_react25.useCallback)(() => {
|
|
1541
1500
|
$values.resetValues();
|
|
1542
1501
|
$errors.clearErrors();
|
|
1543
1502
|
$status.resetDirty();
|
|
1544
1503
|
$status.resetTouched();
|
|
1545
1504
|
mode === "uncontrolled" && setFormKey((key2) => key2 + 1);
|
|
1546
1505
|
}, []);
|
|
1547
|
-
const initialize = (0,
|
|
1506
|
+
const initialize = (0, import_react25.useCallback)((values) => {
|
|
1548
1507
|
$values.initialize(values, () => mode === "uncontrolled" && setFormKey((key2) => key2 + 1));
|
|
1549
1508
|
}, []);
|
|
1550
|
-
const setFieldValue = (0,
|
|
1509
|
+
const setFieldValue = (0, import_react25.useCallback)(
|
|
1551
1510
|
(path, value, options2) => {
|
|
1552
1511
|
const shouldValidate = shouldValidateOnChange(path, validateInputOnChange);
|
|
1553
1512
|
$status.clearFieldDirty(path);
|
|
@@ -1572,7 +1531,7 @@ function useForm({
|
|
|
1572
1531
|
},
|
|
1573
1532
|
[onValuesChange, rules]
|
|
1574
1533
|
);
|
|
1575
|
-
const setValues = (0,
|
|
1534
|
+
const setValues = (0, import_react25.useCallback)(
|
|
1576
1535
|
(values) => {
|
|
1577
1536
|
const previousValues = $values.refValues.current;
|
|
1578
1537
|
$values.setValues({ values, updateState: mode === "controlled" });
|
|
@@ -1588,12 +1547,12 @@ function useForm({
|
|
|
1588
1547
|
},
|
|
1589
1548
|
[onValuesChange, clearInputErrorOnChange]
|
|
1590
1549
|
);
|
|
1591
|
-
const validate = (0,
|
|
1550
|
+
const validate = (0, import_react25.useCallback)(() => {
|
|
1592
1551
|
const results = validateValues(rules, $values.refValues.current);
|
|
1593
1552
|
$errors.setErrors(results.errors);
|
|
1594
1553
|
return results;
|
|
1595
1554
|
}, [rules]);
|
|
1596
|
-
const validateField = (0,
|
|
1555
|
+
const validateField = (0, import_react25.useCallback)(
|
|
1597
1556
|
(path) => {
|
|
1598
1557
|
const results = validateFieldValue(path, rules, $values.refValues.current);
|
|
1599
1558
|
results.hasError ? $errors.setFieldError(path, results.error) : $errors.clearFieldError(path);
|
|
@@ -1649,16 +1608,16 @@ function useForm({
|
|
|
1649
1608
|
}
|
|
1650
1609
|
};
|
|
1651
1610
|
const getTransformedValues = (input) => transformValues(input || $values.refValues.current);
|
|
1652
|
-
const onReset = (0,
|
|
1611
|
+
const onReset = (0, import_react25.useCallback)((event) => {
|
|
1653
1612
|
event.preventDefault();
|
|
1654
1613
|
reset();
|
|
1655
1614
|
}, []);
|
|
1656
|
-
const isValid = (0,
|
|
1615
|
+
const isValid = (0, import_react25.useCallback)(
|
|
1657
1616
|
(path) => path ? !validateFieldValue(path, rules, $values.refValues.current).hasError : !validateValues(rules, $values.refValues.current).hasErrors,
|
|
1658
1617
|
[rules]
|
|
1659
1618
|
);
|
|
1660
1619
|
const key = (path) => `${formKey}-${path}-${fieldKeys[path] || 0}`;
|
|
1661
|
-
const getInputNode = (0,
|
|
1620
|
+
const getInputNode = (0, import_react25.useCallback)(
|
|
1662
1621
|
(path) => document.querySelector(`[data-path="${getDataPath(name, path)}"]`),
|
|
1663
1622
|
[]
|
|
1664
1623
|
);
|
|
@@ -1703,18 +1662,17 @@ function useForm({
|
|
|
1703
1662
|
}
|
|
1704
1663
|
|
|
1705
1664
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
1706
|
-
var
|
|
1707
|
-
var
|
|
1708
|
-
var import_util = require("libnoise-ts/util");
|
|
1665
|
+
var import_react26 = require("react");
|
|
1666
|
+
var import_libnoise_simplex_ts13 = require("libnoise-simplex-ts");
|
|
1709
1667
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
1710
|
-
var
|
|
1668
|
+
var import_hooks20 = require("@mantine/hooks");
|
|
1711
1669
|
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
1712
|
-
var
|
|
1670
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1713
1671
|
function NoiseCurveNode({ id, selected, data, type }) {
|
|
1714
|
-
const incoming = (0,
|
|
1715
|
-
const updateNodeData = (0,
|
|
1716
|
-
const updateComputedData = (0,
|
|
1717
|
-
const [values, setValues] = (0,
|
|
1672
|
+
const incoming = (0, import_hooks19.useIncomingComputedData)(id);
|
|
1673
|
+
const updateNodeData = (0, import_hooks19.useUpdateNodeData)();
|
|
1674
|
+
const updateComputedData = (0, import_hooks19.useUpdateNodeComputedData)();
|
|
1675
|
+
const [values, setValues] = (0, import_react26.useState)([]);
|
|
1718
1676
|
const form = useForm({
|
|
1719
1677
|
mode: "uncontrolled",
|
|
1720
1678
|
initialValues: {
|
|
@@ -1733,7 +1691,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1733
1691
|
}
|
|
1734
1692
|
}
|
|
1735
1693
|
},
|
|
1736
|
-
onValuesChange: (0,
|
|
1694
|
+
onValuesChange: (0, import_react26.useCallback)((values2) => {
|
|
1737
1695
|
if (form.isValid()) {
|
|
1738
1696
|
const points = values2.points.map((v) => ({ input: v.input, output: v.output }));
|
|
1739
1697
|
setValues(points);
|
|
@@ -1742,21 +1700,21 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1742
1700
|
form.validate();
|
|
1743
1701
|
}, [])
|
|
1744
1702
|
});
|
|
1745
|
-
(0,
|
|
1746
|
-
const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: (0,
|
|
1703
|
+
(0, import_react26.useEffect)(() => {
|
|
1704
|
+
const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: (0, import_hooks20.randomId)() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: (0, import_hooks20.randomId)() }));
|
|
1747
1705
|
form.initialize({ points });
|
|
1748
1706
|
}, []);
|
|
1749
|
-
(0,
|
|
1707
|
+
(0, import_react26.useEffect)(() => {
|
|
1750
1708
|
if (incoming?.length && values?.length >= 4) {
|
|
1751
|
-
const module2 = new
|
|
1709
|
+
const module2 = new import_libnoise_simplex_ts13.Curve(
|
|
1752
1710
|
incoming[0].module,
|
|
1753
|
-
values.map((p) => new
|
|
1711
|
+
values.map((p) => new import_libnoise_simplex_ts13.Tuple(p.input, p.output))
|
|
1754
1712
|
);
|
|
1755
1713
|
updateComputedData(id, { module: module2 });
|
|
1756
1714
|
}
|
|
1757
1715
|
}, [values, incoming]);
|
|
1758
|
-
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0,
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
1716
|
+
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core10.Group, { mt: "xs", children: [
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1760
1718
|
import_core10.NumberInput,
|
|
1761
1719
|
{
|
|
1762
1720
|
size: "xs",
|
|
@@ -1767,7 +1725,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1767
1725
|
},
|
|
1768
1726
|
form.key(`points.${index}.input`)
|
|
1769
1727
|
),
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1771
1729
|
import_core10.NumberInput,
|
|
1772
1730
|
{
|
|
1773
1731
|
size: "xs",
|
|
@@ -1778,60 +1736,60 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1778
1736
|
},
|
|
1779
1737
|
form.key(`points.${index}.output`)
|
|
1780
1738
|
),
|
|
1781
|
-
data.state === import_abstract2.NodeState.edit && values.length > 4 && /* @__PURE__ */ (0,
|
|
1739
|
+
data.state === import_abstract2.NodeState.edit && values.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1782
1740
|
import_core10.ActionIcon,
|
|
1783
1741
|
{
|
|
1784
1742
|
color: "red",
|
|
1785
1743
|
variant: "outline",
|
|
1786
1744
|
size: "sm",
|
|
1787
1745
|
onClick: () => form.removeListItem("points", index),
|
|
1788
|
-
children: /* @__PURE__ */ (0,
|
|
1746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react2.IconX, { size: "1rem" })
|
|
1789
1747
|
}
|
|
1790
1748
|
)
|
|
1791
1749
|
] }, item.key));
|
|
1792
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_layout19.NodeContainer, { id, selected, type, data, children: [
|
|
1793
1751
|
fields,
|
|
1794
|
-
data.state === import_abstract2.NodeState.edit && /* @__PURE__ */ (0,
|
|
1795
|
-
/* @__PURE__ */ (0,
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
1752
|
+
data.state === import_abstract2.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core10.Space, { h: 10 }),
|
|
1754
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1797
1755
|
import_core10.Button,
|
|
1798
1756
|
{
|
|
1799
1757
|
variant: "outline",
|
|
1800
1758
|
size: "xs",
|
|
1801
1759
|
fullWidth: true,
|
|
1802
|
-
onClick: () => form.insertListItem("points", { input: 0, output: 0, key: (0,
|
|
1760
|
+
onClick: () => form.insertListItem("points", { input: 0, output: 0, key: (0, import_hooks20.randomId)() }),
|
|
1803
1761
|
children: "Add control point"
|
|
1804
1762
|
}
|
|
1805
1763
|
)
|
|
1806
1764
|
] }),
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_layout19.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
1808
1766
|
] });
|
|
1809
1767
|
}
|
|
1810
1768
|
var noise_curve_node_default = NoiseCurveNode;
|
|
1811
1769
|
|
|
1812
1770
|
// src/nodes/modifiers/noise-exponent-node.tsx
|
|
1813
|
-
var
|
|
1814
|
-
var
|
|
1771
|
+
var import_layout20 = require("@awesome-flow/core/layout");
|
|
1772
|
+
var import_react27 = require("react");
|
|
1815
1773
|
var import_core11 = require("@mantine/core");
|
|
1816
|
-
var
|
|
1817
|
-
var
|
|
1818
|
-
var
|
|
1774
|
+
var import_hooks21 = require("@awesome-flow/core/hooks");
|
|
1775
|
+
var import_libnoise_simplex_ts14 = require("libnoise-simplex-ts");
|
|
1776
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1819
1777
|
function NoiseExponentNode({ id, selected, data, type }) {
|
|
1820
|
-
const [exponent, setExponent] = (0,
|
|
1821
|
-
const incoming = (0,
|
|
1822
|
-
const updateNodeData = (0,
|
|
1823
|
-
const updateComputedData = (0,
|
|
1824
|
-
(0,
|
|
1778
|
+
const [exponent, setExponent] = (0, import_react27.useState)(data.exponent);
|
|
1779
|
+
const incoming = (0, import_hooks21.useIncomingComputedData)(id);
|
|
1780
|
+
const updateNodeData = (0, import_hooks21.useUpdateNodeData)();
|
|
1781
|
+
const updateComputedData = (0, import_hooks21.useUpdateNodeComputedData)();
|
|
1782
|
+
(0, import_react27.useEffect)(() => {
|
|
1825
1783
|
if (incoming?.length > 0) {
|
|
1826
|
-
const module2 = new
|
|
1784
|
+
const module2 = new import_libnoise_simplex_ts14.Exponent(incoming[0].module, exponent);
|
|
1827
1785
|
updateComputedData(id, { module: module2 });
|
|
1828
1786
|
}
|
|
1829
1787
|
updateNodeData(id, { exponent });
|
|
1830
1788
|
}, [incoming, exponent]);
|
|
1831
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_layout20.NodeContainer, { id, selected, data, type, children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core11.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core11.Group, { children: [
|
|
1833
1791
|
"Exponent:",
|
|
1834
|
-
/* @__PURE__ */ (0,
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1835
1793
|
import_core11.NumberInput,
|
|
1836
1794
|
{
|
|
1837
1795
|
size: "xs",
|
|
@@ -1841,55 +1799,55 @@ function NoiseExponentNode({ id, selected, data, type }) {
|
|
|
1841
1799
|
}
|
|
1842
1800
|
)
|
|
1843
1801
|
] }) }),
|
|
1844
|
-
/* @__PURE__ */ (0,
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_layout20.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
1845
1803
|
] });
|
|
1846
1804
|
}
|
|
1847
1805
|
var noise_exponent_node_default = NoiseExponentNode;
|
|
1848
1806
|
|
|
1849
1807
|
// src/nodes/modifiers/noise-invert-node.tsx
|
|
1850
|
-
var
|
|
1851
|
-
var
|
|
1852
|
-
var
|
|
1853
|
-
var
|
|
1854
|
-
var
|
|
1808
|
+
var import_layout21 = require("@awesome-flow/core/layout");
|
|
1809
|
+
var import_react28 = require("react");
|
|
1810
|
+
var import_hooks22 = require("@awesome-flow/core/hooks");
|
|
1811
|
+
var import_libnoise_simplex_ts15 = require("libnoise-simplex-ts");
|
|
1812
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1855
1813
|
function NoiseInvertNode({ id, selected, data, type }) {
|
|
1856
|
-
const incoming = (0,
|
|
1857
|
-
const updateComputedData = (0,
|
|
1858
|
-
(0,
|
|
1814
|
+
const incoming = (0, import_hooks22.useIncomingComputedData)(id);
|
|
1815
|
+
const updateComputedData = (0, import_hooks22.useUpdateNodeComputedData)();
|
|
1816
|
+
(0, import_react28.useEffect)(() => {
|
|
1859
1817
|
if (incoming?.length > 0) {
|
|
1860
|
-
const module2 = new
|
|
1818
|
+
const module2 = new import_libnoise_simplex_ts15.Invert(incoming[0].module);
|
|
1861
1819
|
updateComputedData(id, { module: module2 });
|
|
1862
1820
|
}
|
|
1863
1821
|
}, [incoming]);
|
|
1864
|
-
return /* @__PURE__ */ (0,
|
|
1822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_layout21.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_layout21.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
|
|
1865
1823
|
}
|
|
1866
1824
|
var noise_invert_node_default = NoiseInvertNode;
|
|
1867
1825
|
|
|
1868
1826
|
// src/nodes/modifiers/noise-scale-bias-node.tsx
|
|
1869
|
-
var
|
|
1870
|
-
var
|
|
1827
|
+
var import_layout22 = require("@awesome-flow/core/layout");
|
|
1828
|
+
var import_react29 = require("react");
|
|
1871
1829
|
var import_core12 = require("@mantine/core");
|
|
1872
|
-
var
|
|
1873
|
-
var
|
|
1874
|
-
var
|
|
1830
|
+
var import_hooks23 = require("@awesome-flow/core/hooks");
|
|
1831
|
+
var import_libnoise_simplex_ts16 = require("libnoise-simplex-ts");
|
|
1832
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1875
1833
|
function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
1876
|
-
const [scale, setScale] = (0,
|
|
1877
|
-
const [bias, setBias] = (0,
|
|
1878
|
-
const incoming = (0,
|
|
1879
|
-
const updateNodeData = (0,
|
|
1880
|
-
const updateComputedData = (0,
|
|
1881
|
-
(0,
|
|
1834
|
+
const [scale, setScale] = (0, import_react29.useState)(data.scale);
|
|
1835
|
+
const [bias, setBias] = (0, import_react29.useState)(data.bias);
|
|
1836
|
+
const incoming = (0, import_hooks23.useIncomingComputedData)(id);
|
|
1837
|
+
const updateNodeData = (0, import_hooks23.useUpdateNodeData)();
|
|
1838
|
+
const updateComputedData = (0, import_hooks23.useUpdateNodeComputedData)();
|
|
1839
|
+
(0, import_react29.useEffect)(() => {
|
|
1882
1840
|
if (incoming?.length > 0) {
|
|
1883
|
-
const module2 = new
|
|
1841
|
+
const module2 = new import_libnoise_simplex_ts16.ScaleBias(incoming[0].module, scale, bias);
|
|
1884
1842
|
updateComputedData(id, { module: module2 });
|
|
1885
1843
|
}
|
|
1886
1844
|
updateNodeData(id, { scale, bias });
|
|
1887
1845
|
}, [incoming, scale, bias]);
|
|
1888
|
-
return /* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
1846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_layout22.NodeContainer, { id, selected, data, type, children: [
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core12.Stack, { children: [
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core12.Group, { children: [
|
|
1891
1849
|
"Scale:",
|
|
1892
|
-
/* @__PURE__ */ (0,
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1893
1851
|
import_core12.NumberInput,
|
|
1894
1852
|
{
|
|
1895
1853
|
size: "xs",
|
|
@@ -1900,9 +1858,9 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1900
1858
|
}
|
|
1901
1859
|
)
|
|
1902
1860
|
] }),
|
|
1903
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core12.Group, { children: [
|
|
1904
1862
|
"Bias:",
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1906
1864
|
import_core12.NumberInput,
|
|
1907
1865
|
{
|
|
1908
1866
|
size: "xs",
|
|
@@ -1914,26 +1872,26 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1914
1872
|
)
|
|
1915
1873
|
] })
|
|
1916
1874
|
] }),
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_layout22.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
1918
1876
|
] });
|
|
1919
1877
|
}
|
|
1920
1878
|
var noise_scale_bias_node_default = NoiseScaleBiasNode;
|
|
1921
1879
|
|
|
1922
1880
|
// src/nodes/modifiers/noise-terrace-node.tsx
|
|
1923
|
-
var
|
|
1881
|
+
var import_layout23 = require("@awesome-flow/core/layout");
|
|
1924
1882
|
var import_core13 = require("@mantine/core");
|
|
1925
|
-
var
|
|
1926
|
-
var
|
|
1927
|
-
var
|
|
1883
|
+
var import_hooks24 = require("@awesome-flow/core/hooks");
|
|
1884
|
+
var import_react30 = require("react");
|
|
1885
|
+
var import_libnoise_simplex_ts17 = require("libnoise-simplex-ts");
|
|
1928
1886
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
1929
|
-
var
|
|
1887
|
+
var import_hooks25 = require("@mantine/hooks");
|
|
1930
1888
|
var import_abstract3 = require("@awesome-flow/core/abstract");
|
|
1931
|
-
var
|
|
1889
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1932
1890
|
function NoiseTerraceNode({ id, selected, data, type }) {
|
|
1933
|
-
const incoming = (0,
|
|
1934
|
-
const updateNodeData = (0,
|
|
1935
|
-
const updateComputedData = (0,
|
|
1936
|
-
const [values, setValues] = (0,
|
|
1891
|
+
const incoming = (0, import_hooks24.useIncomingComputedData)(id);
|
|
1892
|
+
const updateNodeData = (0, import_hooks24.useUpdateNodeData)();
|
|
1893
|
+
const updateComputedData = (0, import_hooks24.useUpdateNodeComputedData)();
|
|
1894
|
+
const [values, setValues] = (0, import_react30.useState)([]);
|
|
1937
1895
|
const form = useForm({
|
|
1938
1896
|
mode: "uncontrolled",
|
|
1939
1897
|
initialValues: {
|
|
@@ -1941,7 +1899,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1941
1899
|
},
|
|
1942
1900
|
validateInputOnChange: [`points.${FORM_INDEX}.input`],
|
|
1943
1901
|
clearInputErrorOnChange: true,
|
|
1944
|
-
onValuesChange: (0,
|
|
1902
|
+
onValuesChange: (0, import_react30.useCallback)((values2) => {
|
|
1945
1903
|
if (form.isValid()) {
|
|
1946
1904
|
const points = values2.points.map((v) => v.value);
|
|
1947
1905
|
setValues(points);
|
|
@@ -1950,18 +1908,18 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1950
1908
|
form.validate();
|
|
1951
1909
|
}, [])
|
|
1952
1910
|
});
|
|
1953
|
-
(0,
|
|
1954
|
-
const points = data.points?.length ? data.points.map((v) => ({ value: v, key: (0,
|
|
1911
|
+
(0, import_react30.useEffect)(() => {
|
|
1912
|
+
const points = data.points?.length ? data.points.map((v) => ({ value: v, key: (0, import_hooks25.randomId)() })) : [1, 2].map(() => ({ value: 0, key: (0, import_hooks25.randomId)() }));
|
|
1955
1913
|
form.initialize({ points });
|
|
1956
1914
|
}, []);
|
|
1957
|
-
(0,
|
|
1915
|
+
(0, import_react30.useEffect)(() => {
|
|
1958
1916
|
if (incoming?.length && values?.length >= 2) {
|
|
1959
|
-
const module2 = new
|
|
1917
|
+
const module2 = new import_libnoise_simplex_ts17.Terrace(incoming[0].module, values);
|
|
1960
1918
|
updateComputedData(id, { module: module2 });
|
|
1961
1919
|
}
|
|
1962
1920
|
}, [values, incoming]);
|
|
1963
|
-
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1921
|
+
const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core13.Group, { mt: "xs", children: [
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1965
1923
|
import_core13.NumberInput,
|
|
1966
1924
|
{
|
|
1967
1925
|
size: "xs",
|
|
@@ -1971,52 +1929,52 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1971
1929
|
},
|
|
1972
1930
|
form.key(`points.${index}.value`)
|
|
1973
1931
|
),
|
|
1974
|
-
data.state === import_abstract3.NodeState.edit && values.length > 2 && /* @__PURE__ */ (0,
|
|
1932
|
+
data.state === import_abstract3.NodeState.edit && values.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1975
1933
|
import_core13.ActionIcon,
|
|
1976
1934
|
{
|
|
1977
1935
|
color: "red",
|
|
1978
1936
|
variant: "outline",
|
|
1979
1937
|
size: "sm",
|
|
1980
1938
|
onClick: () => form.removeListItem("points", index),
|
|
1981
|
-
children: /* @__PURE__ */ (0,
|
|
1939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons_react3.IconX, { size: "1rem" })
|
|
1982
1940
|
}
|
|
1983
1941
|
)
|
|
1984
1942
|
] }, item.key));
|
|
1985
|
-
return /* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_layout23.NodeContainer, { id, selected, type, data, children: [
|
|
1986
1944
|
fields,
|
|
1987
|
-
data.state === import_abstract3.NodeState.edit && /* @__PURE__ */ (0,
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
1989
|
-
/* @__PURE__ */ (0,
|
|
1945
|
+
data.state === import_abstract3.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core13.Space, { h: 10 }),
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1990
1948
|
import_core13.Button,
|
|
1991
1949
|
{
|
|
1992
1950
|
variant: "outline",
|
|
1993
1951
|
size: "xs",
|
|
1994
1952
|
fullWidth: true,
|
|
1995
|
-
onClick: () => form.insertListItem("points", { value: 0, key: (0,
|
|
1953
|
+
onClick: () => form.insertListItem("points", { value: 0, key: (0, import_hooks25.randomId)() }),
|
|
1996
1954
|
children: "Add control point"
|
|
1997
1955
|
}
|
|
1998
1956
|
)
|
|
1999
1957
|
] }),
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
1958
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_layout23.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2001
1959
|
] });
|
|
2002
1960
|
}
|
|
2003
1961
|
var noise_terrace_node_default = NoiseTerraceNode;
|
|
2004
1962
|
|
|
2005
1963
|
// src/nodes/selectors/noise-blend-node.tsx
|
|
2006
|
-
var
|
|
2007
|
-
var
|
|
2008
|
-
var
|
|
2009
|
-
var
|
|
1964
|
+
var import_layout24 = require("@awesome-flow/core/layout");
|
|
1965
|
+
var import_react31 = require("react");
|
|
1966
|
+
var import_hooks26 = require("@awesome-flow/core/hooks");
|
|
1967
|
+
var import_libnoise_simplex_ts18 = require("libnoise-simplex-ts");
|
|
2010
1968
|
var import_components8 = require("@awesome-flow/core/components");
|
|
2011
|
-
var
|
|
1969
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2012
1970
|
function NoiseBlendNode({ id, selected, data, type }) {
|
|
2013
|
-
const updateComputedData = (0,
|
|
2014
|
-
const onDataUpdated = (0,
|
|
1971
|
+
const updateComputedData = (0, import_hooks26.useUpdateNodeComputedData)();
|
|
1972
|
+
const onDataUpdated = (0, import_react31.useCallback)(
|
|
2015
1973
|
(incomingData) => {
|
|
2016
1974
|
const incomingSources = incomingData["source" /* source */];
|
|
2017
1975
|
const incomingControl = incomingData["control" /* control */];
|
|
2018
1976
|
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
2019
|
-
const module2 = new
|
|
1977
|
+
const module2 = new import_libnoise_simplex_ts18.Blend(
|
|
2020
1978
|
incomingSources[0].module,
|
|
2021
1979
|
incomingSources[1].module,
|
|
2022
1980
|
incomingControl[0].module
|
|
@@ -2026,8 +1984,8 @@ function NoiseBlendNode({ id, selected, data, type }) {
|
|
|
2026
1984
|
},
|
|
2027
1985
|
[]
|
|
2028
1986
|
);
|
|
2029
|
-
return /* @__PURE__ */ (0,
|
|
2030
|
-
/* @__PURE__ */ (0,
|
|
1987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_layout24.NodeContainer, { id, selected, data, type, children: [
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2031
1989
|
import_components8.HandlesIncomingDataStatus,
|
|
2032
1990
|
{
|
|
2033
1991
|
nodeId: id,
|
|
@@ -2038,34 +1996,34 @@ function NoiseBlendNode({ id, selected, data, type }) {
|
|
|
2038
1996
|
resetComputedData: true
|
|
2039
1997
|
}
|
|
2040
1998
|
),
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_layout24.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2042
2000
|
] });
|
|
2043
2001
|
}
|
|
2044
2002
|
var noise_blend_node_default = NoiseBlendNode;
|
|
2045
2003
|
|
|
2046
2004
|
// src/nodes/selectors/noise-select-node.tsx
|
|
2047
|
-
var
|
|
2048
|
-
var
|
|
2049
|
-
var
|
|
2050
|
-
var
|
|
2005
|
+
var import_layout25 = require("@awesome-flow/core/layout");
|
|
2006
|
+
var import_react32 = require("react");
|
|
2007
|
+
var import_hooks27 = require("@awesome-flow/core/hooks");
|
|
2008
|
+
var import_libnoise_simplex_ts19 = require("libnoise-simplex-ts");
|
|
2051
2009
|
var import_core14 = require("@mantine/core");
|
|
2052
2010
|
var import_components9 = require("@awesome-flow/core/components");
|
|
2053
|
-
var
|
|
2011
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2054
2012
|
function NoiseSelectNode({ id, selected, data, type }) {
|
|
2055
|
-
const [edgeFalloff, setEdgeFalloff] = (0,
|
|
2056
|
-
const [lowerBound, setLowerBound] = (0,
|
|
2057
|
-
const [upperBound, setUpperBound] = (0,
|
|
2058
|
-
const updateNodeData = (0,
|
|
2059
|
-
const updateComputedData = (0,
|
|
2060
|
-
(0,
|
|
2013
|
+
const [edgeFalloff, setEdgeFalloff] = (0, import_react32.useState)(data.edgeFalloff);
|
|
2014
|
+
const [lowerBound, setLowerBound] = (0, import_react32.useState)(data.lowerBound);
|
|
2015
|
+
const [upperBound, setUpperBound] = (0, import_react32.useState)(data.upperBound);
|
|
2016
|
+
const updateNodeData = (0, import_hooks27.useUpdateNodeData)();
|
|
2017
|
+
const updateComputedData = (0, import_hooks27.useUpdateNodeComputedData)();
|
|
2018
|
+
(0, import_react32.useEffect)(() => {
|
|
2061
2019
|
updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
|
|
2062
2020
|
}, [edgeFalloff, lowerBound, upperBound]);
|
|
2063
|
-
const onDataUpdated = (0,
|
|
2021
|
+
const onDataUpdated = (0, import_react32.useCallback)(
|
|
2064
2022
|
(incomingData) => {
|
|
2065
2023
|
const incomingSources = incomingData["source" /* source */];
|
|
2066
2024
|
const incomingControl = incomingData["control" /* control */];
|
|
2067
2025
|
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
2068
|
-
const module2 = new
|
|
2026
|
+
const module2 = new import_libnoise_simplex_ts19.Select(
|
|
2069
2027
|
incomingSources[0].module,
|
|
2070
2028
|
incomingSources[1].module,
|
|
2071
2029
|
incomingControl[0].module,
|
|
@@ -2078,11 +2036,11 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2078
2036
|
},
|
|
2079
2037
|
[]
|
|
2080
2038
|
);
|
|
2081
|
-
return /* @__PURE__ */ (0,
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_layout25.NodeContainer, { id, selected, data, type, children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core14.Stack, { children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core14.Group, { children: [
|
|
2084
2042
|
"Edge Falloff:",
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2086
2044
|
import_core14.NumberInput,
|
|
2087
2045
|
{
|
|
2088
2046
|
size: "xs",
|
|
@@ -2093,9 +2051,9 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2093
2051
|
}
|
|
2094
2052
|
)
|
|
2095
2053
|
] }),
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2054
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core14.Group, { children: [
|
|
2097
2055
|
"Lower Bound:",
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2099
2057
|
import_core14.NumberInput,
|
|
2100
2058
|
{
|
|
2101
2059
|
size: "xs",
|
|
@@ -2106,9 +2064,9 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2106
2064
|
}
|
|
2107
2065
|
)
|
|
2108
2066
|
] }),
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core14.Group, { children: [
|
|
2110
2068
|
"Upper Bound:",
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2112
2070
|
import_core14.NumberInput,
|
|
2113
2071
|
{
|
|
2114
2072
|
size: "xs",
|
|
@@ -2119,7 +2077,7 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2119
2077
|
}
|
|
2120
2078
|
)
|
|
2121
2079
|
] }),
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2123
2081
|
import_components9.HandlesIncomingDataStatus,
|
|
2124
2082
|
{
|
|
2125
2083
|
nodeId: id,
|
|
@@ -2131,28 +2089,28 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
2131
2089
|
}
|
|
2132
2090
|
)
|
|
2133
2091
|
] }),
|
|
2134
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_layout25.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2135
2093
|
] });
|
|
2136
2094
|
}
|
|
2137
2095
|
var noise_select_node_default = NoiseSelectNode;
|
|
2138
2096
|
|
|
2139
2097
|
// src/nodes/transformers/noise-displace-node.tsx
|
|
2140
|
-
var
|
|
2141
|
-
var
|
|
2142
|
-
var
|
|
2143
|
-
var
|
|
2098
|
+
var import_layout26 = require("@awesome-flow/core/layout");
|
|
2099
|
+
var import_react33 = require("react");
|
|
2100
|
+
var import_hooks28 = require("@awesome-flow/core/hooks");
|
|
2101
|
+
var import_libnoise_simplex_ts20 = require("libnoise-simplex-ts");
|
|
2144
2102
|
var import_components10 = require("@awesome-flow/core/components");
|
|
2145
|
-
var
|
|
2103
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2146
2104
|
function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
2147
|
-
const updateComputedData = (0,
|
|
2148
|
-
const onDataUpdated = (0,
|
|
2105
|
+
const updateComputedData = (0, import_hooks28.useUpdateNodeComputedData)();
|
|
2106
|
+
const onDataUpdated = (0, import_react33.useCallback)(
|
|
2149
2107
|
(handleData) => {
|
|
2150
2108
|
const sourceModule = handleData["source" /* sourceModule */];
|
|
2151
2109
|
const xModule = handleData["x-module" /* xModule */];
|
|
2152
2110
|
const yModule = handleData["y-module" /* yModule */];
|
|
2153
2111
|
const zModule = handleData["z-module" /* zModule */];
|
|
2154
2112
|
if (sourceModule && xModule && yModule && zModule) {
|
|
2155
|
-
const module2 = new
|
|
2113
|
+
const module2 = new import_libnoise_simplex_ts20.Displace(
|
|
2156
2114
|
sourceModule[0].module,
|
|
2157
2115
|
xModule[0].module,
|
|
2158
2116
|
yModule[0].module,
|
|
@@ -2163,8 +2121,8 @@ function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
|
2163
2121
|
},
|
|
2164
2122
|
[]
|
|
2165
2123
|
);
|
|
2166
|
-
return /* @__PURE__ */ (0,
|
|
2167
|
-
/* @__PURE__ */ (0,
|
|
2124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_layout26.NodeContainer, { id, selected, data, type, children: [
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2168
2126
|
import_components10.HandlesIncomingDataStatus,
|
|
2169
2127
|
{
|
|
2170
2128
|
nodeId: id,
|
|
@@ -2175,42 +2133,42 @@ function NoiseDisplaceNode({ id, selected, data, type }) {
|
|
|
2175
2133
|
resetComputedData: true
|
|
2176
2134
|
}
|
|
2177
2135
|
),
|
|
2178
|
-
/* @__PURE__ */ (0,
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_layout26.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2179
2137
|
] });
|
|
2180
2138
|
}
|
|
2181
2139
|
var noise_displace_node_default = NoiseDisplaceNode;
|
|
2182
2140
|
|
|
2183
2141
|
// src/nodes/transformers/noise-rotate-point-node.tsx
|
|
2184
|
-
var
|
|
2185
|
-
var
|
|
2186
|
-
var
|
|
2142
|
+
var import_layout27 = require("@awesome-flow/core/layout");
|
|
2143
|
+
var import_react34 = require("react");
|
|
2144
|
+
var import_hooks29 = require("@awesome-flow/core/hooks");
|
|
2187
2145
|
var import_core15 = require("@mantine/core");
|
|
2188
|
-
var
|
|
2189
|
-
var
|
|
2146
|
+
var import_libnoise_simplex_ts21 = require("libnoise-simplex-ts");
|
|
2147
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2190
2148
|
function NoiseRotatePointNode({
|
|
2191
2149
|
id,
|
|
2192
2150
|
selected,
|
|
2193
2151
|
data,
|
|
2194
2152
|
type
|
|
2195
2153
|
}) {
|
|
2196
|
-
const [xAngle, setXAngle] = (0,
|
|
2197
|
-
const [yAngle, setYAngle] = (0,
|
|
2198
|
-
const [zAngle, setZAngle] = (0,
|
|
2199
|
-
const incoming = (0,
|
|
2200
|
-
const updateNodeData = (0,
|
|
2201
|
-
const updateComputedData = (0,
|
|
2202
|
-
(0,
|
|
2154
|
+
const [xAngle, setXAngle] = (0, import_react34.useState)(data.xAngle);
|
|
2155
|
+
const [yAngle, setYAngle] = (0, import_react34.useState)(data.yAngle);
|
|
2156
|
+
const [zAngle, setZAngle] = (0, import_react34.useState)(data.zAngle);
|
|
2157
|
+
const incoming = (0, import_hooks29.useIncomingComputedData)(id);
|
|
2158
|
+
const updateNodeData = (0, import_hooks29.useUpdateNodeData)();
|
|
2159
|
+
const updateComputedData = (0, import_hooks29.useUpdateNodeComputedData)();
|
|
2160
|
+
(0, import_react34.useEffect)(() => {
|
|
2203
2161
|
if (incoming?.length) {
|
|
2204
|
-
const module2 = new
|
|
2162
|
+
const module2 = new import_libnoise_simplex_ts21.RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
|
|
2205
2163
|
updateComputedData(id, { module: module2 });
|
|
2206
2164
|
}
|
|
2207
2165
|
updateNodeData(id, { xAngle, yAngle, zAngle });
|
|
2208
2166
|
}, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
|
|
2209
|
-
return /* @__PURE__ */ (0,
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_layout27.NodeContainer, { id, selected, data, type, children: [
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core15.Stack, { children: [
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core15.Group, { children: [
|
|
2212
2170
|
"X Angle:",
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2214
2172
|
import_core15.NumberInput,
|
|
2215
2173
|
{
|
|
2216
2174
|
size: "xs",
|
|
@@ -2221,9 +2179,9 @@ function NoiseRotatePointNode({
|
|
|
2221
2179
|
}
|
|
2222
2180
|
)
|
|
2223
2181
|
] }),
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2182
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core15.Group, { children: [
|
|
2225
2183
|
"Y Angle:",
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2227
2185
|
import_core15.NumberInput,
|
|
2228
2186
|
{
|
|
2229
2187
|
size: "xs",
|
|
@@ -2234,9 +2192,9 @@ function NoiseRotatePointNode({
|
|
|
2234
2192
|
}
|
|
2235
2193
|
)
|
|
2236
2194
|
] }),
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core15.Group, { children: [
|
|
2238
2196
|
"Z Angle:",
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2197
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2240
2198
|
import_core15.NumberInput,
|
|
2241
2199
|
{
|
|
2242
2200
|
size: "xs",
|
|
@@ -2248,42 +2206,42 @@ function NoiseRotatePointNode({
|
|
|
2248
2206
|
)
|
|
2249
2207
|
] })
|
|
2250
2208
|
] }),
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_layout27.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2252
2210
|
] });
|
|
2253
2211
|
}
|
|
2254
2212
|
var noise_rotate_point_node_default = NoiseRotatePointNode;
|
|
2255
2213
|
|
|
2256
2214
|
// src/nodes/transformers/noise-scale-point-node.tsx
|
|
2257
|
-
var
|
|
2258
|
-
var
|
|
2259
|
-
var
|
|
2215
|
+
var import_layout28 = require("@awesome-flow/core/layout");
|
|
2216
|
+
var import_react35 = require("react");
|
|
2217
|
+
var import_hooks30 = require("@awesome-flow/core/hooks");
|
|
2260
2218
|
var import_core16 = require("@mantine/core");
|
|
2261
|
-
var
|
|
2262
|
-
var
|
|
2219
|
+
var import_libnoise_simplex_ts22 = require("libnoise-simplex-ts");
|
|
2220
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2263
2221
|
function NoiseScalePointNode({
|
|
2264
2222
|
id,
|
|
2265
2223
|
selected,
|
|
2266
2224
|
data,
|
|
2267
2225
|
type
|
|
2268
2226
|
}) {
|
|
2269
|
-
const [xScale, setXScale] = (0,
|
|
2270
|
-
const [yScale, setYScale] = (0,
|
|
2271
|
-
const [zScale, setZScale] = (0,
|
|
2272
|
-
const incoming = (0,
|
|
2273
|
-
const updateNodeData = (0,
|
|
2274
|
-
const updateComputedData = (0,
|
|
2275
|
-
(0,
|
|
2227
|
+
const [xScale, setXScale] = (0, import_react35.useState)(data.xScale);
|
|
2228
|
+
const [yScale, setYScale] = (0, import_react35.useState)(data.yScale);
|
|
2229
|
+
const [zScale, setZScale] = (0, import_react35.useState)(data.zScale);
|
|
2230
|
+
const incoming = (0, import_hooks30.useIncomingComputedData)(id);
|
|
2231
|
+
const updateNodeData = (0, import_hooks30.useUpdateNodeData)();
|
|
2232
|
+
const updateComputedData = (0, import_hooks30.useUpdateNodeComputedData)();
|
|
2233
|
+
(0, import_react35.useEffect)(() => {
|
|
2276
2234
|
if (incoming?.length) {
|
|
2277
|
-
const module2 = new
|
|
2235
|
+
const module2 = new import_libnoise_simplex_ts22.ScalePoint(incoming[0].module, xScale, yScale, zScale);
|
|
2278
2236
|
updateComputedData(id, { module: module2 });
|
|
2279
2237
|
}
|
|
2280
2238
|
updateNodeData(id, { xScale, yScale, zScale });
|
|
2281
2239
|
}, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
|
|
2282
|
-
return /* @__PURE__ */ (0,
|
|
2283
|
-
/* @__PURE__ */ (0,
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_layout28.NodeContainer, { id, selected, data, type, children: [
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core16.Stack, { children: [
|
|
2242
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core16.Group, { children: [
|
|
2285
2243
|
"X Scale:",
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2244
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2287
2245
|
import_core16.NumberInput,
|
|
2288
2246
|
{
|
|
2289
2247
|
size: "xs",
|
|
@@ -2294,9 +2252,9 @@ function NoiseScalePointNode({
|
|
|
2294
2252
|
}
|
|
2295
2253
|
)
|
|
2296
2254
|
] }),
|
|
2297
|
-
/* @__PURE__ */ (0,
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core16.Group, { children: [
|
|
2298
2256
|
"Y Scale:",
|
|
2299
|
-
/* @__PURE__ */ (0,
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2300
2258
|
import_core16.NumberInput,
|
|
2301
2259
|
{
|
|
2302
2260
|
size: "xs",
|
|
@@ -2307,9 +2265,9 @@ function NoiseScalePointNode({
|
|
|
2307
2265
|
}
|
|
2308
2266
|
)
|
|
2309
2267
|
] }),
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
2268
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core16.Group, { children: [
|
|
2311
2269
|
"Z Scale:",
|
|
2312
|
-
/* @__PURE__ */ (0,
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2313
2271
|
import_core16.NumberInput,
|
|
2314
2272
|
{
|
|
2315
2273
|
size: "xs",
|
|
@@ -2321,42 +2279,42 @@ function NoiseScalePointNode({
|
|
|
2321
2279
|
)
|
|
2322
2280
|
] })
|
|
2323
2281
|
] }),
|
|
2324
|
-
/* @__PURE__ */ (0,
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_layout28.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2325
2283
|
] });
|
|
2326
2284
|
}
|
|
2327
2285
|
var noise_scale_point_node_default = NoiseScalePointNode;
|
|
2328
2286
|
|
|
2329
2287
|
// src/nodes/transformers/noise-translate-point-node.tsx
|
|
2330
|
-
var
|
|
2331
|
-
var
|
|
2332
|
-
var
|
|
2288
|
+
var import_layout29 = require("@awesome-flow/core/layout");
|
|
2289
|
+
var import_react36 = require("react");
|
|
2290
|
+
var import_hooks31 = require("@awesome-flow/core/hooks");
|
|
2333
2291
|
var import_core17 = require("@mantine/core");
|
|
2334
|
-
var
|
|
2335
|
-
var
|
|
2292
|
+
var import_libnoise_simplex_ts23 = require("libnoise-simplex-ts");
|
|
2293
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2336
2294
|
function NoiseTranslatePointNode({
|
|
2337
2295
|
id,
|
|
2338
2296
|
selected,
|
|
2339
2297
|
data,
|
|
2340
2298
|
type
|
|
2341
2299
|
}) {
|
|
2342
|
-
const [translateX, setTranslateX] = (0,
|
|
2343
|
-
const [translateY, setTranslateY] = (0,
|
|
2344
|
-
const [translateZ, setTranslateZ] = (0,
|
|
2345
|
-
const incoming = (0,
|
|
2346
|
-
const updateNodeData = (0,
|
|
2347
|
-
const updateComputedData = (0,
|
|
2348
|
-
(0,
|
|
2300
|
+
const [translateX, setTranslateX] = (0, import_react36.useState)(data.translateX);
|
|
2301
|
+
const [translateY, setTranslateY] = (0, import_react36.useState)(data.translateY);
|
|
2302
|
+
const [translateZ, setTranslateZ] = (0, import_react36.useState)(data.translateZ);
|
|
2303
|
+
const incoming = (0, import_hooks31.useIncomingComputedData)(id);
|
|
2304
|
+
const updateNodeData = (0, import_hooks31.useUpdateNodeData)();
|
|
2305
|
+
const updateComputedData = (0, import_hooks31.useUpdateNodeComputedData)();
|
|
2306
|
+
(0, import_react36.useEffect)(() => {
|
|
2349
2307
|
if (incoming?.length) {
|
|
2350
|
-
const module2 = new
|
|
2308
|
+
const module2 = new import_libnoise_simplex_ts23.TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
|
|
2351
2309
|
updateComputedData(id, { module: module2 });
|
|
2352
2310
|
}
|
|
2353
2311
|
updateNodeData(id, { translateX, translateY, translateZ });
|
|
2354
2312
|
}, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
|
|
2355
|
-
return /* @__PURE__ */ (0,
|
|
2356
|
-
/* @__PURE__ */ (0,
|
|
2357
|
-
/* @__PURE__ */ (0,
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_layout29.NodeContainer, { id, selected, data, type, children: [
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Stack, { children: [
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
|
|
2358
2316
|
"Translate X:",
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2317
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2360
2318
|
import_core17.NumberInput,
|
|
2361
2319
|
{
|
|
2362
2320
|
size: "xs",
|
|
@@ -2367,9 +2325,9 @@ function NoiseTranslatePointNode({
|
|
|
2367
2325
|
}
|
|
2368
2326
|
)
|
|
2369
2327
|
] }),
|
|
2370
|
-
/* @__PURE__ */ (0,
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
|
|
2371
2329
|
"Translate Y:",
|
|
2372
|
-
/* @__PURE__ */ (0,
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2373
2331
|
import_core17.NumberInput,
|
|
2374
2332
|
{
|
|
2375
2333
|
size: "xs",
|
|
@@ -2380,9 +2338,9 @@ function NoiseTranslatePointNode({
|
|
|
2380
2338
|
}
|
|
2381
2339
|
)
|
|
2382
2340
|
] }),
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
|
|
2384
2342
|
"Translate Z:",
|
|
2385
|
-
/* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2386
2344
|
import_core17.NumberInput,
|
|
2387
2345
|
{
|
|
2388
2346
|
size: "xs",
|
|
@@ -2394,33 +2352,33 @@ function NoiseTranslatePointNode({
|
|
|
2394
2352
|
)
|
|
2395
2353
|
] })
|
|
2396
2354
|
] }),
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2355
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_layout29.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2398
2356
|
] });
|
|
2399
2357
|
}
|
|
2400
2358
|
var noise_translate_point_node_default = NoiseTranslatePointNode;
|
|
2401
2359
|
|
|
2402
2360
|
// src/nodes/transformers/noise-turbulence-node .tsx
|
|
2403
|
-
var
|
|
2404
|
-
var
|
|
2405
|
-
var
|
|
2406
|
-
var
|
|
2361
|
+
var import_layout30 = require("@awesome-flow/core/layout");
|
|
2362
|
+
var import_react37 = require("react");
|
|
2363
|
+
var import_hooks32 = require("@awesome-flow/core/hooks");
|
|
2364
|
+
var import_libnoise_simplex_ts24 = require("libnoise-simplex-ts");
|
|
2407
2365
|
var import_components11 = require("@awesome-flow/core/components");
|
|
2408
|
-
var
|
|
2366
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2409
2367
|
function NoiseTurbulenceNode({
|
|
2410
2368
|
id,
|
|
2411
2369
|
selected,
|
|
2412
2370
|
data,
|
|
2413
2371
|
type
|
|
2414
2372
|
}) {
|
|
2415
|
-
const [properties, setProperties] = (0,
|
|
2416
|
-
const incoming = (0,
|
|
2417
|
-
const updateComputedData = (0,
|
|
2418
|
-
const onPropertiesChange = (0,
|
|
2373
|
+
const [properties, setProperties] = (0, import_react37.useState)(null);
|
|
2374
|
+
const incoming = (0, import_hooks32.useIncomingComputedData)(id);
|
|
2375
|
+
const updateComputedData = (0, import_hooks32.useUpdateNodeComputedData)();
|
|
2376
|
+
const onPropertiesChange = (0, import_react37.useCallback)((props) => {
|
|
2419
2377
|
setProperties(props);
|
|
2420
2378
|
}, []);
|
|
2421
|
-
(0,
|
|
2379
|
+
(0, import_react37.useEffect)(() => {
|
|
2422
2380
|
if (incoming?.length && properties) {
|
|
2423
|
-
const module2 = new
|
|
2381
|
+
const module2 = new import_libnoise_simplex_ts24.Turbulence(
|
|
2424
2382
|
incoming[0].module,
|
|
2425
2383
|
properties.frequency.value,
|
|
2426
2384
|
properties.power.value,
|
|
@@ -2430,9 +2388,9 @@ function NoiseTurbulenceNode({
|
|
|
2430
2388
|
updateComputedData(id, { module: module2 });
|
|
2431
2389
|
}
|
|
2432
2390
|
}, [id, incoming, properties]);
|
|
2433
|
-
return /* @__PURE__ */ (0,
|
|
2434
|
-
/* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_layout30.NodeContainer, { id, selected, data, type, children: [
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components11.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_layout30.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
2436
2394
|
] });
|
|
2437
2395
|
}
|
|
2438
2396
|
var noise_turbulence_node_default = NoiseTurbulenceNode;
|
|
@@ -2578,34 +2536,9 @@ var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
|
2578
2536
|
};
|
|
2579
2537
|
};
|
|
2580
2538
|
|
|
2581
|
-
// src/templates/generators/noise-
|
|
2539
|
+
// src/templates/generators/noise-spheres-template.ts
|
|
2582
2540
|
var import_abstract9 = require("@awesome-flow/core/abstract");
|
|
2583
2541
|
var import_system6 = require("@xyflow/system");
|
|
2584
|
-
var NoiseSimplexNodeTemplateFactory = class {
|
|
2585
|
-
template = {
|
|
2586
|
-
type: "noise-simplex" /* noiseSimplex */,
|
|
2587
|
-
group: "Noise Generators" /* noiseGenerators */,
|
|
2588
|
-
data: {
|
|
2589
|
-
title: "Simplex Noise"
|
|
2590
|
-
},
|
|
2591
|
-
handles: [
|
|
2592
|
-
{
|
|
2593
|
-
position: import_system6.Position.Left,
|
|
2594
|
-
dataType: import_abstract9.CoreHandleType.variableProperty,
|
|
2595
|
-
connection: "target"
|
|
2596
|
-
},
|
|
2597
|
-
{
|
|
2598
|
-
position: import_system6.Position.Right,
|
|
2599
|
-
dataType: "module" /* module */,
|
|
2600
|
-
connection: "source"
|
|
2601
|
-
}
|
|
2602
|
-
]
|
|
2603
|
-
};
|
|
2604
|
-
};
|
|
2605
|
-
|
|
2606
|
-
// src/templates/generators/noise-spheres-template.ts
|
|
2607
|
-
var import_abstract10 = require("@awesome-flow/core/abstract");
|
|
2608
|
-
var import_system7 = require("@xyflow/system");
|
|
2609
2542
|
var NoiseSpheresNodeTemplateFactory = class {
|
|
2610
2543
|
template = {
|
|
2611
2544
|
type: "noise-spheres" /* noiseSpheres */,
|
|
@@ -2616,12 +2549,12 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2616
2549
|
},
|
|
2617
2550
|
handles: [
|
|
2618
2551
|
{
|
|
2619
|
-
position:
|
|
2620
|
-
dataType:
|
|
2552
|
+
position: import_system6.Position.Left,
|
|
2553
|
+
dataType: import_abstract9.CoreHandleType.variableProperty,
|
|
2621
2554
|
connection: "target"
|
|
2622
2555
|
},
|
|
2623
2556
|
{
|
|
2624
|
-
position:
|
|
2557
|
+
position: import_system6.Position.Right,
|
|
2625
2558
|
dataType: "module" /* module */,
|
|
2626
2559
|
connection: "source"
|
|
2627
2560
|
}
|
|
@@ -2630,8 +2563,8 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2630
2563
|
};
|
|
2631
2564
|
|
|
2632
2565
|
// src/templates/generators/noise-voronoi-template.ts
|
|
2633
|
-
var
|
|
2634
|
-
var
|
|
2566
|
+
var import_abstract10 = require("@awesome-flow/core/abstract");
|
|
2567
|
+
var import_system7 = require("@xyflow/system");
|
|
2635
2568
|
var NoiseVoronoiNodeTemplateFactory = class {
|
|
2636
2569
|
template = {
|
|
2637
2570
|
type: "noise-voronoi" /* noiseVoronoi */,
|
|
@@ -2645,12 +2578,12 @@ var NoiseVoronoiNodeTemplateFactory = class {
|
|
|
2645
2578
|
},
|
|
2646
2579
|
handles: [
|
|
2647
2580
|
{
|
|
2648
|
-
position:
|
|
2649
|
-
dataType:
|
|
2581
|
+
position: import_system7.Position.Left,
|
|
2582
|
+
dataType: import_abstract10.CoreHandleType.variableProperty,
|
|
2650
2583
|
connection: "target"
|
|
2651
2584
|
},
|
|
2652
2585
|
{
|
|
2653
|
-
position:
|
|
2586
|
+
position: import_system7.Position.Right,
|
|
2654
2587
|
dataType: "module" /* module */,
|
|
2655
2588
|
connection: "source"
|
|
2656
2589
|
}
|
|
@@ -2659,7 +2592,7 @@ var NoiseVoronoiNodeTemplateFactory = class {
|
|
|
2659
2592
|
};
|
|
2660
2593
|
|
|
2661
2594
|
// src/templates/generators/position-const-template.ts
|
|
2662
|
-
var
|
|
2595
|
+
var import_system8 = require("@xyflow/system");
|
|
2663
2596
|
var PositionConstNodeTemplateFactory = class {
|
|
2664
2597
|
template = {
|
|
2665
2598
|
type: "position" /* position */,
|
|
@@ -2670,7 +2603,7 @@ var PositionConstNodeTemplateFactory = class {
|
|
|
2670
2603
|
},
|
|
2671
2604
|
handles: [
|
|
2672
2605
|
{
|
|
2673
|
-
position:
|
|
2606
|
+
position: import_system8.Position.Right,
|
|
2674
2607
|
dataType: "position" /* position */,
|
|
2675
2608
|
connection: "source"
|
|
2676
2609
|
}
|
|
@@ -2679,7 +2612,7 @@ var PositionConstNodeTemplateFactory = class {
|
|
|
2679
2612
|
};
|
|
2680
2613
|
|
|
2681
2614
|
// src/templates/generators/position-grid-template.ts
|
|
2682
|
-
var
|
|
2615
|
+
var import_system9 = require("@xyflow/system");
|
|
2683
2616
|
var PositionGridNodeTemplateFactory = class {
|
|
2684
2617
|
template = {
|
|
2685
2618
|
type: "grid" /* grid */,
|
|
@@ -2691,7 +2624,7 @@ var PositionGridNodeTemplateFactory = class {
|
|
|
2691
2624
|
},
|
|
2692
2625
|
handles: [
|
|
2693
2626
|
{
|
|
2694
|
-
position:
|
|
2627
|
+
position: import_system9.Position.Right,
|
|
2695
2628
|
dataType: "position" /* position */,
|
|
2696
2629
|
connection: "source"
|
|
2697
2630
|
}
|
|
@@ -2701,7 +2634,7 @@ var PositionGridNodeTemplateFactory = class {
|
|
|
2701
2634
|
|
|
2702
2635
|
// src/templates/modifiers/noise-normalize-template.ts
|
|
2703
2636
|
var import_utils = require("@awesome-flow/core/utils");
|
|
2704
|
-
var
|
|
2637
|
+
var import_system10 = require("@xyflow/system");
|
|
2705
2638
|
var NoiseNormalizeNodeTemplateFactory = class {
|
|
2706
2639
|
template = {
|
|
2707
2640
|
id: import_utils.IDGenerator.template(),
|
|
@@ -2714,13 +2647,13 @@ var NoiseNormalizeNodeTemplateFactory = class {
|
|
|
2714
2647
|
},
|
|
2715
2648
|
handles: [
|
|
2716
2649
|
{
|
|
2717
|
-
position:
|
|
2650
|
+
position: import_system10.Position.Left,
|
|
2718
2651
|
dataType: "module" /* module */,
|
|
2719
2652
|
connection: "target",
|
|
2720
2653
|
maxConnections: 1
|
|
2721
2654
|
},
|
|
2722
2655
|
{
|
|
2723
|
-
position:
|
|
2656
|
+
position: import_system10.Position.Right,
|
|
2724
2657
|
dataType: "module" /* module */,
|
|
2725
2658
|
connection: "source"
|
|
2726
2659
|
}
|
|
@@ -2729,7 +2662,7 @@ var NoiseNormalizeNodeTemplateFactory = class {
|
|
|
2729
2662
|
};
|
|
2730
2663
|
|
|
2731
2664
|
// src/templates/output/noise-logger-template.ts
|
|
2732
|
-
var
|
|
2665
|
+
var import_system11 = require("@xyflow/system");
|
|
2733
2666
|
var NoiseLoggerNodeTemplateFactory = class {
|
|
2734
2667
|
template = {
|
|
2735
2668
|
type: "noise-logger" /* noiseLogger */,
|
|
@@ -2739,7 +2672,7 @@ var NoiseLoggerNodeTemplateFactory = class {
|
|
|
2739
2672
|
},
|
|
2740
2673
|
handles: [
|
|
2741
2674
|
{
|
|
2742
|
-
position:
|
|
2675
|
+
position: import_system11.Position.Left,
|
|
2743
2676
|
dataType: "noise" /* noise */,
|
|
2744
2677
|
connection: "target"
|
|
2745
2678
|
}
|
|
@@ -2748,7 +2681,7 @@ var NoiseLoggerNodeTemplateFactory = class {
|
|
|
2748
2681
|
};
|
|
2749
2682
|
|
|
2750
2683
|
// src/templates/output/noise-raw-texture-template.ts
|
|
2751
|
-
var
|
|
2684
|
+
var import_system12 = require("@xyflow/system");
|
|
2752
2685
|
var NoiseRawTextureTemplateFactory = class {
|
|
2753
2686
|
template = {
|
|
2754
2687
|
type: "texture-data" /* textureData */,
|
|
@@ -2758,13 +2691,13 @@ var NoiseRawTextureTemplateFactory = class {
|
|
|
2758
2691
|
},
|
|
2759
2692
|
handles: [
|
|
2760
2693
|
{
|
|
2761
|
-
position:
|
|
2694
|
+
position: import_system12.Position.Left,
|
|
2762
2695
|
dataType: "noise" /* noise */,
|
|
2763
2696
|
connection: "target",
|
|
2764
2697
|
maxConnections: 1
|
|
2765
2698
|
},
|
|
2766
2699
|
{
|
|
2767
|
-
position:
|
|
2700
|
+
position: import_system12.Position.Right,
|
|
2768
2701
|
dataType: "texture" /* texture */,
|
|
2769
2702
|
connection: "source"
|
|
2770
2703
|
}
|
|
@@ -2773,7 +2706,7 @@ var NoiseRawTextureTemplateFactory = class {
|
|
|
2773
2706
|
};
|
|
2774
2707
|
|
|
2775
2708
|
// src/templates/output/position-logger-template.ts
|
|
2776
|
-
var
|
|
2709
|
+
var import_system13 = require("@xyflow/system");
|
|
2777
2710
|
var PositionLoggerNodeTemplateFactory = class {
|
|
2778
2711
|
template = {
|
|
2779
2712
|
type: "position-logger" /* positionLogger */,
|
|
@@ -2783,7 +2716,7 @@ var PositionLoggerNodeTemplateFactory = class {
|
|
|
2783
2716
|
},
|
|
2784
2717
|
handles: [
|
|
2785
2718
|
{
|
|
2786
|
-
position:
|
|
2719
|
+
position: import_system13.Position.Left,
|
|
2787
2720
|
dataType: "position" /* position */,
|
|
2788
2721
|
connection: "target"
|
|
2789
2722
|
}
|
|
@@ -2792,7 +2725,7 @@ var PositionLoggerNodeTemplateFactory = class {
|
|
|
2792
2725
|
};
|
|
2793
2726
|
|
|
2794
2727
|
// src/templates/modifiers/noise-combine-template.ts
|
|
2795
|
-
var
|
|
2728
|
+
var import_system14 = require("@xyflow/system");
|
|
2796
2729
|
var NoiseCombineNodeTemplateFactory = class {
|
|
2797
2730
|
template = {
|
|
2798
2731
|
type: "noise-combiner" /* noiseCombine */,
|
|
@@ -2803,13 +2736,13 @@ var NoiseCombineNodeTemplateFactory = class {
|
|
|
2803
2736
|
},
|
|
2804
2737
|
handles: [
|
|
2805
2738
|
{
|
|
2806
|
-
position:
|
|
2739
|
+
position: import_system14.Position.Left,
|
|
2807
2740
|
dataType: "module" /* module */,
|
|
2808
2741
|
connection: "target",
|
|
2809
2742
|
maxConnections: 2
|
|
2810
2743
|
},
|
|
2811
2744
|
{
|
|
2812
|
-
position:
|
|
2745
|
+
position: import_system14.Position.Right,
|
|
2813
2746
|
dataType: "module" /* module */,
|
|
2814
2747
|
connection: "source"
|
|
2815
2748
|
}
|
|
@@ -2818,7 +2751,7 @@ var NoiseCombineNodeTemplateFactory = class {
|
|
|
2818
2751
|
};
|
|
2819
2752
|
|
|
2820
2753
|
// src/templates/modifiers/noise-clamp-template.ts
|
|
2821
|
-
var
|
|
2754
|
+
var import_system15 = require("@xyflow/system");
|
|
2822
2755
|
var NoiseClampNodeTemplateFactory = class {
|
|
2823
2756
|
template = {
|
|
2824
2757
|
type: "noise-clamp" /* noiseClamp */,
|
|
@@ -2830,13 +2763,13 @@ var NoiseClampNodeTemplateFactory = class {
|
|
|
2830
2763
|
},
|
|
2831
2764
|
handles: [
|
|
2832
2765
|
{
|
|
2833
|
-
position:
|
|
2766
|
+
position: import_system15.Position.Left,
|
|
2834
2767
|
dataType: "module" /* module */,
|
|
2835
2768
|
connection: "target",
|
|
2836
2769
|
maxConnections: 1
|
|
2837
2770
|
},
|
|
2838
2771
|
{
|
|
2839
|
-
position:
|
|
2772
|
+
position: import_system15.Position.Right,
|
|
2840
2773
|
dataType: "module" /* module */,
|
|
2841
2774
|
connection: "source"
|
|
2842
2775
|
}
|
|
@@ -2845,7 +2778,7 @@ var NoiseClampNodeTemplateFactory = class {
|
|
|
2845
2778
|
};
|
|
2846
2779
|
|
|
2847
2780
|
// src/templates/modifiers/noise-abs-template.ts
|
|
2848
|
-
var
|
|
2781
|
+
var import_system16 = require("@xyflow/system");
|
|
2849
2782
|
var NoiseAbsNodeTemplateFactory = class {
|
|
2850
2783
|
template = {
|
|
2851
2784
|
type: "noise-abs" /* noiseAbs */,
|
|
@@ -2855,13 +2788,13 @@ var NoiseAbsNodeTemplateFactory = class {
|
|
|
2855
2788
|
},
|
|
2856
2789
|
handles: [
|
|
2857
2790
|
{
|
|
2858
|
-
position:
|
|
2791
|
+
position: import_system16.Position.Left,
|
|
2859
2792
|
dataType: "module" /* module */,
|
|
2860
2793
|
connection: "target",
|
|
2861
2794
|
maxConnections: 1
|
|
2862
2795
|
},
|
|
2863
2796
|
{
|
|
2864
|
-
position:
|
|
2797
|
+
position: import_system16.Position.Right,
|
|
2865
2798
|
dataType: "module" /* module */,
|
|
2866
2799
|
connection: "source"
|
|
2867
2800
|
}
|
|
@@ -2870,7 +2803,7 @@ var NoiseAbsNodeTemplateFactory = class {
|
|
|
2870
2803
|
};
|
|
2871
2804
|
|
|
2872
2805
|
// src/templates/output/noise-output-template.ts
|
|
2873
|
-
var
|
|
2806
|
+
var import_system17 = require("@xyflow/system");
|
|
2874
2807
|
var NoiseOutputNodeTemplateFactory = class {
|
|
2875
2808
|
template = {
|
|
2876
2809
|
type: "noise-output" /* noiseOutput */,
|
|
@@ -2880,18 +2813,18 @@ var NoiseOutputNodeTemplateFactory = class {
|
|
|
2880
2813
|
},
|
|
2881
2814
|
handles: [
|
|
2882
2815
|
{
|
|
2883
|
-
position:
|
|
2816
|
+
position: import_system17.Position.Left,
|
|
2884
2817
|
dataType: "position" /* position */,
|
|
2885
2818
|
connection: "target"
|
|
2886
2819
|
},
|
|
2887
2820
|
{
|
|
2888
|
-
position:
|
|
2821
|
+
position: import_system17.Position.Left,
|
|
2889
2822
|
dataType: "module" /* module */,
|
|
2890
2823
|
connection: "target",
|
|
2891
2824
|
maxConnections: 1
|
|
2892
2825
|
},
|
|
2893
2826
|
{
|
|
2894
|
-
position:
|
|
2827
|
+
position: import_system17.Position.Right,
|
|
2895
2828
|
dataType: "noise" /* noise */,
|
|
2896
2829
|
connection: "source"
|
|
2897
2830
|
}
|
|
@@ -2900,8 +2833,7 @@ var NoiseOutputNodeTemplateFactory = class {
|
|
|
2900
2833
|
};
|
|
2901
2834
|
|
|
2902
2835
|
// src/templates/modifiers/noise-curve-template.ts
|
|
2903
|
-
var
|
|
2904
|
-
var import_system19 = require("@xyflow/system");
|
|
2836
|
+
var import_system18 = require("@xyflow/system");
|
|
2905
2837
|
var NoiseCurveNodeTemplateFactory = class {
|
|
2906
2838
|
template = {
|
|
2907
2839
|
type: "noise-curve" /* noiseCurve */,
|
|
@@ -2912,18 +2844,18 @@ var NoiseCurveNodeTemplateFactory = class {
|
|
|
2912
2844
|
},
|
|
2913
2845
|
handles: [
|
|
2914
2846
|
{
|
|
2915
|
-
position:
|
|
2847
|
+
position: import_system18.Position.Left,
|
|
2916
2848
|
dataType: "module" /* module */,
|
|
2917
2849
|
connection: "target",
|
|
2918
2850
|
maxConnections: 1
|
|
2919
2851
|
},
|
|
2852
|
+
// {
|
|
2853
|
+
// position: Position.Left,
|
|
2854
|
+
// dataType: CoreHandleType.variableProperty,
|
|
2855
|
+
// connection: 'target',
|
|
2856
|
+
// },
|
|
2920
2857
|
{
|
|
2921
|
-
position:
|
|
2922
|
-
dataType: import_abstract20.CoreHandleType.variableProperty,
|
|
2923
|
-
connection: "target"
|
|
2924
|
-
},
|
|
2925
|
-
{
|
|
2926
|
-
position: import_system19.Position.Right,
|
|
2858
|
+
position: import_system18.Position.Right,
|
|
2927
2859
|
dataType: "module" /* module */,
|
|
2928
2860
|
connection: "source"
|
|
2929
2861
|
}
|
|
@@ -2932,7 +2864,7 @@ var NoiseCurveNodeTemplateFactory = class {
|
|
|
2932
2864
|
};
|
|
2933
2865
|
|
|
2934
2866
|
// src/templates/modifiers/noise-exponent-template.ts
|
|
2935
|
-
var
|
|
2867
|
+
var import_system19 = require("@xyflow/system");
|
|
2936
2868
|
var NoiseExponentNodeTemplateFactory = class {
|
|
2937
2869
|
template = {
|
|
2938
2870
|
type: "noise-exponent" /* noiseExponent */,
|
|
@@ -2943,13 +2875,13 @@ var NoiseExponentNodeTemplateFactory = class {
|
|
|
2943
2875
|
},
|
|
2944
2876
|
handles: [
|
|
2945
2877
|
{
|
|
2946
|
-
position:
|
|
2878
|
+
position: import_system19.Position.Left,
|
|
2947
2879
|
dataType: "module" /* module */,
|
|
2948
2880
|
connection: "target",
|
|
2949
2881
|
maxConnections: 1
|
|
2950
2882
|
},
|
|
2951
2883
|
{
|
|
2952
|
-
position:
|
|
2884
|
+
position: import_system19.Position.Right,
|
|
2953
2885
|
dataType: "module" /* module */,
|
|
2954
2886
|
connection: "source"
|
|
2955
2887
|
}
|
|
@@ -2958,7 +2890,7 @@ var NoiseExponentNodeTemplateFactory = class {
|
|
|
2958
2890
|
};
|
|
2959
2891
|
|
|
2960
2892
|
// src/templates/modifiers/noise-invert-template.ts
|
|
2961
|
-
var
|
|
2893
|
+
var import_system20 = require("@xyflow/system");
|
|
2962
2894
|
var NoiseInvertNodeTemplateFactory = class {
|
|
2963
2895
|
template = {
|
|
2964
2896
|
type: "noise-invert" /* noiseInvert */,
|
|
@@ -2968,13 +2900,13 @@ var NoiseInvertNodeTemplateFactory = class {
|
|
|
2968
2900
|
},
|
|
2969
2901
|
handles: [
|
|
2970
2902
|
{
|
|
2971
|
-
position:
|
|
2903
|
+
position: import_system20.Position.Left,
|
|
2972
2904
|
dataType: "module" /* module */,
|
|
2973
2905
|
connection: "target",
|
|
2974
2906
|
maxConnections: 1
|
|
2975
2907
|
},
|
|
2976
2908
|
{
|
|
2977
|
-
position:
|
|
2909
|
+
position: import_system20.Position.Right,
|
|
2978
2910
|
dataType: "module" /* module */,
|
|
2979
2911
|
connection: "source"
|
|
2980
2912
|
}
|
|
@@ -2983,7 +2915,7 @@ var NoiseInvertNodeTemplateFactory = class {
|
|
|
2983
2915
|
};
|
|
2984
2916
|
|
|
2985
2917
|
// src/templates/modifiers/noise-scalebias-template.ts
|
|
2986
|
-
var
|
|
2918
|
+
var import_system21 = require("@xyflow/system");
|
|
2987
2919
|
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
2988
2920
|
template = {
|
|
2989
2921
|
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
@@ -2995,13 +2927,13 @@ var NoiseScaleBiasNodeTemplateFactory = class {
|
|
|
2995
2927
|
},
|
|
2996
2928
|
handles: [
|
|
2997
2929
|
{
|
|
2998
|
-
position:
|
|
2930
|
+
position: import_system21.Position.Left,
|
|
2999
2931
|
dataType: "module" /* module */,
|
|
3000
2932
|
connection: "target",
|
|
3001
2933
|
maxConnections: 1
|
|
3002
2934
|
},
|
|
3003
2935
|
{
|
|
3004
|
-
position:
|
|
2936
|
+
position: import_system21.Position.Right,
|
|
3005
2937
|
dataType: "module" /* module */,
|
|
3006
2938
|
connection: "source"
|
|
3007
2939
|
}
|
|
@@ -3010,7 +2942,7 @@ var NoiseScaleBiasNodeTemplateFactory = class {
|
|
|
3010
2942
|
};
|
|
3011
2943
|
|
|
3012
2944
|
// src/templates/modifiers/noise-terrace-template.ts
|
|
3013
|
-
var
|
|
2945
|
+
var import_system22 = require("@xyflow/system");
|
|
3014
2946
|
var NoiseTerraceNodeTemplateFactory = class {
|
|
3015
2947
|
template = {
|
|
3016
2948
|
type: "noise-terrace" /* noiseTerrace */,
|
|
@@ -3021,13 +2953,13 @@ var NoiseTerraceNodeTemplateFactory = class {
|
|
|
3021
2953
|
},
|
|
3022
2954
|
handles: [
|
|
3023
2955
|
{
|
|
3024
|
-
position:
|
|
2956
|
+
position: import_system22.Position.Left,
|
|
3025
2957
|
dataType: "module" /* module */,
|
|
3026
2958
|
connection: "target",
|
|
3027
2959
|
maxConnections: 1
|
|
3028
2960
|
},
|
|
3029
2961
|
{
|
|
3030
|
-
position:
|
|
2962
|
+
position: import_system22.Position.Right,
|
|
3031
2963
|
dataType: "module" /* module */,
|
|
3032
2964
|
connection: "source"
|
|
3033
2965
|
}
|
|
@@ -3036,7 +2968,7 @@ var NoiseTerraceNodeTemplateFactory = class {
|
|
|
3036
2968
|
};
|
|
3037
2969
|
|
|
3038
2970
|
// src/templates/selectors/noise-blend-template.ts
|
|
3039
|
-
var
|
|
2971
|
+
var import_system23 = require("@xyflow/system");
|
|
3040
2972
|
var NoiseBlendNodeTemplateFactory = class {
|
|
3041
2973
|
template = {
|
|
3042
2974
|
type: "noise-blend" /* noiseBlend */,
|
|
@@ -3046,7 +2978,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3046
2978
|
},
|
|
3047
2979
|
handles: [
|
|
3048
2980
|
{
|
|
3049
|
-
position:
|
|
2981
|
+
position: import_system23.Position.Left,
|
|
3050
2982
|
dataType: "module" /* module */,
|
|
3051
2983
|
connection: "target",
|
|
3052
2984
|
label: "Source Modules",
|
|
@@ -3055,7 +2987,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3055
2987
|
minConnections: 2
|
|
3056
2988
|
},
|
|
3057
2989
|
{
|
|
3058
|
-
position:
|
|
2990
|
+
position: import_system23.Position.Left,
|
|
3059
2991
|
dataType: "module" /* module */,
|
|
3060
2992
|
dataId: "control" /* control */,
|
|
3061
2993
|
connection: "target",
|
|
@@ -3063,7 +2995,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3063
2995
|
maxConnections: 1
|
|
3064
2996
|
},
|
|
3065
2997
|
{
|
|
3066
|
-
position:
|
|
2998
|
+
position: import_system23.Position.Right,
|
|
3067
2999
|
dataType: "module" /* module */,
|
|
3068
3000
|
dataId: "output" /* output */,
|
|
3069
3001
|
connection: "source"
|
|
@@ -3073,7 +3005,7 @@ var NoiseBlendNodeTemplateFactory = class {
|
|
|
3073
3005
|
};
|
|
3074
3006
|
|
|
3075
3007
|
// src/templates/selectors/noise-select-template.ts
|
|
3076
|
-
var
|
|
3008
|
+
var import_system24 = require("@xyflow/system");
|
|
3077
3009
|
var NoiseSelectNodeTemplateFactory = class {
|
|
3078
3010
|
template = {
|
|
3079
3011
|
type: "noise-select" /* noiseSelect */,
|
|
@@ -3086,7 +3018,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3086
3018
|
},
|
|
3087
3019
|
handles: [
|
|
3088
3020
|
{
|
|
3089
|
-
position:
|
|
3021
|
+
position: import_system24.Position.Left,
|
|
3090
3022
|
dataType: "module" /* module */,
|
|
3091
3023
|
dataId: "source" /* source */,
|
|
3092
3024
|
connection: "target",
|
|
@@ -3095,7 +3027,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3095
3027
|
minConnections: 2
|
|
3096
3028
|
},
|
|
3097
3029
|
{
|
|
3098
|
-
position:
|
|
3030
|
+
position: import_system24.Position.Left,
|
|
3099
3031
|
dataType: "module" /* module */,
|
|
3100
3032
|
dataId: "control" /* control */,
|
|
3101
3033
|
connection: "target",
|
|
@@ -3103,7 +3035,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3103
3035
|
maxConnections: 1
|
|
3104
3036
|
},
|
|
3105
3037
|
{
|
|
3106
|
-
position:
|
|
3038
|
+
position: import_system24.Position.Right,
|
|
3107
3039
|
dataType: "module" /* module */,
|
|
3108
3040
|
dataId: "output" /* output */,
|
|
3109
3041
|
connection: "source"
|
|
@@ -3113,7 +3045,7 @@ var NoiseSelectNodeTemplateFactory = class {
|
|
|
3113
3045
|
};
|
|
3114
3046
|
|
|
3115
3047
|
// src/templates/transformers/noise-displace-template.ts
|
|
3116
|
-
var
|
|
3048
|
+
var import_system25 = require("@xyflow/system");
|
|
3117
3049
|
var NoiseDisplaceNodeTemplateFactory = class {
|
|
3118
3050
|
template = {
|
|
3119
3051
|
type: "noise-displace" /* noiseDisplace */,
|
|
@@ -3123,7 +3055,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3123
3055
|
},
|
|
3124
3056
|
handles: [
|
|
3125
3057
|
{
|
|
3126
|
-
position:
|
|
3058
|
+
position: import_system25.Position.Left,
|
|
3127
3059
|
connection: "target",
|
|
3128
3060
|
label: "Source Module",
|
|
3129
3061
|
dataType: "module" /* module */,
|
|
@@ -3131,7 +3063,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3131
3063
|
maxConnections: 1
|
|
3132
3064
|
},
|
|
3133
3065
|
{
|
|
3134
|
-
position:
|
|
3066
|
+
position: import_system25.Position.Left,
|
|
3135
3067
|
connection: "target",
|
|
3136
3068
|
label: "X Module",
|
|
3137
3069
|
dataType: "module" /* module */,
|
|
@@ -3139,7 +3071,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3139
3071
|
maxConnections: 1
|
|
3140
3072
|
},
|
|
3141
3073
|
{
|
|
3142
|
-
position:
|
|
3074
|
+
position: import_system25.Position.Left,
|
|
3143
3075
|
connection: "target",
|
|
3144
3076
|
label: "Y Module",
|
|
3145
3077
|
dataType: "module" /* module */,
|
|
@@ -3147,7 +3079,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3147
3079
|
maxConnections: 1
|
|
3148
3080
|
},
|
|
3149
3081
|
{
|
|
3150
|
-
position:
|
|
3082
|
+
position: import_system25.Position.Left,
|
|
3151
3083
|
connection: "target",
|
|
3152
3084
|
label: "Z Module",
|
|
3153
3085
|
dataType: "module" /* module */,
|
|
@@ -3155,7 +3087,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3155
3087
|
maxConnections: 1
|
|
3156
3088
|
},
|
|
3157
3089
|
{
|
|
3158
|
-
position:
|
|
3090
|
+
position: import_system25.Position.Right,
|
|
3159
3091
|
dataType: "module" /* module */,
|
|
3160
3092
|
dataId: "output" /* output */,
|
|
3161
3093
|
connection: "source"
|
|
@@ -3165,7 +3097,7 @@ var NoiseDisplaceNodeTemplateFactory = class {
|
|
|
3165
3097
|
};
|
|
3166
3098
|
|
|
3167
3099
|
// src/templates/transformers/noise-rotate-point-template.ts
|
|
3168
|
-
var
|
|
3100
|
+
var import_system26 = require("@xyflow/system");
|
|
3169
3101
|
var NoiseRotatePointNodeTemplateFactory = class {
|
|
3170
3102
|
template = {
|
|
3171
3103
|
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
@@ -3178,14 +3110,14 @@ var NoiseRotatePointNodeTemplateFactory = class {
|
|
|
3178
3110
|
},
|
|
3179
3111
|
handles: [
|
|
3180
3112
|
{
|
|
3181
|
-
position:
|
|
3113
|
+
position: import_system26.Position.Left,
|
|
3182
3114
|
dataType: "module" /* module */,
|
|
3183
3115
|
connection: "target",
|
|
3184
3116
|
label: "Source Module",
|
|
3185
3117
|
maxConnections: 1
|
|
3186
3118
|
},
|
|
3187
3119
|
{
|
|
3188
|
-
position:
|
|
3120
|
+
position: import_system26.Position.Right,
|
|
3189
3121
|
dataType: "module" /* module */,
|
|
3190
3122
|
connection: "source"
|
|
3191
3123
|
}
|
|
@@ -3194,7 +3126,7 @@ var NoiseRotatePointNodeTemplateFactory = class {
|
|
|
3194
3126
|
};
|
|
3195
3127
|
|
|
3196
3128
|
// src/templates/transformers/noise-scale-point-template.ts
|
|
3197
|
-
var
|
|
3129
|
+
var import_system27 = require("@xyflow/system");
|
|
3198
3130
|
var NoiseScalePointNodeTemplateFactory = class {
|
|
3199
3131
|
template = {
|
|
3200
3132
|
type: "noise-scale-point" /* noiseScalePoint */,
|
|
@@ -3207,14 +3139,14 @@ var NoiseScalePointNodeTemplateFactory = class {
|
|
|
3207
3139
|
},
|
|
3208
3140
|
handles: [
|
|
3209
3141
|
{
|
|
3210
|
-
position:
|
|
3142
|
+
position: import_system27.Position.Left,
|
|
3211
3143
|
dataType: "module" /* module */,
|
|
3212
3144
|
connection: "target",
|
|
3213
3145
|
label: "Source Module",
|
|
3214
3146
|
maxConnections: 1
|
|
3215
3147
|
},
|
|
3216
3148
|
{
|
|
3217
|
-
position:
|
|
3149
|
+
position: import_system27.Position.Right,
|
|
3218
3150
|
dataType: "module" /* module */,
|
|
3219
3151
|
connection: "source"
|
|
3220
3152
|
}
|
|
@@ -3223,7 +3155,7 @@ var NoiseScalePointNodeTemplateFactory = class {
|
|
|
3223
3155
|
};
|
|
3224
3156
|
|
|
3225
3157
|
// src/templates/transformers/noise-translate-point-template.ts
|
|
3226
|
-
var
|
|
3158
|
+
var import_system28 = require("@xyflow/system");
|
|
3227
3159
|
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
3228
3160
|
template = {
|
|
3229
3161
|
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
@@ -3236,14 +3168,14 @@ var NoiseTranslatePointNodeTemplateFactory = class {
|
|
|
3236
3168
|
},
|
|
3237
3169
|
handles: [
|
|
3238
3170
|
{
|
|
3239
|
-
position:
|
|
3171
|
+
position: import_system28.Position.Left,
|
|
3240
3172
|
dataType: "module" /* module */,
|
|
3241
3173
|
connection: "target",
|
|
3242
3174
|
label: "Source Module",
|
|
3243
3175
|
maxConnections: 1
|
|
3244
3176
|
},
|
|
3245
3177
|
{
|
|
3246
|
-
position:
|
|
3178
|
+
position: import_system28.Position.Right,
|
|
3247
3179
|
dataType: "module" /* module */,
|
|
3248
3180
|
connection: "source"
|
|
3249
3181
|
}
|
|
@@ -3252,8 +3184,8 @@ var NoiseTranslatePointNodeTemplateFactory = class {
|
|
|
3252
3184
|
};
|
|
3253
3185
|
|
|
3254
3186
|
// src/templates/transformers/noise-turbulence-template.ts
|
|
3255
|
-
var
|
|
3256
|
-
var
|
|
3187
|
+
var import_abstract30 = require("@awesome-flow/core/abstract");
|
|
3188
|
+
var import_system29 = require("@xyflow/system");
|
|
3257
3189
|
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
3258
3190
|
template = {
|
|
3259
3191
|
type: "noise-turbulence" /* noiseTurbulence */,
|
|
@@ -3267,20 +3199,20 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3267
3199
|
},
|
|
3268
3200
|
handles: [
|
|
3269
3201
|
{
|
|
3270
|
-
position:
|
|
3202
|
+
position: import_system29.Position.Left,
|
|
3271
3203
|
dataType: "module" /* module */,
|
|
3272
3204
|
connection: "target",
|
|
3273
3205
|
label: "Source Module",
|
|
3274
3206
|
maxConnections: 1
|
|
3275
3207
|
},
|
|
3276
3208
|
{
|
|
3277
|
-
position:
|
|
3278
|
-
dataType:
|
|
3209
|
+
position: import_system29.Position.Left,
|
|
3210
|
+
dataType: import_abstract30.CoreHandleType.variableProperty,
|
|
3279
3211
|
label: "Variable Properties",
|
|
3280
3212
|
connection: "target"
|
|
3281
3213
|
},
|
|
3282
3214
|
{
|
|
3283
|
-
position:
|
|
3215
|
+
position: import_system29.Position.Right,
|
|
3284
3216
|
dataType: "module" /* module */,
|
|
3285
3217
|
connection: "source"
|
|
3286
3218
|
}
|
|
@@ -3289,9 +3221,9 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3289
3221
|
};
|
|
3290
3222
|
|
|
3291
3223
|
// src/templates/generators/noise-billow-template.ts
|
|
3292
|
-
var
|
|
3224
|
+
var import_abstract32 = require("@awesome-flow/core/abstract");
|
|
3293
3225
|
var import_utils2 = require("@awesome-flow/core/utils");
|
|
3294
|
-
var
|
|
3226
|
+
var import_system30 = require("@xyflow/system");
|
|
3295
3227
|
var NoiseBillowNodeTemplateFactory = class {
|
|
3296
3228
|
template = {
|
|
3297
3229
|
id: import_utils2.IDGenerator.template(),
|
|
@@ -3307,12 +3239,12 @@ var NoiseBillowNodeTemplateFactory = class {
|
|
|
3307
3239
|
},
|
|
3308
3240
|
handles: [
|
|
3309
3241
|
{
|
|
3310
|
-
position:
|
|
3311
|
-
dataType:
|
|
3242
|
+
position: import_system30.Position.Left,
|
|
3243
|
+
dataType: import_abstract32.CoreHandleType.variableProperty,
|
|
3312
3244
|
connection: "target"
|
|
3313
3245
|
},
|
|
3314
3246
|
{
|
|
3315
|
-
position:
|
|
3247
|
+
position: import_system30.Position.Right,
|
|
3316
3248
|
dataType: "module" /* module */,
|
|
3317
3249
|
connection: "source"
|
|
3318
3250
|
}
|
|
@@ -3321,14 +3253,14 @@ var NoiseBillowNodeTemplateFactory = class {
|
|
|
3321
3253
|
};
|
|
3322
3254
|
|
|
3323
3255
|
// src/templates/groups/module-group-template.ts
|
|
3324
|
-
var
|
|
3256
|
+
var import_abstract33 = require("@awesome-flow/core/abstract");
|
|
3325
3257
|
var import_utils3 = require("@awesome-flow/core/utils");
|
|
3326
|
-
var
|
|
3258
|
+
var import_system31 = require("@xyflow/system");
|
|
3327
3259
|
var ModuleGroupNodeTemplateFactory = class {
|
|
3328
3260
|
template = {
|
|
3329
3261
|
id: import_utils3.IDGenerator.template(),
|
|
3330
3262
|
type: "group-module" /* groupModule */,
|
|
3331
|
-
group:
|
|
3263
|
+
group: import_abstract33.CoreTemplateGroup.groups,
|
|
3332
3264
|
data: {
|
|
3333
3265
|
title: "Modules Group",
|
|
3334
3266
|
isGroup: true,
|
|
@@ -3343,14 +3275,14 @@ var ModuleGroupNodeTemplateFactory = class {
|
|
|
3343
3275
|
},
|
|
3344
3276
|
handles: [
|
|
3345
3277
|
{
|
|
3346
|
-
position:
|
|
3278
|
+
position: import_system31.Position.Bottom,
|
|
3347
3279
|
dataType: "module" /* module */,
|
|
3348
3280
|
connection: "target",
|
|
3349
3281
|
maxConnections: 1,
|
|
3350
3282
|
hideOnCollapse: true
|
|
3351
3283
|
},
|
|
3352
3284
|
{
|
|
3353
|
-
position:
|
|
3285
|
+
position: import_system31.Position.Right,
|
|
3354
3286
|
dataType: "module" /* module */,
|
|
3355
3287
|
connection: "source"
|
|
3356
3288
|
}
|
|
@@ -3359,13 +3291,13 @@ var ModuleGroupNodeTemplateFactory = class {
|
|
|
3359
3291
|
};
|
|
3360
3292
|
|
|
3361
3293
|
// src/nodes/groups/module-group-node.tsx
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var
|
|
3294
|
+
var import_layout31 = require("@awesome-flow/core/layout");
|
|
3295
|
+
var import_react38 = require("@xyflow/react");
|
|
3296
|
+
var import_react39 = require("react");
|
|
3365
3297
|
var import_shallow = require("zustand/shallow");
|
|
3366
3298
|
var import_core18 = require("@mantine/core");
|
|
3367
|
-
var
|
|
3368
|
-
var
|
|
3299
|
+
var import_hooks33 = require("@awesome-flow/core/hooks");
|
|
3300
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3369
3301
|
function ModuleGroupNode({
|
|
3370
3302
|
id,
|
|
3371
3303
|
selected,
|
|
@@ -3374,22 +3306,22 @@ function ModuleGroupNode({
|
|
|
3374
3306
|
width,
|
|
3375
3307
|
height
|
|
3376
3308
|
}) {
|
|
3377
|
-
const updateNodeInternals = (0,
|
|
3378
|
-
const triggerNodeChanges = (0,
|
|
3379
|
-
const { groupNodes, setGroupCollapsed } = (0,
|
|
3380
|
-
(0,
|
|
3309
|
+
const updateNodeInternals = (0, import_react38.useUpdateNodeInternals)();
|
|
3310
|
+
const triggerNodeChanges = (0, import_react38.useStore)((s) => s.triggerNodeChanges);
|
|
3311
|
+
const { groupNodes, setGroupCollapsed } = (0, import_hooks33.useFlowStore)(
|
|
3312
|
+
(0, import_react39.useCallback)(
|
|
3381
3313
|
(state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
|
|
3382
3314
|
[]
|
|
3383
3315
|
)
|
|
3384
3316
|
);
|
|
3385
|
-
const intersectingNode = (0,
|
|
3386
|
-
(0,
|
|
3317
|
+
const intersectingNode = (0, import_hooks33.useInteractiveStore)(
|
|
3318
|
+
(0, import_react39.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
|
|
3387
3319
|
import_shallow.shallow
|
|
3388
3320
|
);
|
|
3389
|
-
(0,
|
|
3321
|
+
(0, import_react39.useEffect)(() => {
|
|
3390
3322
|
updateNodeInternals(id);
|
|
3391
3323
|
}, [width, height]);
|
|
3392
|
-
(0,
|
|
3324
|
+
(0, import_react39.useEffect)(() => {
|
|
3393
3325
|
triggerNodeChanges([
|
|
3394
3326
|
{
|
|
3395
3327
|
id,
|
|
@@ -3398,37 +3330,37 @@ function ModuleGroupNode({
|
|
|
3398
3330
|
}
|
|
3399
3331
|
]);
|
|
3400
3332
|
}, [intersectingNode]);
|
|
3401
|
-
const onCollapsed = (0,
|
|
3333
|
+
const onCollapsed = (0, import_react39.useCallback)((collapsed) => {
|
|
3402
3334
|
setGroupCollapsed(id, collapsed);
|
|
3403
3335
|
}, []);
|
|
3404
|
-
const size = (0,
|
|
3336
|
+
const size = (0, import_react39.useMemo)(() => {
|
|
3405
3337
|
return {
|
|
3406
3338
|
width: data.initialSize?.width || 100,
|
|
3407
3339
|
height: data.initialSize?.height || 50
|
|
3408
3340
|
};
|
|
3409
3341
|
}, [data.initialSize]);
|
|
3410
|
-
const incomingModules = (0,
|
|
3411
|
-
const updateComputedData = (0,
|
|
3412
|
-
(0,
|
|
3342
|
+
const incomingModules = (0, import_hooks33.useIncomingComputedData)(id);
|
|
3343
|
+
const updateComputedData = (0, import_hooks33.useUpdateNodeComputedData)();
|
|
3344
|
+
(0, import_react39.useEffect)(() => {
|
|
3413
3345
|
if (incomingModules?.length) {
|
|
3414
3346
|
const { module: module2 } = incomingModules[0];
|
|
3415
3347
|
updateComputedData(id, { module: module2 });
|
|
3416
3348
|
}
|
|
3417
3349
|
}, [incomingModules]);
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
-
|
|
3350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3351
|
+
import_layout31.NodeContainer,
|
|
3420
3352
|
{
|
|
3421
3353
|
id,
|
|
3422
3354
|
selected,
|
|
3423
3355
|
data,
|
|
3424
|
-
title: /* @__PURE__ */ (0,
|
|
3425
|
-
/* @__PURE__ */ (0,
|
|
3426
|
-
/* @__PURE__ */ (0,
|
|
3356
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core18.Group, { justify: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core18.Group, { gap: "xs", children: [
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core18.Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
|
|
3358
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_layout31.NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
|
|
3427
3359
|
] }) }),
|
|
3428
3360
|
type,
|
|
3429
3361
|
children: [
|
|
3430
|
-
/* @__PURE__ */ (0,
|
|
3431
|
-
|
|
3362
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3363
|
+
import_react38.NodeResizer,
|
|
3432
3364
|
{
|
|
3433
3365
|
nodeId: id,
|
|
3434
3366
|
minWidth: size.width,
|
|
@@ -3436,7 +3368,7 @@ function ModuleGroupNode({
|
|
|
3436
3368
|
isVisible: selected && !data.isCollapsed
|
|
3437
3369
|
}
|
|
3438
3370
|
),
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_layout31.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
3440
3372
|
]
|
|
3441
3373
|
}
|
|
3442
3374
|
);
|
|
@@ -3453,7 +3385,6 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
|
|
|
3453
3385
|
NoiseNodeType2["noiseLogger"] = "noise-logger";
|
|
3454
3386
|
NoiseNodeType2["noiseOutput"] = "noise-output";
|
|
3455
3387
|
NoiseNodeType2["noiseConst"] = "noise-constant";
|
|
3456
|
-
NoiseNodeType2["noiseSimplex"] = "noise-simplex";
|
|
3457
3388
|
NoiseNodeType2["noiseBillow"] = "noise-billow";
|
|
3458
3389
|
NoiseNodeType2["noiseCheckerboard"] = "noise-checkerboard";
|
|
3459
3390
|
NoiseNodeType2["noiseNormalize"] = "noise-normalize";
|
|
@@ -3489,7 +3420,6 @@ var noiseNodeTypes = {
|
|
|
3489
3420
|
["position-logger" /* positionLogger */]: positions_logger_node_default,
|
|
3490
3421
|
["noise-constant" /* noiseConst */]: noise_const_node_default,
|
|
3491
3422
|
["noise-billow" /* noiseBillow */]: noise_billow_node_default,
|
|
3492
|
-
["noise-simplex" /* noiseSimplex */]: noise_simplex_node_default,
|
|
3493
3423
|
["noise-checkerboard" /* noiseCheckerboard */]: noise_checkerboard_node_default,
|
|
3494
3424
|
["noise-cylinders" /* noiseCylinders */]: noise_cylinders_node_default,
|
|
3495
3425
|
["noise-perlin" /* noisePerlin */]: noise_perlin_node_default,
|
|
@@ -3515,7 +3445,6 @@ var noiseNodeTypes = {
|
|
|
3515
3445
|
};
|
|
3516
3446
|
var noiseNodeTemplates = {
|
|
3517
3447
|
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
3518
|
-
["noise-simplex" /* noiseSimplex */]: new NoiseSimplexNodeTemplateFactory(),
|
|
3519
3448
|
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
3520
3449
|
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
3521
3450
|
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|