@awesome-flow/noise 0.7.0 → 0.8.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 +8 -3469
- package/dist/abstract/index.d.cts +2 -2
- package/dist/abstract/index.d.ts +2 -2
- package/dist/abstract/index.js +15 -3508
- package/dist/chunk-2Y22M2Y4.js +0 -0
- package/dist/chunk-4PQ4USYV.cjs +1 -0
- package/dist/chunk-5ELMFIRV.js +0 -0
- package/dist/chunk-ACWBUUZ7.cjs +1376 -0
- package/dist/chunk-BG6U3TYO.js +1376 -0
- package/dist/chunk-D5JM4EYQ.cjs +305 -0
- package/dist/chunk-DWSACR65.js +305 -0
- package/dist/chunk-FFQRP23R.cjs +1 -0
- package/dist/chunk-JACBT4MS.cjs +1 -0
- package/dist/chunk-KHIIB5TH.js +93 -0
- package/dist/chunk-M67JHEU2.cjs +93 -0
- package/dist/chunk-N6YNJKLS.cjs +1 -0
- package/dist/chunk-PS5VUND5.js +348 -0
- package/dist/chunk-Q5FVGKKM.cjs +1 -0
- package/dist/chunk-RDQ4BOOV.js +522 -0
- package/dist/chunk-RKTZQUWR.cjs +348 -0
- package/dist/chunk-RVWCBH7K.js +0 -0
- package/dist/chunk-SD3T3LFY.js +0 -0
- package/dist/chunk-SGHEOOLW.js +19 -0
- package/dist/chunk-TOYKGWYO.js +0 -0
- package/dist/chunk-TZCT2GZV.cjs +522 -0
- package/dist/chunk-UNMRBZ5X.cjs +19 -0
- package/dist/chunk-WOJTKQKO.cjs +1 -0
- package/dist/chunk-XZQQ6N3L.js +0 -0
- package/dist/modules/index.cjs +4 -42
- package/dist/modules/index.js +3 -15
- package/dist/nodes/generators/index.cjs +13 -335
- package/dist/nodes/generators/index.d.cts +7 -7
- package/dist/nodes/generators/index.d.ts +7 -7
- package/dist/nodes/generators/index.js +12 -299
- package/dist/nodes/groups/index.cjs +4 -111
- package/dist/nodes/groups/index.d.cts +2 -2
- package/dist/nodes/groups/index.d.ts +2 -2
- package/dist/nodes/groups/index.js +2 -88
- package/dist/nodes/index.cjs +75 -3425
- package/dist/nodes/index.js +37 -3397
- package/dist/nodes/modifiers/index.cjs +4 -1459
- package/dist/nodes/modifiers/index.d.cts +6 -6
- package/dist/nodes/modifiers/index.d.ts +6 -6
- package/dist/nodes/modifiers/index.js +11 -1479
- package/dist/nodes/output/index.cjs +8 -1335
- package/dist/nodes/output/index.d.cts +3 -3
- package/dist/nodes/output/index.d.ts +3 -3
- package/dist/nodes/output/index.js +10 -1361
- package/dist/nodes/selectors/index.cjs +8 -1317
- package/dist/nodes/selectors/index.d.cts +1 -1
- package/dist/nodes/selectors/index.d.ts +1 -1
- package/dist/nodes/selectors/index.js +8 -1343
- package/dist/nodes/transformers/index.cjs +8 -331
- package/dist/nodes/transformers/index.d.cts +5 -5
- package/dist/nodes/transformers/index.d.ts +5 -5
- package/dist/nodes/transformers/index.js +6 -311
- package/dist/templates/generators/index.cjs +8 -1199
- package/dist/templates/generators/index.d.cts +5 -5
- package/dist/templates/generators/index.d.ts +5 -5
- package/dist/templates/generators/index.js +17 -1226
- package/dist/templates/groups/index.cjs +8 -1199
- package/dist/templates/groups/index.js +8 -1226
- package/dist/templates/index.cjs +77 -1263
- package/dist/templates/index.js +43 -1226
- package/dist/templates/modifiers/index.cjs +8 -1199
- package/dist/templates/modifiers/index.d.cts +9 -9
- package/dist/templates/modifiers/index.d.ts +9 -9
- package/dist/templates/modifiers/index.js +16 -1226
- package/dist/templates/output/index.cjs +8 -1199
- package/dist/templates/output/index.d.cts +3 -3
- package/dist/templates/output/index.d.ts +3 -3
- package/dist/templates/output/index.js +11 -1226
- package/dist/templates/selectors/index.cjs +8 -1199
- package/dist/templates/selectors/index.js +9 -1226
- package/dist/templates/transformers/index.cjs +8 -1199
- package/dist/templates/transformers/index.js +12 -1226
- package/package.json +30 -20
|
@@ -0,0 +1,1376 @@
|
|
|
1
|
+
import {
|
|
2
|
+
noise_displace_node_default,
|
|
3
|
+
noise_rotate_point_node_default,
|
|
4
|
+
noise_scale_point_node_default,
|
|
5
|
+
noise_translate_point_node_default,
|
|
6
|
+
noise_turbulence_node_default
|
|
7
|
+
} from "./chunk-PS5VUND5.js";
|
|
8
|
+
import {
|
|
9
|
+
noise_billow_node_default,
|
|
10
|
+
noise_checkerboard_node_default,
|
|
11
|
+
noise_const_node_default,
|
|
12
|
+
noise_cylinders_node_default,
|
|
13
|
+
noise_perlin_node_default,
|
|
14
|
+
noise_ridgedmulti_node_default,
|
|
15
|
+
noise_spheres_node_default,
|
|
16
|
+
noise_voronoi_node_default,
|
|
17
|
+
position_const_node_default,
|
|
18
|
+
position_grid_node_default
|
|
19
|
+
} from "./chunk-DWSACR65.js";
|
|
20
|
+
import {
|
|
21
|
+
module_group_node_default
|
|
22
|
+
} from "./chunk-KHIIB5TH.js";
|
|
23
|
+
import {
|
|
24
|
+
noise_abs_node_default,
|
|
25
|
+
noise_clamp_node_default,
|
|
26
|
+
noise_combine_node_default,
|
|
27
|
+
noise_curve_node_default,
|
|
28
|
+
noise_exponent_node_default,
|
|
29
|
+
noise_invert_node_default,
|
|
30
|
+
noise_normalize_node_default,
|
|
31
|
+
noise_scale_bias_node_default,
|
|
32
|
+
noise_terrace_node_default
|
|
33
|
+
} from "./chunk-RDQ4BOOV.js";
|
|
34
|
+
|
|
35
|
+
// src/nodes/output/noise-logger-node.tsx
|
|
36
|
+
import { useIncomingComputedData } from "@awesome-flow/core/hooks";
|
|
37
|
+
import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
38
|
+
import { Divider, Stack, Text } from "@mantine/core";
|
|
39
|
+
import { useMemo } from "react";
|
|
40
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
+
function NoiseLoggerNode({ id, selected, data, type }) {
|
|
42
|
+
const incoming = useIncomingComputedData(id);
|
|
43
|
+
const noise = useMemo(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
44
|
+
return /* @__PURE__ */ jsxs(NodeContainer, { id, selected, data, type, children: [
|
|
45
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
46
|
+
"Size: ",
|
|
47
|
+
noise?.length || 0
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsx(Divider, { h: 5 }),
|
|
50
|
+
/* @__PURE__ */ jsx(Stack, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
51
|
+
v.position?.x,
|
|
52
|
+
":",
|
|
53
|
+
v.position?.y,
|
|
54
|
+
":",
|
|
55
|
+
v.position?.z,
|
|
56
|
+
": ",
|
|
57
|
+
v.value
|
|
58
|
+
] }, i)) }),
|
|
59
|
+
/* @__PURE__ */ jsx(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
var noise_logger_node_default = NoiseLoggerNode;
|
|
63
|
+
|
|
64
|
+
// src/nodes/output/noise-output-node.tsx
|
|
65
|
+
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
|
|
66
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData4 } from "@awesome-flow/core/hooks";
|
|
67
|
+
import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
|
|
68
|
+
import { Text as Text3 } from "@mantine/core";
|
|
69
|
+
import { useCallback as useCallback3, useState as useState3 } from "react";
|
|
70
|
+
|
|
71
|
+
// src/nodes/selectors/noise-blend-node.tsx
|
|
72
|
+
import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
|
|
73
|
+
import { useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
|
|
74
|
+
import { NodeContainer as NodeContainer2, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
|
|
75
|
+
import { Blend } from "libnoise-simplex-ts";
|
|
76
|
+
import { useCallback } from "react";
|
|
77
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
78
|
+
function NoiseBlendNode({ id, selected, data, type }) {
|
|
79
|
+
const updateComputedData = useUpdateNodeComputedData();
|
|
80
|
+
const onDataUpdated = useCallback(
|
|
81
|
+
(incomingData) => {
|
|
82
|
+
const incomingSources = incomingData["source" /* source */];
|
|
83
|
+
const incomingControl = incomingData["control" /* control */];
|
|
84
|
+
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
85
|
+
const module = new Blend(
|
|
86
|
+
incomingSources[0].module,
|
|
87
|
+
incomingSources[1].module,
|
|
88
|
+
incomingControl[0].module
|
|
89
|
+
);
|
|
90
|
+
updateComputedData(id, { module });
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
[]
|
|
94
|
+
);
|
|
95
|
+
return /* @__PURE__ */ jsxs2(NodeContainer2, { id, selected, data, type, children: [
|
|
96
|
+
/* @__PURE__ */ jsx2(
|
|
97
|
+
HandlesIncomingDataStatus,
|
|
98
|
+
{
|
|
99
|
+
nodeId: id,
|
|
100
|
+
handles: data.handles,
|
|
101
|
+
handleKey: "dataId",
|
|
102
|
+
onDataUpdated,
|
|
103
|
+
type: "target",
|
|
104
|
+
resetComputedData: true
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx2(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" })
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
var noise_blend_node_default = NoiseBlendNode;
|
|
111
|
+
|
|
112
|
+
// src/nodes/selectors/noise-select-node.tsx
|
|
113
|
+
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
|
|
114
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData2, useUpdateNodeData } from "@awesome-flow/core/hooks";
|
|
115
|
+
import { NodeContainer as NodeContainer3, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
|
|
116
|
+
import { Group, NumberInput, Stack as Stack2 } from "@mantine/core";
|
|
117
|
+
import { Select } from "libnoise-simplex-ts";
|
|
118
|
+
import { useCallback as useCallback2, useEffect, useState } from "react";
|
|
119
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
120
|
+
function NoiseSelectNode({ id, selected, data, type }) {
|
|
121
|
+
const [edgeFalloff, setEdgeFalloff] = useState(data.edgeFalloff);
|
|
122
|
+
const [lowerBound, setLowerBound] = useState(data.lowerBound);
|
|
123
|
+
const [upperBound, setUpperBound] = useState(data.upperBound);
|
|
124
|
+
const updateNodeData = useUpdateNodeData();
|
|
125
|
+
const updateComputedData = useUpdateNodeComputedData2();
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
|
|
128
|
+
}, [edgeFalloff, lowerBound, upperBound]);
|
|
129
|
+
const onDataUpdated = useCallback2(
|
|
130
|
+
(incomingData) => {
|
|
131
|
+
const incomingSources = incomingData["source" /* source */];
|
|
132
|
+
const incomingControl = incomingData["control" /* control */];
|
|
133
|
+
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
134
|
+
const module = new Select(
|
|
135
|
+
incomingSources[0].module,
|
|
136
|
+
incomingSources[1].module,
|
|
137
|
+
incomingControl[0].module,
|
|
138
|
+
edgeFalloff,
|
|
139
|
+
lowerBound,
|
|
140
|
+
upperBound
|
|
141
|
+
);
|
|
142
|
+
updateComputedData(id, { module });
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
[]
|
|
146
|
+
);
|
|
147
|
+
return /* @__PURE__ */ jsxs3(NodeContainer3, { id, selected, data, type, children: [
|
|
148
|
+
/* @__PURE__ */ jsxs3(Stack2, { children: [
|
|
149
|
+
/* @__PURE__ */ jsxs3(Group, { children: [
|
|
150
|
+
"Edge Falloff:",
|
|
151
|
+
/* @__PURE__ */ jsx3(
|
|
152
|
+
NumberInput,
|
|
153
|
+
{
|
|
154
|
+
size: "xs",
|
|
155
|
+
w: 100,
|
|
156
|
+
value: edgeFalloff,
|
|
157
|
+
onChange: (e) => setEdgeFalloff(Number(e)),
|
|
158
|
+
step: 0.1
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }),
|
|
162
|
+
/* @__PURE__ */ jsxs3(Group, { children: [
|
|
163
|
+
"Lower Bound:",
|
|
164
|
+
/* @__PURE__ */ jsx3(
|
|
165
|
+
NumberInput,
|
|
166
|
+
{
|
|
167
|
+
size: "xs",
|
|
168
|
+
w: 100,
|
|
169
|
+
value: lowerBound,
|
|
170
|
+
onChange: (e) => setLowerBound(Number(e)),
|
|
171
|
+
step: 0.1
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }),
|
|
175
|
+
/* @__PURE__ */ jsxs3(Group, { children: [
|
|
176
|
+
"Upper Bound:",
|
|
177
|
+
/* @__PURE__ */ jsx3(
|
|
178
|
+
NumberInput,
|
|
179
|
+
{
|
|
180
|
+
size: "xs",
|
|
181
|
+
w: 100,
|
|
182
|
+
value: upperBound,
|
|
183
|
+
onChange: (e) => setUpperBound(Number(e)),
|
|
184
|
+
step: 0.1
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
] }),
|
|
188
|
+
/* @__PURE__ */ jsx3(
|
|
189
|
+
HandlesIncomingDataStatus2,
|
|
190
|
+
{
|
|
191
|
+
nodeId: id,
|
|
192
|
+
handles: data.handles,
|
|
193
|
+
handleKey: "dataId",
|
|
194
|
+
onDataUpdated,
|
|
195
|
+
type: "target",
|
|
196
|
+
resetComputedData: true
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
] }),
|
|
200
|
+
/* @__PURE__ */ jsx3(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" })
|
|
201
|
+
] });
|
|
202
|
+
}
|
|
203
|
+
var noise_select_node_default = NoiseSelectNode;
|
|
204
|
+
|
|
205
|
+
// src/nodes/output/noise-raw-texture-node.tsx
|
|
206
|
+
import { useIncomingComputedData as useIncomingComputedData2, useUpdateNodeComputedData as useUpdateNodeComputedData3 } from "@awesome-flow/core/hooks";
|
|
207
|
+
import { NodeContainer as NodeContainer4, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
|
|
208
|
+
import { Group as Group2, Stack as Stack3 } from "@mantine/core";
|
|
209
|
+
import { useEffect as useEffect2, useMemo as useMemo2, useState as useState2 } from "react";
|
|
210
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
211
|
+
function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
212
|
+
const updateComputedData = useUpdateNodeComputedData3();
|
|
213
|
+
const [dataLength, setDataLength] = useState2(0);
|
|
214
|
+
const [resolution, setResolution] = useState2(0);
|
|
215
|
+
const incoming = useIncomingComputedData2(id);
|
|
216
|
+
const noise = useMemo2(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
217
|
+
useEffect2(() => {
|
|
218
|
+
if (noise?.length) {
|
|
219
|
+
const size = Math.ceil(Math.sqrt(noise.length));
|
|
220
|
+
const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
|
|
221
|
+
const dataArray = new Uint8Array(size * size * 4);
|
|
222
|
+
dataArray.set(colors);
|
|
223
|
+
setResolution(size);
|
|
224
|
+
setDataLength(dataArray.length);
|
|
225
|
+
updateComputedData(id, {
|
|
226
|
+
textureData: dataArray,
|
|
227
|
+
textureResolutionX: size,
|
|
228
|
+
textureResolutionY: size
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}, [noise]);
|
|
232
|
+
return /* @__PURE__ */ jsxs4(NodeContainer4, { id, selected, data, type, children: [
|
|
233
|
+
/* @__PURE__ */ jsxs4(Stack3, { children: [
|
|
234
|
+
/* @__PURE__ */ jsxs4(Group2, { children: [
|
|
235
|
+
"Resolution: ",
|
|
236
|
+
resolution,
|
|
237
|
+
"x",
|
|
238
|
+
resolution
|
|
239
|
+
] }),
|
|
240
|
+
/* @__PURE__ */ jsxs4(Group2, { children: [
|
|
241
|
+
"Input Length: ",
|
|
242
|
+
noise?.length || 0
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ jsxs4(Group2, { children: [
|
|
245
|
+
"Output Length (",
|
|
246
|
+
resolution,
|
|
247
|
+
"*",
|
|
248
|
+
resolution,
|
|
249
|
+
"*4): ",
|
|
250
|
+
dataLength
|
|
251
|
+
] })
|
|
252
|
+
] }),
|
|
253
|
+
/* @__PURE__ */ jsx4(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
|
|
254
|
+
] });
|
|
255
|
+
}
|
|
256
|
+
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
257
|
+
|
|
258
|
+
// src/nodes/output/positions-logger-node.tsx
|
|
259
|
+
import { useIncomingComputedData as useIncomingComputedData3 } from "@awesome-flow/core/hooks";
|
|
260
|
+
import { NodeContainer as NodeContainer5, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
|
|
261
|
+
import { Divider as Divider2, Stack as Stack4, Text as Text2 } from "@mantine/core";
|
|
262
|
+
import { useMemo as useMemo3 } from "react";
|
|
263
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
264
|
+
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
265
|
+
const incoming = useIncomingComputedData3(id);
|
|
266
|
+
const positions = useMemo3(() => {
|
|
267
|
+
return incoming?.map((p) => p.positions).flat();
|
|
268
|
+
}, [incoming]);
|
|
269
|
+
return /* @__PURE__ */ jsxs5(NodeContainer5, { id, selected, data, type, children: [
|
|
270
|
+
/* @__PURE__ */ jsxs5(Text2, { children: [
|
|
271
|
+
"Size: ",
|
|
272
|
+
positions?.length || 0
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ jsx5(Divider2, { h: 5 }),
|
|
275
|
+
/* @__PURE__ */ jsx5(Stack4, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs5(Text2, { children: [
|
|
276
|
+
v.x,
|
|
277
|
+
":",
|
|
278
|
+
v.y,
|
|
279
|
+
":",
|
|
280
|
+
v.z
|
|
281
|
+
] }, i)) }),
|
|
282
|
+
/* @__PURE__ */ jsx5(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
|
|
283
|
+
] });
|
|
284
|
+
}
|
|
285
|
+
var positions_logger_node_default = PositionsLoggerNode;
|
|
286
|
+
|
|
287
|
+
// src/templates/generators/noise-billow-template.ts
|
|
288
|
+
import { CoreHandleType } from "@awesome-flow/core/abstract";
|
|
289
|
+
import { IDGenerator } from "@awesome-flow/core/utils";
|
|
290
|
+
import { Position } from "@xyflow/system";
|
|
291
|
+
|
|
292
|
+
// src/abstract/templates.ts
|
|
293
|
+
var NoiseTemplateGroup = /* @__PURE__ */ ((NoiseTemplateGroup2) => {
|
|
294
|
+
NoiseTemplateGroup2["positions"] = "Positions";
|
|
295
|
+
NoiseTemplateGroup2["output"] = "Output";
|
|
296
|
+
NoiseTemplateGroup2["noiseGenerators"] = "Noise Generators";
|
|
297
|
+
NoiseTemplateGroup2["noiseModifiers"] = "Noise Modifiers";
|
|
298
|
+
NoiseTemplateGroup2["noiseSelectors"] = "Noise Selectors";
|
|
299
|
+
NoiseTemplateGroup2["noiseTransformers"] = "Noise Transformers";
|
|
300
|
+
return NoiseTemplateGroup2;
|
|
301
|
+
})(NoiseTemplateGroup || {});
|
|
302
|
+
|
|
303
|
+
// src/templates/generators/noise-billow-template.ts
|
|
304
|
+
var NoiseBillowNodeTemplateFactory = class {
|
|
305
|
+
template = {
|
|
306
|
+
id: IDGenerator.template(),
|
|
307
|
+
type: "noise-billow" /* noiseBillow */,
|
|
308
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
309
|
+
data: {
|
|
310
|
+
title: "Billow Noise",
|
|
311
|
+
frequency: 0.1,
|
|
312
|
+
lacunarity: 2,
|
|
313
|
+
octaves: 5,
|
|
314
|
+
persistence: 0.5,
|
|
315
|
+
seed: 0
|
|
316
|
+
},
|
|
317
|
+
handles: [
|
|
318
|
+
{
|
|
319
|
+
position: Position.Left,
|
|
320
|
+
dataType: CoreHandleType.variableProperty,
|
|
321
|
+
connection: "target"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
position: Position.Right,
|
|
325
|
+
dataType: "module" /* module */,
|
|
326
|
+
connection: "source"
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
// src/templates/generators/noise-checkerboard-template.ts
|
|
333
|
+
import { Position as Position2 } from "@xyflow/system";
|
|
334
|
+
var NoiseCheckerboardNodeTemplateFactory = class {
|
|
335
|
+
template = {
|
|
336
|
+
type: "noise-checkerboard" /* noiseCheckerboard */,
|
|
337
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
338
|
+
data: {
|
|
339
|
+
title: "Checkerboard Noise"
|
|
340
|
+
},
|
|
341
|
+
handles: [
|
|
342
|
+
{
|
|
343
|
+
position: Position2.Right,
|
|
344
|
+
dataType: "module" /* module */,
|
|
345
|
+
connection: "source"
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
// src/templates/generators/noise-const-template.ts
|
|
352
|
+
import { Position as Position3 } from "@xyflow/system";
|
|
353
|
+
var NoiseConstNodeTemplateFactory = class {
|
|
354
|
+
template = {
|
|
355
|
+
type: "noise-constant" /* noiseConst */,
|
|
356
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
357
|
+
data: {
|
|
358
|
+
title: "Const Value Noise",
|
|
359
|
+
noise: 0,
|
|
360
|
+
min: -1,
|
|
361
|
+
max: 1
|
|
362
|
+
},
|
|
363
|
+
handles: [
|
|
364
|
+
{
|
|
365
|
+
position: Position3.Right,
|
|
366
|
+
dataType: "module" /* module */,
|
|
367
|
+
connection: "source"
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// src/templates/generators/noise-cylinders-template.ts
|
|
374
|
+
import { CoreHandleType as CoreHandleType2 } from "@awesome-flow/core/abstract";
|
|
375
|
+
import { Position as Position4 } from "@xyflow/system";
|
|
376
|
+
var NoiseCylindersNodeTemplateFactory = class {
|
|
377
|
+
template = {
|
|
378
|
+
type: "noise-cylinders" /* noiseCylinders */,
|
|
379
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
380
|
+
data: {
|
|
381
|
+
title: "Cylinders Noise",
|
|
382
|
+
frequency: 0.1
|
|
383
|
+
},
|
|
384
|
+
handles: [
|
|
385
|
+
{
|
|
386
|
+
position: Position4.Left,
|
|
387
|
+
dataType: CoreHandleType2.variableProperty,
|
|
388
|
+
connection: "target"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
position: Position4.Right,
|
|
392
|
+
dataType: "module" /* module */,
|
|
393
|
+
connection: "source"
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// src/templates/generators/noise-perlin-template.ts
|
|
400
|
+
import { CoreHandleType as CoreHandleType3 } from "@awesome-flow/core/abstract";
|
|
401
|
+
import { Position as Position5 } from "@xyflow/system";
|
|
402
|
+
var NoisePerlinNodeTemplateFactory = class {
|
|
403
|
+
template = {
|
|
404
|
+
type: "noise-perlin" /* noisePerlin */,
|
|
405
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
406
|
+
data: {
|
|
407
|
+
title: "Perlin Noise",
|
|
408
|
+
frequency: 0.1,
|
|
409
|
+
lacunarity: 2,
|
|
410
|
+
octaves: 5,
|
|
411
|
+
persistence: 0.5,
|
|
412
|
+
seed: 0
|
|
413
|
+
},
|
|
414
|
+
handles: [
|
|
415
|
+
{
|
|
416
|
+
position: Position5.Left,
|
|
417
|
+
dataType: CoreHandleType3.variableProperty,
|
|
418
|
+
connection: "target"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
position: Position5.Right,
|
|
422
|
+
dataType: "module" /* module */,
|
|
423
|
+
connection: "source"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
// src/templates/generators/noise-ridgedmulti-template.ts
|
|
430
|
+
import { CoreHandleType as CoreHandleType4 } from "@awesome-flow/core/abstract";
|
|
431
|
+
import { Position as Position6 } from "@xyflow/system";
|
|
432
|
+
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
433
|
+
template = {
|
|
434
|
+
type: "noise-ridged-multi" /* noiseRidgedMulti */,
|
|
435
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
436
|
+
data: {
|
|
437
|
+
title: "Ridged Multi Noise",
|
|
438
|
+
frequency: 0.1,
|
|
439
|
+
lacunarity: 2,
|
|
440
|
+
octaves: 6,
|
|
441
|
+
offset: 1,
|
|
442
|
+
gain: 2,
|
|
443
|
+
seed: 0
|
|
444
|
+
},
|
|
445
|
+
handles: [
|
|
446
|
+
{
|
|
447
|
+
position: Position6.Left,
|
|
448
|
+
dataType: CoreHandleType4.variableProperty,
|
|
449
|
+
connection: "target"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
position: Position6.Right,
|
|
453
|
+
dataType: "module" /* module */,
|
|
454
|
+
connection: "source"
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// src/templates/generators/noise-spheres-template.ts
|
|
461
|
+
import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
|
|
462
|
+
import { Position as Position7 } from "@xyflow/system";
|
|
463
|
+
var NoiseSpheresNodeTemplateFactory = class {
|
|
464
|
+
template = {
|
|
465
|
+
type: "noise-spheres" /* noiseSpheres */,
|
|
466
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
467
|
+
data: {
|
|
468
|
+
title: "Spheres Noise",
|
|
469
|
+
frequency: 0.1
|
|
470
|
+
},
|
|
471
|
+
handles: [
|
|
472
|
+
{
|
|
473
|
+
position: Position7.Left,
|
|
474
|
+
dataType: CoreHandleType5.variableProperty,
|
|
475
|
+
connection: "target"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
position: Position7.Right,
|
|
479
|
+
dataType: "module" /* module */,
|
|
480
|
+
connection: "source"
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
// src/templates/generators/noise-voronoi-template.ts
|
|
487
|
+
import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
|
|
488
|
+
import { Position as Position8 } from "@xyflow/system";
|
|
489
|
+
var NoiseVoronoiNodeTemplateFactory = class {
|
|
490
|
+
template = {
|
|
491
|
+
type: "noise-voronoi" /* noiseVoronoi */,
|
|
492
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
493
|
+
data: {
|
|
494
|
+
title: "Voronoi Noise",
|
|
495
|
+
frequency: 0.1,
|
|
496
|
+
displacement: 1,
|
|
497
|
+
distance: true,
|
|
498
|
+
seed: 0
|
|
499
|
+
},
|
|
500
|
+
handles: [
|
|
501
|
+
{
|
|
502
|
+
position: Position8.Left,
|
|
503
|
+
dataType: CoreHandleType6.variableProperty,
|
|
504
|
+
connection: "target"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
position: Position8.Right,
|
|
508
|
+
dataType: "module" /* module */,
|
|
509
|
+
connection: "source"
|
|
510
|
+
}
|
|
511
|
+
]
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
// src/templates/generators/position-const-template.ts
|
|
516
|
+
import { Position as Position9 } from "@xyflow/system";
|
|
517
|
+
var PositionConstNodeTemplateFactory = class {
|
|
518
|
+
template = {
|
|
519
|
+
type: "position" /* position */,
|
|
520
|
+
group: "Positions" /* positions */,
|
|
521
|
+
data: {
|
|
522
|
+
title: "Position Output",
|
|
523
|
+
position: { x: 0, y: 0, z: 0 }
|
|
524
|
+
},
|
|
525
|
+
handles: [
|
|
526
|
+
{
|
|
527
|
+
position: Position9.Right,
|
|
528
|
+
dataType: "position" /* position */,
|
|
529
|
+
connection: "source"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
// src/templates/generators/position-grid-template.ts
|
|
536
|
+
import { Position as Position10 } from "@xyflow/system";
|
|
537
|
+
var PositionGridNodeTemplateFactory = class {
|
|
538
|
+
template = {
|
|
539
|
+
type: "grid" /* grid */,
|
|
540
|
+
group: "Positions" /* positions */,
|
|
541
|
+
data: {
|
|
542
|
+
title: "Grid Output",
|
|
543
|
+
center: { x: 0, y: 0, z: 0 },
|
|
544
|
+
radius: 1
|
|
545
|
+
},
|
|
546
|
+
handles: [
|
|
547
|
+
{
|
|
548
|
+
position: Position10.Right,
|
|
549
|
+
dataType: "position" /* position */,
|
|
550
|
+
connection: "source"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
// src/templates/groups/module-group-template.ts
|
|
557
|
+
import {
|
|
558
|
+
CoreTemplateGroup
|
|
559
|
+
} from "@awesome-flow/core/abstract";
|
|
560
|
+
import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
|
|
561
|
+
import { Position as Position11 } from "@xyflow/system";
|
|
562
|
+
var ModuleGroupNodeTemplateFactory = class {
|
|
563
|
+
template = {
|
|
564
|
+
id: IDGenerator2.template(),
|
|
565
|
+
type: "group-module" /* groupModule */,
|
|
566
|
+
group: CoreTemplateGroup.groups,
|
|
567
|
+
data: {
|
|
568
|
+
title: "Modules Group",
|
|
569
|
+
isGroup: true,
|
|
570
|
+
initialSize: {
|
|
571
|
+
width: 300,
|
|
572
|
+
height: 200
|
|
573
|
+
},
|
|
574
|
+
collapsedSize: {
|
|
575
|
+
width: 300,
|
|
576
|
+
height: 80
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
handles: [
|
|
580
|
+
{
|
|
581
|
+
position: Position11.Bottom,
|
|
582
|
+
dataType: "module" /* module */,
|
|
583
|
+
connection: "target",
|
|
584
|
+
maxConnections: 1,
|
|
585
|
+
hideOnCollapse: true
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
position: Position11.Right,
|
|
589
|
+
dataType: "module" /* module */,
|
|
590
|
+
connection: "source"
|
|
591
|
+
}
|
|
592
|
+
]
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
// src/templates/modifiers/noise-abs-template.ts
|
|
597
|
+
import { Position as Position12 } from "@xyflow/system";
|
|
598
|
+
var NoiseAbsNodeTemplateFactory = class {
|
|
599
|
+
template = {
|
|
600
|
+
type: "noise-abs" /* noiseAbs */,
|
|
601
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
602
|
+
data: {
|
|
603
|
+
title: "Abs Noise"
|
|
604
|
+
},
|
|
605
|
+
handles: [
|
|
606
|
+
{
|
|
607
|
+
position: Position12.Left,
|
|
608
|
+
dataType: "module" /* module */,
|
|
609
|
+
connection: "target",
|
|
610
|
+
maxConnections: 1
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
position: Position12.Right,
|
|
614
|
+
dataType: "module" /* module */,
|
|
615
|
+
connection: "source"
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
// src/templates/modifiers/noise-clamp-template.ts
|
|
622
|
+
import { Position as Position13 } from "@xyflow/system";
|
|
623
|
+
var NoiseClampNodeTemplateFactory = class {
|
|
624
|
+
template = {
|
|
625
|
+
type: "noise-clamp" /* noiseClamp */,
|
|
626
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
627
|
+
data: {
|
|
628
|
+
title: "Clamp Noise",
|
|
629
|
+
lowerBound: -1,
|
|
630
|
+
upperBound: 1
|
|
631
|
+
},
|
|
632
|
+
handles: [
|
|
633
|
+
{
|
|
634
|
+
position: Position13.Left,
|
|
635
|
+
dataType: "module" /* module */,
|
|
636
|
+
connection: "target",
|
|
637
|
+
maxConnections: 1
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
position: Position13.Right,
|
|
641
|
+
dataType: "module" /* module */,
|
|
642
|
+
connection: "source"
|
|
643
|
+
}
|
|
644
|
+
]
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
// src/templates/modifiers/noise-combine-template.ts
|
|
649
|
+
import { Position as Position14 } from "@xyflow/system";
|
|
650
|
+
var NoiseCombineNodeTemplateFactory = class {
|
|
651
|
+
template = {
|
|
652
|
+
type: "noise-combiner" /* noiseCombine */,
|
|
653
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
654
|
+
data: {
|
|
655
|
+
title: "Combine Noise",
|
|
656
|
+
operation: "add" /* add */
|
|
657
|
+
},
|
|
658
|
+
handles: [
|
|
659
|
+
{
|
|
660
|
+
position: Position14.Left,
|
|
661
|
+
dataType: "module" /* module */,
|
|
662
|
+
connection: "target",
|
|
663
|
+
maxConnections: 2
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
position: Position14.Right,
|
|
667
|
+
dataType: "module" /* module */,
|
|
668
|
+
connection: "source"
|
|
669
|
+
}
|
|
670
|
+
]
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// src/templates/modifiers/noise-curve-template.ts
|
|
675
|
+
import { Position as Position15 } from "@xyflow/system";
|
|
676
|
+
var NoiseCurveNodeTemplateFactory = class {
|
|
677
|
+
template = {
|
|
678
|
+
type: "noise-curve" /* noiseCurve */,
|
|
679
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
680
|
+
data: {
|
|
681
|
+
title: "Noise Curve",
|
|
682
|
+
points: []
|
|
683
|
+
},
|
|
684
|
+
handles: [
|
|
685
|
+
{
|
|
686
|
+
position: Position15.Left,
|
|
687
|
+
dataType: "module" /* module */,
|
|
688
|
+
connection: "target",
|
|
689
|
+
maxConnections: 1
|
|
690
|
+
},
|
|
691
|
+
// {
|
|
692
|
+
// position: Position.Left,
|
|
693
|
+
// dataType: CoreHandleType.variableProperty,
|
|
694
|
+
// connection: 'target',
|
|
695
|
+
// },
|
|
696
|
+
{
|
|
697
|
+
position: Position15.Right,
|
|
698
|
+
dataType: "module" /* module */,
|
|
699
|
+
connection: "source"
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
// src/templates/modifiers/noise-exponent-template.ts
|
|
706
|
+
import { Position as Position16 } from "@xyflow/system";
|
|
707
|
+
var NoiseExponentNodeTemplateFactory = class {
|
|
708
|
+
template = {
|
|
709
|
+
type: "noise-exponent" /* noiseExponent */,
|
|
710
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
711
|
+
data: {
|
|
712
|
+
title: "Noise Exponent",
|
|
713
|
+
exponent: 1
|
|
714
|
+
},
|
|
715
|
+
handles: [
|
|
716
|
+
{
|
|
717
|
+
position: Position16.Left,
|
|
718
|
+
dataType: "module" /* module */,
|
|
719
|
+
connection: "target",
|
|
720
|
+
maxConnections: 1
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
position: Position16.Right,
|
|
724
|
+
dataType: "module" /* module */,
|
|
725
|
+
connection: "source"
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
// src/templates/modifiers/noise-invert-template.ts
|
|
732
|
+
import { Position as Position17 } from "@xyflow/system";
|
|
733
|
+
var NoiseInvertNodeTemplateFactory = class {
|
|
734
|
+
template = {
|
|
735
|
+
type: "noise-invert" /* noiseInvert */,
|
|
736
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
737
|
+
data: {
|
|
738
|
+
title: "Invert Noise"
|
|
739
|
+
},
|
|
740
|
+
handles: [
|
|
741
|
+
{
|
|
742
|
+
position: Position17.Left,
|
|
743
|
+
dataType: "module" /* module */,
|
|
744
|
+
connection: "target",
|
|
745
|
+
maxConnections: 1
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
position: Position17.Right,
|
|
749
|
+
dataType: "module" /* module */,
|
|
750
|
+
connection: "source"
|
|
751
|
+
}
|
|
752
|
+
]
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
// src/templates/modifiers/noise-normalize-template.ts
|
|
757
|
+
import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
|
|
758
|
+
import { Position as Position18 } from "@xyflow/system";
|
|
759
|
+
var NoiseNormalizeNodeTemplateFactory = class {
|
|
760
|
+
template = {
|
|
761
|
+
id: IDGenerator3.template(),
|
|
762
|
+
type: "noise-normalize" /* noiseNormalize */,
|
|
763
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
764
|
+
data: {
|
|
765
|
+
title: "Normalize Noise",
|
|
766
|
+
intervalStart: -1,
|
|
767
|
+
intervalEnd: 1
|
|
768
|
+
},
|
|
769
|
+
handles: [
|
|
770
|
+
{
|
|
771
|
+
position: Position18.Left,
|
|
772
|
+
dataType: "module" /* module */,
|
|
773
|
+
connection: "target",
|
|
774
|
+
maxConnections: 1
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
position: Position18.Right,
|
|
778
|
+
dataType: "module" /* module */,
|
|
779
|
+
connection: "source"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
// src/templates/modifiers/noise-scalebias-template.ts
|
|
786
|
+
import { Position as Position19 } from "@xyflow/system";
|
|
787
|
+
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
788
|
+
template = {
|
|
789
|
+
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
790
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
791
|
+
data: {
|
|
792
|
+
title: "Scale/Bias Noise",
|
|
793
|
+
scale: 1,
|
|
794
|
+
bias: 0
|
|
795
|
+
},
|
|
796
|
+
handles: [
|
|
797
|
+
{
|
|
798
|
+
position: Position19.Left,
|
|
799
|
+
dataType: "module" /* module */,
|
|
800
|
+
connection: "target",
|
|
801
|
+
maxConnections: 1
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
position: Position19.Right,
|
|
805
|
+
dataType: "module" /* module */,
|
|
806
|
+
connection: "source"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
// src/templates/modifiers/noise-terrace-template.ts
|
|
813
|
+
import { Position as Position20 } from "@xyflow/system";
|
|
814
|
+
var NoiseTerraceNodeTemplateFactory = class {
|
|
815
|
+
template = {
|
|
816
|
+
type: "noise-terrace" /* noiseTerrace */,
|
|
817
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
818
|
+
data: {
|
|
819
|
+
title: "Noise Terrace",
|
|
820
|
+
points: []
|
|
821
|
+
},
|
|
822
|
+
handles: [
|
|
823
|
+
{
|
|
824
|
+
position: Position20.Left,
|
|
825
|
+
dataType: "module" /* module */,
|
|
826
|
+
connection: "target",
|
|
827
|
+
maxConnections: 1
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
position: Position20.Right,
|
|
831
|
+
dataType: "module" /* module */,
|
|
832
|
+
connection: "source"
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
// src/templates/output/noise-logger-template.ts
|
|
839
|
+
import { Position as Position21 } from "@xyflow/system";
|
|
840
|
+
var NoiseLoggerNodeTemplateFactory = class {
|
|
841
|
+
template = {
|
|
842
|
+
type: "noise-logger" /* noiseLogger */,
|
|
843
|
+
group: "Output" /* output */,
|
|
844
|
+
data: {
|
|
845
|
+
title: "Noise Logger"
|
|
846
|
+
},
|
|
847
|
+
handles: [
|
|
848
|
+
{
|
|
849
|
+
position: Position21.Left,
|
|
850
|
+
dataType: "noise" /* noise */,
|
|
851
|
+
connection: "target"
|
|
852
|
+
}
|
|
853
|
+
]
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
// src/templates/output/noise-output-template.ts
|
|
858
|
+
import { Position as Position22 } from "@xyflow/system";
|
|
859
|
+
var NoiseOutputNodeTemplateFactory = class {
|
|
860
|
+
template = {
|
|
861
|
+
type: "noise-output" /* noiseOutput */,
|
|
862
|
+
group: "Output" /* output */,
|
|
863
|
+
data: {
|
|
864
|
+
title: "Noise Output"
|
|
865
|
+
},
|
|
866
|
+
handles: [
|
|
867
|
+
{
|
|
868
|
+
position: Position22.Left,
|
|
869
|
+
dataType: "position" /* position */,
|
|
870
|
+
connection: "target"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
position: Position22.Left,
|
|
874
|
+
dataType: "module" /* module */,
|
|
875
|
+
connection: "target",
|
|
876
|
+
maxConnections: 1
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
position: Position22.Right,
|
|
880
|
+
dataType: "noise" /* noise */,
|
|
881
|
+
connection: "source"
|
|
882
|
+
}
|
|
883
|
+
]
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
// src/templates/output/noise-raw-texture-template.ts
|
|
888
|
+
import { Position as Position23 } from "@xyflow/system";
|
|
889
|
+
var NoiseRawTextureTemplateFactory = class {
|
|
890
|
+
template = {
|
|
891
|
+
type: "texture-data" /* textureData */,
|
|
892
|
+
group: "Output" /* output */,
|
|
893
|
+
data: {
|
|
894
|
+
title: "Texture Data"
|
|
895
|
+
},
|
|
896
|
+
handles: [
|
|
897
|
+
{
|
|
898
|
+
position: Position23.Left,
|
|
899
|
+
dataType: "noise" /* noise */,
|
|
900
|
+
connection: "target",
|
|
901
|
+
maxConnections: 1
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
position: Position23.Right,
|
|
905
|
+
dataType: "texture" /* texture */,
|
|
906
|
+
connection: "source"
|
|
907
|
+
}
|
|
908
|
+
]
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
// src/templates/output/position-logger-template.ts
|
|
913
|
+
import { Position as Position24 } from "@xyflow/system";
|
|
914
|
+
var PositionLoggerNodeTemplateFactory = class {
|
|
915
|
+
template = {
|
|
916
|
+
type: "position-logger" /* positionLogger */,
|
|
917
|
+
group: "Positions" /* positions */,
|
|
918
|
+
data: {
|
|
919
|
+
title: "Position Logger"
|
|
920
|
+
},
|
|
921
|
+
handles: [
|
|
922
|
+
{
|
|
923
|
+
position: Position24.Left,
|
|
924
|
+
dataType: "position" /* position */,
|
|
925
|
+
connection: "target"
|
|
926
|
+
}
|
|
927
|
+
]
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
// src/templates/selectors/noise-blend-template.ts
|
|
932
|
+
import { Position as Position25 } from "@xyflow/system";
|
|
933
|
+
var NoiseBlendNodeTemplateFactory = class {
|
|
934
|
+
template = {
|
|
935
|
+
type: "noise-blend" /* noiseBlend */,
|
|
936
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
937
|
+
data: {
|
|
938
|
+
title: "Noise Blend"
|
|
939
|
+
},
|
|
940
|
+
handles: [
|
|
941
|
+
{
|
|
942
|
+
position: Position25.Left,
|
|
943
|
+
dataType: "module" /* module */,
|
|
944
|
+
connection: "target",
|
|
945
|
+
label: "Source Modules",
|
|
946
|
+
dataId: "source" /* source */,
|
|
947
|
+
maxConnections: 2,
|
|
948
|
+
minConnections: 2
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
position: Position25.Left,
|
|
952
|
+
dataType: "module" /* module */,
|
|
953
|
+
dataId: "control" /* control */,
|
|
954
|
+
connection: "target",
|
|
955
|
+
label: "Control Module",
|
|
956
|
+
maxConnections: 1
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
position: Position25.Right,
|
|
960
|
+
dataType: "module" /* module */,
|
|
961
|
+
dataId: "output" /* output */,
|
|
962
|
+
connection: "source"
|
|
963
|
+
}
|
|
964
|
+
]
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
// src/templates/selectors/noise-select-template.ts
|
|
969
|
+
import { Position as Position26 } from "@xyflow/system";
|
|
970
|
+
var NoiseSelectNodeTemplateFactory = class {
|
|
971
|
+
template = {
|
|
972
|
+
type: "noise-select" /* noiseSelect */,
|
|
973
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
974
|
+
data: {
|
|
975
|
+
title: "Noise Select",
|
|
976
|
+
edgeFalloff: 0,
|
|
977
|
+
lowerBound: -1,
|
|
978
|
+
upperBound: 1
|
|
979
|
+
},
|
|
980
|
+
handles: [
|
|
981
|
+
{
|
|
982
|
+
position: Position26.Left,
|
|
983
|
+
dataType: "module" /* module */,
|
|
984
|
+
dataId: "source" /* source */,
|
|
985
|
+
connection: "target",
|
|
986
|
+
label: "Source Modules",
|
|
987
|
+
maxConnections: 2,
|
|
988
|
+
minConnections: 2
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
position: Position26.Left,
|
|
992
|
+
dataType: "module" /* module */,
|
|
993
|
+
dataId: "control" /* control */,
|
|
994
|
+
connection: "target",
|
|
995
|
+
label: "Control Module",
|
|
996
|
+
maxConnections: 1
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
position: Position26.Right,
|
|
1000
|
+
dataType: "module" /* module */,
|
|
1001
|
+
dataId: "output" /* output */,
|
|
1002
|
+
connection: "source"
|
|
1003
|
+
}
|
|
1004
|
+
]
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
// src/templates/transformers/noise-displace-template.ts
|
|
1009
|
+
import { Position as Position27 } from "@xyflow/system";
|
|
1010
|
+
var NoiseDisplaceNodeTemplateFactory = class {
|
|
1011
|
+
template = {
|
|
1012
|
+
type: "noise-displace" /* noiseDisplace */,
|
|
1013
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1014
|
+
data: {
|
|
1015
|
+
title: "Noise Displace"
|
|
1016
|
+
},
|
|
1017
|
+
handles: [
|
|
1018
|
+
{
|
|
1019
|
+
position: Position27.Left,
|
|
1020
|
+
connection: "target",
|
|
1021
|
+
label: "Source Module",
|
|
1022
|
+
dataType: "module" /* module */,
|
|
1023
|
+
dataId: "source" /* sourceModule */,
|
|
1024
|
+
maxConnections: 1
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
position: Position27.Left,
|
|
1028
|
+
connection: "target",
|
|
1029
|
+
label: "X Module",
|
|
1030
|
+
dataType: "module" /* module */,
|
|
1031
|
+
dataId: "x-module" /* xModule */,
|
|
1032
|
+
maxConnections: 1
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
position: Position27.Left,
|
|
1036
|
+
connection: "target",
|
|
1037
|
+
label: "Y Module",
|
|
1038
|
+
dataType: "module" /* module */,
|
|
1039
|
+
dataId: "y-module" /* yModule */,
|
|
1040
|
+
maxConnections: 1
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
position: Position27.Left,
|
|
1044
|
+
connection: "target",
|
|
1045
|
+
label: "Z Module",
|
|
1046
|
+
dataType: "module" /* module */,
|
|
1047
|
+
dataId: "z-module" /* zModule */,
|
|
1048
|
+
maxConnections: 1
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
position: Position27.Right,
|
|
1052
|
+
dataType: "module" /* module */,
|
|
1053
|
+
dataId: "output" /* output */,
|
|
1054
|
+
connection: "source"
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
// src/templates/transformers/noise-rotate-point-template.ts
|
|
1061
|
+
import { Position as Position28 } from "@xyflow/system";
|
|
1062
|
+
var NoiseRotatePointNodeTemplateFactory = class {
|
|
1063
|
+
template = {
|
|
1064
|
+
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
1065
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1066
|
+
data: {
|
|
1067
|
+
title: "Noise Rotate Point",
|
|
1068
|
+
xAngle: 0,
|
|
1069
|
+
yAngle: 0,
|
|
1070
|
+
zAngle: 0
|
|
1071
|
+
},
|
|
1072
|
+
handles: [
|
|
1073
|
+
{
|
|
1074
|
+
position: Position28.Left,
|
|
1075
|
+
dataType: "module" /* module */,
|
|
1076
|
+
connection: "target",
|
|
1077
|
+
label: "Source Module",
|
|
1078
|
+
maxConnections: 1
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
position: Position28.Right,
|
|
1082
|
+
dataType: "module" /* module */,
|
|
1083
|
+
connection: "source"
|
|
1084
|
+
}
|
|
1085
|
+
]
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1089
|
+
// src/templates/transformers/noise-scale-point-template.ts
|
|
1090
|
+
import { Position as Position29 } from "@xyflow/system";
|
|
1091
|
+
var NoiseScalePointNodeTemplateFactory = class {
|
|
1092
|
+
template = {
|
|
1093
|
+
type: "noise-scale-point" /* noiseScalePoint */,
|
|
1094
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1095
|
+
data: {
|
|
1096
|
+
title: "Noise Scale Point",
|
|
1097
|
+
xScale: 1,
|
|
1098
|
+
yScale: 1,
|
|
1099
|
+
zScale: 1
|
|
1100
|
+
},
|
|
1101
|
+
handles: [
|
|
1102
|
+
{
|
|
1103
|
+
position: Position29.Left,
|
|
1104
|
+
dataType: "module" /* module */,
|
|
1105
|
+
connection: "target",
|
|
1106
|
+
label: "Source Module",
|
|
1107
|
+
maxConnections: 1
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
position: Position29.Right,
|
|
1111
|
+
dataType: "module" /* module */,
|
|
1112
|
+
connection: "source"
|
|
1113
|
+
}
|
|
1114
|
+
]
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
// src/templates/transformers/noise-translate-point-template.ts
|
|
1119
|
+
import { Position as Position30 } from "@xyflow/system";
|
|
1120
|
+
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
1121
|
+
template = {
|
|
1122
|
+
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
1123
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1124
|
+
data: {
|
|
1125
|
+
title: "Noise Translate Point",
|
|
1126
|
+
translateX: 0,
|
|
1127
|
+
translateY: 0,
|
|
1128
|
+
translateZ: 0
|
|
1129
|
+
},
|
|
1130
|
+
handles: [
|
|
1131
|
+
{
|
|
1132
|
+
position: Position30.Left,
|
|
1133
|
+
dataType: "module" /* module */,
|
|
1134
|
+
connection: "target",
|
|
1135
|
+
label: "Source Module",
|
|
1136
|
+
maxConnections: 1
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
position: Position30.Right,
|
|
1140
|
+
dataType: "module" /* module */,
|
|
1141
|
+
connection: "source"
|
|
1142
|
+
}
|
|
1143
|
+
]
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
// src/templates/transformers/noise-turbulence-template.ts
|
|
1148
|
+
import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
|
|
1149
|
+
import { Position as Position31 } from "@xyflow/system";
|
|
1150
|
+
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
1151
|
+
template = {
|
|
1152
|
+
type: "noise-turbulence" /* noiseTurbulence */,
|
|
1153
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1154
|
+
data: {
|
|
1155
|
+
title: "Noise Turbulence",
|
|
1156
|
+
frequency: 1,
|
|
1157
|
+
power: 1,
|
|
1158
|
+
roughness: 1,
|
|
1159
|
+
seed: 0
|
|
1160
|
+
},
|
|
1161
|
+
handles: [
|
|
1162
|
+
{
|
|
1163
|
+
position: Position31.Left,
|
|
1164
|
+
dataType: "module" /* module */,
|
|
1165
|
+
connection: "target",
|
|
1166
|
+
label: "Source Module",
|
|
1167
|
+
maxConnections: 1
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
position: Position31.Left,
|
|
1171
|
+
dataType: CoreHandleType7.variableProperty,
|
|
1172
|
+
label: "Variable Properties",
|
|
1173
|
+
connection: "target"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
position: Position31.Right,
|
|
1177
|
+
dataType: "module" /* module */,
|
|
1178
|
+
connection: "source"
|
|
1179
|
+
}
|
|
1180
|
+
]
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1184
|
+
// src/abstract/node-types.ts
|
|
1185
|
+
var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
|
|
1186
|
+
NoiseNodeType2["position"] = "position";
|
|
1187
|
+
NoiseNodeType2["grid"] = "grid";
|
|
1188
|
+
NoiseNodeType2["textureData"] = "texture-data";
|
|
1189
|
+
NoiseNodeType2["groupModule"] = "group-module";
|
|
1190
|
+
NoiseNodeType2["positionLogger"] = "position-logger";
|
|
1191
|
+
NoiseNodeType2["noiseLogger"] = "noise-logger";
|
|
1192
|
+
NoiseNodeType2["noiseOutput"] = "noise-output";
|
|
1193
|
+
NoiseNodeType2["noiseConst"] = "noise-constant";
|
|
1194
|
+
NoiseNodeType2["noiseBillow"] = "noise-billow";
|
|
1195
|
+
NoiseNodeType2["noiseCheckerboard"] = "noise-checkerboard";
|
|
1196
|
+
NoiseNodeType2["noiseNormalize"] = "noise-normalize";
|
|
1197
|
+
NoiseNodeType2["noiseCylinders"] = "noise-cylinders";
|
|
1198
|
+
NoiseNodeType2["noisePerlin"] = "noise-perlin";
|
|
1199
|
+
NoiseNodeType2["noiseRidgedMulti"] = "noise-ridged-multi";
|
|
1200
|
+
NoiseNodeType2["noiseSpheres"] = "noise-spheres";
|
|
1201
|
+
NoiseNodeType2["noiseVoronoi"] = "noise-voronoi";
|
|
1202
|
+
NoiseNodeType2["noiseCombine"] = "noise-combiner";
|
|
1203
|
+
NoiseNodeType2["noiseClamp"] = "noise-clamp";
|
|
1204
|
+
NoiseNodeType2["noiseAbs"] = "noise-abs";
|
|
1205
|
+
NoiseNodeType2["noiseCurve"] = "noise-curve";
|
|
1206
|
+
NoiseNodeType2["noiseExponent"] = "noise-exponent";
|
|
1207
|
+
NoiseNodeType2["noiseInvert"] = "noise-invert";
|
|
1208
|
+
NoiseNodeType2["noiseScaleBias"] = "noise-scale-bias";
|
|
1209
|
+
NoiseNodeType2["noiseTerrace"] = "noise-terrace";
|
|
1210
|
+
NoiseNodeType2["noiseBlend"] = "noise-blend";
|
|
1211
|
+
NoiseNodeType2["noiseSelect"] = "noise-select";
|
|
1212
|
+
NoiseNodeType2["noiseDisplace"] = "noise-displace";
|
|
1213
|
+
NoiseNodeType2["noiseRotatePoint"] = "noise-rotate-point";
|
|
1214
|
+
NoiseNodeType2["noiseScalePoint"] = "noise-scale-point";
|
|
1215
|
+
NoiseNodeType2["noiseTranslatePoint"] = "noise-translate-point";
|
|
1216
|
+
NoiseNodeType2["noiseTurbulence"] = "noise-turbulence";
|
|
1217
|
+
return NoiseNodeType2;
|
|
1218
|
+
})(NoiseNodeType || {});
|
|
1219
|
+
var noiseNodeTypes = {
|
|
1220
|
+
["group-module" /* groupModule */]: module_group_node_default,
|
|
1221
|
+
["position" /* position */]: position_const_node_default,
|
|
1222
|
+
["grid" /* grid */]: position_grid_node_default,
|
|
1223
|
+
["noise-output" /* noiseOutput */]: noise_output_node_default,
|
|
1224
|
+
["texture-data" /* textureData */]: noise_raw_texture_node_default,
|
|
1225
|
+
["noise-logger" /* noiseLogger */]: noise_logger_node_default,
|
|
1226
|
+
["position-logger" /* positionLogger */]: positions_logger_node_default,
|
|
1227
|
+
["noise-constant" /* noiseConst */]: noise_const_node_default,
|
|
1228
|
+
["noise-billow" /* noiseBillow */]: noise_billow_node_default,
|
|
1229
|
+
["noise-checkerboard" /* noiseCheckerboard */]: noise_checkerboard_node_default,
|
|
1230
|
+
["noise-cylinders" /* noiseCylinders */]: noise_cylinders_node_default,
|
|
1231
|
+
["noise-perlin" /* noisePerlin */]: noise_perlin_node_default,
|
|
1232
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: noise_ridgedmulti_node_default,
|
|
1233
|
+
["noise-spheres" /* noiseSpheres */]: noise_spheres_node_default,
|
|
1234
|
+
["noise-voronoi" /* noiseVoronoi */]: noise_voronoi_node_default,
|
|
1235
|
+
["noise-combiner" /* noiseCombine */]: noise_combine_node_default,
|
|
1236
|
+
["noise-clamp" /* noiseClamp */]: noise_clamp_node_default,
|
|
1237
|
+
["noise-abs" /* noiseAbs */]: noise_abs_node_default,
|
|
1238
|
+
["noise-normalize" /* noiseNormalize */]: noise_normalize_node_default,
|
|
1239
|
+
["noise-curve" /* noiseCurve */]: noise_curve_node_default,
|
|
1240
|
+
["noise-exponent" /* noiseExponent */]: noise_exponent_node_default,
|
|
1241
|
+
["noise-invert" /* noiseInvert */]: noise_invert_node_default,
|
|
1242
|
+
["noise-scale-bias" /* noiseScaleBias */]: noise_scale_bias_node_default,
|
|
1243
|
+
["noise-terrace" /* noiseTerrace */]: noise_terrace_node_default,
|
|
1244
|
+
["noise-blend" /* noiseBlend */]: noise_blend_node_default,
|
|
1245
|
+
["noise-select" /* noiseSelect */]: noise_select_node_default,
|
|
1246
|
+
["noise-displace" /* noiseDisplace */]: noise_displace_node_default,
|
|
1247
|
+
["noise-rotate-point" /* noiseRotatePoint */]: noise_rotate_point_node_default,
|
|
1248
|
+
["noise-scale-point" /* noiseScalePoint */]: noise_scale_point_node_default,
|
|
1249
|
+
["noise-translate-point" /* noiseTranslatePoint */]: noise_translate_point_node_default,
|
|
1250
|
+
["noise-turbulence" /* noiseTurbulence */]: noise_turbulence_node_default
|
|
1251
|
+
};
|
|
1252
|
+
var noiseNodeTemplates = {
|
|
1253
|
+
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
1254
|
+
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
1255
|
+
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
1256
|
+
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|
|
1257
|
+
["noise-logger" /* noiseLogger */]: new NoiseLoggerNodeTemplateFactory(),
|
|
1258
|
+
["noise-constant" /* noiseConst */]: new NoiseConstNodeTemplateFactory(),
|
|
1259
|
+
["position" /* position */]: new PositionConstNodeTemplateFactory(),
|
|
1260
|
+
["position-logger" /* positionLogger */]: new PositionLoggerNodeTemplateFactory(),
|
|
1261
|
+
["grid" /* grid */]: new PositionGridNodeTemplateFactory(),
|
|
1262
|
+
["texture-data" /* textureData */]: new NoiseRawTextureTemplateFactory(),
|
|
1263
|
+
["noise-cylinders" /* noiseCylinders */]: new NoiseCylindersNodeTemplateFactory(),
|
|
1264
|
+
["noise-perlin" /* noisePerlin */]: new NoisePerlinNodeTemplateFactory(),
|
|
1265
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: new NoiseRidgedMultiNodeTemplateFactory(),
|
|
1266
|
+
["noise-spheres" /* noiseSpheres */]: new NoiseSpheresNodeTemplateFactory(),
|
|
1267
|
+
["noise-voronoi" /* noiseVoronoi */]: new NoiseVoronoiNodeTemplateFactory(),
|
|
1268
|
+
["noise-combiner" /* noiseCombine */]: new NoiseCombineNodeTemplateFactory(),
|
|
1269
|
+
["noise-clamp" /* noiseClamp */]: new NoiseClampNodeTemplateFactory(),
|
|
1270
|
+
["noise-abs" /* noiseAbs */]: new NoiseAbsNodeTemplateFactory(),
|
|
1271
|
+
["noise-curve" /* noiseCurve */]: new NoiseCurveNodeTemplateFactory(),
|
|
1272
|
+
["noise-exponent" /* noiseExponent */]: new NoiseExponentNodeTemplateFactory(),
|
|
1273
|
+
["noise-invert" /* noiseInvert */]: new NoiseInvertNodeTemplateFactory(),
|
|
1274
|
+
["noise-scale-bias" /* noiseScaleBias */]: new NoiseScaleBiasNodeTemplateFactory(),
|
|
1275
|
+
["noise-terrace" /* noiseTerrace */]: new NoiseTerraceNodeTemplateFactory(),
|
|
1276
|
+
["noise-blend" /* noiseBlend */]: new NoiseBlendNodeTemplateFactory(),
|
|
1277
|
+
["noise-select" /* noiseSelect */]: new NoiseSelectNodeTemplateFactory(),
|
|
1278
|
+
["noise-displace" /* noiseDisplace */]: new NoiseDisplaceNodeTemplateFactory(),
|
|
1279
|
+
["noise-rotate-point" /* noiseRotatePoint */]: new NoiseRotatePointNodeTemplateFactory(),
|
|
1280
|
+
["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
|
|
1281
|
+
["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
|
|
1282
|
+
["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
|
|
1283
|
+
["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
// src/nodes/output/noise-output-node.tsx
|
|
1287
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1288
|
+
function NoiseOutputNode({ id, selected, data, type }) {
|
|
1289
|
+
const [size, setSize] = useState3(0);
|
|
1290
|
+
const updateComputedData = useUpdateNodeComputedData4();
|
|
1291
|
+
const onDataUpdated = useCallback3(
|
|
1292
|
+
(handleData) => {
|
|
1293
|
+
const incomingPositions = handleData["position" /* position */];
|
|
1294
|
+
const incomingModule = handleData["module" /* module */];
|
|
1295
|
+
if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
|
|
1296
|
+
const { module } = incomingModule[0];
|
|
1297
|
+
const noise = [];
|
|
1298
|
+
for (const input of incomingPositions) {
|
|
1299
|
+
for (const position of input.positions) {
|
|
1300
|
+
const value = module.getValue(position.x, position.y, position.z);
|
|
1301
|
+
noise.push({
|
|
1302
|
+
position,
|
|
1303
|
+
value
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
updateComputedData(id, { noise, module });
|
|
1308
|
+
setSize(noise.length);
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
[]
|
|
1312
|
+
);
|
|
1313
|
+
return /* @__PURE__ */ jsxs6(NodeContainer6, { id, selected, data, type, children: [
|
|
1314
|
+
/* @__PURE__ */ jsx6(
|
|
1315
|
+
HandlesIncomingDataStatus3,
|
|
1316
|
+
{
|
|
1317
|
+
nodeId: id,
|
|
1318
|
+
handles: data.handles,
|
|
1319
|
+
handleKey: "dataType",
|
|
1320
|
+
onDataUpdated,
|
|
1321
|
+
type: "target",
|
|
1322
|
+
resetComputedData: true
|
|
1323
|
+
}
|
|
1324
|
+
),
|
|
1325
|
+
/* @__PURE__ */ jsxs6(Text3, { mt: 5, children: [
|
|
1326
|
+
"Noise points: ",
|
|
1327
|
+
size
|
|
1328
|
+
] }),
|
|
1329
|
+
/* @__PURE__ */ jsx6(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
|
|
1330
|
+
] });
|
|
1331
|
+
}
|
|
1332
|
+
var noise_output_node_default = NoiseOutputNode;
|
|
1333
|
+
|
|
1334
|
+
export {
|
|
1335
|
+
noise_logger_node_default,
|
|
1336
|
+
noise_output_node_default,
|
|
1337
|
+
noise_raw_texture_node_default,
|
|
1338
|
+
positions_logger_node_default,
|
|
1339
|
+
noise_blend_node_default,
|
|
1340
|
+
noise_select_node_default,
|
|
1341
|
+
NoiseTemplateGroup,
|
|
1342
|
+
NoiseBillowNodeTemplateFactory,
|
|
1343
|
+
NoiseCheckerboardNodeTemplateFactory,
|
|
1344
|
+
NoiseConstNodeTemplateFactory,
|
|
1345
|
+
NoiseCylindersNodeTemplateFactory,
|
|
1346
|
+
NoisePerlinNodeTemplateFactory,
|
|
1347
|
+
NoiseRidgedMultiNodeTemplateFactory,
|
|
1348
|
+
NoiseSpheresNodeTemplateFactory,
|
|
1349
|
+
NoiseVoronoiNodeTemplateFactory,
|
|
1350
|
+
PositionConstNodeTemplateFactory,
|
|
1351
|
+
PositionGridNodeTemplateFactory,
|
|
1352
|
+
ModuleGroupNodeTemplateFactory,
|
|
1353
|
+
NoiseAbsNodeTemplateFactory,
|
|
1354
|
+
NoiseClampNodeTemplateFactory,
|
|
1355
|
+
NoiseCombineNodeTemplateFactory,
|
|
1356
|
+
NoiseCurveNodeTemplateFactory,
|
|
1357
|
+
NoiseExponentNodeTemplateFactory,
|
|
1358
|
+
NoiseInvertNodeTemplateFactory,
|
|
1359
|
+
NoiseNormalizeNodeTemplateFactory,
|
|
1360
|
+
NoiseScaleBiasNodeTemplateFactory,
|
|
1361
|
+
NoiseTerraceNodeTemplateFactory,
|
|
1362
|
+
NoiseLoggerNodeTemplateFactory,
|
|
1363
|
+
NoiseOutputNodeTemplateFactory,
|
|
1364
|
+
NoiseRawTextureTemplateFactory,
|
|
1365
|
+
PositionLoggerNodeTemplateFactory,
|
|
1366
|
+
NoiseBlendNodeTemplateFactory,
|
|
1367
|
+
NoiseSelectNodeTemplateFactory,
|
|
1368
|
+
NoiseDisplaceNodeTemplateFactory,
|
|
1369
|
+
NoiseRotatePointNodeTemplateFactory,
|
|
1370
|
+
NoiseScalePointNodeTemplateFactory,
|
|
1371
|
+
NoiseTranslatePointNodeTemplateFactory,
|
|
1372
|
+
NoiseTurbulenceNodeTemplateFactory,
|
|
1373
|
+
NoiseNodeType,
|
|
1374
|
+
noiseNodeTypes,
|
|
1375
|
+
noiseNodeTemplates
|
|
1376
|
+
};
|