@awesome-flow/noise 0.1.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.
Files changed (109) hide show
  1. package/dist/abstract/index.cjs +4234 -0
  2. package/dist/abstract/index.cjs.map +1 -0
  3. package/dist/abstract/index.d.cts +137 -0
  4. package/dist/abstract/index.d.ts +137 -0
  5. package/dist/abstract/index.js +4271 -0
  6. package/dist/abstract/index.js.map +1 -0
  7. package/dist/handle-types-D-v5S53h.d.cts +22 -0
  8. package/dist/handle-types-D-v5S53h.d.ts +22 -0
  9. package/dist/layout/index.cjs +164 -0
  10. package/dist/layout/index.cjs.map +1 -0
  11. package/dist/layout/index.d.cts +26 -0
  12. package/dist/layout/index.d.ts +26 -0
  13. package/dist/layout/index.js +136 -0
  14. package/dist/layout/index.js.map +1 -0
  15. package/dist/modules/index.cjs +71 -0
  16. package/dist/modules/index.cjs.map +1 -0
  17. package/dist/modules/index.d.cts +18 -0
  18. package/dist/modules/index.d.ts +18 -0
  19. package/dist/modules/index.js +34 -0
  20. package/dist/modules/index.js.map +1 -0
  21. package/dist/node-props-CeZ8Oshz.d.ts +161 -0
  22. package/dist/node-props-hKW-_KOU.d.cts +161 -0
  23. package/dist/nodes/generators/index.cjs +640 -0
  24. package/dist/nodes/generators/index.cjs.map +1 -0
  25. package/dist/nodes/generators/index.d.cts +38 -0
  26. package/dist/nodes/generators/index.d.ts +38 -0
  27. package/dist/nodes/generators/index.js +592 -0
  28. package/dist/nodes/generators/index.js.map +1 -0
  29. package/dist/nodes/groups/index.cjs +104 -0
  30. package/dist/nodes/groups/index.cjs.map +1 -0
  31. package/dist/nodes/groups/index.d.cts +7 -0
  32. package/dist/nodes/groups/index.d.ts +7 -0
  33. package/dist/nodes/groups/index.js +78 -0
  34. package/dist/nodes/groups/index.js.map +1 -0
  35. package/dist/nodes/index.cjs +2830 -0
  36. package/dist/nodes/index.cjs.map +1 -0
  37. package/dist/nodes/index.d.cts +16 -0
  38. package/dist/nodes/index.d.ts +16 -0
  39. package/dist/nodes/index.js +2840 -0
  40. package/dist/nodes/index.js.map +1 -0
  41. package/dist/nodes/modifiers/index.cjs +1593 -0
  42. package/dist/nodes/modifiers/index.cjs.map +1 -0
  43. package/dist/nodes/modifiers/index.d.cts +32 -0
  44. package/dist/nodes/modifiers/index.d.ts +32 -0
  45. package/dist/nodes/modifiers/index.js +1612 -0
  46. package/dist/nodes/modifiers/index.js.map +1 -0
  47. package/dist/nodes/output/index.cjs +210 -0
  48. package/dist/nodes/output/index.cjs.map +1 -0
  49. package/dist/nodes/output/index.d.cts +13 -0
  50. package/dist/nodes/output/index.d.ts +13 -0
  51. package/dist/nodes/output/index.js +181 -0
  52. package/dist/nodes/output/index.js.map +1 -0
  53. package/dist/nodes/selectors/index.cjs +136 -0
  54. package/dist/nodes/selectors/index.cjs.map +1 -0
  55. package/dist/nodes/selectors/index.d.cts +16 -0
  56. package/dist/nodes/selectors/index.d.ts +16 -0
  57. package/dist/nodes/selectors/index.js +113 -0
  58. package/dist/nodes/selectors/index.js.map +1 -0
  59. package/dist/nodes/transformers/index.cjs +477 -0
  60. package/dist/nodes/transformers/index.cjs.map +1 -0
  61. package/dist/nodes/transformers/index.d.cts +22 -0
  62. package/dist/nodes/transformers/index.d.ts +22 -0
  63. package/dist/nodes/transformers/index.js +459 -0
  64. package/dist/nodes/transformers/index.js.map +1 -0
  65. package/dist/properties-BxwtU6i9.d.cts +9 -0
  66. package/dist/properties-BxwtU6i9.d.ts +9 -0
  67. package/dist/templates/generators/index.cjs +1714 -0
  68. package/dist/templates/generators/index.cjs.map +1 -0
  69. package/dist/templates/generators/index.d.cts +89 -0
  70. package/dist/templates/generators/index.d.ts +89 -0
  71. package/dist/templates/generators/index.js +1723 -0
  72. package/dist/templates/generators/index.js.map +1 -0
  73. package/dist/templates/groups/index.cjs +1690 -0
  74. package/dist/templates/groups/index.cjs.map +1 -0
  75. package/dist/templates/groups/index.d.cts +11 -0
  76. package/dist/templates/groups/index.d.ts +11 -0
  77. package/dist/templates/groups/index.js +1711 -0
  78. package/dist/templates/groups/index.js.map +1 -0
  79. package/dist/templates/index.cjs +1758 -0
  80. package/dist/templates/index.cjs.map +1 -0
  81. package/dist/templates/index.d.cts +15 -0
  82. package/dist/templates/index.d.ts +15 -0
  83. package/dist/templates/index.js +1745 -0
  84. package/dist/templates/index.js.map +1 -0
  85. package/dist/templates/modifiers/index.cjs +1708 -0
  86. package/dist/templates/modifiers/index.cjs.map +1 -0
  87. package/dist/templates/modifiers/index.d.cts +71 -0
  88. package/dist/templates/modifiers/index.d.ts +71 -0
  89. package/dist/templates/modifiers/index.js +1720 -0
  90. package/dist/templates/modifiers/index.js.map +1 -0
  91. package/dist/templates/output/index.cjs +1696 -0
  92. package/dist/templates/output/index.cjs.map +1 -0
  93. package/dist/templates/output/index.d.cts +29 -0
  94. package/dist/templates/output/index.d.ts +29 -0
  95. package/dist/templates/output/index.js +1714 -0
  96. package/dist/templates/output/index.js.map +1 -0
  97. package/dist/templates/selectors/index.cjs +1692 -0
  98. package/dist/templates/selectors/index.cjs.map +1 -0
  99. package/dist/templates/selectors/index.d.cts +22 -0
  100. package/dist/templates/selectors/index.d.ts +22 -0
  101. package/dist/templates/selectors/index.js +1712 -0
  102. package/dist/templates/selectors/index.js.map +1 -0
  103. package/dist/templates/transformers/index.cjs +1698 -0
  104. package/dist/templates/transformers/index.cjs.map +1 -0
  105. package/dist/templates/transformers/index.d.cts +40 -0
  106. package/dist/templates/transformers/index.d.ts +40 -0
  107. package/dist/templates/transformers/index.js +1715 -0
  108. package/dist/templates/transformers/index.js.map +1 -0
  109. package/package.json +111 -0
