@awesome-flow/noise 0.1.0 → 0.4.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/LICENSE.md +201 -0
- package/dist/abstract/index.cjs +1405 -2078
- package/dist/abstract/index.cjs.map +1 -1
- package/dist/abstract/index.d.cts +23 -25
- package/dist/abstract/index.d.ts +23 -25
- package/dist/abstract/index.js +1315 -1996
- package/dist/abstract/index.js.map +1 -1
- package/dist/index-BungWYrh.d.cts +49 -0
- package/dist/index-DsQSjZC5.d.ts +49 -0
- package/dist/{node-props-CeZ8Oshz.d.ts → node-props-BbqbXDXn.d.cts} +2 -22
- package/dist/{node-props-hKW-_KOU.d.cts → node-props-BbqbXDXn.d.ts} +2 -22
- package/dist/nodes/generators/index.cjs +130 -380
- package/dist/nodes/generators/index.cjs.map +1 -1
- package/dist/nodes/generators/index.d.cts +2 -8
- package/dist/nodes/generators/index.d.ts +2 -8
- package/dist/nodes/generators/index.js +112 -360
- package/dist/nodes/generators/index.js.map +1 -1
- package/dist/nodes/groups/index.cjs +25 -13
- package/dist/nodes/groups/index.cjs.map +1 -1
- package/dist/nodes/groups/index.js +26 -14
- package/dist/nodes/groups/index.js.map +1 -1
- package/dist/nodes/index.cjs +1654 -988
- package/dist/nodes/index.cjs.map +1 -1
- package/dist/nodes/index.d.cts +3 -5
- package/dist/nodes/index.d.ts +3 -5
- package/dist/nodes/index.js +1622 -960
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/modifiers/index.cjs +17 -119
- package/dist/nodes/modifiers/index.cjs.map +1 -1
- package/dist/nodes/modifiers/index.d.cts +2 -6
- package/dist/nodes/modifiers/index.d.ts +2 -6
- package/dist/nodes/modifiers/index.js +16 -124
- package/dist/nodes/modifiers/index.js.map +1 -1
- package/dist/nodes/output/index.cjs +1271 -89
- package/dist/nodes/output/index.cjs.map +1 -1
- package/dist/nodes/output/index.js +1314 -92
- package/dist/nodes/output/index.js.map +1 -1
- package/dist/nodes/selectors/index.cjs +1296 -58
- package/dist/nodes/selectors/index.cjs.map +1 -1
- package/dist/nodes/selectors/index.d.cts +1 -3
- package/dist/nodes/selectors/index.d.ts +1 -3
- package/dist/nodes/selectors/index.js +1339 -65
- package/dist/nodes/selectors/index.js.map +1 -1
- package/dist/nodes/transformers/index.cjs +67 -206
- package/dist/nodes/transformers/index.cjs.map +1 -1
- package/dist/nodes/transformers/index.d.cts +3 -5
- package/dist/nodes/transformers/index.d.ts +3 -5
- package/dist/nodes/transformers/index.js +54 -193
- package/dist/nodes/transformers/index.js.map +1 -1
- package/dist/templates/generators/index.cjs +839 -1278
- package/dist/templates/generators/index.cjs.map +1 -1
- package/dist/templates/generators/index.d.cts +13 -50
- package/dist/templates/generators/index.d.ts +13 -50
- package/dist/templates/generators/index.js +836 -1280
- package/dist/templates/generators/index.js.map +1 -1
- package/dist/templates/groups/index.cjs +837 -1272
- package/dist/templates/groups/index.cjs.map +1 -1
- package/dist/templates/groups/index.d.cts +1 -5
- package/dist/templates/groups/index.d.ts +1 -5
- package/dist/templates/groups/index.js +835 -1277
- package/dist/templates/groups/index.js.map +1 -1
- package/dist/templates/index.cjs +839 -1280
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.d.cts +4 -7
- package/dist/templates/index.d.ts +4 -7
- package/dist/templates/index.js +836 -1281
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/modifiers/index.cjs +841 -1278
- package/dist/templates/modifiers/index.cjs.map +1 -1
- package/dist/templates/modifiers/index.d.cts +11 -38
- package/dist/templates/modifiers/index.d.ts +11 -38
- package/dist/templates/modifiers/index.js +838 -1281
- package/dist/templates/modifiers/index.js.map +1 -1
- package/dist/templates/output/index.cjs +839 -1274
- package/dist/templates/output/index.cjs.map +1 -1
- package/dist/templates/output/index.d.cts +4 -14
- package/dist/templates/output/index.d.ts +4 -14
- package/dist/templates/output/index.js +837 -1279
- package/dist/templates/output/index.js.map +1 -1
- package/dist/templates/selectors/index.cjs +839 -1274
- package/dist/templates/selectors/index.cjs.map +1 -1
- package/dist/templates/selectors/index.d.cts +3 -9
- package/dist/templates/selectors/index.d.ts +3 -9
- package/dist/templates/selectors/index.js +837 -1279
- package/dist/templates/selectors/index.js.map +1 -1
- package/dist/templates/transformers/index.cjs +839 -1274
- package/dist/templates/transformers/index.cjs.map +1 -1
- package/dist/templates/transformers/index.d.cts +3 -36
- package/dist/templates/transformers/index.d.ts +3 -36
- package/dist/templates/transformers/index.js +837 -1279
- package/dist/templates/transformers/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/handle-types-D-v5S53h.d.cts +0 -22
- package/dist/handle-types-D-v5S53h.d.ts +0 -22
- package/dist/layout/index.cjs +0 -164
- package/dist/layout/index.cjs.map +0 -1
- package/dist/layout/index.d.cts +0 -26
- package/dist/layout/index.d.ts +0 -26
- package/dist/layout/index.js +0 -136
- package/dist/layout/index.js.map +0 -1
- package/dist/properties-BxwtU6i9.d.cts +0 -9
- package/dist/properties-BxwtU6i9.d.ts +0 -9
|
@@ -1,67 +1,288 @@
|
|
|
1
1
|
// src/nodes/selectors/noise-blend-node.tsx
|
|
2
|
-
import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { NodeContainer as NodeContainer32, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
|
|
3
|
+
import { useCallback as useCallback15 } from "react";
|
|
4
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData30 } from "@awesome-flow/core/hooks";
|
|
5
5
|
import { Blend } from "libnoise-ts/module/selector";
|
|
6
|
-
import {
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function NoiseBlendNode({ id, selected, data, type }) {
|
|
9
|
-
const incoming = useIncomingComputedData(id);
|
|
10
|
-
const updateComputedData = useUpdateNodeComputedData();
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (incoming?.length > 2) {
|
|
13
|
-
const module = new Blend(incoming[0].module, incoming[1].module, incoming[2].module);
|
|
14
|
-
updateComputedData(id, { module });
|
|
15
|
-
}
|
|
16
|
-
}, [id, incoming, updateComputedData]);
|
|
17
|
-
return /* @__PURE__ */ jsxs(NodeContainer, { id, selected, data, type, children: [
|
|
18
|
-
/* @__PURE__ */ jsxs(Group, { children: [
|
|
19
|
-
"Modules: ",
|
|
20
|
-
incoming?.length
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ jsx(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
var noise_blend_node_default = NoiseBlendNode;
|
|
6
|
+
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus4 } from "@awesome-flow/core/components";
|
|
26
7
|
|
|
27
|
-
// src/nodes/
|
|
28
|
-
import { NodeContainer
|
|
8
|
+
// src/nodes/generators/noise-simplex-node.tsx
|
|
9
|
+
import { NodeContainer } from "@awesome-flow/core/layout";
|
|
10
|
+
import { useEffect, useMemo } from "react";
|
|
11
|
+
import { useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
|
|
12
|
+
|
|
13
|
+
// src/modules/simplex-module.ts
|
|
14
|
+
import Module from "libnoise-ts/module/Module";
|
|
15
|
+
import { createNoise3D } from "simplex-noise";
|
|
16
|
+
|
|
17
|
+
// src/nodes/generators/noise-simplex-node.tsx
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
|
|
20
|
+
// src/nodes/generators/position-const-node.tsx
|
|
21
|
+
import { NodeContainer as NodeContainer2 } from "@awesome-flow/core/layout";
|
|
29
22
|
import { useEffect as useEffect2, useState } from "react";
|
|
23
|
+
import { Group, NumberInput, Stack } from "@mantine/core";
|
|
24
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData2, useUpdateNodeData } from "@awesome-flow/core/hooks";
|
|
25
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
26
|
+
|
|
27
|
+
// src/nodes/generators/position-grid-node.tsx
|
|
28
|
+
import { NodeContainer as NodeContainer3 } from "@awesome-flow/core/layout";
|
|
29
|
+
import { useEffect as useEffect3, useState as useState2 } from "react";
|
|
30
|
+
import { Group as Group2, NumberInput as NumberInput2, Stack as Stack2 } from "@mantine/core";
|
|
31
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData3, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
|
|
32
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
33
|
+
|
|
34
|
+
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
35
|
+
import { NodeContainer as NodeContainer4, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
36
|
+
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
37
|
+
import { Group as Group3, NumberInput as NumberInput3, Stack as Stack3 } from "@mantine/core";
|
|
38
|
+
import {
|
|
39
|
+
useIncomingComputedData,
|
|
40
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData4,
|
|
41
|
+
useUpdateNodeData as useUpdateNodeData3
|
|
42
|
+
} from "@awesome-flow/core/hooks";
|
|
43
|
+
|
|
44
|
+
// src/modules/normalize-noise-module.ts
|
|
45
|
+
import ModifierModule from "libnoise-ts/module/modifier";
|
|
46
|
+
|
|
47
|
+
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
48
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
49
|
+
|
|
50
|
+
// src/nodes/generators/noise-const-node.tsx
|
|
51
|
+
import { NodeContainer as NodeContainer5 } from "@awesome-flow/core/layout";
|
|
52
|
+
import { useEffect as useEffect5, useMemo as useMemo2, useState as useState4 } from "react";
|
|
53
|
+
import { Group as Group4, NumberInput as NumberInput4, Stack as Stack4 } from "@mantine/core";
|
|
54
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData5, useUpdateNodeData as useUpdateNodeData4 } from "@awesome-flow/core/hooks";
|
|
55
|
+
import { Const } from "libnoise-ts/module/generator";
|
|
56
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
57
|
+
|
|
58
|
+
// src/nodes/generators/noise-billow-node.tsx
|
|
59
|
+
import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
|
|
60
|
+
import { useCallback, useMemo as useMemo3 } from "react";
|
|
61
|
+
import { Billow } from "libnoise-ts/module/generator";
|
|
62
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
|
|
63
|
+
import { NodePropertyVariables } from "@awesome-flow/core/components";
|
|
64
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
65
|
+
|
|
66
|
+
// src/nodes/output/noise-logger-node.tsx
|
|
67
|
+
import { NodeContainer as NodeContainer7, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
|
|
68
|
+
import { useMemo as useMemo4 } from "react";
|
|
69
|
+
import { Divider, Stack as Stack5, Text } from "@mantine/core";
|
|
70
|
+
import { useIncomingComputedData as useIncomingComputedData2 } from "@awesome-flow/core/hooks";
|
|
71
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
72
|
+
|
|
73
|
+
// src/nodes/output/noise-raw-texture-node.tsx
|
|
74
|
+
import { NodeContainer as NodeContainer8, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
|
|
75
|
+
import { useEffect as useEffect6, useMemo as useMemo5, useState as useState5 } from "react";
|
|
76
|
+
import { useIncomingComputedData as useIncomingComputedData3, useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
|
|
77
|
+
import { Group as Group5, Stack as Stack6 } from "@mantine/core";
|
|
78
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
79
|
+
|
|
80
|
+
// src/nodes/generators/noise-checkerboard-node.tsx
|
|
81
|
+
import { NodeContainer as NodeContainer9 } from "@awesome-flow/core/layout";
|
|
82
|
+
import { useEffect as useEffect7, useMemo as useMemo6 } from "react";
|
|
83
|
+
import { Checkerboard } from "libnoise-ts/module/generator";
|
|
84
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData8 } from "@awesome-flow/core/hooks";
|
|
85
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
86
|
+
|
|
87
|
+
// src/nodes/output/positions-logger-node.tsx
|
|
88
|
+
import { NodeContainer as NodeContainer10, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
|
|
89
|
+
import { useMemo as useMemo7 } from "react";
|
|
90
|
+
import { Divider as Divider2, Stack as Stack7, Text as Text2 } from "@mantine/core";
|
|
91
|
+
import { useIncomingComputedData as useIncomingComputedData4 } from "@awesome-flow/core/hooks";
|
|
92
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
93
|
+
|
|
94
|
+
// src/nodes/generators/noise-cylinders-node.tsx
|
|
95
|
+
import { NodeContainer as NodeContainer11, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
|
|
96
|
+
import { useCallback as useCallback2, useMemo as useMemo8 } from "react";
|
|
97
|
+
import { Cylinders } from "libnoise-ts/module/generator";
|
|
98
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData9 } from "@awesome-flow/core/hooks";
|
|
99
|
+
import { NodePropertyVariables as NodePropertyVariables2 } from "@awesome-flow/core/components";
|
|
100
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
101
|
+
|
|
102
|
+
// src/nodes/generators/noise-perlin-node.tsx
|
|
103
|
+
import { NodeContainer as NodeContainer12, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
|
|
104
|
+
import { useCallback as useCallback3, useMemo as useMemo9 } from "react";
|
|
105
|
+
import { Perlin } from "libnoise-ts/module/generator";
|
|
106
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData10 } from "@awesome-flow/core/hooks";
|
|
107
|
+
import { NodePropertyVariables as NodePropertyVariables3 } from "@awesome-flow/core/components";
|
|
108
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
109
|
+
|
|
110
|
+
// src/nodes/generators/noise-ridgedmulti-node.tsx
|
|
111
|
+
import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
|
|
112
|
+
import { useCallback as useCallback4, useMemo as useMemo10 } from "react";
|
|
113
|
+
import { RidgedMulti } from "libnoise-ts/module/generator";
|
|
114
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData11 } from "@awesome-flow/core/hooks";
|
|
115
|
+
import { NodePropertyVariables as NodePropertyVariables4 } from "@awesome-flow/core/components";
|
|
116
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
117
|
+
|
|
118
|
+
// src/nodes/generators/noise-spheres-node.tsx
|
|
119
|
+
import { NodeContainer as NodeContainer14, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
|
|
120
|
+
import { useCallback as useCallback5, useMemo as useMemo11 } from "react";
|
|
121
|
+
import { Spheres } from "libnoise-ts/module/generator";
|
|
122
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
|
|
123
|
+
import { NodePropertyVariables as NodePropertyVariables5 } from "@awesome-flow/core/components";
|
|
124
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
125
|
+
|
|
126
|
+
// src/nodes/generators/noise-voronoi-node.tsx
|
|
127
|
+
import { NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
|
|
128
|
+
import { useCallback as useCallback6 } from "react";
|
|
129
|
+
import { Voronoi } from "libnoise-ts/module/generator";
|
|
130
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData13 } from "@awesome-flow/core/hooks";
|
|
131
|
+
import { NodePropertyVariables as NodePropertyVariables6 } from "@awesome-flow/core/components";
|
|
132
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
133
|
+
|
|
134
|
+
// src/nodes/modifiers/noise-combine-node.tsx
|
|
135
|
+
import { NodeCombobox, NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
|
|
136
|
+
import { useCallback as useCallback7, useEffect as useEffect8 } from "react";
|
|
137
|
+
import {
|
|
138
|
+
useIncomingComputedData as useIncomingComputedData5,
|
|
139
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData14,
|
|
140
|
+
useUpdateNodeData as useUpdateNodeData5
|
|
141
|
+
} from "@awesome-flow/core/hooks";
|
|
142
|
+
import {
|
|
143
|
+
IconAsterisk,
|
|
144
|
+
IconChevronLeft,
|
|
145
|
+
IconChevronRight,
|
|
146
|
+
IconChevronUp,
|
|
147
|
+
IconPlus
|
|
148
|
+
} from "@tabler/icons-react";
|
|
149
|
+
|
|
150
|
+
// src/abstract/operations.ts
|
|
151
|
+
import { Add, Max, Min, Multiply, Power } from "libnoise-ts/module/combiner";
|
|
152
|
+
|
|
153
|
+
// src/nodes/modifiers/noise-combine-node.tsx
|
|
154
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
155
|
+
|
|
156
|
+
// src/nodes/modifiers/noise-clamp-node.tsx
|
|
157
|
+
import { NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
|
|
158
|
+
import { useEffect as useEffect9, useState as useState6 } from "react";
|
|
159
|
+
import { Group as Group6, NumberInput as NumberInput5, Stack as Stack8 } from "@mantine/core";
|
|
160
|
+
import {
|
|
161
|
+
useIncomingComputedData as useIncomingComputedData6,
|
|
162
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData15,
|
|
163
|
+
useUpdateNodeData as useUpdateNodeData6
|
|
164
|
+
} from "@awesome-flow/core/hooks";
|
|
165
|
+
import { Clamp } from "libnoise-ts/module/modifier";
|
|
166
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
167
|
+
|
|
168
|
+
// src/nodes/modifiers/noise-abs-node.tsx
|
|
169
|
+
import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
|
|
170
|
+
import { useEffect as useEffect10 } from "react";
|
|
171
|
+
import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData16 } from "@awesome-flow/core/hooks";
|
|
172
|
+
import { Abs } from "libnoise-ts/module/modifier";
|
|
173
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
174
|
+
|
|
175
|
+
// src/nodes/output/noise-output-node.tsx
|
|
176
|
+
import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
|
|
177
|
+
import { useCallback as useCallback8, useState as useState7 } from "react";
|
|
178
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData17 } from "@awesome-flow/core/hooks";
|
|
179
|
+
import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
|
|
180
|
+
import { Text as Text3 } from "@mantine/core";
|
|
181
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
182
|
+
|
|
183
|
+
// src/nodes/modifiers/noise-curve-node.tsx
|
|
184
|
+
import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
|
|
185
|
+
import { ActionIcon, Button, Group as Group7, NumberInput as NumberInput6, Space } from "@mantine/core";
|
|
30
186
|
import {
|
|
31
|
-
useIncomingComputedData as
|
|
32
|
-
useUpdateNodeComputedData as
|
|
33
|
-
useUpdateNodeData
|
|
187
|
+
useIncomingComputedData as useIncomingComputedData8,
|
|
188
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData18,
|
|
189
|
+
useUpdateNodeData as useUpdateNodeData7
|
|
34
190
|
} from "@awesome-flow/core/hooks";
|
|
191
|
+
import { useCallback as useCallback9, useEffect as useEffect11, useState as useState8 } from "react";
|
|
192
|
+
import { Curve } from "libnoise-ts/module/modifier";
|
|
193
|
+
import { Tuple } from "libnoise-ts/util";
|
|
194
|
+
import { IconX } from "@tabler/icons-react";
|
|
195
|
+
import { randomId } from "@mantine/hooks";
|
|
196
|
+
import { NodeState } from "@awesome-flow/core/abstract";
|
|
197
|
+
import { Fragment, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
198
|
+
|
|
199
|
+
// src/nodes/modifiers/noise-exponent-node.tsx
|
|
200
|
+
import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
|
|
201
|
+
import { useEffect as useEffect12, useState as useState9 } from "react";
|
|
202
|
+
import { Group as Group8, NumberInput as NumberInput7, Stack as Stack9 } from "@mantine/core";
|
|
203
|
+
import {
|
|
204
|
+
useIncomingComputedData as useIncomingComputedData9,
|
|
205
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData19,
|
|
206
|
+
useUpdateNodeData as useUpdateNodeData8
|
|
207
|
+
} from "@awesome-flow/core/hooks";
|
|
208
|
+
import { Exponent } from "libnoise-ts/module/modifier";
|
|
209
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
210
|
+
|
|
211
|
+
// src/nodes/modifiers/noise-invert-node.tsx
|
|
212
|
+
import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
|
|
213
|
+
import { useEffect as useEffect13 } from "react";
|
|
214
|
+
import { useIncomingComputedData as useIncomingComputedData10, useUpdateNodeComputedData as useUpdateNodeComputedData20 } from "@awesome-flow/core/hooks";
|
|
215
|
+
import { Invert } from "libnoise-ts/module/modifier";
|
|
216
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
217
|
+
|
|
218
|
+
// src/nodes/modifiers/noise-scale-bias-node.tsx
|
|
219
|
+
import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
|
|
220
|
+
import { useEffect as useEffect14, useState as useState10 } from "react";
|
|
221
|
+
import { Group as Group9, NumberInput as NumberInput8, Stack as Stack10 } from "@mantine/core";
|
|
222
|
+
import {
|
|
223
|
+
useIncomingComputedData as useIncomingComputedData11,
|
|
224
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData21,
|
|
225
|
+
useUpdateNodeData as useUpdateNodeData9
|
|
226
|
+
} from "@awesome-flow/core/hooks";
|
|
227
|
+
import { ScaleBias } from "libnoise-ts/module/modifier";
|
|
228
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
229
|
+
|
|
230
|
+
// src/nodes/modifiers/noise-terrace-node.tsx
|
|
231
|
+
import { NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
|
|
232
|
+
import { ActionIcon as ActionIcon2, Button as Button2, Group as Group10, NumberInput as NumberInput9, Space as Space2 } from "@mantine/core";
|
|
233
|
+
import {
|
|
234
|
+
useIncomingComputedData as useIncomingComputedData12,
|
|
235
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData22,
|
|
236
|
+
useUpdateNodeData as useUpdateNodeData10
|
|
237
|
+
} from "@awesome-flow/core/hooks";
|
|
238
|
+
import { useCallback as useCallback10, useEffect as useEffect15, useState as useState11 } from "react";
|
|
239
|
+
import { Terrace } from "libnoise-ts/module/modifier";
|
|
240
|
+
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
241
|
+
import { randomId as randomId2 } from "@mantine/hooks";
|
|
242
|
+
import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
|
|
243
|
+
import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
244
|
+
|
|
245
|
+
// src/nodes/selectors/noise-select-node.tsx
|
|
246
|
+
import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
|
|
247
|
+
import { useCallback as useCallback11, useEffect as useEffect16, useState as useState12 } from "react";
|
|
248
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData23, useUpdateNodeData as useUpdateNodeData11 } from "@awesome-flow/core/hooks";
|
|
35
249
|
import { Select } from "libnoise-ts/module/selector";
|
|
36
|
-
import { Group as
|
|
37
|
-
import {
|
|
250
|
+
import { Group as Group11, NumberInput as NumberInput10, Stack as Stack11 } from "@mantine/core";
|
|
251
|
+
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
|
|
252
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
38
253
|
function NoiseSelectNode({ id, selected, data, type }) {
|
|
39
|
-
const [edgeFalloff, setEdgeFalloff] =
|
|
40
|
-
const [lowerBound, setLowerBound] =
|
|
41
|
-
const [upperBound, setUpperBound] =
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
useEffect2(() => {
|
|
46
|
-
if (incoming?.length > 2) {
|
|
47
|
-
const module = new Select(
|
|
48
|
-
incoming[0].module,
|
|
49
|
-
incoming[1].module,
|
|
50
|
-
incoming[2].module,
|
|
51
|
-
edgeFalloff,
|
|
52
|
-
lowerBound,
|
|
53
|
-
upperBound
|
|
54
|
-
);
|
|
55
|
-
updateComputedData(id, { module });
|
|
56
|
-
}
|
|
254
|
+
const [edgeFalloff, setEdgeFalloff] = useState12(data.edgeFalloff);
|
|
255
|
+
const [lowerBound, setLowerBound] = useState12(data.lowerBound);
|
|
256
|
+
const [upperBound, setUpperBound] = useState12(data.upperBound);
|
|
257
|
+
const updateNodeData = useUpdateNodeData11();
|
|
258
|
+
const updateComputedData = useUpdateNodeComputedData23();
|
|
259
|
+
useEffect16(() => {
|
|
57
260
|
updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
261
|
+
}, [edgeFalloff, lowerBound, upperBound]);
|
|
262
|
+
const onDataUpdated = useCallback11(
|
|
263
|
+
(incomingData) => {
|
|
264
|
+
const incomingSources = incomingData["source" /* source */];
|
|
265
|
+
const incomingControl = incomingData["control" /* control */];
|
|
266
|
+
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
267
|
+
const module = new Select(
|
|
268
|
+
incomingSources[0].module,
|
|
269
|
+
incomingSources[1].module,
|
|
270
|
+
incomingControl[0].module,
|
|
271
|
+
edgeFalloff,
|
|
272
|
+
lowerBound,
|
|
273
|
+
upperBound
|
|
274
|
+
);
|
|
275
|
+
updateComputedData(id, { module });
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
[]
|
|
279
|
+
);
|
|
280
|
+
return /* @__PURE__ */ jsxs21(NodeContainer25, { id, selected, data, type, children: [
|
|
281
|
+
/* @__PURE__ */ jsxs21(Stack11, { children: [
|
|
282
|
+
/* @__PURE__ */ jsxs21(Group11, { children: [
|
|
62
283
|
"Edge Falloff:",
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
284
|
+
/* @__PURE__ */ jsx25(
|
|
285
|
+
NumberInput10,
|
|
65
286
|
{
|
|
66
287
|
size: "xs",
|
|
67
288
|
w: 100,
|
|
@@ -71,10 +292,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
71
292
|
}
|
|
72
293
|
)
|
|
73
294
|
] }),
|
|
74
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ jsxs21(Group11, { children: [
|
|
75
296
|
"Lower Bound:",
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
297
|
+
/* @__PURE__ */ jsx25(
|
|
298
|
+
NumberInput10,
|
|
78
299
|
{
|
|
79
300
|
size: "xs",
|
|
80
301
|
w: 100,
|
|
@@ -84,10 +305,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
84
305
|
}
|
|
85
306
|
)
|
|
86
307
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ jsxs21(Group11, { children: [
|
|
88
309
|
"Upper Bound:",
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
310
|
+
/* @__PURE__ */ jsx25(
|
|
311
|
+
NumberInput10,
|
|
91
312
|
{
|
|
92
313
|
size: "xs",
|
|
93
314
|
w: 100,
|
|
@@ -97,15 +318,1068 @@ function NoiseSelectNode({ id, selected, data, type }) {
|
|
|
97
318
|
}
|
|
98
319
|
)
|
|
99
320
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
321
|
+
/* @__PURE__ */ jsx25(
|
|
322
|
+
HandlesIncomingDataStatus2,
|
|
323
|
+
{
|
|
324
|
+
nodeId: id,
|
|
325
|
+
handles: data.handles,
|
|
326
|
+
handleKey: "dataId",
|
|
327
|
+
onDataUpdated,
|
|
328
|
+
type: "target",
|
|
329
|
+
resetComputedData: true
|
|
330
|
+
}
|
|
331
|
+
)
|
|
104
332
|
] }),
|
|
105
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ jsx25(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
|
|
106
334
|
] });
|
|
107
335
|
}
|
|
108
336
|
var noise_select_node_default = NoiseSelectNode;
|
|
337
|
+
|
|
338
|
+
// src/nodes/transformers/noise-displace-node.tsx
|
|
339
|
+
import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
|
|
340
|
+
import { useCallback as useCallback12 } from "react";
|
|
341
|
+
import { useUpdateNodeComputedData as useUpdateNodeComputedData24 } from "@awesome-flow/core/hooks";
|
|
342
|
+
import { Displace } from "libnoise-ts/module/transformer";
|
|
343
|
+
import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
|
|
344
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
345
|
+
|
|
346
|
+
// src/nodes/transformers/noise-rotate-point-node.tsx
|
|
347
|
+
import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
|
|
348
|
+
import { useEffect as useEffect17, useState as useState13 } from "react";
|
|
349
|
+
import {
|
|
350
|
+
useIncomingComputedData as useIncomingComputedData13,
|
|
351
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData25,
|
|
352
|
+
useUpdateNodeData as useUpdateNodeData12
|
|
353
|
+
} from "@awesome-flow/core/hooks";
|
|
354
|
+
import { Group as Group12, NumberInput as NumberInput11, Stack as Stack12 } from "@mantine/core";
|
|
355
|
+
import { RotatePoint } from "libnoise-ts/module/transformer";
|
|
356
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
357
|
+
|
|
358
|
+
// src/nodes/transformers/noise-scale-point-node.tsx
|
|
359
|
+
import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
|
|
360
|
+
import { useEffect as useEffect18, useState as useState14 } from "react";
|
|
361
|
+
import {
|
|
362
|
+
useIncomingComputedData as useIncomingComputedData14,
|
|
363
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData26,
|
|
364
|
+
useUpdateNodeData as useUpdateNodeData13
|
|
365
|
+
} from "@awesome-flow/core/hooks";
|
|
366
|
+
import { Group as Group13, NumberInput as NumberInput12, Stack as Stack13 } from "@mantine/core";
|
|
367
|
+
import { ScalePoint } from "libnoise-ts/module/transformer";
|
|
368
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
369
|
+
|
|
370
|
+
// src/nodes/transformers/noise-translate-point-node.tsx
|
|
371
|
+
import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
|
|
372
|
+
import { useEffect as useEffect19, useState as useState15 } from "react";
|
|
373
|
+
import {
|
|
374
|
+
useIncomingComputedData as useIncomingComputedData15,
|
|
375
|
+
useUpdateNodeComputedData as useUpdateNodeComputedData27,
|
|
376
|
+
useUpdateNodeData as useUpdateNodeData14
|
|
377
|
+
} from "@awesome-flow/core/hooks";
|
|
378
|
+
import { Group as Group14, NumberInput as NumberInput13, Stack as Stack14 } from "@mantine/core";
|
|
379
|
+
import { TranslatePoint } from "libnoise-ts/module/transformer";
|
|
380
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
381
|
+
|
|
382
|
+
// src/nodes/transformers/noise-turbulence-node .tsx
|
|
383
|
+
import { NodeContainer as NodeContainer30, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
|
|
384
|
+
import { useCallback as useCallback13, useEffect as useEffect20, useState as useState16 } from "react";
|
|
385
|
+
import { useIncomingComputedData as useIncomingComputedData16, useUpdateNodeComputedData as useUpdateNodeComputedData28 } from "@awesome-flow/core/hooks";
|
|
386
|
+
import { Turbulence } from "libnoise-ts/module/transformer";
|
|
387
|
+
import { NodePropertyVariables as NodePropertyVariables7 } from "@awesome-flow/core/components";
|
|
388
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
389
|
+
|
|
390
|
+
// src/templates/generators/noise-checkerboard-template.ts
|
|
391
|
+
import { Position } from "@xyflow/system";
|
|
392
|
+
var NoiseCheckerboardNodeTemplateFactory = class {
|
|
393
|
+
template = {
|
|
394
|
+
type: "noise-checkerboard" /* noiseCheckerboard */,
|
|
395
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
396
|
+
data: {
|
|
397
|
+
title: "Checkerboard Noise"
|
|
398
|
+
},
|
|
399
|
+
handles: [
|
|
400
|
+
{
|
|
401
|
+
position: Position.Right,
|
|
402
|
+
dataType: "module" /* module */,
|
|
403
|
+
connection: "source"
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
// src/templates/generators/noise-const-template.ts
|
|
410
|
+
import { Position as Position2 } from "@xyflow/system";
|
|
411
|
+
var NoiseConstNodeTemplateFactory = class {
|
|
412
|
+
template = {
|
|
413
|
+
type: "noise-constant" /* noiseConst */,
|
|
414
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
415
|
+
data: {
|
|
416
|
+
title: "Const Value Noise",
|
|
417
|
+
noise: 0,
|
|
418
|
+
min: -1,
|
|
419
|
+
max: 1
|
|
420
|
+
},
|
|
421
|
+
handles: [
|
|
422
|
+
{
|
|
423
|
+
position: Position2.Right,
|
|
424
|
+
dataType: "module" /* module */,
|
|
425
|
+
connection: "source"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// src/templates/generators/noise-cylinders-template.ts
|
|
432
|
+
import { CoreHandleType } from "@awesome-flow/core/abstract";
|
|
433
|
+
import { Position as Position3 } from "@xyflow/system";
|
|
434
|
+
var NoiseCylindersNodeTemplateFactory = class {
|
|
435
|
+
template = {
|
|
436
|
+
type: "noise-cylinders" /* noiseCylinders */,
|
|
437
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
438
|
+
data: {
|
|
439
|
+
title: "Cylinders Noise",
|
|
440
|
+
frequency: 0.1
|
|
441
|
+
},
|
|
442
|
+
handles: [
|
|
443
|
+
{
|
|
444
|
+
position: Position3.Left,
|
|
445
|
+
dataType: CoreHandleType.variableProperty,
|
|
446
|
+
connection: "target"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
position: Position3.Right,
|
|
450
|
+
dataType: "module" /* module */,
|
|
451
|
+
connection: "source"
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
// src/templates/generators/noise-perlin-template.ts
|
|
458
|
+
import { CoreHandleType as CoreHandleType2 } from "@awesome-flow/core/abstract";
|
|
459
|
+
import { Position as Position4 } from "@xyflow/system";
|
|
460
|
+
var NoisePerlinNodeTemplateFactory = class {
|
|
461
|
+
template = {
|
|
462
|
+
type: "noise-perlin" /* noisePerlin */,
|
|
463
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
464
|
+
data: {
|
|
465
|
+
title: "Perlin Noise",
|
|
466
|
+
frequency: 0.1,
|
|
467
|
+
lacunarity: 2,
|
|
468
|
+
octaves: 5,
|
|
469
|
+
persistence: 0.5,
|
|
470
|
+
seed: 0
|
|
471
|
+
},
|
|
472
|
+
handles: [
|
|
473
|
+
{
|
|
474
|
+
position: Position4.Left,
|
|
475
|
+
dataType: CoreHandleType2.variableProperty,
|
|
476
|
+
connection: "target"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
position: Position4.Right,
|
|
480
|
+
dataType: "module" /* module */,
|
|
481
|
+
connection: "source"
|
|
482
|
+
}
|
|
483
|
+
]
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
// src/templates/generators/noise-ridgedmulti-template.ts
|
|
488
|
+
import { CoreHandleType as CoreHandleType3 } from "@awesome-flow/core/abstract";
|
|
489
|
+
import { Position as Position5 } from "@xyflow/system";
|
|
490
|
+
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
491
|
+
template = {
|
|
492
|
+
type: "noise-ridged-multi" /* noiseRidgedMulti */,
|
|
493
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
494
|
+
data: {
|
|
495
|
+
title: "Ridged Multi Noise",
|
|
496
|
+
frequency: 0.1,
|
|
497
|
+
lacunarity: 2,
|
|
498
|
+
octaves: 6,
|
|
499
|
+
offset: 1,
|
|
500
|
+
gain: 2,
|
|
501
|
+
seed: 0
|
|
502
|
+
},
|
|
503
|
+
handles: [
|
|
504
|
+
{
|
|
505
|
+
position: Position5.Left,
|
|
506
|
+
dataType: CoreHandleType3.variableProperty,
|
|
507
|
+
connection: "target"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
position: Position5.Right,
|
|
511
|
+
dataType: "module" /* module */,
|
|
512
|
+
connection: "source"
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
// src/templates/generators/noise-simplex-template.ts
|
|
519
|
+
import {
|
|
520
|
+
CoreHandleType as CoreHandleType4
|
|
521
|
+
} from "@awesome-flow/core/abstract";
|
|
522
|
+
import { Position as Position6 } from "@xyflow/system";
|
|
523
|
+
var NoiseSimplexNodeTemplateFactory = class {
|
|
524
|
+
template = {
|
|
525
|
+
type: "noise-simplex" /* noiseSimplex */,
|
|
526
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
527
|
+
data: {
|
|
528
|
+
title: "Simplex Noise"
|
|
529
|
+
},
|
|
530
|
+
handles: [
|
|
531
|
+
{
|
|
532
|
+
position: Position6.Left,
|
|
533
|
+
dataType: CoreHandleType4.variableProperty,
|
|
534
|
+
connection: "target"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
position: Position6.Right,
|
|
538
|
+
dataType: "module" /* module */,
|
|
539
|
+
connection: "source"
|
|
540
|
+
}
|
|
541
|
+
]
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// src/templates/generators/noise-spheres-template.ts
|
|
546
|
+
import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
|
|
547
|
+
import { Position as Position7 } from "@xyflow/system";
|
|
548
|
+
var NoiseSpheresNodeTemplateFactory = class {
|
|
549
|
+
template = {
|
|
550
|
+
type: "noise-spheres" /* noiseSpheres */,
|
|
551
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
552
|
+
data: {
|
|
553
|
+
title: "Spheres Noise",
|
|
554
|
+
frequency: 0.1
|
|
555
|
+
},
|
|
556
|
+
handles: [
|
|
557
|
+
{
|
|
558
|
+
position: Position7.Left,
|
|
559
|
+
dataType: CoreHandleType5.variableProperty,
|
|
560
|
+
connection: "target"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
position: Position7.Right,
|
|
564
|
+
dataType: "module" /* module */,
|
|
565
|
+
connection: "source"
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
// src/templates/generators/noise-voronoi-template.ts
|
|
572
|
+
import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
|
|
573
|
+
import { Position as Position8 } from "@xyflow/system";
|
|
574
|
+
var NoiseVoronoiNodeTemplateFactory = class {
|
|
575
|
+
template = {
|
|
576
|
+
type: "noise-voronoi" /* noiseVoronoi */,
|
|
577
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
578
|
+
data: {
|
|
579
|
+
title: "Voronoi Noise",
|
|
580
|
+
frequency: 0.1,
|
|
581
|
+
displacement: 1,
|
|
582
|
+
distance: true,
|
|
583
|
+
seed: 0
|
|
584
|
+
},
|
|
585
|
+
handles: [
|
|
586
|
+
{
|
|
587
|
+
position: Position8.Left,
|
|
588
|
+
dataType: CoreHandleType6.variableProperty,
|
|
589
|
+
connection: "target"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
position: Position8.Right,
|
|
593
|
+
dataType: "module" /* module */,
|
|
594
|
+
connection: "source"
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
// src/templates/generators/position-const-template.ts
|
|
601
|
+
import { Position as Position9 } from "@xyflow/system";
|
|
602
|
+
var PositionConstNodeTemplateFactory = class {
|
|
603
|
+
template = {
|
|
604
|
+
type: "position" /* position */,
|
|
605
|
+
group: "Positions" /* positions */,
|
|
606
|
+
data: {
|
|
607
|
+
title: "Position Output",
|
|
608
|
+
position: { x: 0, y: 0, z: 0 }
|
|
609
|
+
},
|
|
610
|
+
handles: [
|
|
611
|
+
{
|
|
612
|
+
position: Position9.Right,
|
|
613
|
+
dataType: "position" /* position */,
|
|
614
|
+
connection: "source"
|
|
615
|
+
}
|
|
616
|
+
]
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
// src/templates/generators/position-grid-template.ts
|
|
621
|
+
import { Position as Position10 } from "@xyflow/system";
|
|
622
|
+
var PositionGridNodeTemplateFactory = class {
|
|
623
|
+
template = {
|
|
624
|
+
type: "grid" /* grid */,
|
|
625
|
+
group: "Positions" /* positions */,
|
|
626
|
+
data: {
|
|
627
|
+
title: "Grid Output",
|
|
628
|
+
center: { x: 0, y: 0, z: 0 },
|
|
629
|
+
radius: 1
|
|
630
|
+
},
|
|
631
|
+
handles: [
|
|
632
|
+
{
|
|
633
|
+
position: Position10.Right,
|
|
634
|
+
dataType: "position" /* position */,
|
|
635
|
+
connection: "source"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
// src/templates/modifiers/noise-normalize-template.ts
|
|
642
|
+
import { IDGenerator } from "@awesome-flow/core/utils";
|
|
643
|
+
import { Position as Position11 } from "@xyflow/system";
|
|
644
|
+
var NoiseNormalizeNodeTemplateFactory = class {
|
|
645
|
+
template = {
|
|
646
|
+
id: IDGenerator.template(),
|
|
647
|
+
type: "noise-normalize" /* noiseNormalize */,
|
|
648
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
649
|
+
data: {
|
|
650
|
+
title: "Normalize Noise",
|
|
651
|
+
intervalStart: -1,
|
|
652
|
+
intervalEnd: 1
|
|
653
|
+
},
|
|
654
|
+
handles: [
|
|
655
|
+
{
|
|
656
|
+
position: Position11.Left,
|
|
657
|
+
dataType: "module" /* module */,
|
|
658
|
+
connection: "target",
|
|
659
|
+
maxConnections: 1
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
position: Position11.Right,
|
|
663
|
+
dataType: "module" /* module */,
|
|
664
|
+
connection: "source"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
// src/templates/output/noise-logger-template.ts
|
|
671
|
+
import { Position as Position12 } from "@xyflow/system";
|
|
672
|
+
var NoiseLoggerNodeTemplateFactory = class {
|
|
673
|
+
template = {
|
|
674
|
+
type: "noise-logger" /* noiseLogger */,
|
|
675
|
+
group: "Output" /* output */,
|
|
676
|
+
data: {
|
|
677
|
+
title: "Noise Logger"
|
|
678
|
+
},
|
|
679
|
+
handles: [
|
|
680
|
+
{
|
|
681
|
+
position: Position12.Left,
|
|
682
|
+
dataType: "noise" /* noise */,
|
|
683
|
+
connection: "target"
|
|
684
|
+
}
|
|
685
|
+
]
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
// src/templates/output/noise-raw-texture-template.ts
|
|
690
|
+
import { Position as Position13 } from "@xyflow/system";
|
|
691
|
+
var NoiseRawTextureTemplateFactory = class {
|
|
692
|
+
template = {
|
|
693
|
+
type: "texture-data" /* textureData */,
|
|
694
|
+
group: "Output" /* output */,
|
|
695
|
+
data: {
|
|
696
|
+
title: "Texture Data"
|
|
697
|
+
},
|
|
698
|
+
handles: [
|
|
699
|
+
{
|
|
700
|
+
position: Position13.Left,
|
|
701
|
+
dataType: "noise" /* noise */,
|
|
702
|
+
connection: "target",
|
|
703
|
+
maxConnections: 1
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
position: Position13.Right,
|
|
707
|
+
dataType: "texture" /* texture */,
|
|
708
|
+
connection: "source"
|
|
709
|
+
}
|
|
710
|
+
]
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
// src/templates/output/position-logger-template.ts
|
|
715
|
+
import { Position as Position14 } from "@xyflow/system";
|
|
716
|
+
var PositionLoggerNodeTemplateFactory = class {
|
|
717
|
+
template = {
|
|
718
|
+
type: "position-logger" /* positionLogger */,
|
|
719
|
+
group: "Positions" /* positions */,
|
|
720
|
+
data: {
|
|
721
|
+
title: "Position Logger"
|
|
722
|
+
},
|
|
723
|
+
handles: [
|
|
724
|
+
{
|
|
725
|
+
position: Position14.Left,
|
|
726
|
+
dataType: "position" /* position */,
|
|
727
|
+
connection: "target"
|
|
728
|
+
}
|
|
729
|
+
]
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
// src/templates/modifiers/noise-combine-template.ts
|
|
734
|
+
import { Position as Position15 } from "@xyflow/system";
|
|
735
|
+
var NoiseCombineNodeTemplateFactory = class {
|
|
736
|
+
template = {
|
|
737
|
+
type: "noise-combiner" /* noiseCombine */,
|
|
738
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
739
|
+
data: {
|
|
740
|
+
title: "Combine Noise",
|
|
741
|
+
operation: "add" /* add */
|
|
742
|
+
},
|
|
743
|
+
handles: [
|
|
744
|
+
{
|
|
745
|
+
position: Position15.Left,
|
|
746
|
+
dataType: "module" /* module */,
|
|
747
|
+
connection: "target",
|
|
748
|
+
maxConnections: 2
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
position: Position15.Right,
|
|
752
|
+
dataType: "module" /* module */,
|
|
753
|
+
connection: "source"
|
|
754
|
+
}
|
|
755
|
+
]
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
// src/templates/modifiers/noise-clamp-template.ts
|
|
760
|
+
import { Position as Position16 } from "@xyflow/system";
|
|
761
|
+
var NoiseClampNodeTemplateFactory = class {
|
|
762
|
+
template = {
|
|
763
|
+
type: "noise-clamp" /* noiseClamp */,
|
|
764
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
765
|
+
data: {
|
|
766
|
+
title: "Clamp Noise",
|
|
767
|
+
lowerBound: -1,
|
|
768
|
+
upperBound: 1
|
|
769
|
+
},
|
|
770
|
+
handles: [
|
|
771
|
+
{
|
|
772
|
+
position: Position16.Left,
|
|
773
|
+
dataType: "module" /* module */,
|
|
774
|
+
connection: "target",
|
|
775
|
+
maxConnections: 1
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
position: Position16.Right,
|
|
779
|
+
dataType: "module" /* module */,
|
|
780
|
+
connection: "source"
|
|
781
|
+
}
|
|
782
|
+
]
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
// src/templates/modifiers/noise-abs-template.ts
|
|
787
|
+
import { Position as Position17 } from "@xyflow/system";
|
|
788
|
+
var NoiseAbsNodeTemplateFactory = class {
|
|
789
|
+
template = {
|
|
790
|
+
type: "noise-abs" /* noiseAbs */,
|
|
791
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
792
|
+
data: {
|
|
793
|
+
title: "Abs Noise"
|
|
794
|
+
},
|
|
795
|
+
handles: [
|
|
796
|
+
{
|
|
797
|
+
position: Position17.Left,
|
|
798
|
+
dataType: "module" /* module */,
|
|
799
|
+
connection: "target",
|
|
800
|
+
maxConnections: 1
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
position: Position17.Right,
|
|
804
|
+
dataType: "module" /* module */,
|
|
805
|
+
connection: "source"
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/templates/output/noise-output-template.ts
|
|
812
|
+
import { Position as Position18 } from "@xyflow/system";
|
|
813
|
+
var NoiseOutputNodeTemplateFactory = class {
|
|
814
|
+
template = {
|
|
815
|
+
type: "noise-output" /* noiseOutput */,
|
|
816
|
+
group: "Output" /* output */,
|
|
817
|
+
data: {
|
|
818
|
+
title: "Noise Output"
|
|
819
|
+
},
|
|
820
|
+
handles: [
|
|
821
|
+
{
|
|
822
|
+
position: Position18.Left,
|
|
823
|
+
dataType: "position" /* position */,
|
|
824
|
+
connection: "target"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
position: Position18.Left,
|
|
828
|
+
dataType: "module" /* module */,
|
|
829
|
+
connection: "target",
|
|
830
|
+
maxConnections: 1
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
position: Position18.Right,
|
|
834
|
+
dataType: "noise" /* noise */,
|
|
835
|
+
connection: "source"
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
// src/templates/modifiers/noise-curve-template.ts
|
|
842
|
+
import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
|
|
843
|
+
import { Position as Position19 } from "@xyflow/system";
|
|
844
|
+
var NoiseCurveNodeTemplateFactory = class {
|
|
845
|
+
template = {
|
|
846
|
+
type: "noise-curve" /* noiseCurve */,
|
|
847
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
848
|
+
data: {
|
|
849
|
+
title: "Noise Curve",
|
|
850
|
+
points: []
|
|
851
|
+
},
|
|
852
|
+
handles: [
|
|
853
|
+
{
|
|
854
|
+
position: Position19.Left,
|
|
855
|
+
dataType: "module" /* module */,
|
|
856
|
+
connection: "target",
|
|
857
|
+
maxConnections: 1
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
position: Position19.Left,
|
|
861
|
+
dataType: CoreHandleType7.variableProperty,
|
|
862
|
+
connection: "target"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
position: Position19.Right,
|
|
866
|
+
dataType: "module" /* module */,
|
|
867
|
+
connection: "source"
|
|
868
|
+
}
|
|
869
|
+
]
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
// src/templates/modifiers/noise-exponent-template.ts
|
|
874
|
+
import { Position as Position20 } from "@xyflow/system";
|
|
875
|
+
var NoiseExponentNodeTemplateFactory = class {
|
|
876
|
+
template = {
|
|
877
|
+
type: "noise-exponent" /* noiseExponent */,
|
|
878
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
879
|
+
data: {
|
|
880
|
+
title: "Noise Exponent",
|
|
881
|
+
exponent: 1
|
|
882
|
+
},
|
|
883
|
+
handles: [
|
|
884
|
+
{
|
|
885
|
+
position: Position20.Left,
|
|
886
|
+
dataType: "module" /* module */,
|
|
887
|
+
connection: "target",
|
|
888
|
+
maxConnections: 1
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
position: Position20.Right,
|
|
892
|
+
dataType: "module" /* module */,
|
|
893
|
+
connection: "source"
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
// src/templates/modifiers/noise-invert-template.ts
|
|
900
|
+
import { Position as Position21 } from "@xyflow/system";
|
|
901
|
+
var NoiseInvertNodeTemplateFactory = class {
|
|
902
|
+
template = {
|
|
903
|
+
type: "noise-invert" /* noiseInvert */,
|
|
904
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
905
|
+
data: {
|
|
906
|
+
title: "Invert Noise"
|
|
907
|
+
},
|
|
908
|
+
handles: [
|
|
909
|
+
{
|
|
910
|
+
position: Position21.Left,
|
|
911
|
+
dataType: "module" /* module */,
|
|
912
|
+
connection: "target",
|
|
913
|
+
maxConnections: 1
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
position: Position21.Right,
|
|
917
|
+
dataType: "module" /* module */,
|
|
918
|
+
connection: "source"
|
|
919
|
+
}
|
|
920
|
+
]
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
// src/templates/modifiers/noise-scalebias-template.ts
|
|
925
|
+
import { Position as Position22 } from "@xyflow/system";
|
|
926
|
+
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
927
|
+
template = {
|
|
928
|
+
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
929
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
930
|
+
data: {
|
|
931
|
+
title: "Scale/Bias Noise",
|
|
932
|
+
scale: 1,
|
|
933
|
+
bias: 0
|
|
934
|
+
},
|
|
935
|
+
handles: [
|
|
936
|
+
{
|
|
937
|
+
position: Position22.Left,
|
|
938
|
+
dataType: "module" /* module */,
|
|
939
|
+
connection: "target",
|
|
940
|
+
maxConnections: 1
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
position: Position22.Right,
|
|
944
|
+
dataType: "module" /* module */,
|
|
945
|
+
connection: "source"
|
|
946
|
+
}
|
|
947
|
+
]
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
// src/templates/modifiers/noise-terrace-template.ts
|
|
952
|
+
import { Position as Position23 } from "@xyflow/system";
|
|
953
|
+
var NoiseTerraceNodeTemplateFactory = class {
|
|
954
|
+
template = {
|
|
955
|
+
type: "noise-terrace" /* noiseTerrace */,
|
|
956
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
957
|
+
data: {
|
|
958
|
+
title: "Noise Terrace",
|
|
959
|
+
points: []
|
|
960
|
+
},
|
|
961
|
+
handles: [
|
|
962
|
+
{
|
|
963
|
+
position: Position23.Left,
|
|
964
|
+
dataType: "module" /* module */,
|
|
965
|
+
connection: "target",
|
|
966
|
+
maxConnections: 1
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
position: Position23.Right,
|
|
970
|
+
dataType: "module" /* module */,
|
|
971
|
+
connection: "source"
|
|
972
|
+
}
|
|
973
|
+
]
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
// src/templates/selectors/noise-blend-template.ts
|
|
978
|
+
import { Position as Position24 } from "@xyflow/system";
|
|
979
|
+
var NoiseBlendNodeTemplateFactory = class {
|
|
980
|
+
template = {
|
|
981
|
+
type: "noise-blend" /* noiseBlend */,
|
|
982
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
983
|
+
data: {
|
|
984
|
+
title: "Noise Blend"
|
|
985
|
+
},
|
|
986
|
+
handles: [
|
|
987
|
+
{
|
|
988
|
+
position: Position24.Left,
|
|
989
|
+
dataType: "module" /* module */,
|
|
990
|
+
connection: "target",
|
|
991
|
+
label: "Source Modules",
|
|
992
|
+
dataId: "source" /* source */,
|
|
993
|
+
maxConnections: 2,
|
|
994
|
+
minConnections: 2
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
position: Position24.Left,
|
|
998
|
+
dataType: "module" /* module */,
|
|
999
|
+
dataId: "control" /* control */,
|
|
1000
|
+
connection: "target",
|
|
1001
|
+
label: "Control Module",
|
|
1002
|
+
maxConnections: 1
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
position: Position24.Right,
|
|
1006
|
+
dataType: "module" /* module */,
|
|
1007
|
+
dataId: "output" /* output */,
|
|
1008
|
+
connection: "source"
|
|
1009
|
+
}
|
|
1010
|
+
]
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
// src/templates/selectors/noise-select-template.ts
|
|
1015
|
+
import { Position as Position25 } from "@xyflow/system";
|
|
1016
|
+
var NoiseSelectNodeTemplateFactory = class {
|
|
1017
|
+
template = {
|
|
1018
|
+
type: "noise-select" /* noiseSelect */,
|
|
1019
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
1020
|
+
data: {
|
|
1021
|
+
title: "Noise Select",
|
|
1022
|
+
edgeFalloff: 0,
|
|
1023
|
+
lowerBound: -1,
|
|
1024
|
+
upperBound: 1
|
|
1025
|
+
},
|
|
1026
|
+
handles: [
|
|
1027
|
+
{
|
|
1028
|
+
position: Position25.Left,
|
|
1029
|
+
dataType: "module" /* module */,
|
|
1030
|
+
dataId: "source" /* source */,
|
|
1031
|
+
connection: "target",
|
|
1032
|
+
label: "Source Modules",
|
|
1033
|
+
maxConnections: 2,
|
|
1034
|
+
minConnections: 2
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
position: Position25.Left,
|
|
1038
|
+
dataType: "module" /* module */,
|
|
1039
|
+
dataId: "control" /* control */,
|
|
1040
|
+
connection: "target",
|
|
1041
|
+
label: "Control Module",
|
|
1042
|
+
maxConnections: 1
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
position: Position25.Right,
|
|
1046
|
+
dataType: "module" /* module */,
|
|
1047
|
+
dataId: "output" /* output */,
|
|
1048
|
+
connection: "source"
|
|
1049
|
+
}
|
|
1050
|
+
]
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
// src/templates/transformers/noise-displace-template.ts
|
|
1055
|
+
import { Position as Position26 } from "@xyflow/system";
|
|
1056
|
+
var NoiseDisplaceNodeTemplateFactory = class {
|
|
1057
|
+
template = {
|
|
1058
|
+
type: "noise-displace" /* noiseDisplace */,
|
|
1059
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1060
|
+
data: {
|
|
1061
|
+
title: "Noise Displace"
|
|
1062
|
+
},
|
|
1063
|
+
handles: [
|
|
1064
|
+
{
|
|
1065
|
+
position: Position26.Left,
|
|
1066
|
+
connection: "target",
|
|
1067
|
+
label: "Source Module",
|
|
1068
|
+
dataType: "module" /* module */,
|
|
1069
|
+
dataId: "source" /* sourceModule */,
|
|
1070
|
+
maxConnections: 1
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
position: Position26.Left,
|
|
1074
|
+
connection: "target",
|
|
1075
|
+
label: "X Module",
|
|
1076
|
+
dataType: "module" /* module */,
|
|
1077
|
+
dataId: "x-module" /* xModule */,
|
|
1078
|
+
maxConnections: 1
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
position: Position26.Left,
|
|
1082
|
+
connection: "target",
|
|
1083
|
+
label: "Y Module",
|
|
1084
|
+
dataType: "module" /* module */,
|
|
1085
|
+
dataId: "y-module" /* yModule */,
|
|
1086
|
+
maxConnections: 1
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
position: Position26.Left,
|
|
1090
|
+
connection: "target",
|
|
1091
|
+
label: "Z Module",
|
|
1092
|
+
dataType: "module" /* module */,
|
|
1093
|
+
dataId: "z-module" /* zModule */,
|
|
1094
|
+
maxConnections: 1
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
position: Position26.Right,
|
|
1098
|
+
dataType: "module" /* module */,
|
|
1099
|
+
dataId: "output" /* output */,
|
|
1100
|
+
connection: "source"
|
|
1101
|
+
}
|
|
1102
|
+
]
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
// src/templates/transformers/noise-rotate-point-template.ts
|
|
1107
|
+
import { Position as Position27 } from "@xyflow/system";
|
|
1108
|
+
var NoiseRotatePointNodeTemplateFactory = class {
|
|
1109
|
+
template = {
|
|
1110
|
+
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
1111
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1112
|
+
data: {
|
|
1113
|
+
title: "Noise Rotate Point",
|
|
1114
|
+
xAngle: 0,
|
|
1115
|
+
yAngle: 0,
|
|
1116
|
+
zAngle: 0
|
|
1117
|
+
},
|
|
1118
|
+
handles: [
|
|
1119
|
+
{
|
|
1120
|
+
position: Position27.Left,
|
|
1121
|
+
dataType: "module" /* module */,
|
|
1122
|
+
connection: "target",
|
|
1123
|
+
label: "Source Module",
|
|
1124
|
+
maxConnections: 1
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
position: Position27.Right,
|
|
1128
|
+
dataType: "module" /* module */,
|
|
1129
|
+
connection: "source"
|
|
1130
|
+
}
|
|
1131
|
+
]
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
// src/templates/transformers/noise-scale-point-template.ts
|
|
1136
|
+
import { Position as Position28 } from "@xyflow/system";
|
|
1137
|
+
var NoiseScalePointNodeTemplateFactory = class {
|
|
1138
|
+
template = {
|
|
1139
|
+
type: "noise-scale-point" /* noiseScalePoint */,
|
|
1140
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1141
|
+
data: {
|
|
1142
|
+
title: "Noise Scale Point",
|
|
1143
|
+
xScale: 1,
|
|
1144
|
+
yScale: 1,
|
|
1145
|
+
zScale: 1
|
|
1146
|
+
},
|
|
1147
|
+
handles: [
|
|
1148
|
+
{
|
|
1149
|
+
position: Position28.Left,
|
|
1150
|
+
dataType: "module" /* module */,
|
|
1151
|
+
connection: "target",
|
|
1152
|
+
label: "Source Module",
|
|
1153
|
+
maxConnections: 1
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
position: Position28.Right,
|
|
1157
|
+
dataType: "module" /* module */,
|
|
1158
|
+
connection: "source"
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
// src/templates/transformers/noise-translate-point-template.ts
|
|
1165
|
+
import { Position as Position29 } from "@xyflow/system";
|
|
1166
|
+
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
1167
|
+
template = {
|
|
1168
|
+
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
1169
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1170
|
+
data: {
|
|
1171
|
+
title: "Noise Translate Point",
|
|
1172
|
+
translateX: 0,
|
|
1173
|
+
translateY: 0,
|
|
1174
|
+
translateZ: 0
|
|
1175
|
+
},
|
|
1176
|
+
handles: [
|
|
1177
|
+
{
|
|
1178
|
+
position: Position29.Left,
|
|
1179
|
+
dataType: "module" /* module */,
|
|
1180
|
+
connection: "target",
|
|
1181
|
+
label: "Source Module",
|
|
1182
|
+
maxConnections: 1
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
position: Position29.Right,
|
|
1186
|
+
dataType: "module" /* module */,
|
|
1187
|
+
connection: "source"
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1192
|
+
|
|
1193
|
+
// src/templates/transformers/noise-turbulence-template.ts
|
|
1194
|
+
import { CoreHandleType as CoreHandleType8 } from "@awesome-flow/core/abstract";
|
|
1195
|
+
import { Position as Position30 } from "@xyflow/system";
|
|
1196
|
+
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
1197
|
+
template = {
|
|
1198
|
+
type: "noise-turbulence" /* noiseTurbulence */,
|
|
1199
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1200
|
+
data: {
|
|
1201
|
+
title: "Noise Turbulence",
|
|
1202
|
+
frequency: 1,
|
|
1203
|
+
power: 1,
|
|
1204
|
+
roughness: 1,
|
|
1205
|
+
seed: 0
|
|
1206
|
+
},
|
|
1207
|
+
handles: [
|
|
1208
|
+
{
|
|
1209
|
+
position: Position30.Left,
|
|
1210
|
+
dataType: "module" /* module */,
|
|
1211
|
+
connection: "target",
|
|
1212
|
+
label: "Source Module",
|
|
1213
|
+
maxConnections: 1
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
position: Position30.Left,
|
|
1217
|
+
dataType: CoreHandleType8.variableProperty,
|
|
1218
|
+
label: "Variable Properties",
|
|
1219
|
+
connection: "target"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
position: Position30.Right,
|
|
1223
|
+
dataType: "module" /* module */,
|
|
1224
|
+
connection: "source"
|
|
1225
|
+
}
|
|
1226
|
+
]
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
// src/templates/generators/noise-billow-template.ts
|
|
1231
|
+
import { CoreHandleType as CoreHandleType9 } from "@awesome-flow/core/abstract";
|
|
1232
|
+
import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
|
|
1233
|
+
import { Position as Position31 } from "@xyflow/system";
|
|
1234
|
+
var NoiseBillowNodeTemplateFactory = class {
|
|
1235
|
+
template = {
|
|
1236
|
+
id: IDGenerator2.template(),
|
|
1237
|
+
type: "noise-billow" /* noiseBillow */,
|
|
1238
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
1239
|
+
data: {
|
|
1240
|
+
title: "Billow Noise",
|
|
1241
|
+
frequency: 0.1,
|
|
1242
|
+
lacunarity: 2,
|
|
1243
|
+
octaves: 5,
|
|
1244
|
+
persistence: 0.5,
|
|
1245
|
+
seed: 0
|
|
1246
|
+
},
|
|
1247
|
+
handles: [
|
|
1248
|
+
{
|
|
1249
|
+
position: Position31.Left,
|
|
1250
|
+
dataType: CoreHandleType9.variableProperty,
|
|
1251
|
+
connection: "target"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
position: Position31.Right,
|
|
1255
|
+
dataType: "module" /* module */,
|
|
1256
|
+
connection: "source"
|
|
1257
|
+
}
|
|
1258
|
+
]
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
// src/templates/groups/module-group-template.ts
|
|
1263
|
+
import {
|
|
1264
|
+
CoreTemplateGroup
|
|
1265
|
+
} from "@awesome-flow/core/abstract";
|
|
1266
|
+
import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
|
|
1267
|
+
import { Position as Position32 } from "@xyflow/system";
|
|
1268
|
+
var ModuleGroupNodeTemplateFactory = class {
|
|
1269
|
+
template = {
|
|
1270
|
+
id: IDGenerator3.template(),
|
|
1271
|
+
type: "group-module" /* groupModule */,
|
|
1272
|
+
group: CoreTemplateGroup.groups,
|
|
1273
|
+
data: {
|
|
1274
|
+
title: "Modules Group",
|
|
1275
|
+
isGroup: true,
|
|
1276
|
+
initialSize: {
|
|
1277
|
+
width: 300,
|
|
1278
|
+
height: 200
|
|
1279
|
+
},
|
|
1280
|
+
collapsedSize: {
|
|
1281
|
+
width: 300,
|
|
1282
|
+
height: 80
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
handles: [
|
|
1286
|
+
{
|
|
1287
|
+
position: Position32.Bottom,
|
|
1288
|
+
dataType: "module" /* module */,
|
|
1289
|
+
connection: "target",
|
|
1290
|
+
maxConnections: 1,
|
|
1291
|
+
hideOnCollapse: true
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
position: Position32.Right,
|
|
1295
|
+
dataType: "module" /* module */,
|
|
1296
|
+
connection: "source"
|
|
1297
|
+
}
|
|
1298
|
+
]
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
// src/nodes/groups/module-group-node.tsx
|
|
1303
|
+
import { NodeContainer as NodeContainer31, NodeCollapse, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
|
|
1304
|
+
import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
|
|
1305
|
+
import { FlowContext } from "@awesome-flow/core/abstract";
|
|
1306
|
+
import { useCallback as useCallback14, useContext, useEffect as useEffect21, useMemo as useMemo12 } from "react";
|
|
1307
|
+
import { shallow } from "zustand/shallow";
|
|
1308
|
+
import { Badge, Group as Group15 } from "@mantine/core";
|
|
1309
|
+
import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
|
|
1310
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1311
|
+
|
|
1312
|
+
// src/abstract/node-types.ts
|
|
1313
|
+
var noiseNodeTemplates = {
|
|
1314
|
+
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
1315
|
+
["noise-simplex" /* noiseSimplex */]: new NoiseSimplexNodeTemplateFactory(),
|
|
1316
|
+
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
1317
|
+
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
1318
|
+
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|
|
1319
|
+
["noise-logger" /* noiseLogger */]: new NoiseLoggerNodeTemplateFactory(),
|
|
1320
|
+
["noise-constant" /* noiseConst */]: new NoiseConstNodeTemplateFactory(),
|
|
1321
|
+
["position" /* position */]: new PositionConstNodeTemplateFactory(),
|
|
1322
|
+
["position-logger" /* positionLogger */]: new PositionLoggerNodeTemplateFactory(),
|
|
1323
|
+
["grid" /* grid */]: new PositionGridNodeTemplateFactory(),
|
|
1324
|
+
["texture-data" /* textureData */]: new NoiseRawTextureTemplateFactory(),
|
|
1325
|
+
["noise-cylinders" /* noiseCylinders */]: new NoiseCylindersNodeTemplateFactory(),
|
|
1326
|
+
["noise-perlin" /* noisePerlin */]: new NoisePerlinNodeTemplateFactory(),
|
|
1327
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: new NoiseRidgedMultiNodeTemplateFactory(),
|
|
1328
|
+
["noise-spheres" /* noiseSpheres */]: new NoiseSpheresNodeTemplateFactory(),
|
|
1329
|
+
["noise-voronoi" /* noiseVoronoi */]: new NoiseVoronoiNodeTemplateFactory(),
|
|
1330
|
+
["noise-combiner" /* noiseCombine */]: new NoiseCombineNodeTemplateFactory(),
|
|
1331
|
+
["noise-clamp" /* noiseClamp */]: new NoiseClampNodeTemplateFactory(),
|
|
1332
|
+
["noise-abs" /* noiseAbs */]: new NoiseAbsNodeTemplateFactory(),
|
|
1333
|
+
["noise-curve" /* noiseCurve */]: new NoiseCurveNodeTemplateFactory(),
|
|
1334
|
+
["noise-exponent" /* noiseExponent */]: new NoiseExponentNodeTemplateFactory(),
|
|
1335
|
+
["noise-invert" /* noiseInvert */]: new NoiseInvertNodeTemplateFactory(),
|
|
1336
|
+
["noise-scale-bias" /* noiseScaleBias */]: new NoiseScaleBiasNodeTemplateFactory(),
|
|
1337
|
+
["noise-terrace" /* noiseTerrace */]: new NoiseTerraceNodeTemplateFactory(),
|
|
1338
|
+
["noise-blend" /* noiseBlend */]: new NoiseBlendNodeTemplateFactory(),
|
|
1339
|
+
["noise-select" /* noiseSelect */]: new NoiseSelectNodeTemplateFactory(),
|
|
1340
|
+
["noise-displace" /* noiseDisplace */]: new NoiseDisplaceNodeTemplateFactory(),
|
|
1341
|
+
["noise-rotate-point" /* noiseRotatePoint */]: new NoiseRotatePointNodeTemplateFactory(),
|
|
1342
|
+
["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
|
|
1343
|
+
["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
|
|
1344
|
+
["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
|
|
1345
|
+
["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
// src/nodes/selectors/noise-blend-node.tsx
|
|
1349
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1350
|
+
function NoiseBlendNode({ id, selected, data, type }) {
|
|
1351
|
+
const updateComputedData = useUpdateNodeComputedData30();
|
|
1352
|
+
const onDataUpdated = useCallback15(
|
|
1353
|
+
(incomingData) => {
|
|
1354
|
+
const incomingSources = incomingData["source" /* source */];
|
|
1355
|
+
const incomingControl = incomingData["control" /* control */];
|
|
1356
|
+
if (incomingSources?.length >= 2 && incomingControl?.length) {
|
|
1357
|
+
const module = new Blend(
|
|
1358
|
+
incomingSources[0].module,
|
|
1359
|
+
incomingSources[1].module,
|
|
1360
|
+
incomingControl[0].module
|
|
1361
|
+
);
|
|
1362
|
+
updateComputedData(id, { module });
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
[]
|
|
1366
|
+
);
|
|
1367
|
+
return /* @__PURE__ */ jsxs28(NodeContainer32, { id, selected, data, type, children: [
|
|
1368
|
+
/* @__PURE__ */ jsx32(
|
|
1369
|
+
HandlesIncomingDataStatus4,
|
|
1370
|
+
{
|
|
1371
|
+
nodeId: id,
|
|
1372
|
+
handles: data.handles,
|
|
1373
|
+
handleKey: "dataId",
|
|
1374
|
+
onDataUpdated,
|
|
1375
|
+
type: "target",
|
|
1376
|
+
resetComputedData: true
|
|
1377
|
+
}
|
|
1378
|
+
),
|
|
1379
|
+
/* @__PURE__ */ jsx32(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
|
|
1380
|
+
] });
|
|
1381
|
+
}
|
|
1382
|
+
var noise_blend_node_default = NoiseBlendNode;
|
|
109
1383
|
export {
|
|
110
1384
|
noise_blend_node_default as NoiseBlendNode,
|
|
111
1385
|
noise_select_node_default as NoiseSelectNode
|