@awesome-flow/noise 0.3.0 → 0.5.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 +1403 -2079
- package/dist/abstract/index.d.cts +23 -25
- package/dist/abstract/index.d.ts +23 -25
- package/dist/abstract/index.js +1319 -1998
- package/dist/index-BungWYrh.d.cts +49 -0
- package/dist/index-DsQSjZC5.d.ts +49 -0
- package/dist/modules/index.cjs +0 -1
- package/dist/modules/index.js +0 -1
- 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 -381
- 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 -361
- package/dist/nodes/groups/index.cjs +27 -18
- package/dist/nodes/groups/index.js +34 -20
- package/dist/nodes/index.cjs +1652 -989
- package/dist/nodes/index.d.cts +3 -5
- package/dist/nodes/index.d.ts +3 -5
- package/dist/nodes/index.js +1629 -965
- package/dist/nodes/modifiers/index.cjs +17 -120
- 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 -125
- package/dist/nodes/output/index.cjs +1270 -90
- package/dist/nodes/output/index.js +1318 -93
- package/dist/nodes/selectors/index.cjs +1295 -59
- package/dist/nodes/selectors/index.d.cts +1 -3
- package/dist/nodes/selectors/index.d.ts +1 -3
- package/dist/nodes/selectors/index.js +1343 -66
- package/dist/nodes/transformers/index.cjs +67 -207
- 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 -194
- package/dist/templates/generators/index.cjs +838 -1279
- package/dist/templates/generators/index.d.cts +13 -50
- package/dist/templates/generators/index.d.ts +13 -50
- package/dist/templates/generators/index.js +840 -1281
- package/dist/templates/groups/index.cjs +836 -1273
- package/dist/templates/groups/index.d.cts +1 -5
- package/dist/templates/groups/index.d.ts +1 -5
- package/dist/templates/groups/index.js +839 -1278
- package/dist/templates/index.cjs +838 -1281
- package/dist/templates/index.d.cts +4 -7
- package/dist/templates/index.d.ts +4 -7
- package/dist/templates/index.js +840 -1282
- package/dist/templates/modifiers/index.cjs +840 -1279
- package/dist/templates/modifiers/index.d.cts +11 -38
- package/dist/templates/modifiers/index.d.ts +11 -38
- package/dist/templates/modifiers/index.js +842 -1282
- package/dist/templates/output/index.cjs +838 -1275
- package/dist/templates/output/index.d.cts +4 -14
- package/dist/templates/output/index.d.ts +4 -14
- package/dist/templates/output/index.js +841 -1280
- package/dist/templates/selectors/index.cjs +838 -1275
- package/dist/templates/selectors/index.d.cts +3 -9
- package/dist/templates/selectors/index.d.ts +3 -9
- package/dist/templates/selectors/index.js +841 -1280
- package/dist/templates/transformers/index.cjs +838 -1275
- package/dist/templates/transformers/index.d.cts +3 -36
- package/dist/templates/transformers/index.d.ts +3 -36
- package/dist/templates/transformers/index.js +841 -1280
- package/package.json +3 -3
- package/dist/abstract/index.cjs.map +0 -1
- package/dist/abstract/index.js.map +0 -1
- 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/modules/index.cjs.map +0 -1
- package/dist/modules/index.js.map +0 -1
- package/dist/nodes/generators/index.cjs.map +0 -1
- package/dist/nodes/generators/index.js.map +0 -1
- package/dist/nodes/groups/index.cjs.map +0 -1
- package/dist/nodes/groups/index.js.map +0 -1
- package/dist/nodes/index.cjs.map +0 -1
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/modifiers/index.cjs.map +0 -1
- package/dist/nodes/modifiers/index.js.map +0 -1
- package/dist/nodes/output/index.cjs.map +0 -1
- package/dist/nodes/output/index.js.map +0 -1
- package/dist/nodes/selectors/index.cjs.map +0 -1
- package/dist/nodes/selectors/index.js.map +0 -1
- package/dist/nodes/transformers/index.cjs.map +0 -1
- package/dist/nodes/transformers/index.js.map +0 -1
- package/dist/properties-BxwtU6i9.d.cts +0 -9
- package/dist/properties-BxwtU6i9.d.ts +0 -9
- package/dist/templates/generators/index.cjs.map +0 -1
- package/dist/templates/generators/index.js.map +0 -1
- package/dist/templates/groups/index.cjs.map +0 -1
- package/dist/templates/groups/index.js.map +0 -1
- package/dist/templates/index.cjs.map +0 -1
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/modifiers/index.cjs.map +0 -1
- package/dist/templates/modifiers/index.js.map +0 -1
- package/dist/templates/output/index.cjs.map +0 -1
- package/dist/templates/output/index.js.map +0 -1
- package/dist/templates/selectors/index.cjs.map +0 -1
- package/dist/templates/selectors/index.js.map +0 -1
- package/dist/templates/transformers/index.cjs.map +0 -1
- package/dist/templates/transformers/index.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
|
|
19
29
|
// src/nodes/output/index.ts
|
|
@@ -56,86 +66,79 @@ function NoiseLoggerNode({ id, selected, data, type }) {
|
|
|
56
66
|
var noise_logger_node_default = NoiseLoggerNode;
|
|
57
67
|
|
|
58
68
|
// src/nodes/output/noise-output-node.tsx
|
|
69
|
+
var import_layout32 = require("@awesome-flow/core/layout");
|
|
70
|
+
var import_react33 = require("react");
|
|
71
|
+
var import_hooks34 = require("@awesome-flow/core/hooks");
|
|
72
|
+
var import_components11 = require("@awesome-flow/core/components");
|
|
73
|
+
var import_core18 = require("@mantine/core");
|
|
74
|
+
|
|
75
|
+
// src/nodes/generators/noise-simplex-node.tsx
|
|
59
76
|
var import_layout2 = require("@awesome-flow/core/layout");
|
|
60
|
-
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
61
|
-
var import_core2 = require("@mantine/core");
|
|
62
77
|
var import_react2 = require("react");
|
|
78
|
+
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
79
|
+
|
|
80
|
+
// src/modules/simplex-module.ts
|
|
81
|
+
var import_Module = __toESM(require("libnoise-ts/module/Module"), 1);
|
|
82
|
+
var import_simplex_noise = require("simplex-noise");
|
|
83
|
+
|
|
84
|
+
// src/nodes/generators/noise-simplex-node.tsx
|
|
63
85
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
64
|
-
function NoiseOutputNode({ id, selected, data, type }) {
|
|
65
|
-
const [generating, setGenerating] = (0, import_react2.useState)(false);
|
|
66
|
-
const updateComputedData = (0, import_hooks2.useUpdateNodeComputedData)();
|
|
67
|
-
const incomingModules = (0, import_hooks2.useIncomingComputedData)(id, 8 /* module */);
|
|
68
|
-
const incomingPositions = (0, import_hooks2.useIncomingComputedData)(
|
|
69
|
-
id,
|
|
70
|
-
4 /* position */
|
|
71
|
-
);
|
|
72
|
-
(0, import_react2.useEffect)(() => {
|
|
73
|
-
if (incomingPositions?.length && incomingModules?.length) {
|
|
74
|
-
const { module: module2 } = incomingModules[0];
|
|
75
|
-
if (module2) {
|
|
76
|
-
setGenerating(true);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}, [incomingModules, incomingPositions]);
|
|
80
|
-
(0, import_react2.useEffect)(() => {
|
|
81
|
-
if (incomingPositions?.length && incomingModules?.length) {
|
|
82
|
-
const { module: module2 } = incomingModules[0];
|
|
83
|
-
if (module2 && generating) {
|
|
84
|
-
const noise = [];
|
|
85
|
-
for (const input of incomingPositions) {
|
|
86
|
-
for (const position of input.positions) {
|
|
87
|
-
const value = module2.getValue(position.x, position.y, position.z);
|
|
88
|
-
noise.push({
|
|
89
|
-
position,
|
|
90
|
-
value
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
console.log("SET COMPUTED DATA");
|
|
95
|
-
updateComputedData(id, { noise, module: module2 });
|
|
96
|
-
setGenerating(false);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, [generating]);
|
|
100
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_layout2.NodeContainer, { id, selected, data, type, children: [
|
|
101
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Box, { pos: "relative", children: [
|
|
102
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
103
|
-
import_core2.LoadingOverlay,
|
|
104
|
-
{
|
|
105
|
-
visible: generating,
|
|
106
|
-
zIndex: 1e3,
|
|
107
|
-
overlayProps: { radius: "sm", blur: 2 }
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Stack, { children: [
|
|
111
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
112
|
-
"Position Inputs: ",
|
|
113
|
-
incomingPositions?.length
|
|
114
|
-
] }),
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Group, { children: [
|
|
116
|
-
"Module Inputs: ",
|
|
117
|
-
incomingModules?.length
|
|
118
|
-
] })
|
|
119
|
-
] })
|
|
120
|
-
] }),
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_layout2.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
122
|
-
] });
|
|
123
|
-
}
|
|
124
|
-
var noise_output_node_default = NoiseOutputNode;
|
|
125
86
|
|
|
126
|
-
// src/nodes/
|
|
87
|
+
// src/nodes/generators/position-const-node.tsx
|
|
127
88
|
var import_layout3 = require("@awesome-flow/core/layout");
|
|
128
89
|
var import_react3 = require("react");
|
|
90
|
+
var import_core2 = require("@mantine/core");
|
|
129
91
|
var import_hooks3 = require("@awesome-flow/core/hooks");
|
|
130
|
-
var import_core3 = require("@mantine/core");
|
|
131
92
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
93
|
+
|
|
94
|
+
// src/nodes/generators/position-grid-node.tsx
|
|
95
|
+
var import_layout4 = require("@awesome-flow/core/layout");
|
|
96
|
+
var import_react4 = require("react");
|
|
97
|
+
var import_core3 = require("@mantine/core");
|
|
98
|
+
var import_hooks4 = require("@awesome-flow/core/hooks");
|
|
99
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
100
|
+
|
|
101
|
+
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
102
|
+
var import_layout5 = require("@awesome-flow/core/layout");
|
|
103
|
+
var import_react5 = require("react");
|
|
104
|
+
var import_core4 = require("@mantine/core");
|
|
105
|
+
var import_hooks5 = require("@awesome-flow/core/hooks");
|
|
106
|
+
|
|
107
|
+
// src/modules/normalize-noise-module.ts
|
|
108
|
+
var import_modifier = __toESM(require("libnoise-ts/module/modifier"), 1);
|
|
109
|
+
|
|
110
|
+
// src/nodes/modifiers/noise-normalize-node.tsx
|
|
111
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
112
|
+
|
|
113
|
+
// src/nodes/generators/noise-const-node.tsx
|
|
114
|
+
var import_layout6 = require("@awesome-flow/core/layout");
|
|
115
|
+
var import_react6 = require("react");
|
|
116
|
+
var import_core5 = require("@mantine/core");
|
|
117
|
+
var import_hooks6 = require("@awesome-flow/core/hooks");
|
|
118
|
+
var import_generator = require("libnoise-ts/module/generator");
|
|
119
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
120
|
+
|
|
121
|
+
// src/nodes/generators/noise-billow-node.tsx
|
|
122
|
+
var import_layout7 = require("@awesome-flow/core/layout");
|
|
123
|
+
var import_react7 = require("react");
|
|
124
|
+
var import_generator2 = require("libnoise-ts/module/generator");
|
|
125
|
+
var import_hooks7 = require("@awesome-flow/core/hooks");
|
|
126
|
+
var import_components = require("@awesome-flow/core/components");
|
|
127
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
128
|
+
|
|
129
|
+
// src/nodes/output/noise-raw-texture-node.tsx
|
|
130
|
+
var import_layout8 = require("@awesome-flow/core/layout");
|
|
131
|
+
var import_react8 = require("react");
|
|
132
|
+
var import_hooks8 = require("@awesome-flow/core/hooks");
|
|
133
|
+
var import_core6 = require("@mantine/core");
|
|
134
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
132
135
|
function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
133
|
-
const updateComputedData = (0,
|
|
134
|
-
const [dataLength, setDataLength] = (0,
|
|
135
|
-
const [resolution, setResolution] = (0,
|
|
136
|
-
const incoming = (0,
|
|
137
|
-
const noise = (0,
|
|
138
|
-
(0,
|
|
136
|
+
const updateComputedData = (0, import_hooks8.useUpdateNodeComputedData)();
|
|
137
|
+
const [dataLength, setDataLength] = (0, import_react8.useState)(0);
|
|
138
|
+
const [resolution, setResolution] = (0, import_react8.useState)(0);
|
|
139
|
+
const incoming = (0, import_hooks8.useIncomingComputedData)(id);
|
|
140
|
+
const noise = (0, import_react8.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
|
|
141
|
+
(0, import_react8.useEffect)(() => {
|
|
139
142
|
if (noise?.length) {
|
|
140
143
|
const size = Math.ceil(Math.sqrt(noise.length));
|
|
141
144
|
const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
|
|
@@ -146,19 +149,19 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
146
149
|
updateComputedData(id, { textureData: dataArray, textureResolution: size });
|
|
147
150
|
}
|
|
148
151
|
}, [noise]);
|
|
149
|
-
return /* @__PURE__ */ (0,
|
|
150
|
-
/* @__PURE__ */ (0,
|
|
151
|
-
/* @__PURE__ */ (0,
|
|
152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_layout8.NodeContainer, { id, selected, data, type, children: [
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Stack, { children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
|
|
152
155
|
"Resolution: ",
|
|
153
156
|
resolution,
|
|
154
157
|
"x",
|
|
155
158
|
resolution
|
|
156
159
|
] }),
|
|
157
|
-
/* @__PURE__ */ (0,
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
|
|
158
161
|
"Input Length: ",
|
|
159
162
|
noise?.length || 0
|
|
160
163
|
] }),
|
|
161
|
-
/* @__PURE__ */ (0,
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
|
|
162
165
|
"Output Length (",
|
|
163
166
|
resolution,
|
|
164
167
|
"*",
|
|
@@ -167,39 +170,1217 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
|
|
|
167
170
|
dataLength
|
|
168
171
|
] })
|
|
169
172
|
] }),
|
|
170
|
-
/* @__PURE__ */ (0,
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_layout8.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
171
174
|
] });
|
|
172
175
|
}
|
|
173
176
|
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
174
177
|
|
|
178
|
+
// src/nodes/generators/noise-checkerboard-node.tsx
|
|
179
|
+
var import_layout9 = require("@awesome-flow/core/layout");
|
|
180
|
+
var import_react9 = require("react");
|
|
181
|
+
var import_generator3 = require("libnoise-ts/module/generator");
|
|
182
|
+
var import_hooks9 = require("@awesome-flow/core/hooks");
|
|
183
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
184
|
+
|
|
175
185
|
// src/nodes/output/positions-logger-node.tsx
|
|
176
|
-
var
|
|
177
|
-
var
|
|
178
|
-
var
|
|
179
|
-
var
|
|
180
|
-
var
|
|
186
|
+
var import_layout10 = require("@awesome-flow/core/layout");
|
|
187
|
+
var import_react10 = require("react");
|
|
188
|
+
var import_core7 = require("@mantine/core");
|
|
189
|
+
var import_hooks10 = require("@awesome-flow/core/hooks");
|
|
190
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
181
191
|
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
182
|
-
const incoming = (0,
|
|
183
|
-
const positions = (0,
|
|
192
|
+
const incoming = (0, import_hooks10.useIncomingComputedData)(id);
|
|
193
|
+
const positions = (0, import_react10.useMemo)(() => {
|
|
184
194
|
return incoming?.map((p) => p.positions).flat();
|
|
185
195
|
}, [incoming]);
|
|
186
|
-
return /* @__PURE__ */ (0,
|
|
187
|
-
/* @__PURE__ */ (0,
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_layout10.NodeContainer, { id, selected, data, type, children: [
|
|
197
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
|
|
188
198
|
"Size: ",
|
|
189
199
|
positions?.length || 0
|
|
190
200
|
] }),
|
|
191
|
-
/* @__PURE__ */ (0,
|
|
192
|
-
/* @__PURE__ */ (0,
|
|
201
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Divider, { h: 5 }),
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Stack, { children: positions?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
|
|
193
203
|
v.x,
|
|
194
204
|
":",
|
|
195
205
|
v.y,
|
|
196
206
|
":",
|
|
197
207
|
v.z
|
|
198
208
|
] }, i)) }),
|
|
199
|
-
/* @__PURE__ */ (0,
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_layout10.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
200
210
|
] });
|
|
201
211
|
}
|
|
202
212
|
var positions_logger_node_default = PositionsLoggerNode;
|
|
213
|
+
|
|
214
|
+
// src/nodes/generators/noise-cylinders-node.tsx
|
|
215
|
+
var import_layout11 = require("@awesome-flow/core/layout");
|
|
216
|
+
var import_react11 = require("react");
|
|
217
|
+
var import_generator4 = require("libnoise-ts/module/generator");
|
|
218
|
+
var import_hooks11 = require("@awesome-flow/core/hooks");
|
|
219
|
+
var import_components2 = require("@awesome-flow/core/components");
|
|
220
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
221
|
+
|
|
222
|
+
// src/nodes/generators/noise-perlin-node.tsx
|
|
223
|
+
var import_layout12 = require("@awesome-flow/core/layout");
|
|
224
|
+
var import_react12 = require("react");
|
|
225
|
+
var import_generator5 = require("libnoise-ts/module/generator");
|
|
226
|
+
var import_hooks12 = require("@awesome-flow/core/hooks");
|
|
227
|
+
var import_components3 = require("@awesome-flow/core/components");
|
|
228
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
229
|
+
|
|
230
|
+
// src/nodes/generators/noise-ridgedmulti-node.tsx
|
|
231
|
+
var import_layout13 = require("@awesome-flow/core/layout");
|
|
232
|
+
var import_react13 = require("react");
|
|
233
|
+
var import_generator6 = require("libnoise-ts/module/generator");
|
|
234
|
+
var import_hooks13 = require("@awesome-flow/core/hooks");
|
|
235
|
+
var import_components4 = require("@awesome-flow/core/components");
|
|
236
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
237
|
+
|
|
238
|
+
// src/nodes/generators/noise-spheres-node.tsx
|
|
239
|
+
var import_layout14 = require("@awesome-flow/core/layout");
|
|
240
|
+
var import_react14 = require("react");
|
|
241
|
+
var import_generator7 = require("libnoise-ts/module/generator");
|
|
242
|
+
var import_hooks14 = require("@awesome-flow/core/hooks");
|
|
243
|
+
var import_components5 = require("@awesome-flow/core/components");
|
|
244
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
245
|
+
|
|
246
|
+
// src/nodes/generators/noise-voronoi-node.tsx
|
|
247
|
+
var import_layout15 = require("@awesome-flow/core/layout");
|
|
248
|
+
var import_react15 = require("react");
|
|
249
|
+
var import_generator8 = require("libnoise-ts/module/generator");
|
|
250
|
+
var import_hooks15 = require("@awesome-flow/core/hooks");
|
|
251
|
+
var import_components6 = require("@awesome-flow/core/components");
|
|
252
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
253
|
+
|
|
254
|
+
// src/nodes/modifiers/noise-combine-node.tsx
|
|
255
|
+
var import_layout16 = require("@awesome-flow/core/layout");
|
|
256
|
+
var import_react16 = require("react");
|
|
257
|
+
var import_hooks16 = require("@awesome-flow/core/hooks");
|
|
258
|
+
var import_icons_react = require("@tabler/icons-react");
|
|
259
|
+
|
|
260
|
+
// src/abstract/operations.ts
|
|
261
|
+
var import_combiner = require("libnoise-ts/module/combiner");
|
|
262
|
+
|
|
263
|
+
// src/nodes/modifiers/noise-combine-node.tsx
|
|
264
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
265
|
+
|
|
266
|
+
// src/nodes/modifiers/noise-clamp-node.tsx
|
|
267
|
+
var import_layout17 = require("@awesome-flow/core/layout");
|
|
268
|
+
var import_react17 = require("react");
|
|
269
|
+
var import_core8 = require("@mantine/core");
|
|
270
|
+
var import_hooks17 = require("@awesome-flow/core/hooks");
|
|
271
|
+
var import_modifier2 = require("libnoise-ts/module/modifier");
|
|
272
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
273
|
+
|
|
274
|
+
// src/nodes/modifiers/noise-abs-node.tsx
|
|
275
|
+
var import_layout18 = require("@awesome-flow/core/layout");
|
|
276
|
+
var import_react18 = require("react");
|
|
277
|
+
var import_hooks18 = require("@awesome-flow/core/hooks");
|
|
278
|
+
var import_modifier3 = require("libnoise-ts/module/modifier");
|
|
279
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
280
|
+
|
|
281
|
+
// src/nodes/modifiers/noise-curve-node.tsx
|
|
282
|
+
var import_layout19 = require("@awesome-flow/core/layout");
|
|
283
|
+
var import_core9 = require("@mantine/core");
|
|
284
|
+
var import_hooks19 = require("@awesome-flow/core/hooks");
|
|
285
|
+
var import_react19 = require("react");
|
|
286
|
+
var import_modifier4 = require("libnoise-ts/module/modifier");
|
|
287
|
+
var import_util = require("libnoise-ts/util");
|
|
288
|
+
var import_icons_react2 = require("@tabler/icons-react");
|
|
289
|
+
var import_hooks20 = require("@mantine/hooks");
|
|
290
|
+
var import_abstract = require("@awesome-flow/core/abstract");
|
|
291
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
292
|
+
|
|
293
|
+
// src/nodes/modifiers/noise-exponent-node.tsx
|
|
294
|
+
var import_layout20 = require("@awesome-flow/core/layout");
|
|
295
|
+
var import_react20 = require("react");
|
|
296
|
+
var import_core10 = require("@mantine/core");
|
|
297
|
+
var import_hooks21 = require("@awesome-flow/core/hooks");
|
|
298
|
+
var import_modifier5 = require("libnoise-ts/module/modifier");
|
|
299
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
300
|
+
|
|
301
|
+
// src/nodes/modifiers/noise-invert-node.tsx
|
|
302
|
+
var import_layout21 = require("@awesome-flow/core/layout");
|
|
303
|
+
var import_react21 = require("react");
|
|
304
|
+
var import_hooks22 = require("@awesome-flow/core/hooks");
|
|
305
|
+
var import_modifier6 = require("libnoise-ts/module/modifier");
|
|
306
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
307
|
+
|
|
308
|
+
// src/nodes/modifiers/noise-scale-bias-node.tsx
|
|
309
|
+
var import_layout22 = require("@awesome-flow/core/layout");
|
|
310
|
+
var import_react22 = require("react");
|
|
311
|
+
var import_core11 = require("@mantine/core");
|
|
312
|
+
var import_hooks23 = require("@awesome-flow/core/hooks");
|
|
313
|
+
var import_modifier7 = require("libnoise-ts/module/modifier");
|
|
314
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
315
|
+
|
|
316
|
+
// src/nodes/modifiers/noise-terrace-node.tsx
|
|
317
|
+
var import_layout23 = require("@awesome-flow/core/layout");
|
|
318
|
+
var import_core12 = require("@mantine/core");
|
|
319
|
+
var import_hooks24 = require("@awesome-flow/core/hooks");
|
|
320
|
+
var import_react23 = require("react");
|
|
321
|
+
var import_modifier8 = require("libnoise-ts/module/modifier");
|
|
322
|
+
var import_icons_react3 = require("@tabler/icons-react");
|
|
323
|
+
var import_hooks25 = require("@mantine/hooks");
|
|
324
|
+
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
325
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
326
|
+
|
|
327
|
+
// src/nodes/selectors/noise-blend-node.tsx
|
|
328
|
+
var import_layout24 = require("@awesome-flow/core/layout");
|
|
329
|
+
var import_react24 = require("react");
|
|
330
|
+
var import_hooks26 = require("@awesome-flow/core/hooks");
|
|
331
|
+
var import_selector = require("libnoise-ts/module/selector");
|
|
332
|
+
var import_components7 = require("@awesome-flow/core/components");
|
|
333
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
334
|
+
|
|
335
|
+
// src/nodes/selectors/noise-select-node.tsx
|
|
336
|
+
var import_layout25 = require("@awesome-flow/core/layout");
|
|
337
|
+
var import_react25 = require("react");
|
|
338
|
+
var import_hooks27 = require("@awesome-flow/core/hooks");
|
|
339
|
+
var import_selector2 = require("libnoise-ts/module/selector");
|
|
340
|
+
var import_core13 = require("@mantine/core");
|
|
341
|
+
var import_components8 = require("@awesome-flow/core/components");
|
|
342
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
343
|
+
|
|
344
|
+
// src/nodes/transformers/noise-displace-node.tsx
|
|
345
|
+
var import_layout26 = require("@awesome-flow/core/layout");
|
|
346
|
+
var import_react26 = require("react");
|
|
347
|
+
var import_hooks28 = require("@awesome-flow/core/hooks");
|
|
348
|
+
var import_transformer = require("libnoise-ts/module/transformer");
|
|
349
|
+
var import_components9 = require("@awesome-flow/core/components");
|
|
350
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
351
|
+
|
|
352
|
+
// src/nodes/transformers/noise-rotate-point-node.tsx
|
|
353
|
+
var import_layout27 = require("@awesome-flow/core/layout");
|
|
354
|
+
var import_react27 = require("react");
|
|
355
|
+
var import_hooks29 = require("@awesome-flow/core/hooks");
|
|
356
|
+
var import_core14 = require("@mantine/core");
|
|
357
|
+
var import_transformer2 = require("libnoise-ts/module/transformer");
|
|
358
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
359
|
+
|
|
360
|
+
// src/nodes/transformers/noise-scale-point-node.tsx
|
|
361
|
+
var import_layout28 = require("@awesome-flow/core/layout");
|
|
362
|
+
var import_react28 = require("react");
|
|
363
|
+
var import_hooks30 = require("@awesome-flow/core/hooks");
|
|
364
|
+
var import_core15 = require("@mantine/core");
|
|
365
|
+
var import_transformer3 = require("libnoise-ts/module/transformer");
|
|
366
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
367
|
+
|
|
368
|
+
// src/nodes/transformers/noise-translate-point-node.tsx
|
|
369
|
+
var import_layout29 = require("@awesome-flow/core/layout");
|
|
370
|
+
var import_react29 = require("react");
|
|
371
|
+
var import_hooks31 = require("@awesome-flow/core/hooks");
|
|
372
|
+
var import_core16 = require("@mantine/core");
|
|
373
|
+
var import_transformer4 = require("libnoise-ts/module/transformer");
|
|
374
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
375
|
+
|
|
376
|
+
// src/nodes/transformers/noise-turbulence-node .tsx
|
|
377
|
+
var import_layout30 = require("@awesome-flow/core/layout");
|
|
378
|
+
var import_react30 = require("react");
|
|
379
|
+
var import_hooks32 = require("@awesome-flow/core/hooks");
|
|
380
|
+
var import_transformer5 = require("libnoise-ts/module/transformer");
|
|
381
|
+
var import_components10 = require("@awesome-flow/core/components");
|
|
382
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
383
|
+
|
|
384
|
+
// src/templates/generators/noise-checkerboard-template.ts
|
|
385
|
+
var import_system = require("@xyflow/system");
|
|
386
|
+
var NoiseCheckerboardNodeTemplateFactory = class {
|
|
387
|
+
template = {
|
|
388
|
+
type: "noise-checkerboard" /* noiseCheckerboard */,
|
|
389
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
390
|
+
data: {
|
|
391
|
+
title: "Checkerboard Noise"
|
|
392
|
+
},
|
|
393
|
+
handles: [
|
|
394
|
+
{
|
|
395
|
+
position: import_system.Position.Right,
|
|
396
|
+
dataType: "module" /* module */,
|
|
397
|
+
connection: "source"
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
// src/templates/generators/noise-const-template.ts
|
|
404
|
+
var import_system2 = require("@xyflow/system");
|
|
405
|
+
var NoiseConstNodeTemplateFactory = class {
|
|
406
|
+
template = {
|
|
407
|
+
type: "noise-constant" /* noiseConst */,
|
|
408
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
409
|
+
data: {
|
|
410
|
+
title: "Const Value Noise",
|
|
411
|
+
noise: 0,
|
|
412
|
+
min: -1,
|
|
413
|
+
max: 1
|
|
414
|
+
},
|
|
415
|
+
handles: [
|
|
416
|
+
{
|
|
417
|
+
position: import_system2.Position.Right,
|
|
418
|
+
dataType: "module" /* module */,
|
|
419
|
+
connection: "source"
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
// src/templates/generators/noise-cylinders-template.ts
|
|
426
|
+
var import_abstract5 = require("@awesome-flow/core/abstract");
|
|
427
|
+
var import_system3 = require("@xyflow/system");
|
|
428
|
+
var NoiseCylindersNodeTemplateFactory = class {
|
|
429
|
+
template = {
|
|
430
|
+
type: "noise-cylinders" /* noiseCylinders */,
|
|
431
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
432
|
+
data: {
|
|
433
|
+
title: "Cylinders Noise",
|
|
434
|
+
frequency: 0.1
|
|
435
|
+
},
|
|
436
|
+
handles: [
|
|
437
|
+
{
|
|
438
|
+
position: import_system3.Position.Left,
|
|
439
|
+
dataType: import_abstract5.CoreHandleType.variableProperty,
|
|
440
|
+
connection: "target"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
position: import_system3.Position.Right,
|
|
444
|
+
dataType: "module" /* module */,
|
|
445
|
+
connection: "source"
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// src/templates/generators/noise-perlin-template.ts
|
|
452
|
+
var import_abstract6 = require("@awesome-flow/core/abstract");
|
|
453
|
+
var import_system4 = require("@xyflow/system");
|
|
454
|
+
var NoisePerlinNodeTemplateFactory = class {
|
|
455
|
+
template = {
|
|
456
|
+
type: "noise-perlin" /* noisePerlin */,
|
|
457
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
458
|
+
data: {
|
|
459
|
+
title: "Perlin Noise",
|
|
460
|
+
frequency: 0.1,
|
|
461
|
+
lacunarity: 2,
|
|
462
|
+
octaves: 5,
|
|
463
|
+
persistence: 0.5,
|
|
464
|
+
seed: 0
|
|
465
|
+
},
|
|
466
|
+
handles: [
|
|
467
|
+
{
|
|
468
|
+
position: import_system4.Position.Left,
|
|
469
|
+
dataType: import_abstract6.CoreHandleType.variableProperty,
|
|
470
|
+
connection: "target"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
position: import_system4.Position.Right,
|
|
474
|
+
dataType: "module" /* module */,
|
|
475
|
+
connection: "source"
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// src/templates/generators/noise-ridgedmulti-template.ts
|
|
482
|
+
var import_abstract7 = require("@awesome-flow/core/abstract");
|
|
483
|
+
var import_system5 = require("@xyflow/system");
|
|
484
|
+
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
485
|
+
template = {
|
|
486
|
+
type: "noise-ridged-multi" /* noiseRidgedMulti */,
|
|
487
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
488
|
+
data: {
|
|
489
|
+
title: "Ridged Multi Noise",
|
|
490
|
+
frequency: 0.1,
|
|
491
|
+
lacunarity: 2,
|
|
492
|
+
octaves: 6,
|
|
493
|
+
offset: 1,
|
|
494
|
+
gain: 2,
|
|
495
|
+
seed: 0
|
|
496
|
+
},
|
|
497
|
+
handles: [
|
|
498
|
+
{
|
|
499
|
+
position: import_system5.Position.Left,
|
|
500
|
+
dataType: import_abstract7.CoreHandleType.variableProperty,
|
|
501
|
+
connection: "target"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
position: import_system5.Position.Right,
|
|
505
|
+
dataType: "module" /* module */,
|
|
506
|
+
connection: "source"
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
// src/templates/generators/noise-simplex-template.ts
|
|
513
|
+
var import_abstract8 = require("@awesome-flow/core/abstract");
|
|
514
|
+
var import_system6 = require("@xyflow/system");
|
|
515
|
+
var NoiseSimplexNodeTemplateFactory = class {
|
|
516
|
+
template = {
|
|
517
|
+
type: "noise-simplex" /* noiseSimplex */,
|
|
518
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
519
|
+
data: {
|
|
520
|
+
title: "Simplex Noise"
|
|
521
|
+
},
|
|
522
|
+
handles: [
|
|
523
|
+
{
|
|
524
|
+
position: import_system6.Position.Left,
|
|
525
|
+
dataType: import_abstract8.CoreHandleType.variableProperty,
|
|
526
|
+
connection: "target"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
position: import_system6.Position.Right,
|
|
530
|
+
dataType: "module" /* module */,
|
|
531
|
+
connection: "source"
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// src/templates/generators/noise-spheres-template.ts
|
|
538
|
+
var import_abstract9 = require("@awesome-flow/core/abstract");
|
|
539
|
+
var import_system7 = require("@xyflow/system");
|
|
540
|
+
var NoiseSpheresNodeTemplateFactory = class {
|
|
541
|
+
template = {
|
|
542
|
+
type: "noise-spheres" /* noiseSpheres */,
|
|
543
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
544
|
+
data: {
|
|
545
|
+
title: "Spheres Noise",
|
|
546
|
+
frequency: 0.1
|
|
547
|
+
},
|
|
548
|
+
handles: [
|
|
549
|
+
{
|
|
550
|
+
position: import_system7.Position.Left,
|
|
551
|
+
dataType: import_abstract9.CoreHandleType.variableProperty,
|
|
552
|
+
connection: "target"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
position: import_system7.Position.Right,
|
|
556
|
+
dataType: "module" /* module */,
|
|
557
|
+
connection: "source"
|
|
558
|
+
}
|
|
559
|
+
]
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
// src/templates/generators/noise-voronoi-template.ts
|
|
564
|
+
var import_abstract10 = require("@awesome-flow/core/abstract");
|
|
565
|
+
var import_system8 = require("@xyflow/system");
|
|
566
|
+
var NoiseVoronoiNodeTemplateFactory = class {
|
|
567
|
+
template = {
|
|
568
|
+
type: "noise-voronoi" /* noiseVoronoi */,
|
|
569
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
570
|
+
data: {
|
|
571
|
+
title: "Voronoi Noise",
|
|
572
|
+
frequency: 0.1,
|
|
573
|
+
displacement: 1,
|
|
574
|
+
distance: true,
|
|
575
|
+
seed: 0
|
|
576
|
+
},
|
|
577
|
+
handles: [
|
|
578
|
+
{
|
|
579
|
+
position: import_system8.Position.Left,
|
|
580
|
+
dataType: import_abstract10.CoreHandleType.variableProperty,
|
|
581
|
+
connection: "target"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
position: import_system8.Position.Right,
|
|
585
|
+
dataType: "module" /* module */,
|
|
586
|
+
connection: "source"
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
// src/templates/generators/position-const-template.ts
|
|
593
|
+
var import_system9 = require("@xyflow/system");
|
|
594
|
+
var PositionConstNodeTemplateFactory = class {
|
|
595
|
+
template = {
|
|
596
|
+
type: "position" /* position */,
|
|
597
|
+
group: "Positions" /* positions */,
|
|
598
|
+
data: {
|
|
599
|
+
title: "Position Output",
|
|
600
|
+
position: { x: 0, y: 0, z: 0 }
|
|
601
|
+
},
|
|
602
|
+
handles: [
|
|
603
|
+
{
|
|
604
|
+
position: import_system9.Position.Right,
|
|
605
|
+
dataType: "position" /* position */,
|
|
606
|
+
connection: "source"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
// src/templates/generators/position-grid-template.ts
|
|
613
|
+
var import_system10 = require("@xyflow/system");
|
|
614
|
+
var PositionGridNodeTemplateFactory = class {
|
|
615
|
+
template = {
|
|
616
|
+
type: "grid" /* grid */,
|
|
617
|
+
group: "Positions" /* positions */,
|
|
618
|
+
data: {
|
|
619
|
+
title: "Grid Output",
|
|
620
|
+
center: { x: 0, y: 0, z: 0 },
|
|
621
|
+
radius: 1
|
|
622
|
+
},
|
|
623
|
+
handles: [
|
|
624
|
+
{
|
|
625
|
+
position: import_system10.Position.Right,
|
|
626
|
+
dataType: "position" /* position */,
|
|
627
|
+
connection: "source"
|
|
628
|
+
}
|
|
629
|
+
]
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
// src/templates/modifiers/noise-normalize-template.ts
|
|
634
|
+
var import_utils = require("@awesome-flow/core/utils");
|
|
635
|
+
var import_system11 = require("@xyflow/system");
|
|
636
|
+
var NoiseNormalizeNodeTemplateFactory = class {
|
|
637
|
+
template = {
|
|
638
|
+
id: import_utils.IDGenerator.template(),
|
|
639
|
+
type: "noise-normalize" /* noiseNormalize */,
|
|
640
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
641
|
+
data: {
|
|
642
|
+
title: "Normalize Noise",
|
|
643
|
+
intervalStart: -1,
|
|
644
|
+
intervalEnd: 1
|
|
645
|
+
},
|
|
646
|
+
handles: [
|
|
647
|
+
{
|
|
648
|
+
position: import_system11.Position.Left,
|
|
649
|
+
dataType: "module" /* module */,
|
|
650
|
+
connection: "target",
|
|
651
|
+
maxConnections: 1
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
position: import_system11.Position.Right,
|
|
655
|
+
dataType: "module" /* module */,
|
|
656
|
+
connection: "source"
|
|
657
|
+
}
|
|
658
|
+
]
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
// src/templates/output/noise-logger-template.ts
|
|
663
|
+
var import_system12 = require("@xyflow/system");
|
|
664
|
+
var NoiseLoggerNodeTemplateFactory = class {
|
|
665
|
+
template = {
|
|
666
|
+
type: "noise-logger" /* noiseLogger */,
|
|
667
|
+
group: "Output" /* output */,
|
|
668
|
+
data: {
|
|
669
|
+
title: "Noise Logger"
|
|
670
|
+
},
|
|
671
|
+
handles: [
|
|
672
|
+
{
|
|
673
|
+
position: import_system12.Position.Left,
|
|
674
|
+
dataType: "noise" /* noise */,
|
|
675
|
+
connection: "target"
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
// src/templates/output/noise-raw-texture-template.ts
|
|
682
|
+
var import_system13 = require("@xyflow/system");
|
|
683
|
+
var NoiseRawTextureTemplateFactory = class {
|
|
684
|
+
template = {
|
|
685
|
+
type: "texture-data" /* textureData */,
|
|
686
|
+
group: "Output" /* output */,
|
|
687
|
+
data: {
|
|
688
|
+
title: "Texture Data"
|
|
689
|
+
},
|
|
690
|
+
handles: [
|
|
691
|
+
{
|
|
692
|
+
position: import_system13.Position.Left,
|
|
693
|
+
dataType: "noise" /* noise */,
|
|
694
|
+
connection: "target",
|
|
695
|
+
maxConnections: 1
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
position: import_system13.Position.Right,
|
|
699
|
+
dataType: "texture" /* texture */,
|
|
700
|
+
connection: "source"
|
|
701
|
+
}
|
|
702
|
+
]
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
// src/templates/output/position-logger-template.ts
|
|
707
|
+
var import_system14 = require("@xyflow/system");
|
|
708
|
+
var PositionLoggerNodeTemplateFactory = class {
|
|
709
|
+
template = {
|
|
710
|
+
type: "position-logger" /* positionLogger */,
|
|
711
|
+
group: "Positions" /* positions */,
|
|
712
|
+
data: {
|
|
713
|
+
title: "Position Logger"
|
|
714
|
+
},
|
|
715
|
+
handles: [
|
|
716
|
+
{
|
|
717
|
+
position: import_system14.Position.Left,
|
|
718
|
+
dataType: "position" /* position */,
|
|
719
|
+
connection: "target"
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
// src/templates/modifiers/noise-combine-template.ts
|
|
726
|
+
var import_system15 = require("@xyflow/system");
|
|
727
|
+
var NoiseCombineNodeTemplateFactory = class {
|
|
728
|
+
template = {
|
|
729
|
+
type: "noise-combiner" /* noiseCombine */,
|
|
730
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
731
|
+
data: {
|
|
732
|
+
title: "Combine Noise",
|
|
733
|
+
operation: "add" /* add */
|
|
734
|
+
},
|
|
735
|
+
handles: [
|
|
736
|
+
{
|
|
737
|
+
position: import_system15.Position.Left,
|
|
738
|
+
dataType: "module" /* module */,
|
|
739
|
+
connection: "target",
|
|
740
|
+
maxConnections: 2
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
position: import_system15.Position.Right,
|
|
744
|
+
dataType: "module" /* module */,
|
|
745
|
+
connection: "source"
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
// src/templates/modifiers/noise-clamp-template.ts
|
|
752
|
+
var import_system16 = require("@xyflow/system");
|
|
753
|
+
var NoiseClampNodeTemplateFactory = class {
|
|
754
|
+
template = {
|
|
755
|
+
type: "noise-clamp" /* noiseClamp */,
|
|
756
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
757
|
+
data: {
|
|
758
|
+
title: "Clamp Noise",
|
|
759
|
+
lowerBound: -1,
|
|
760
|
+
upperBound: 1
|
|
761
|
+
},
|
|
762
|
+
handles: [
|
|
763
|
+
{
|
|
764
|
+
position: import_system16.Position.Left,
|
|
765
|
+
dataType: "module" /* module */,
|
|
766
|
+
connection: "target",
|
|
767
|
+
maxConnections: 1
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
position: import_system16.Position.Right,
|
|
771
|
+
dataType: "module" /* module */,
|
|
772
|
+
connection: "source"
|
|
773
|
+
}
|
|
774
|
+
]
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
// src/templates/modifiers/noise-abs-template.ts
|
|
779
|
+
var import_system17 = require("@xyflow/system");
|
|
780
|
+
var NoiseAbsNodeTemplateFactory = class {
|
|
781
|
+
template = {
|
|
782
|
+
type: "noise-abs" /* noiseAbs */,
|
|
783
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
784
|
+
data: {
|
|
785
|
+
title: "Abs Noise"
|
|
786
|
+
},
|
|
787
|
+
handles: [
|
|
788
|
+
{
|
|
789
|
+
position: import_system17.Position.Left,
|
|
790
|
+
dataType: "module" /* module */,
|
|
791
|
+
connection: "target",
|
|
792
|
+
maxConnections: 1
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
position: import_system17.Position.Right,
|
|
796
|
+
dataType: "module" /* module */,
|
|
797
|
+
connection: "source"
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
// src/templates/output/noise-output-template.ts
|
|
804
|
+
var import_system18 = require("@xyflow/system");
|
|
805
|
+
var NoiseOutputNodeTemplateFactory = class {
|
|
806
|
+
template = {
|
|
807
|
+
type: "noise-output" /* noiseOutput */,
|
|
808
|
+
group: "Output" /* output */,
|
|
809
|
+
data: {
|
|
810
|
+
title: "Noise Output"
|
|
811
|
+
},
|
|
812
|
+
handles: [
|
|
813
|
+
{
|
|
814
|
+
position: import_system18.Position.Left,
|
|
815
|
+
dataType: "position" /* position */,
|
|
816
|
+
connection: "target"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
position: import_system18.Position.Left,
|
|
820
|
+
dataType: "module" /* module */,
|
|
821
|
+
connection: "target",
|
|
822
|
+
maxConnections: 1
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
position: import_system18.Position.Right,
|
|
826
|
+
dataType: "noise" /* noise */,
|
|
827
|
+
connection: "source"
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
// src/templates/modifiers/noise-curve-template.ts
|
|
834
|
+
var import_abstract19 = require("@awesome-flow/core/abstract");
|
|
835
|
+
var import_system19 = require("@xyflow/system");
|
|
836
|
+
var NoiseCurveNodeTemplateFactory = class {
|
|
837
|
+
template = {
|
|
838
|
+
type: "noise-curve" /* noiseCurve */,
|
|
839
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
840
|
+
data: {
|
|
841
|
+
title: "Noise Curve",
|
|
842
|
+
points: []
|
|
843
|
+
},
|
|
844
|
+
handles: [
|
|
845
|
+
{
|
|
846
|
+
position: import_system19.Position.Left,
|
|
847
|
+
dataType: "module" /* module */,
|
|
848
|
+
connection: "target",
|
|
849
|
+
maxConnections: 1
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
position: import_system19.Position.Left,
|
|
853
|
+
dataType: import_abstract19.CoreHandleType.variableProperty,
|
|
854
|
+
connection: "target"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
position: import_system19.Position.Right,
|
|
858
|
+
dataType: "module" /* module */,
|
|
859
|
+
connection: "source"
|
|
860
|
+
}
|
|
861
|
+
]
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
// src/templates/modifiers/noise-exponent-template.ts
|
|
866
|
+
var import_system20 = require("@xyflow/system");
|
|
867
|
+
var NoiseExponentNodeTemplateFactory = class {
|
|
868
|
+
template = {
|
|
869
|
+
type: "noise-exponent" /* noiseExponent */,
|
|
870
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
871
|
+
data: {
|
|
872
|
+
title: "Noise Exponent",
|
|
873
|
+
exponent: 1
|
|
874
|
+
},
|
|
875
|
+
handles: [
|
|
876
|
+
{
|
|
877
|
+
position: import_system20.Position.Left,
|
|
878
|
+
dataType: "module" /* module */,
|
|
879
|
+
connection: "target",
|
|
880
|
+
maxConnections: 1
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
position: import_system20.Position.Right,
|
|
884
|
+
dataType: "module" /* module */,
|
|
885
|
+
connection: "source"
|
|
886
|
+
}
|
|
887
|
+
]
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
// src/templates/modifiers/noise-invert-template.ts
|
|
892
|
+
var import_system21 = require("@xyflow/system");
|
|
893
|
+
var NoiseInvertNodeTemplateFactory = class {
|
|
894
|
+
template = {
|
|
895
|
+
type: "noise-invert" /* noiseInvert */,
|
|
896
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
897
|
+
data: {
|
|
898
|
+
title: "Invert Noise"
|
|
899
|
+
},
|
|
900
|
+
handles: [
|
|
901
|
+
{
|
|
902
|
+
position: import_system21.Position.Left,
|
|
903
|
+
dataType: "module" /* module */,
|
|
904
|
+
connection: "target",
|
|
905
|
+
maxConnections: 1
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
position: import_system21.Position.Right,
|
|
909
|
+
dataType: "module" /* module */,
|
|
910
|
+
connection: "source"
|
|
911
|
+
}
|
|
912
|
+
]
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
// src/templates/modifiers/noise-scalebias-template.ts
|
|
917
|
+
var import_system22 = require("@xyflow/system");
|
|
918
|
+
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
919
|
+
template = {
|
|
920
|
+
type: "noise-scale-bias" /* noiseScaleBias */,
|
|
921
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
922
|
+
data: {
|
|
923
|
+
title: "Scale/Bias Noise",
|
|
924
|
+
scale: 1,
|
|
925
|
+
bias: 0
|
|
926
|
+
},
|
|
927
|
+
handles: [
|
|
928
|
+
{
|
|
929
|
+
position: import_system22.Position.Left,
|
|
930
|
+
dataType: "module" /* module */,
|
|
931
|
+
connection: "target",
|
|
932
|
+
maxConnections: 1
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
position: import_system22.Position.Right,
|
|
936
|
+
dataType: "module" /* module */,
|
|
937
|
+
connection: "source"
|
|
938
|
+
}
|
|
939
|
+
]
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
// src/templates/modifiers/noise-terrace-template.ts
|
|
944
|
+
var import_system23 = require("@xyflow/system");
|
|
945
|
+
var NoiseTerraceNodeTemplateFactory = class {
|
|
946
|
+
template = {
|
|
947
|
+
type: "noise-terrace" /* noiseTerrace */,
|
|
948
|
+
group: "Noise Modifiers" /* noiseModifiers */,
|
|
949
|
+
data: {
|
|
950
|
+
title: "Noise Terrace",
|
|
951
|
+
points: []
|
|
952
|
+
},
|
|
953
|
+
handles: [
|
|
954
|
+
{
|
|
955
|
+
position: import_system23.Position.Left,
|
|
956
|
+
dataType: "module" /* module */,
|
|
957
|
+
connection: "target",
|
|
958
|
+
maxConnections: 1
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
position: import_system23.Position.Right,
|
|
962
|
+
dataType: "module" /* module */,
|
|
963
|
+
connection: "source"
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
// src/templates/selectors/noise-blend-template.ts
|
|
970
|
+
var import_system24 = require("@xyflow/system");
|
|
971
|
+
var NoiseBlendNodeTemplateFactory = class {
|
|
972
|
+
template = {
|
|
973
|
+
type: "noise-blend" /* noiseBlend */,
|
|
974
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
975
|
+
data: {
|
|
976
|
+
title: "Noise Blend"
|
|
977
|
+
},
|
|
978
|
+
handles: [
|
|
979
|
+
{
|
|
980
|
+
position: import_system24.Position.Left,
|
|
981
|
+
dataType: "module" /* module */,
|
|
982
|
+
connection: "target",
|
|
983
|
+
label: "Source Modules",
|
|
984
|
+
dataId: "source" /* source */,
|
|
985
|
+
maxConnections: 2,
|
|
986
|
+
minConnections: 2
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
position: import_system24.Position.Left,
|
|
990
|
+
dataType: "module" /* module */,
|
|
991
|
+
dataId: "control" /* control */,
|
|
992
|
+
connection: "target",
|
|
993
|
+
label: "Control Module",
|
|
994
|
+
maxConnections: 1
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
position: import_system24.Position.Right,
|
|
998
|
+
dataType: "module" /* module */,
|
|
999
|
+
dataId: "output" /* output */,
|
|
1000
|
+
connection: "source"
|
|
1001
|
+
}
|
|
1002
|
+
]
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
// src/templates/selectors/noise-select-template.ts
|
|
1007
|
+
var import_system25 = require("@xyflow/system");
|
|
1008
|
+
var NoiseSelectNodeTemplateFactory = class {
|
|
1009
|
+
template = {
|
|
1010
|
+
type: "noise-select" /* noiseSelect */,
|
|
1011
|
+
group: "Noise Selectors" /* noiseSelectors */,
|
|
1012
|
+
data: {
|
|
1013
|
+
title: "Noise Select",
|
|
1014
|
+
edgeFalloff: 0,
|
|
1015
|
+
lowerBound: -1,
|
|
1016
|
+
upperBound: 1
|
|
1017
|
+
},
|
|
1018
|
+
handles: [
|
|
1019
|
+
{
|
|
1020
|
+
position: import_system25.Position.Left,
|
|
1021
|
+
dataType: "module" /* module */,
|
|
1022
|
+
dataId: "source" /* source */,
|
|
1023
|
+
connection: "target",
|
|
1024
|
+
label: "Source Modules",
|
|
1025
|
+
maxConnections: 2,
|
|
1026
|
+
minConnections: 2
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
position: import_system25.Position.Left,
|
|
1030
|
+
dataType: "module" /* module */,
|
|
1031
|
+
dataId: "control" /* control */,
|
|
1032
|
+
connection: "target",
|
|
1033
|
+
label: "Control Module",
|
|
1034
|
+
maxConnections: 1
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
position: import_system25.Position.Right,
|
|
1038
|
+
dataType: "module" /* module */,
|
|
1039
|
+
dataId: "output" /* output */,
|
|
1040
|
+
connection: "source"
|
|
1041
|
+
}
|
|
1042
|
+
]
|
|
1043
|
+
};
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
// src/templates/transformers/noise-displace-template.ts
|
|
1047
|
+
var import_system26 = require("@xyflow/system");
|
|
1048
|
+
var NoiseDisplaceNodeTemplateFactory = class {
|
|
1049
|
+
template = {
|
|
1050
|
+
type: "noise-displace" /* noiseDisplace */,
|
|
1051
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1052
|
+
data: {
|
|
1053
|
+
title: "Noise Displace"
|
|
1054
|
+
},
|
|
1055
|
+
handles: [
|
|
1056
|
+
{
|
|
1057
|
+
position: import_system26.Position.Left,
|
|
1058
|
+
connection: "target",
|
|
1059
|
+
label: "Source Module",
|
|
1060
|
+
dataType: "module" /* module */,
|
|
1061
|
+
dataId: "source" /* sourceModule */,
|
|
1062
|
+
maxConnections: 1
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
position: import_system26.Position.Left,
|
|
1066
|
+
connection: "target",
|
|
1067
|
+
label: "X Module",
|
|
1068
|
+
dataType: "module" /* module */,
|
|
1069
|
+
dataId: "x-module" /* xModule */,
|
|
1070
|
+
maxConnections: 1
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
position: import_system26.Position.Left,
|
|
1074
|
+
connection: "target",
|
|
1075
|
+
label: "Y Module",
|
|
1076
|
+
dataType: "module" /* module */,
|
|
1077
|
+
dataId: "y-module" /* yModule */,
|
|
1078
|
+
maxConnections: 1
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
position: import_system26.Position.Left,
|
|
1082
|
+
connection: "target",
|
|
1083
|
+
label: "Z Module",
|
|
1084
|
+
dataType: "module" /* module */,
|
|
1085
|
+
dataId: "z-module" /* zModule */,
|
|
1086
|
+
maxConnections: 1
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
position: import_system26.Position.Right,
|
|
1090
|
+
dataType: "module" /* module */,
|
|
1091
|
+
dataId: "output" /* output */,
|
|
1092
|
+
connection: "source"
|
|
1093
|
+
}
|
|
1094
|
+
]
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
// src/templates/transformers/noise-rotate-point-template.ts
|
|
1099
|
+
var import_system27 = require("@xyflow/system");
|
|
1100
|
+
var NoiseRotatePointNodeTemplateFactory = class {
|
|
1101
|
+
template = {
|
|
1102
|
+
type: "noise-rotate-point" /* noiseRotatePoint */,
|
|
1103
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1104
|
+
data: {
|
|
1105
|
+
title: "Noise Rotate Point",
|
|
1106
|
+
xAngle: 0,
|
|
1107
|
+
yAngle: 0,
|
|
1108
|
+
zAngle: 0
|
|
1109
|
+
},
|
|
1110
|
+
handles: [
|
|
1111
|
+
{
|
|
1112
|
+
position: import_system27.Position.Left,
|
|
1113
|
+
dataType: "module" /* module */,
|
|
1114
|
+
connection: "target",
|
|
1115
|
+
label: "Source Module",
|
|
1116
|
+
maxConnections: 1
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
position: import_system27.Position.Right,
|
|
1120
|
+
dataType: "module" /* module */,
|
|
1121
|
+
connection: "source"
|
|
1122
|
+
}
|
|
1123
|
+
]
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
// src/templates/transformers/noise-scale-point-template.ts
|
|
1128
|
+
var import_system28 = require("@xyflow/system");
|
|
1129
|
+
var NoiseScalePointNodeTemplateFactory = class {
|
|
1130
|
+
template = {
|
|
1131
|
+
type: "noise-scale-point" /* noiseScalePoint */,
|
|
1132
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1133
|
+
data: {
|
|
1134
|
+
title: "Noise Scale Point",
|
|
1135
|
+
xScale: 1,
|
|
1136
|
+
yScale: 1,
|
|
1137
|
+
zScale: 1
|
|
1138
|
+
},
|
|
1139
|
+
handles: [
|
|
1140
|
+
{
|
|
1141
|
+
position: import_system28.Position.Left,
|
|
1142
|
+
dataType: "module" /* module */,
|
|
1143
|
+
connection: "target",
|
|
1144
|
+
label: "Source Module",
|
|
1145
|
+
maxConnections: 1
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
position: import_system28.Position.Right,
|
|
1149
|
+
dataType: "module" /* module */,
|
|
1150
|
+
connection: "source"
|
|
1151
|
+
}
|
|
1152
|
+
]
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
// src/templates/transformers/noise-translate-point-template.ts
|
|
1157
|
+
var import_system29 = require("@xyflow/system");
|
|
1158
|
+
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
1159
|
+
template = {
|
|
1160
|
+
type: "noise-translate-point" /* noiseTranslatePoint */,
|
|
1161
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1162
|
+
data: {
|
|
1163
|
+
title: "Noise Translate Point",
|
|
1164
|
+
translateX: 0,
|
|
1165
|
+
translateY: 0,
|
|
1166
|
+
translateZ: 0
|
|
1167
|
+
},
|
|
1168
|
+
handles: [
|
|
1169
|
+
{
|
|
1170
|
+
position: import_system29.Position.Left,
|
|
1171
|
+
dataType: "module" /* module */,
|
|
1172
|
+
connection: "target",
|
|
1173
|
+
label: "Source Module",
|
|
1174
|
+
maxConnections: 1
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
position: import_system29.Position.Right,
|
|
1178
|
+
dataType: "module" /* module */,
|
|
1179
|
+
connection: "source"
|
|
1180
|
+
}
|
|
1181
|
+
]
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
// src/templates/transformers/noise-turbulence-template.ts
|
|
1186
|
+
var import_abstract31 = require("@awesome-flow/core/abstract");
|
|
1187
|
+
var import_system30 = require("@xyflow/system");
|
|
1188
|
+
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
1189
|
+
template = {
|
|
1190
|
+
type: "noise-turbulence" /* noiseTurbulence */,
|
|
1191
|
+
group: "Noise Transformers" /* noiseTransformers */,
|
|
1192
|
+
data: {
|
|
1193
|
+
title: "Noise Turbulence",
|
|
1194
|
+
frequency: 1,
|
|
1195
|
+
power: 1,
|
|
1196
|
+
roughness: 1,
|
|
1197
|
+
seed: 0
|
|
1198
|
+
},
|
|
1199
|
+
handles: [
|
|
1200
|
+
{
|
|
1201
|
+
position: import_system30.Position.Left,
|
|
1202
|
+
dataType: "module" /* module */,
|
|
1203
|
+
connection: "target",
|
|
1204
|
+
label: "Source Module",
|
|
1205
|
+
maxConnections: 1
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
position: import_system30.Position.Left,
|
|
1209
|
+
dataType: import_abstract31.CoreHandleType.variableProperty,
|
|
1210
|
+
label: "Variable Properties",
|
|
1211
|
+
connection: "target"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
position: import_system30.Position.Right,
|
|
1215
|
+
dataType: "module" /* module */,
|
|
1216
|
+
connection: "source"
|
|
1217
|
+
}
|
|
1218
|
+
]
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
// src/templates/generators/noise-billow-template.ts
|
|
1223
|
+
var import_abstract33 = require("@awesome-flow/core/abstract");
|
|
1224
|
+
var import_utils2 = require("@awesome-flow/core/utils");
|
|
1225
|
+
var import_system31 = require("@xyflow/system");
|
|
1226
|
+
var NoiseBillowNodeTemplateFactory = class {
|
|
1227
|
+
template = {
|
|
1228
|
+
id: import_utils2.IDGenerator.template(),
|
|
1229
|
+
type: "noise-billow" /* noiseBillow */,
|
|
1230
|
+
group: "Noise Generators" /* noiseGenerators */,
|
|
1231
|
+
data: {
|
|
1232
|
+
title: "Billow Noise",
|
|
1233
|
+
frequency: 0.1,
|
|
1234
|
+
lacunarity: 2,
|
|
1235
|
+
octaves: 5,
|
|
1236
|
+
persistence: 0.5,
|
|
1237
|
+
seed: 0
|
|
1238
|
+
},
|
|
1239
|
+
handles: [
|
|
1240
|
+
{
|
|
1241
|
+
position: import_system31.Position.Left,
|
|
1242
|
+
dataType: import_abstract33.CoreHandleType.variableProperty,
|
|
1243
|
+
connection: "target"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
position: import_system31.Position.Right,
|
|
1247
|
+
dataType: "module" /* module */,
|
|
1248
|
+
connection: "source"
|
|
1249
|
+
}
|
|
1250
|
+
]
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
// src/templates/groups/module-group-template.ts
|
|
1255
|
+
var import_abstract34 = require("@awesome-flow/core/abstract");
|
|
1256
|
+
var import_utils3 = require("@awesome-flow/core/utils");
|
|
1257
|
+
var import_system32 = require("@xyflow/system");
|
|
1258
|
+
var ModuleGroupNodeTemplateFactory = class {
|
|
1259
|
+
template = {
|
|
1260
|
+
id: import_utils3.IDGenerator.template(),
|
|
1261
|
+
type: "group-module" /* groupModule */,
|
|
1262
|
+
group: import_abstract34.CoreTemplateGroup.groups,
|
|
1263
|
+
data: {
|
|
1264
|
+
title: "Modules Group",
|
|
1265
|
+
isGroup: true,
|
|
1266
|
+
initialSize: {
|
|
1267
|
+
width: 300,
|
|
1268
|
+
height: 200
|
|
1269
|
+
},
|
|
1270
|
+
collapsedSize: {
|
|
1271
|
+
width: 300,
|
|
1272
|
+
height: 80
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
handles: [
|
|
1276
|
+
{
|
|
1277
|
+
position: import_system32.Position.Bottom,
|
|
1278
|
+
dataType: "module" /* module */,
|
|
1279
|
+
connection: "target",
|
|
1280
|
+
maxConnections: 1,
|
|
1281
|
+
hideOnCollapse: true
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
position: import_system32.Position.Right,
|
|
1285
|
+
dataType: "module" /* module */,
|
|
1286
|
+
connection: "source"
|
|
1287
|
+
}
|
|
1288
|
+
]
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
// src/nodes/groups/module-group-node.tsx
|
|
1293
|
+
var import_layout31 = require("@awesome-flow/core/layout");
|
|
1294
|
+
var import_react31 = require("@xyflow/react");
|
|
1295
|
+
var import_react32 = require("react");
|
|
1296
|
+
var import_shallow = require("zustand/shallow");
|
|
1297
|
+
var import_core17 = require("@mantine/core");
|
|
1298
|
+
var import_hooks33 = require("@awesome-flow/core/hooks");
|
|
1299
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1300
|
+
|
|
1301
|
+
// src/abstract/node-types.ts
|
|
1302
|
+
var noiseNodeTemplates = {
|
|
1303
|
+
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
1304
|
+
["noise-simplex" /* noiseSimplex */]: new NoiseSimplexNodeTemplateFactory(),
|
|
1305
|
+
["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
|
|
1306
|
+
["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
1307
|
+
["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
|
|
1308
|
+
["noise-logger" /* noiseLogger */]: new NoiseLoggerNodeTemplateFactory(),
|
|
1309
|
+
["noise-constant" /* noiseConst */]: new NoiseConstNodeTemplateFactory(),
|
|
1310
|
+
["position" /* position */]: new PositionConstNodeTemplateFactory(),
|
|
1311
|
+
["position-logger" /* positionLogger */]: new PositionLoggerNodeTemplateFactory(),
|
|
1312
|
+
["grid" /* grid */]: new PositionGridNodeTemplateFactory(),
|
|
1313
|
+
["texture-data" /* textureData */]: new NoiseRawTextureTemplateFactory(),
|
|
1314
|
+
["noise-cylinders" /* noiseCylinders */]: new NoiseCylindersNodeTemplateFactory(),
|
|
1315
|
+
["noise-perlin" /* noisePerlin */]: new NoisePerlinNodeTemplateFactory(),
|
|
1316
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: new NoiseRidgedMultiNodeTemplateFactory(),
|
|
1317
|
+
["noise-spheres" /* noiseSpheres */]: new NoiseSpheresNodeTemplateFactory(),
|
|
1318
|
+
["noise-voronoi" /* noiseVoronoi */]: new NoiseVoronoiNodeTemplateFactory(),
|
|
1319
|
+
["noise-combiner" /* noiseCombine */]: new NoiseCombineNodeTemplateFactory(),
|
|
1320
|
+
["noise-clamp" /* noiseClamp */]: new NoiseClampNodeTemplateFactory(),
|
|
1321
|
+
["noise-abs" /* noiseAbs */]: new NoiseAbsNodeTemplateFactory(),
|
|
1322
|
+
["noise-curve" /* noiseCurve */]: new NoiseCurveNodeTemplateFactory(),
|
|
1323
|
+
["noise-exponent" /* noiseExponent */]: new NoiseExponentNodeTemplateFactory(),
|
|
1324
|
+
["noise-invert" /* noiseInvert */]: new NoiseInvertNodeTemplateFactory(),
|
|
1325
|
+
["noise-scale-bias" /* noiseScaleBias */]: new NoiseScaleBiasNodeTemplateFactory(),
|
|
1326
|
+
["noise-terrace" /* noiseTerrace */]: new NoiseTerraceNodeTemplateFactory(),
|
|
1327
|
+
["noise-blend" /* noiseBlend */]: new NoiseBlendNodeTemplateFactory(),
|
|
1328
|
+
["noise-select" /* noiseSelect */]: new NoiseSelectNodeTemplateFactory(),
|
|
1329
|
+
["noise-displace" /* noiseDisplace */]: new NoiseDisplaceNodeTemplateFactory(),
|
|
1330
|
+
["noise-rotate-point" /* noiseRotatePoint */]: new NoiseRotatePointNodeTemplateFactory(),
|
|
1331
|
+
["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
|
|
1332
|
+
["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
|
|
1333
|
+
["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
|
|
1334
|
+
["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
// src/nodes/output/noise-output-node.tsx
|
|
1338
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1339
|
+
function NoiseOutputNode({ id, selected, data, type }) {
|
|
1340
|
+
const [size, setSize] = (0, import_react33.useState)(0);
|
|
1341
|
+
const updateComputedData = (0, import_hooks34.useUpdateNodeComputedData)();
|
|
1342
|
+
const onDataUpdated = (0, import_react33.useCallback)(
|
|
1343
|
+
(handleData) => {
|
|
1344
|
+
const incomingPositions = handleData["position" /* position */];
|
|
1345
|
+
const incomingModule = handleData["module" /* module */];
|
|
1346
|
+
if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
|
|
1347
|
+
const { module: module2 } = incomingModule[0];
|
|
1348
|
+
const noise = [];
|
|
1349
|
+
for (const input of incomingPositions) {
|
|
1350
|
+
for (const position of input.positions) {
|
|
1351
|
+
const value = module2.getValue(position.x, position.y, position.z);
|
|
1352
|
+
noise.push({
|
|
1353
|
+
position,
|
|
1354
|
+
value
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
updateComputedData(id, { noise, module: module2 });
|
|
1359
|
+
setSize(noise.length);
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
[]
|
|
1363
|
+
);
|
|
1364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_layout32.NodeContainer, { id, selected, data, type, children: [
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1366
|
+
import_components11.HandlesIncomingDataStatus,
|
|
1367
|
+
{
|
|
1368
|
+
nodeId: id,
|
|
1369
|
+
handles: data.handles,
|
|
1370
|
+
handleKey: "dataType",
|
|
1371
|
+
onDataUpdated,
|
|
1372
|
+
type: "target",
|
|
1373
|
+
resetComputedData: true
|
|
1374
|
+
}
|
|
1375
|
+
),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core18.Text, { mt: 5, children: [
|
|
1377
|
+
"Noise points: ",
|
|
1378
|
+
size
|
|
1379
|
+
] }),
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_layout32.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
1381
|
+
] });
|
|
1382
|
+
}
|
|
1383
|
+
var noise_output_node_default = NoiseOutputNode;
|
|
203
1384
|
// Annotate the CommonJS export names for ESM import in node:
|
|
204
1385
|
0 && (module.exports = {
|
|
205
1386
|
NoiseLoggerNode,
|
|
@@ -207,4 +1388,3 @@ var positions_logger_node_default = PositionsLoggerNode;
|
|
|
207
1388
|
NoiseRawTextureNode,
|
|
208
1389
|
PositionsLoggerNode
|
|
209
1390
|
});
|
|
210
|
-
//# sourceMappingURL=index.cjs.map
|