@@ -0,0 +1,477 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/nodes/transformers/index.ts
20
+ var transformers_exports = {};
21
+ __export(transformers_exports, {
22
+ NoiseDisplaceNode: () => noise_displace_node_default,
23
+ NoiseRotatePointNode: () => noise_rotate_point_node_default,
24
+ NoiseScalePointNode: () => noise_scale_point_node_default,
25
+ NoiseTranslatePointNode: () => noise_translate_point_node_default,
26
+ NoiseTurbulenceNode: () => noise_turbulence_node_default
27
+ });
28
+ module.exports = __toCommonJS(transformers_exports);
29
+
30
+ // src/nodes/transformers/noise-displace-node.tsx
31
+ var import_layout = require("@awesome-flow/core/layout");
32
+ var import_react = require("react");
33
+ var import_hooks = require("@awesome-flow/core/hooks");
34
+ var import_transformer = require("libnoise-ts/module/transformer");
35
+ var import_core = require("@mantine/core");
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ function NoiseDisplaceNode({ id, selected, data, type }) {
38
+ const updateComputedData = (0, import_hooks.useUpdateNodeComputedData)();
39
+ const incomingHandleData = (0, import_hooks.useIncomingHandleData)(id, data.handles);
40
+ const { sourceModule, xModule, yModule, zModule } = (0, import_react.useMemo)(() => {
41
+ return {
42
+ sourceModule: incomingHandleData["source" /* sourceModule */],
43
+ xModule: incomingHandleData["x-module" /* xModule */],
44
+ yModule: incomingHandleData["y-module" /* yModule */],
45
+ zModule: incomingHandleData["z-module" /* zModule */]
46
+ };
47
+ }, [incomingHandleData]);
48
+ (0, import_react.useEffect)(() => {
49
+ if (sourceModule && xModule && yModule && zModule) {
50
+ const module2 = new import_transformer.Displace(
51
+ sourceModule[0].module,
52
+ xModule[0].module,
53
+ yModule[0].module,
54
+ zModule[0].module
55
+ );
56
+ updateComputedData(id, { module: module2 });
57
+ }
58
+ }, [id, updateComputedData, sourceModule, xModule, yModule, zModule]);
59
+ const { sourceColor, xColor, yColor, zColor } = (0, import_react.useMemo)(() => {
60
+ return {
61
+ sourceColor: sourceModule ? "green" : "orange",
62
+ xColor: xModule ? "green" : "orange",
63
+ yColor: yModule ? "green" : "orange",
64
+ zColor: zModule ? "green" : "orange"
65
+ };
66
+ }, [sourceModule, xModule, yModule, zModule]);
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_layout.NodeContainer, { id, selected, data, type, children: [
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Stack, { align: "center", children: [
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Badge, { color: sourceColor, children: "Source Module" }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Badge, { color: xColor, children: "X Module" }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Badge, { color: yColor, children: "Y Module" }),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Badge, { color: zColor, children: "Z Module" })
73
+ ] }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
75
+ ] });
76
+ }
77
+ var noise_displace_node_default = NoiseDisplaceNode;
78
+
79
+ // src/nodes/transformers/noise-rotate-point-node.tsx
80
+ var import_layout2 = require("@awesome-flow/core/layout");
81
+ var import_react2 = require("react");
82
+ var import_hooks2 = require("@awesome-flow/core/hooks");
83
+ var import_core2 = require("@mantine/core");
84
+ var import_transformer2 = require("libnoise-ts/module/transformer");
85
+ var import_jsx_runtime2 = require("react/jsx-runtime");
86
+ function NoiseRotatePointNode({
87
+ id,
88
+ selected,
89
+ data,
90
+ type
91
+ }) {
92
+ const [xAngle, setXAngle] = (0, import_react2.useState)(data.xAngle);
93
+ const [yAngle, setYAngle] = (0, import_react2.useState)(data.yAngle);
94
+ const [zAngle, setZAngle] = (0, import_react2.useState)(data.zAngle);
95
+ const incoming = (0, import_hooks2.useIncomingComputedData)(id);
96
+ const updateNodeData = (0, import_hooks2.useUpdateNodeData)();
97
+ const updateComputedData = (0, import_hooks2.useUpdateNodeComputedData)();
98
+ (0, import_react2.useEffect)(() => {
99
+ if (incoming?.length) {
100
+ const module2 = new import_transformer2.RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
101
+ updateComputedData(id, { module: module2 });
102
+ }
103
+ updateNodeData(id, { xAngle, yAngle, zAngle });
104
+ }, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
105
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_layout2.NodeContainer, { id, selected, data, type, children: [
106
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Stack, { children: [
107
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
108
+ "X Angle:",
109
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
110
+ import_core2.NumberInput,
111
+ {
112
+ size: "xs",
113
+ w: 100,
114
+ value: xAngle,
115
+ onChange: (e) => setXAngle(Number(e)),
116
+ step: 0.01
117
+ }
118
+ )
119
+ ] }),
120
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
121
+ "Y Angle:",
122
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
123
+ import_core2.NumberInput,
124
+ {
125
+ size: "xs",
126
+ w: 100,
127
+ value: yAngle,
128
+ onChange: (e) => setYAngle(Number(e)),
129
+ step: 0.01
130
+ }
131
+ )
132
+ ] }),
133
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
134
+ "Z Angle:",
135
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
136
+ import_core2.NumberInput,
137
+ {
138
+ size: "xs",
139
+ w: 100,
140
+ value: zAngle,
141
+ onChange: (e) => setZAngle(Number(e)),
142
+ step: 0.01
143
+ }
144
+ )
145
+ ] })
146
+ ] }),
147
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_layout2.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
148
+ ] });
149
+ }
150
+ var noise_rotate_point_node_default = NoiseRotatePointNode;
151
+
152
+ // src/nodes/transformers/noise-scale-point-node.tsx
153
+ var import_layout3 = require("@awesome-flow/core/layout");
154
+ var import_react3 = require("react");
155
+ var import_hooks3 = require("@awesome-flow/core/hooks");
156
+ var import_core3 = require("@mantine/core");
157
+ var import_transformer3 = require("libnoise-ts/module/transformer");
158
+ var import_jsx_runtime3 = require("react/jsx-runtime");
159
+ function NoiseScalePointNode({
160
+ id,
161
+ selected,
162
+ data,
163
+ type
164
+ }) {
165
+ const [xScale, setXScale] = (0, import_react3.useState)(data.xScale);
166
+ const [yScale, setYScale] = (0, import_react3.useState)(data.yScale);
167
+ const [zScale, setZScale] = (0, import_react3.useState)(data.zScale);
168
+ const incoming = (0, import_hooks3.useIncomingComputedData)(id);
169
+ const updateNodeData = (0, import_hooks3.useUpdateNodeData)();
170
+ const updateComputedData = (0, import_hooks3.useUpdateNodeComputedData)();
171
+ (0, import_react3.useEffect)(() => {
172
+ if (incoming?.length) {
173
+ const module2 = new import_transformer3.ScalePoint(incoming[0].module, xScale, yScale, zScale);
174
+ updateComputedData(id, { module: module2 });
175
+ }
176
+ updateNodeData(id, { xScale, yScale, zScale });
177
+ }, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
178
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_layout3.NodeContainer, { id, selected, data, type, children: [
179
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Stack, { children: [
180
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Group, { children: [
181
+ "X Scale:",
182
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
183
+ import_core3.NumberInput,
184
+ {
185
+ size: "xs",
186
+ w: 100,
187
+ value: xScale,
188
+ onChange: (e) => setXScale(Number(e)),
189
+ step: 0.01
190
+ }
191
+ )
192
+ ] }),
193
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Group, { children: [
194
+ "Y Scale:",
195
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
196
+ import_core3.NumberInput,
197
+ {
198
+ size: "xs",
199
+ w: 100,
200
+ value: yScale,
201
+ onChange: (e) => setYScale(Number(e)),
202
+ step: 0.01
203
+ }
204
+ )
205
+ ] }),
206
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Group, { children: [
207
+ "Z Scale:",
208
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
209
+ import_core3.NumberInput,
210
+ {
211
+ size: "xs",
212
+ w: 100,
213
+ value: zScale,
214
+ onChange: (e) => setZScale(Number(e)),
215
+ step: 0.01
216
+ }
217
+ )
218
+ ] })
219
+ ] }),
220
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_layout3.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
221
+ ] });
222
+ }
223
+ var noise_scale_point_node_default = NoiseScalePointNode;
224
+
225
+ // src/nodes/transformers/noise-translate-point-node.tsx
226
+ var import_layout4 = require("@awesome-flow/core/layout");
227
+ var import_react4 = require("react");
228
+ var import_hooks4 = require("@awesome-flow/core/hooks");
229
+ var import_core4 = require("@mantine/core");
230
+ var import_transformer4 = require("libnoise-ts/module/transformer");
231
+ var import_jsx_runtime4 = require("react/jsx-runtime");
232
+ function NoiseTranslatePointNode({
233
+ id,
234
+ selected,
235
+ data,
236
+ type
237
+ }) {
238
+ const [translateX, setTranslateX] = (0, import_react4.useState)(data.translateX);
239
+ const [translateY, setTranslateY] = (0, import_react4.useState)(data.translateY);
240
+ const [translateZ, setTranslateZ] = (0, import_react4.useState)(data.translateZ);
241
+ const incoming = (0, import_hooks4.useIncomingComputedData)(id);
242
+ const updateNodeData = (0, import_hooks4.useUpdateNodeData)();
243
+ const updateComputedData = (0, import_hooks4.useUpdateNodeComputedData)();
244
+ (0, import_react4.useEffect)(() => {
245
+ if (incoming?.length) {
246
+ const module2 = new import_transformer4.TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
247
+ updateComputedData(id, { module: module2 });
248
+ }
249
+ updateNodeData(id, { translateX, translateY, translateZ });
250
+ }, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
251
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_layout4.NodeContainer, { id, selected, data, type, children: [
252
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Stack, { children: [
253
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { children: [
254
+ "Translate X:",
255
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
256
+ import_core4.NumberInput,
257
+ {
258
+ size: "xs",
259
+ w: 100,
260
+ value: translateX,
261
+ onChange: (e) => setTranslateX(Number(e)),
262
+ step: 1
263
+ }
264
+ )
265
+ ] }),
266
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { children: [
267
+ "Translate Y:",
268
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
269
+ import_core4.NumberInput,
270
+ {
271
+ size: "xs",
272
+ w: 100,
273
+ value: translateY,
274
+ onChange: (e) => setTranslateY(Number(e)),
275
+ step: 1
276
+ }
277
+ )
278
+ ] }),
279
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { children: [
280
+ "Translate Z:",
281
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
282
+ import_core4.NumberInput,
283
+ {
284
+ size: "xs",
285
+ w: 100,
286
+ value: translateZ,
287
+ onChange: (e) => setTranslateZ(Number(e)),
288
+ step: 1
289
+ }
290
+ )
291
+ ] })
292
+ ] }),
293
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_layout4.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
294
+ ] });
295
+ }
296
+ var noise_translate_point_node_default = NoiseTranslatePointNode;
297
+
298
+ // src/nodes/transformers/noise-turbulence-node .tsx
299
+ var import_layout5 = require("@awesome-flow/core/layout");
300
+ var import_react6 = require("react");
301
+ var import_hooks6 = require("@awesome-flow/core/hooks");
302
+ var import_transformer5 = require("libnoise-ts/module/transformer");
303
+
304
+ // src/layout/node-property-variables.tsx
305
+ var import_hooks5 = require("@awesome-flow/core/hooks");
306
+ var import_react5 = require("react");
307
+ var import_core6 = require("@mantine/core");
308
+ var import_utils = require("@awesome-flow/core/utils");
309
+ var import_abstract = require("@awesome-flow/core/abstract");
310
+
311
+ // src/layout/node-value-input.tsx
312
+ var import_core5 = require("@mantine/core");
313
+ var import_jsx_runtime5 = require("react/jsx-runtime");
314
+ function NodeValueInput({ value, disabled, step, onChange }) {
315
+ if (value === void 0 || value === null) {
316
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, {});
317
+ }
318
+ switch (typeof value) {
319
+ case "boolean": {
320
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
321
+ import_core5.Switch,
322
+ {
323
+ checked: value,
324
+ disabled,
325
+ onChange: (e) => onChange(e.currentTarget.checked)
326
+ }
327
+ );
328
+ }
329
+ case "number": {
330
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.NumberInput, { value, disabled, step, onChange: (e) => onChange(e) });
331
+ }
332
+ case "string": {
333
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
334
+ import_core5.Input,
335
+ {
336
+ value,
337
+ disabled,
338
+ onChange: (e) => onChange(e.currentTarget.value)
339
+ }
340
+ );
341
+ }
342
+ default:
343
+ throw new Error(`Unknown input node for value of type: ${typeof value} (${value})`);
344
+ }
345
+ }
346
+ var node_value_input_default = NodeValueInput;
347
+
348
+ // src/layout/node-property-input.tsx
349
+ var import_jsx_runtime6 = require("react/jsx-runtime");
350
+ function NodePropertyInput({ property, onChange }) {
351
+ if (!property) {
352
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {});
353
+ }
354
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
355
+ node_value_input_default,
356
+ {
357
+ value: property.value,
358
+ disabled: property.disabled,
359
+ step: property.step,
360
+ onChange: (value) => onChange(property.name, value)
361
+ }
362
+ );
363
+ }
364
+ var node_property_input_default = NodePropertyInput;
365
+
366
+ // src/layout/node-property-variables.tsx
367
+ var import_jsx_runtime7 = require("react/jsx-runtime");
368
+ function NodePropertyVariables({
369
+ data,
370
+ nodeId,
371
+ onPropertiesChange,
372
+ except = import_abstract.nodeDataPropertyExcept
373
+ }) {
374
+ const [properties, setProperties] = (0, import_react5.useState)(() => {
375
+ const keys = (0, import_utils.getObjectKeys)(data, except);
376
+ const dataProps = {};
377
+ for (const key of keys) {
378
+ dataProps[key] = {
379
+ name: key,
380
+ value: data[key]
381
+ };
382
+ }
383
+ return dataProps;
384
+ });
385
+ const updateNodeData = (0, import_hooks5.useUpdateNodeData)();
386
+ const incoming = (0, import_hooks5.useIncomingNodeData)(nodeId);
387
+ const resetAllDisabled = (0, import_react5.useCallback)(() => {
388
+ const keys = Object.keys(properties);
389
+ keys.forEach((k) => {
390
+ properties[k].disabled = false;
391
+ });
392
+ setProperties(properties);
393
+ }, []);
394
+ const updatePropertyValue = (0, import_react5.useCallback)((name, value, disabled) => {
395
+ let property = properties[name];
396
+ if (property) {
397
+ property.value = value;
398
+ } else {
399
+ property = {
400
+ name,
401
+ value
402
+ };
403
+ }
404
+ property.disabled = disabled;
405
+ setProperties({ ...properties, [name]: property });
406
+ updateNodeData(nodeId, { [name]: value });
407
+ }, []);
408
+ (0, import_react5.useEffect)(() => {
409
+ resetAllDisabled();
410
+ if (incoming?.length) {
411
+ for (const connection of incoming) {
412
+ if (connection.property && properties[connection.property.name] !== void 0) {
413
+ updatePropertyValue(connection.property.name, connection.property.value, true);
414
+ }
415
+ }
416
+ }
417
+ }, [incoming]);
418
+ (0, import_react5.useEffect)(() => {
419
+ if (onPropertiesChange) {
420
+ onPropertiesChange(properties);
421
+ }
422
+ }, [onPropertiesChange, properties]);
423
+ const nodes = (0, import_react5.useMemo)(() => {
424
+ return Object.keys(properties).map((key) => {
425
+ const property = properties[key];
426
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Group, { children: [
427
+ property.name,
428
+ ":",
429
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(node_property_input_default, { property, onChange: updatePropertyValue })
430
+ ] }, key);
431
+ });
432
+ }, [properties, updatePropertyValue]);
433
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Stack, { children: nodes });
434
+ }
435
+ var node_property_variables_default = NodePropertyVariables;
436
+
437
+ // src/nodes/transformers/noise-turbulence-node .tsx
438
+ var import_jsx_runtime8 = require("react/jsx-runtime");
439
+ function NoiseTurbulenceNode({
440
+ id,
441
+ selected,
442
+ data,
443
+ type
444
+ }) {
445
+ const [properties, setProperties] = (0, import_react6.useState)(null);
446
+ const incoming = (0, import_hooks6.useIncomingComputedData)(id);
447
+ const updateComputedData = (0, import_hooks6.useUpdateNodeComputedData)();
448
+ const onPropertiesChange = (0, import_react6.useCallback)((props) => {
449
+ setProperties(props);
450
+ }, []);
451
+ (0, import_react6.useEffect)(() => {
452
+ if (incoming?.length) {
453
+ const module2 = new import_transformer5.Turbulence(
454
+ incoming[0].module,
455
+ properties.frequency.value,
456
+ properties.power.value,
457
+ properties.roughness.value,
458
+ properties.seed.value
459
+ );
460
+ updateComputedData(id, { module: module2 });
461
+ }
462
+ }, [id, incoming, properties, updateComputedData]);
463
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_layout5.NodeContainer, { id, selected, data, type, children: [
464
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
465
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_layout5.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
466
+ ] });
467
+ }
468
+ var noise_turbulence_node_default = NoiseTurbulenceNode;
469
+ // Annotate the CommonJS export names for ESM import in node:
470
+ 0 && (module.exports = {
471
+ NoiseDisplaceNode,
472
+ NoiseRotatePointNode,
473
+ NoiseScalePointNode,
474
+ NoiseTranslatePointNode,
475
+ NoiseTurbulenceNode
476
+ });
477
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/nodes/transformers/index.ts","../../../src/nodes/transformers/noise-displace-node.tsx","../../../src/nodes/transformers/noise-rotate-point-node.tsx","../../../src/nodes/transformers/noise-scale-point-node.tsx","../../../src/nodes/transformers/noise-translate-point-node.tsx","../../../src/nodes/transformers/noise-turbulence-node .tsx","../../../src/layout/node-property-variables.tsx","../../../src/layout/node-value-input.tsx","../../../src/layout/node-property-input.tsx"],"sourcesContent":["export { default as NoiseDisplaceNode } from './noise-displace-node';\nexport { default as NoiseRotatePointNode } from './noise-rotate-point-node';\nexport { default as NoiseScalePointNode } from './noise-scale-point-node';\nexport { default as NoiseTranslatePointNode } from './noise-translate-point-node';\nexport { default as NoiseTurbulenceNode } from './noise-turbulence-node ';\n","import { NodeContainer, NodeTrackConnections } from '@awesome-flow/core/layout';\nimport { Node, NodeProps } from '@xyflow/react';\nimport { useEffect, useMemo } from 'react';\nimport { useIncomingHandleData, useUpdateNodeComputedData } from '@awesome-flow/core/hooks';\nimport { Displace } from 'libnoise-ts/module/transformer';\nimport { Badge, Stack } from '@mantine/core';\nimport { ComputedModuleData, NodeDisplaceNoiseData } from '../../abstract/node-props';\nimport { DisplacementModule } from '../../abstract/handle-types';\n\nfunction NoiseDisplaceNode({ id, selected, data, type }: NodeProps<Node<NodeDisplaceNoiseData>>) {\n const updateComputedData = useUpdateNodeComputedData<ComputedModuleData>();\n const incomingHandleData = useIncomingHandleData<ComputedModuleData>(id, data.handles);\n\n const { sourceModule, xModule, yModule, zModule } = useMemo(() => {\n return {\n sourceModule: incomingHandleData[DisplacementModule.sourceModule],\n xModule: incomingHandleData[DisplacementModule.xModule],\n yModule: incomingHandleData[DisplacementModule.yModule],\n zModule: incomingHandleData[DisplacementModule.zModule],\n };\n }, [incomingHandleData]);\n\n useEffect(() => {\n if (sourceModule && xModule && yModule && zModule) {\n const module = new Displace(\n sourceModule[0].module,\n xModule[0].module,\n yModule[0].module,\n zModule[0].module\n );\n\n updateComputedData(id, { module });\n }\n }, [id, updateComputedData, sourceModule, xModule, yModule, zModule]);\n\n const { sourceColor, xColor, yColor, zColor } = useMemo(() => {\n return {\n sourceColor: sourceModule ? 'green' : 'orange',\n xColor: xModule ? 'green' : 'orange',\n yColor: yModule ? 'green' : 'orange',\n zColor: zModule ? 'green' : 'orange',\n };\n }, [sourceModule, xModule, yModule, zModule]);\n\n return (\n <NodeContainer id={id} selected={selected} data={data} type={type}>\n <Stack align=\"center\">\n <Badge color={sourceColor}>Source Module</Badge>\n <Badge color={xColor}>X Module</Badge>\n <Badge color={yColor}>Y Module</Badge>\n <Badge color={zColor}>Z Module</Badge>\n </Stack>\n <NodeTrackConnections handles={data.handles} nodeId={id} type=\"target\" />\n </NodeContainer>\n );\n}\n\nexport default NoiseDisplaceNode;\n","import { NodeContainer, NodeTrackConnections } from '@awesome-flow/core/layout';\nimport { Node, NodeProps } from '@xyflow/react';\nimport { useEffect, useState } from 'react';\nimport {\n useIncomingComputedData,\n useUpdateNodeComputedData,\n useUpdateNodeData,\n} from '@awesome-flow/core/hooks';\nimport { Group, NumberInput, Stack } from '@mantine/core';\nimport { RotatePoint } from 'libnoise-ts/module/transformer';\nimport { ComputedModuleData, NodeRotatePointNoiseData } from '../../abstract/node-props';\n\nfunction NoiseRotatePointNode({\n id,\n selected,\n data,\n type,\n}: NodeProps<Node<NodeRotatePointNoiseData>>) {\n const [xAngle, setXAngle] = useState(data.xAngle);\n const [yAngle, setYAngle] = useState(data.yAngle);\n const [zAngle, setZAngle] = useState(data.zAngle);\n\n const incoming = useIncomingComputedData<ComputedModuleData>(id);\n\n const updateNodeData = useUpdateNodeData<NodeRotatePointNoiseData>();\n const updateComputedData = useUpdateNodeComputedData<ComputedModuleData>();\n\n useEffect(() => {\n if (incoming?.length) {\n const module = new RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);\n updateComputedData(id, { module });\n }\n\n updateNodeData(id, { xAngle, yAngle, zAngle });\n }, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);\n\n return (\n <NodeContainer id={id} selected={selected} data={data} type={type}>\n <Stack>\n <Group>\n X Angle:\n <NumberInput\n size=\"xs\"\n w={100}\n value={xAngle}\n onChange={(e) => setXAngle(Number(e))}\n step={0.01}\n />\n </Group>\n <Group>\n Y Angle:\n <NumberInput\n size=\"xs\"\n w={100}\n value={yAngle}\n onChange={(e) => setYAngle(Number(e))}\n step={0.01}\n />\n </Group>\n <Group>\n Z Angle:\n <NumberInput\n size=\"xs\"\n w={100}\n value={zAngle}\n onChange={(e) => setZAngle(Number(e))}\n step={0.01}\n />\n </Group>\n </Stack>\n <NodeTrackConnections handles={data.handles} nodeId={id} type=\"target\" />\n </NodeContainer>\n );\n}\n\nexport default NoiseRotatePointNode;\n","import { NodeContainer, NodeTrackConnections } from '@awesome-flow/core/layout';\nimport { Node, NodeProps } from '@xyflow/react';\nimport { useEffect, useState } from 'react';\nimport {\n useIncomingComputedData,\n useUpdateNodeComputedData,\n useUpdateNodeData,\n} from '@awesome-flow/core/hooks';\nimport { Group, NumberInput, Stack } from '@mantine/core';\nimport { ScalePoint } from 'libnoise-ts/module/transformer';\nimport { ComputedModuleData, NodeScalePointNoiseData } from '../../abstract/node-props';\n\nfunction NoiseScalePointNode({\n id,\n selected,\n data,\n type,\n}: NodeProps<Node<NodeScalePointNoiseData>>) {\n const [xScale, setXScale] = useState(data.xScale);\n const [yScale, setYScale] = useState(data.yScale);\n const [zScale, setZScale] = useState(data.zScale);\n\n const incoming = useIncomingComputedData<ComputedModuleData>(id);\n\n const updateNodeData = useUpdateNodeData<NodeScalePointNoiseData>();\n const updateComputedData = useUpdateNodeComputedData<ComputedModuleData>();\n\n useEffect(() => {\n if (incoming?.length) {\n const module = new ScalePoint(incoming[0].module, xScale, yScale, zScale);\n updateComputedData(id, { module });\n }\n\n updateNodeData(id, { xScale, yScale, zScale });\n }, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);\n\n return (\n <NodeContainer id={id} selected={selected} data={data} type={type}>\n <Stack>\n <Group>\n X Scale:\n <NumberInput\n size=\"xs\"\n w={100}\n value={xScale}\n onChange={(e) => setXScale(Number(e))}\n step={0.01}\n />\n </Group>\n <Group>\n Y Scale:\n <NumberInput\n size=\"xs\"\n w={100}\n value={yScale}\n onChange={(e) => setYScale(Number(e))}\n step={0.01}\n />\n </Group>\n <Group>\n Z Scale:\n <NumberInput\n size=\"xs\"\n w={100}\n value={zScale}\n onChange={(e) => setZScale(Number(e))}\n step={0.01}\n />\n </Group>\n </Stack>\n <NodeTrackConnections handles={data.handles} nodeId={id} type=\"target\" />\n </NodeContainer>\n );\n}\n\nexport default NoiseScalePointNode;\n","import { NodeContainer, NodeTrackConnections } from '@awesome-flow/core/layout';\nimport { Node, NodeProps } from '@xyflow/react';\nimport { useEffect, useState } from 'react';\nimport {\n useIncomingComputedData,\n useUpdateNodeComputedData,\n useUpdateNodeData,\n} from '@awesome-flow/core/hooks';\nimport { Group, NumberInput, Stack } from '@mantine/core';\nimport { TranslatePoint } from 'libnoise-ts/module/transformer';\nimport { ComputedModuleData, NodeTranslatePointNoiseData } from '../../abstract/node-props';\n\nfunction NoiseTranslatePointNode({\n id,\n selected,\n data,\n type,\n}: NodeProps<Node<NodeTranslatePointNoiseData>>) {\n const [translateX, setTranslateX] = useState(data.translateX);\n const [translateY, setTranslateY] = useState(data.translateY);\n const [translateZ, setTranslateZ] = useState(data.translateZ);\n\n const incoming = useIncomingComputedData<ComputedModuleData>(id);\n\n const updateNodeData = useUpdateNodeData<NodeTranslatePointNoiseData>();\n const updateComputedData = useUpdateNodeComputedData<ComputedModuleData>();\n\n useEffect(() => {\n if (incoming?.length) {\n const module = new TranslatePoint(incoming[0].module, translateX, translateY, translateZ);\n updateComputedData(id, { module });\n }\n\n updateNodeData(id, { translateX, translateY, translateZ });\n }, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);\n\n return (\n <NodeContainer id={id} selected={selected} data={data} type={type}>\n <Stack>\n <Group>\n Translate X:\n <NumberInput\n size=\"xs\"\n w={100}\n value={translateX}\n onChange={(e) => setTranslateX(Number(e))}\n step={1}\n />\n </Group>\n <Group>\n Translate Y:\n <NumberInput\n size=\"xs\"\n w={100}\n value={translateY}\n onChange={(e) => setTranslateY(Number(e))}\n step={1}\n />\n </Group>\n <Group>\n Translate Z:\n <NumberInput\n size=\"xs\"\n w={100}\n value={translateZ}\n onChange={(e) => setTranslateZ(Number(e))}\n step={1}\n />\n </Group>\n </Stack>\n <NodeTrackConnections handles={data.handles} nodeId={id} type=\"target\" />\n </NodeContainer>\n );\n}\n\nexport default NoiseTranslatePointNode;\n","import { NodeContainer, NodeTrackConnections } from '@awesome-flow/core/layout';\nimport { Node, NodeProps } from '@xyflow/react';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useIncomingComputedData, useUpdateNodeComputedData } from '@awesome-flow/core/hooks';\nimport { Turbulence } from 'libnoise-ts/module/transformer';\nimport { ComputedModuleData, NodeTurbulenceNoiseData } from '../../abstract/node-props';\nimport { PropertyValue } from '../../abstract/properties';\nimport NodePropertyVariables from '../../layout/node-property-variables';\n\nfunction NoiseTurbulenceNode({\n id,\n selected,\n data,\n type,\n}: NodeProps<Node<NodeTurbulenceNoiseData>>) {\n const [properties, setProperties] = useState(null);\n\n const incoming = useIncomingComputedData<ComputedModuleData>(id);\n const updateComputedData = useUpdateNodeComputedData<ComputedModuleData>();\n\n const onPropertiesChange = useCallback((props: Record<string, PropertyValue<number>>) => {\n setProperties(props);\n }, []);\n\n useEffect(() => {\n if (incoming?.length) {\n const module = new Turbulence(\n incoming[0].module,\n properties.frequency.value,\n properties.power.value,\n properties.roughness.value,\n properties.seed.value\n );\n updateComputedData(id, { module });\n }\n }, [id, incoming, properties, updateComputedData]);\n\n return (\n <NodeContainer id={id} selected={selected} data={data} type={type}>\n <NodePropertyVariables data={data} nodeId={id} onPropertiesChange={onPropertiesChange} />\n <NodeTrackConnections handles={data.handles} nodeId={id} type=\"target\" />\n </NodeContainer>\n );\n}\n\nexport default NoiseTurbulenceNode;\n","import { useIncomingNodeData, useUpdateNodeData } from '@awesome-flow/core/hooks';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { Group, Stack } from '@mantine/core';\nimport { getObjectKeys } from '@awesome-flow/core/utils';\nimport { nodeDataPropertyExcept } from '@awesome-flow/core/abstract';\nimport { NodeVariablePropertyData } from '../abstract/node-props';\nimport { PropertyValue, ValueType } from '../abstract/properties';\nimport NodePropertyInput from './node-property-input';\n\nexport type NodeTrackVariablesProps = {\n nodeId: string;\n data: Record<string, any>;\n except?: Set<string>;\n onPropertiesChange?: (properties: Record<string, PropertyValue>) => void;\n};\n\nfunction NodePropertyVariables({\n data,\n nodeId,\n onPropertiesChange,\n except = nodeDataPropertyExcept,\n}: Readonly<NodeTrackVariablesProps>) {\n const [properties, setProperties] = useState<Record<string, PropertyValue>>(() => {\n const keys = getObjectKeys(data, except);\n\n const dataProps = {};\n\n for (const key of keys) {\n dataProps[key] = {\n name: key,\n value: data[key],\n } satisfies PropertyValue;\n }\n\n return dataProps;\n });\n\n const updateNodeData = useUpdateNodeData();\n const incoming = useIncomingNodeData<NodeVariablePropertyData>(nodeId);\n\n const resetAllDisabled = useCallback(() => {\n const keys = Object.keys(properties);\n\n keys.forEach((k) => {\n properties[k].disabled = false;\n });\n\n setProperties(properties);\n }, []);\n\n const updatePropertyValue = useCallback((name: string, value: ValueType, disabled?: boolean) => {\n let property = properties[name];\n\n if (property) {\n property.value = value;\n } else {\n property = {\n name,\n value,\n };\n }\n\n property.disabled = disabled;\n\n setProperties({ ...properties, [name]: property });\n updateNodeData(nodeId, { [name]: value });\n }, []);\n\n useEffect(() => {\n resetAllDisabled();\n\n if (incoming?.length) {\n for (const connection of incoming) {\n if (connection.property && properties[connection.property.name] !== undefined) {\n updatePropertyValue(connection.property.name, connection.property.value, true);\n }\n }\n }\n }, [incoming]);\n\n useEffect(() => {\n if (onPropertiesChange) {\n onPropertiesChange(properties);\n }\n }, [onPropertiesChange, properties]);\n\n const nodes = useMemo(() => {\n return Object.keys(properties).map((key) => {\n const property = properties[key];\n\n return (\n <Group key={key}>\n {property.name}:<NodePropertyInput property={property} onChange={updatePropertyValue} />\n </Group>\n );\n });\n }, [properties, updatePropertyValue]);\n\n return <Stack>{nodes}</Stack>;\n}\n\nexport default NodePropertyVariables;\n","import { Input, NumberInput, Switch } from '@mantine/core';\nimport { ValueType } from '../abstract/properties';\n\nexport type NodeValueInputProps = {\n value: ValueType;\n disabled?: boolean;\n step?: number;\n onChange: (value: ValueType) => void;\n};\n\nfunction NodeValueInput({ value, disabled, step, onChange }: Readonly<NodeValueInputProps>) {\n if (value === undefined || value === null) {\n return <></>;\n }\n\n switch (typeof value) {\n case 'boolean': {\n return (\n <Switch\n checked={value}\n disabled={disabled}\n onChange={(e) => onChange(e.currentTarget.checked)}\n />\n );\n }\n\n case 'number': {\n return (\n <NumberInput value={value} disabled={disabled} step={step} onChange={(e) => onChange(e)} />\n );\n }\n\n case 'string': {\n return (\n <Input\n value={value}\n disabled={disabled}\n onChange={(e) => onChange(e.currentTarget.value)}\n />\n );\n }\n\n default:\n throw new Error(`Unknown input node for value of type: ${typeof value} (${value})`);\n }\n}\n\nexport default NodeValueInput;\n","import { ValueType, PropertyValue } from '../abstract/properties';\nimport NodeValueInput from './node-value-input';\n\nexport type NodePropertyInputProps = {\n property: PropertyValue;\n onChange: (name: string, value: ValueType) => void;\n};\n\nfunction NodePropertyInput({ property, onChange }: Readonly<NodePropertyInputProps>) {\n if (!property) {\n return <></>;\n }\n\n return (\n <NodeValueInput\n value={property.value}\n disabled={property.disabled}\n step={property.step}\n onChange={(value) => onChange(property.name, value)}\n />\n );\n}\n\nexport default NodePropertyInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAAoD;AAEpD,mBAAmC;AACnC,mBAAiE;AACjE,yBAAyB;AACzB,kBAA6B;AAyCvB;AArCN,SAAS,kBAAkB,EAAE,IAAI,UAAU,MAAM,KAAK,GAA2C;AAC/F,QAAM,yBAAqB,wCAA8C;AACzE,QAAM,yBAAqB,oCAA0C,IAAI,KAAK,OAAO;AAErF,QAAM,EAAE,cAAc,SAAS,SAAS,QAAQ,QAAI,sBAAQ,MAAM;AAChE,WAAO;AAAA,MACL,cAAc,8CAAkD;AAAA,MAChE,SAAS,2CAA6C;AAAA,MACtD,SAAS,2CAA6C;AAAA,MACtD,SAAS,2CAA6C;AAAA,IACxD;AAAA,EACF,GAAG,CAAC,kBAAkB,CAAC;AAEvB,8BAAU,MAAM;AACd,QAAI,gBAAgB,WAAW,WAAW,SAAS;AACjD,YAAMA,UAAS,IAAI;AAAA,QACjB,aAAa,CAAC,EAAE;AAAA,QAChB,QAAQ,CAAC,EAAE;AAAA,QACX,QAAQ,CAAC,EAAE;AAAA,QACX,QAAQ,CAAC,EAAE;AAAA,MACb;AAEA,yBAAmB,IAAI,EAAE,QAAAA,QAAO,CAAC;AAAA,IACnC;AAAA,EACF,GAAG,CAAC,IAAI,oBAAoB,cAAc,SAAS,SAAS,OAAO,CAAC;AAEpE,QAAM,EAAE,aAAa,QAAQ,QAAQ,OAAO,QAAI,sBAAQ,MAAM;AAC5D,WAAO;AAAA,MACL,aAAa,eAAe,UAAU;AAAA,MACtC,QAAQ,UAAU,UAAU;AAAA,MAC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AAAA,EACrB,GAAG,CAAC,CAAC;AAEL,+BAAU,MAAM;AACd,QAAI,UAAU,QAAQ;AACpB,YAAMC,UAAS,IAAI;AAAA,QACjB,SAAS,CAAC,EAAE;AAAA,QACZ,WAAW,UAAU;AAAA,QACrB,WAAW,MAAM;AAAA,QACjB,WAAW,UAAU;AAAA,QACrB,WAAW,KAAK;AAAA,MAClB;AACA,yBAAmB,IAAI,EAAE,QAAAA,QAAO,CAAC;AAAA,IACnC;AAAA,EACF,GAAG,CAAC,IAAI,UAAU,YAAY,kBAAkB,CAAC;AAEjD,SACE,8CAAC,gCAAc,IAAQ,UAAoB,MAAY,MACrD;AAAA,iDAAC,mCAAsB,MAAY,QAAQ,IAAI,oBAAwC;AAAA,IACvF,6CAAC,uCAAqB,SAAS,KAAK,SAAS,QAAQ,IAAI,MAAK,UAAS;AAAA,KACzE;AAEJ;AAEA,IAAO,gCAAQ;","names":["module","import_layout","import_react","import_hooks","import_core","import_transformer","import_jsx_runtime","module","import_layout","import_react","import_hooks","import_core","import_transformer","import_jsx_runtime","module","import_layout","import_react","import_hooks","import_core","import_transformer","import_jsx_runtime","module","import_layout","import_react","import_hooks","import_transformer","import_hooks","import_react","import_core","import_core","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","module"]}
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { NodeProps, Node } from '@xyflow/react';
3
+ import { x as NodeDisplaceNoiseData, y as NodeRotatePointNoiseData, z as NodeScalePointNoiseData, A as NodeTranslatePointNoiseData, B as NodeTurbulenceNoiseData } from '../../node-props-hKW-_KOU.cjs';
4
+ import '@awesome-flow/core/abstract';
5
+ import 'libnoise-ts/module/generator';
6
+ import 'libnoise-ts/noisegen';
7
+ import 'libnoise-ts/module/Module';
8
+ import '../../handle-types-D-v5S53h.cjs';
9
+ import 'libnoise-ts/module/combiner';
10
+ import '../../properties-BxwtU6i9.cjs';
11
+
12
+ declare function NoiseDisplaceNode({ id, selected, data, type }: NodeProps<Node<NodeDisplaceNoiseData>>): react_jsx_runtime.JSX.Element;
13
+
14
+ declare function NoiseRotatePointNode({ id, selected, data, type, }: NodeProps<Node<NodeRotatePointNoiseData>>): react_jsx_runtime.JSX.Element;
15
+
16
+ declare function NoiseScalePointNode({ id, selected, data, type, }: NodeProps<Node<NodeScalePointNoiseData>>): react_jsx_runtime.JSX.Element;
17
+
18
+ declare function NoiseTranslatePointNode({ id, selected, data, type, }: NodeProps<Node<NodeTranslatePointNoiseData>>): react_jsx_runtime.JSX.Element;
19
+
20
+ declare function NoiseTurbulenceNode({ id, selected, data, type, }: NodeProps<Node<NodeTurbulenceNoiseData>>): react_jsx_runtime.JSX.Element;
21
+
22
+ export { NoiseDisplaceNode, NoiseRotatePointNode, NoiseScalePointNode, NoiseTranslatePointNode, NoiseTurbulenceNode };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { NodeProps, Node } from '@xyflow/react';
3
+ import { x as NodeDisplaceNoiseData, y as NodeRotatePointNoiseData, z as NodeScalePointNoiseData, A as NodeTranslatePointNoiseData, B as NodeTurbulenceNoiseData } from '../../node-props-CeZ8Oshz.js';
4
+ import '@awesome-flow/core/abstract';
5
+ import 'libnoise-ts/module/generator';
6
+ import 'libnoise-ts/noisegen';
7
+ import 'libnoise-ts/module/Module';
8
+ import '../../handle-types-D-v5S53h.js';
9
+ import 'libnoise-ts/module/combiner';
10
+ import '../../properties-BxwtU6i9.js';
11
+
12
+ declare function NoiseDisplaceNode({ id, selected, data, type }: NodeProps<Node<NodeDisplaceNoiseData>>): react_jsx_runtime.JSX.Element;
13
+
14
+ declare function NoiseRotatePointNode({ id, selected, data, type, }: NodeProps<Node<NodeRotatePointNoiseData>>): react_jsx_runtime.JSX.Element;
15
+
16
+ declare function NoiseScalePointNode({ id, selected, data, type, }: NodeProps<Node<NodeScalePointNoiseData>>): react_jsx_runtime.JSX.Element;
17
+
18
+ declare function NoiseTranslatePointNode({ id, selected, data, type, }: NodeProps<Node<NodeTranslatePointNoiseData>>): react_jsx_runtime.JSX.Element;
19
+
20
+ declare function NoiseTurbulenceNode({ id, selected, data, type, }: NodeProps<Node<NodeTurbulenceNoiseData>>): react_jsx_runtime.JSX.Element;
21
+
22
+ export { NoiseDisplaceNode, NoiseRotatePointNode, NoiseScalePointNode, NoiseTranslatePointNode, NoiseTurbulenceNode };