@awesome-flow/noise 0.8.0 → 0.9.1
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 +6 -6
- package/dist/abstract/index.d.cts +10 -8
- package/dist/abstract/index.d.ts +10 -8
- package/dist/abstract/index.js +5 -5
- package/dist/chunk-4YL2V7SE.js +641 -0
- package/dist/chunk-76MMGOOY.cjs +1008 -0
- package/dist/{chunk-BG6U3TYO.js → chunk-BE4RLT5P.js} +445 -178
- package/dist/chunk-D5QJ3563.cjs +641 -0
- package/dist/chunk-EHBNVDTI.js +60 -0
- package/dist/chunk-L45ZU7VL.js +1008 -0
- package/dist/{chunk-ACWBUUZ7.cjs → chunk-MIYOMNAG.cjs} +467 -200
- package/dist/chunk-O5DVJAMK.cjs +974 -0
- package/dist/chunk-S2ZGHJ75.js +974 -0
- package/dist/chunk-X2GXADE5.cjs +60 -0
- package/dist/{index-mlK0X4O1.d.ts → index-DAAmYCPU.d.ts} +1 -1
- package/dist/{index-CfiOpOzX.d.cts → index-EzT2GjIx.d.cts} +1 -1
- package/dist/{node-props-CAV2WNDN.d.ts → node-props-D8SnrgWa.d.cts} +1 -1
- package/dist/{node-props-CAV2WNDN.d.cts → node-props-D8SnrgWa.d.ts} +1 -1
- package/dist/nodes/generators/index.cjs +2 -2
- package/dist/nodes/generators/index.d.cts +1 -1
- package/dist/nodes/generators/index.d.ts +1 -1
- package/dist/nodes/generators/index.js +1 -1
- package/dist/nodes/groups/index.cjs +2 -2
- package/dist/nodes/groups/index.d.cts +1 -1
- package/dist/nodes/groups/index.d.ts +1 -1
- package/dist/nodes/groups/index.js +1 -1
- package/dist/nodes/index.cjs +6 -6
- package/dist/nodes/index.d.cts +4 -2
- package/dist/nodes/index.d.ts +4 -2
- package/dist/nodes/index.js +5 -5
- package/dist/nodes/modifiers/index.cjs +2 -2
- package/dist/nodes/modifiers/index.d.cts +6 -19
- package/dist/nodes/modifiers/index.d.ts +6 -19
- package/dist/nodes/modifiers/index.js +1 -1
- package/dist/nodes/output/index.cjs +6 -6
- package/dist/nodes/output/index.js +5 -5
- package/dist/nodes/selectors/index.cjs +6 -6
- package/dist/nodes/selectors/index.d.cts +1 -1
- package/dist/nodes/selectors/index.d.ts +1 -1
- package/dist/nodes/selectors/index.js +5 -5
- package/dist/nodes/transformers/index.cjs +2 -2
- package/dist/nodes/transformers/index.d.cts +1 -1
- package/dist/nodes/transformers/index.d.ts +1 -1
- package/dist/nodes/transformers/index.js +1 -1
- package/dist/noise-terrace-node-D2ezdTnC.d.cts +22 -0
- package/dist/noise-terrace-node-DW81ZQk6.d.ts +22 -0
- package/dist/templates/generators/index.cjs +6 -6
- package/dist/templates/generators/index.d.cts +1 -1
- package/dist/templates/generators/index.d.ts +1 -1
- package/dist/templates/generators/index.js +5 -5
- package/dist/templates/groups/index.cjs +6 -6
- package/dist/templates/groups/index.js +5 -5
- package/dist/templates/index.cjs +6 -6
- package/dist/templates/index.d.cts +2 -2
- package/dist/templates/index.d.ts +2 -2
- package/dist/templates/index.js +5 -5
- package/dist/templates/modifiers/index.cjs +6 -6
- package/dist/templates/modifiers/index.d.cts +1 -1
- package/dist/templates/modifiers/index.d.ts +1 -1
- package/dist/templates/modifiers/index.js +5 -5
- package/dist/templates/output/index.cjs +6 -6
- package/dist/templates/output/index.js +5 -5
- package/dist/templates/selectors/index.cjs +6 -6
- package/dist/templates/selectors/index.d.cts +1 -1
- package/dist/templates/selectors/index.d.ts +1 -1
- package/dist/templates/selectors/index.js +5 -5
- package/dist/templates/transformers/index.cjs +6 -6
- package/dist/templates/transformers/index.d.cts +2 -2
- package/dist/templates/transformers/index.d.ts +2 -2
- package/dist/templates/transformers/index.js +5 -5
- package/package.json +15 -14
- package/dist/chunk-D5JM4EYQ.cjs +0 -305
- package/dist/chunk-DWSACR65.js +0 -305
- package/dist/chunk-KHIIB5TH.js +0 -93
- package/dist/chunk-M67JHEU2.cjs +0 -93
- package/dist/chunk-PS5VUND5.js +0 -348
- package/dist/chunk-RDQ4BOOV.js +0 -522
- package/dist/chunk-RKTZQUWR.cjs +0 -348
- package/dist/chunk-TZCT2GZV.cjs +0 -522
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkD5QJ3563cjs = require('./chunk-D5QJ3563.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ var _chunkRKTZQUWRcjs = require('./chunk-RKTZQUWR.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkO5DVJAMKcjs = require('./chunk-O5DVJAMK.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkX2GXADE5cjs = require('./chunk-X2GXADE5.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ var _chunkM67JHEU2cjs = require('./chunk-M67JHEU2.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunk76MMGOOYcjs = require('./chunk-76MMGOOY.cjs');
|
|
34
34
|
|
|
35
35
|
// src/nodes/output/noise-logger-node.tsx
|
|
36
36
|
var _hooks = require('@awesome-flow/core/hooks');
|
|
@@ -38,7 +38,12 @@ var _layout = require('@awesome-flow/core/layout');
|
|
|
38
38
|
var _core = require('@mantine/core');
|
|
39
39
|
var _react = require('react');
|
|
40
40
|
var _jsxruntime = require('react/jsx-runtime');
|
|
41
|
-
function NoiseLoggerNode({
|
|
41
|
+
function NoiseLoggerNode({
|
|
42
|
+
id,
|
|
43
|
+
selected,
|
|
44
|
+
data,
|
|
45
|
+
type
|
|
46
|
+
}) {
|
|
42
47
|
const incoming = _hooks.useIncomingComputedData.call(void 0, id);
|
|
43
48
|
const noise = _react.useMemo.call(void 0, () => _optionalChain([incoming, 'optionalAccess', _ => _.map, 'call', _2 => _2((p) => p.noise), 'access', _3 => _3.flat, 'call', _4 => _4()]), [incoming]);
|
|
44
49
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
@@ -62,6 +67,7 @@ function NoiseLoggerNode({ id, selected, data, type }) {
|
|
|
62
67
|
var noise_logger_node_default = NoiseLoggerNode;
|
|
63
68
|
|
|
64
69
|
// src/nodes/output/noise-output-node.tsx
|
|
70
|
+
var _compilerruntime = require('react/compiler-runtime');
|
|
65
71
|
var _components = require('@awesome-flow/core/components');
|
|
66
72
|
|
|
67
73
|
|
|
@@ -72,40 +78,73 @@ var _components = require('@awesome-flow/core/components');
|
|
|
72
78
|
|
|
73
79
|
|
|
74
80
|
|
|
75
|
-
var _libnoisesimplexts = require('libnoise-simplex-ts');
|
|
76
81
|
|
|
82
|
+
var _libnoisesimplexts = require('libnoise-simplex-ts');
|
|
77
83
|
|
|
78
|
-
function NoiseBlendNode(
|
|
84
|
+
function NoiseBlendNode(t0) {
|
|
85
|
+
const $ = _compilerruntime.c.call(void 0, 17);
|
|
86
|
+
const {
|
|
87
|
+
id,
|
|
88
|
+
selected,
|
|
89
|
+
data,
|
|
90
|
+
type
|
|
91
|
+
} = t0;
|
|
79
92
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
let t1;
|
|
94
|
+
if ($[0] !== id || $[1] !== updateComputedData) {
|
|
95
|
+
t1 = (incomingData) => {
|
|
82
96
|
const incomingSources = incomingData["source" /* source */];
|
|
83
97
|
const incomingControl = incomingData["control" /* control */];
|
|
84
98
|
if (_optionalChain([incomingSources, 'optionalAccess', _14 => _14.length]) >= 2 && _optionalChain([incomingControl, 'optionalAccess', _15 => _15.length])) {
|
|
85
|
-
const module = new (0, _libnoisesimplexts.Blend)(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
);
|
|
90
|
-
updateComputedData(id, { module });
|
|
99
|
+
const module = new (0, _libnoisesimplexts.Blend)(incomingSources[0].module, incomingSources[1].module, incomingControl[0].module);
|
|
100
|
+
updateComputedData(id, {
|
|
101
|
+
module
|
|
102
|
+
});
|
|
91
103
|
}
|
|
92
|
-
}
|
|
93
|
-
[]
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
};
|
|
105
|
+
$[0] = id;
|
|
106
|
+
$[1] = updateComputedData;
|
|
107
|
+
$[2] = t1;
|
|
108
|
+
} else {
|
|
109
|
+
t1 = $[2];
|
|
110
|
+
}
|
|
111
|
+
const onDataUpdated = t1;
|
|
112
|
+
let t2;
|
|
113
|
+
if ($[3] !== data.handles || $[4] !== id || $[5] !== onDataUpdated) {
|
|
114
|
+
t2 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, handleKey: "dataId", onDataUpdated, type: "target", resetComputedData: true });
|
|
115
|
+
$[3] = data.handles;
|
|
116
|
+
$[4] = id;
|
|
117
|
+
$[5] = onDataUpdated;
|
|
118
|
+
$[6] = t2;
|
|
119
|
+
} else {
|
|
120
|
+
t2 = $[6];
|
|
121
|
+
}
|
|
122
|
+
let t3;
|
|
123
|
+
if ($[7] !== data.handles || $[8] !== id) {
|
|
124
|
+
t3 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" });
|
|
125
|
+
$[7] = data.handles;
|
|
126
|
+
$[8] = id;
|
|
127
|
+
$[9] = t3;
|
|
128
|
+
} else {
|
|
129
|
+
t3 = $[9];
|
|
130
|
+
}
|
|
131
|
+
let t4;
|
|
132
|
+
if ($[10] !== data || $[11] !== id || $[12] !== selected || $[13] !== t2 || $[14] !== t3 || $[15] !== type) {
|
|
133
|
+
t4 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
134
|
+
t2,
|
|
135
|
+
t3
|
|
136
|
+
] });
|
|
137
|
+
$[10] = data;
|
|
138
|
+
$[11] = id;
|
|
139
|
+
$[12] = selected;
|
|
140
|
+
$[13] = t2;
|
|
141
|
+
$[14] = t3;
|
|
142
|
+
$[15] = type;
|
|
143
|
+
$[16] = t4;
|
|
144
|
+
} else {
|
|
145
|
+
t4 = $[16];
|
|
146
|
+
}
|
|
147
|
+
return t4;
|
|
109
148
|
}
|
|
110
149
|
var noise_blend_node_default = NoiseBlendNode;
|
|
111
150
|
|
|
@@ -117,88 +156,171 @@ var noise_blend_node_default = NoiseBlendNode;
|
|
|
117
156
|
|
|
118
157
|
|
|
119
158
|
|
|
120
|
-
|
|
159
|
+
|
|
160
|
+
function NoiseSelectNode(t0) {
|
|
161
|
+
const $ = _compilerruntime.c.call(void 0, 41);
|
|
162
|
+
const {
|
|
163
|
+
id,
|
|
164
|
+
selected,
|
|
165
|
+
data,
|
|
166
|
+
type
|
|
167
|
+
} = t0;
|
|
121
168
|
const [edgeFalloff, setEdgeFalloff] = _react.useState.call(void 0, data.edgeFalloff);
|
|
122
169
|
const [lowerBound, setLowerBound] = _react.useState.call(void 0, data.lowerBound);
|
|
123
170
|
const [upperBound, setUpperBound] = _react.useState.call(void 0, data.upperBound);
|
|
124
171
|
const updateNodeData = _hooks.useUpdateNodeData.call(void 0, );
|
|
125
172
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
173
|
+
let t1;
|
|
174
|
+
let t2;
|
|
175
|
+
if ($[0] !== edgeFalloff || $[1] !== id || $[2] !== lowerBound || $[3] !== updateNodeData || $[4] !== upperBound) {
|
|
176
|
+
t1 = () => {
|
|
177
|
+
updateNodeData(id, {
|
|
178
|
+
edgeFalloff,
|
|
179
|
+
lowerBound,
|
|
180
|
+
upperBound
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
t2 = [edgeFalloff, lowerBound, upperBound, id, updateNodeData];
|
|
184
|
+
$[0] = edgeFalloff;
|
|
185
|
+
$[1] = id;
|
|
186
|
+
$[2] = lowerBound;
|
|
187
|
+
$[3] = updateNodeData;
|
|
188
|
+
$[4] = upperBound;
|
|
189
|
+
$[5] = t1;
|
|
190
|
+
$[6] = t2;
|
|
191
|
+
} else {
|
|
192
|
+
t1 = $[5];
|
|
193
|
+
t2 = $[6];
|
|
194
|
+
}
|
|
195
|
+
_react.useEffect.call(void 0, t1, t2);
|
|
196
|
+
let t3;
|
|
197
|
+
if ($[7] !== edgeFalloff || $[8] !== id || $[9] !== lowerBound || $[10] !== updateComputedData || $[11] !== upperBound) {
|
|
198
|
+
t3 = (incomingData) => {
|
|
131
199
|
const incomingSources = incomingData["source" /* source */];
|
|
132
200
|
const incomingControl = incomingData["control" /* control */];
|
|
133
201
|
if (_optionalChain([incomingSources, 'optionalAccess', _16 => _16.length]) >= 2 && _optionalChain([incomingControl, 'optionalAccess', _17 => _17.length])) {
|
|
134
|
-
const module = new (0, _libnoisesimplexts.Select)(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
edgeFalloff,
|
|
139
|
-
lowerBound,
|
|
140
|
-
upperBound
|
|
141
|
-
);
|
|
142
|
-
updateComputedData(id, { module });
|
|
202
|
+
const module = new (0, _libnoisesimplexts.Select)(incomingSources[0].module, incomingSources[1].module, incomingControl[0].module, edgeFalloff, lowerBound, upperBound);
|
|
203
|
+
updateComputedData(id, {
|
|
204
|
+
module
|
|
205
|
+
});
|
|
143
206
|
}
|
|
144
|
-
}
|
|
145
|
-
[]
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
/* @__PURE__ */ _jsxruntime.
|
|
201
|
-
|
|
207
|
+
};
|
|
208
|
+
$[7] = edgeFalloff;
|
|
209
|
+
$[8] = id;
|
|
210
|
+
$[9] = lowerBound;
|
|
211
|
+
$[10] = updateComputedData;
|
|
212
|
+
$[11] = upperBound;
|
|
213
|
+
$[12] = t3;
|
|
214
|
+
} else {
|
|
215
|
+
t3 = $[12];
|
|
216
|
+
}
|
|
217
|
+
const onDataUpdated = t3;
|
|
218
|
+
let t4;
|
|
219
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
220
|
+
t4 = (e) => setEdgeFalloff(Number(e));
|
|
221
|
+
$[13] = t4;
|
|
222
|
+
} else {
|
|
223
|
+
t4 = $[13];
|
|
224
|
+
}
|
|
225
|
+
let t5;
|
|
226
|
+
if ($[14] !== edgeFalloff) {
|
|
227
|
+
t5 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
228
|
+
"Edge Falloff:",
|
|
229
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: edgeFalloff, onChange: t4, step: 0.1 })
|
|
230
|
+
] });
|
|
231
|
+
$[14] = edgeFalloff;
|
|
232
|
+
$[15] = t5;
|
|
233
|
+
} else {
|
|
234
|
+
t5 = $[15];
|
|
235
|
+
}
|
|
236
|
+
let t6;
|
|
237
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
238
|
+
t6 = (e_0) => setLowerBound(Number(e_0));
|
|
239
|
+
$[16] = t6;
|
|
240
|
+
} else {
|
|
241
|
+
t6 = $[16];
|
|
242
|
+
}
|
|
243
|
+
let t7;
|
|
244
|
+
if ($[17] !== lowerBound) {
|
|
245
|
+
t7 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
246
|
+
"Lower Bound:",
|
|
247
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: lowerBound, onChange: t6, step: 0.1 })
|
|
248
|
+
] });
|
|
249
|
+
$[17] = lowerBound;
|
|
250
|
+
$[18] = t7;
|
|
251
|
+
} else {
|
|
252
|
+
t7 = $[18];
|
|
253
|
+
}
|
|
254
|
+
let t8;
|
|
255
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
256
|
+
t8 = (e_1) => setUpperBound(Number(e_1));
|
|
257
|
+
$[19] = t8;
|
|
258
|
+
} else {
|
|
259
|
+
t8 = $[19];
|
|
260
|
+
}
|
|
261
|
+
let t9;
|
|
262
|
+
if ($[20] !== upperBound) {
|
|
263
|
+
t9 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
264
|
+
"Upper Bound:",
|
|
265
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: upperBound, onChange: t8, step: 0.1 })
|
|
266
|
+
] });
|
|
267
|
+
$[20] = upperBound;
|
|
268
|
+
$[21] = t9;
|
|
269
|
+
} else {
|
|
270
|
+
t9 = $[21];
|
|
271
|
+
}
|
|
272
|
+
let t10;
|
|
273
|
+
if ($[22] !== data.handles || $[23] !== id || $[24] !== onDataUpdated) {
|
|
274
|
+
t10 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, handleKey: "dataId", onDataUpdated, type: "target", resetComputedData: true });
|
|
275
|
+
$[22] = data.handles;
|
|
276
|
+
$[23] = id;
|
|
277
|
+
$[24] = onDataUpdated;
|
|
278
|
+
$[25] = t10;
|
|
279
|
+
} else {
|
|
280
|
+
t10 = $[25];
|
|
281
|
+
}
|
|
282
|
+
let t11;
|
|
283
|
+
if ($[26] !== t10 || $[27] !== t5 || $[28] !== t7 || $[29] !== t9) {
|
|
284
|
+
t11 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Stack, { children: [
|
|
285
|
+
t5,
|
|
286
|
+
t7,
|
|
287
|
+
t9,
|
|
288
|
+
t10
|
|
289
|
+
] });
|
|
290
|
+
$[26] = t10;
|
|
291
|
+
$[27] = t5;
|
|
292
|
+
$[28] = t7;
|
|
293
|
+
$[29] = t9;
|
|
294
|
+
$[30] = t11;
|
|
295
|
+
} else {
|
|
296
|
+
t11 = $[30];
|
|
297
|
+
}
|
|
298
|
+
let t12;
|
|
299
|
+
if ($[31] !== data.handles || $[32] !== id) {
|
|
300
|
+
t12 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" });
|
|
301
|
+
$[31] = data.handles;
|
|
302
|
+
$[32] = id;
|
|
303
|
+
$[33] = t12;
|
|
304
|
+
} else {
|
|
305
|
+
t12 = $[33];
|
|
306
|
+
}
|
|
307
|
+
let t13;
|
|
308
|
+
if ($[34] !== data || $[35] !== id || $[36] !== selected || $[37] !== t11 || $[38] !== t12 || $[39] !== type) {
|
|
309
|
+
t13 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
310
|
+
t11,
|
|
311
|
+
t12
|
|
312
|
+
] });
|
|
313
|
+
$[34] = data;
|
|
314
|
+
$[35] = id;
|
|
315
|
+
$[36] = selected;
|
|
316
|
+
$[37] = t11;
|
|
317
|
+
$[38] = t12;
|
|
318
|
+
$[39] = type;
|
|
319
|
+
$[40] = t13;
|
|
320
|
+
} else {
|
|
321
|
+
t13 = $[40];
|
|
322
|
+
}
|
|
323
|
+
return t13;
|
|
202
324
|
}
|
|
203
325
|
var noise_select_node_default = NoiseSelectNode;
|
|
204
326
|
|
|
@@ -208,50 +330,146 @@ var noise_select_node_default = NoiseSelectNode;
|
|
|
208
330
|
|
|
209
331
|
|
|
210
332
|
|
|
211
|
-
|
|
333
|
+
|
|
334
|
+
function NoiseRawTextureNode(t0) {
|
|
335
|
+
const $ = _compilerruntime.c.call(void 0, 28);
|
|
336
|
+
const {
|
|
337
|
+
id,
|
|
338
|
+
selected,
|
|
339
|
+
data,
|
|
340
|
+
type
|
|
341
|
+
} = t0;
|
|
212
342
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
213
343
|
const [dataLength, setDataLength] = _react.useState.call(void 0, 0);
|
|
214
344
|
const [resolution, setResolution] = _react.useState.call(void 0, 0);
|
|
215
345
|
const incoming = _hooks.useIncomingComputedData.call(void 0, id);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
]
|
|
253
|
-
|
|
254
|
-
|
|
346
|
+
let t1;
|
|
347
|
+
let t2;
|
|
348
|
+
if ($[0] !== incoming) {
|
|
349
|
+
t2 = _optionalChain([incoming, 'optionalAccess', _18 => _18.map, 'call', _19 => _19(_temp), 'access', _20 => _20.flat, 'call', _21 => _21()]);
|
|
350
|
+
$[0] = incoming;
|
|
351
|
+
$[1] = t2;
|
|
352
|
+
} else {
|
|
353
|
+
t2 = $[1];
|
|
354
|
+
}
|
|
355
|
+
t1 = t2;
|
|
356
|
+
const noise = t1;
|
|
357
|
+
let t3;
|
|
358
|
+
let t4;
|
|
359
|
+
if ($[2] !== id || $[3] !== noise || $[4] !== updateComputedData) {
|
|
360
|
+
t3 = () => {
|
|
361
|
+
if (_optionalChain([noise, 'optionalAccess', _22 => _22.length])) {
|
|
362
|
+
const size = Math.ceil(Math.sqrt(noise.length));
|
|
363
|
+
const colors = noise.map(_temp2).flat();
|
|
364
|
+
const dataArray = new Uint8Array(size * size * 4);
|
|
365
|
+
dataArray.set(colors);
|
|
366
|
+
setResolution(size);
|
|
367
|
+
setDataLength(dataArray.length);
|
|
368
|
+
updateComputedData(id, {
|
|
369
|
+
textureData: dataArray,
|
|
370
|
+
textureResolutionX: size,
|
|
371
|
+
textureResolutionY: size
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
t4 = [noise, updateComputedData, id];
|
|
376
|
+
$[2] = id;
|
|
377
|
+
$[3] = noise;
|
|
378
|
+
$[4] = updateComputedData;
|
|
379
|
+
$[5] = t3;
|
|
380
|
+
$[6] = t4;
|
|
381
|
+
} else {
|
|
382
|
+
t3 = $[5];
|
|
383
|
+
t4 = $[6];
|
|
384
|
+
}
|
|
385
|
+
_react.useEffect.call(void 0, t3, t4);
|
|
386
|
+
let t5;
|
|
387
|
+
if ($[7] !== resolution) {
|
|
388
|
+
t5 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
389
|
+
"Resolution: ",
|
|
390
|
+
resolution,
|
|
391
|
+
"x",
|
|
392
|
+
resolution
|
|
393
|
+
] });
|
|
394
|
+
$[7] = resolution;
|
|
395
|
+
$[8] = t5;
|
|
396
|
+
} else {
|
|
397
|
+
t5 = $[8];
|
|
398
|
+
}
|
|
399
|
+
const t6 = _optionalChain([noise, 'optionalAccess', _23 => _23.length]) || 0;
|
|
400
|
+
let t7;
|
|
401
|
+
if ($[9] !== t6) {
|
|
402
|
+
t7 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
403
|
+
"Input Length: ",
|
|
404
|
+
t6
|
|
405
|
+
] });
|
|
406
|
+
$[9] = t6;
|
|
407
|
+
$[10] = t7;
|
|
408
|
+
} else {
|
|
409
|
+
t7 = $[10];
|
|
410
|
+
}
|
|
411
|
+
let t8;
|
|
412
|
+
if ($[11] !== dataLength || $[12] !== resolution) {
|
|
413
|
+
t8 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
414
|
+
"Output Length (",
|
|
415
|
+
resolution,
|
|
416
|
+
"*",
|
|
417
|
+
resolution,
|
|
418
|
+
"*4): ",
|
|
419
|
+
dataLength
|
|
420
|
+
] });
|
|
421
|
+
$[11] = dataLength;
|
|
422
|
+
$[12] = resolution;
|
|
423
|
+
$[13] = t8;
|
|
424
|
+
} else {
|
|
425
|
+
t8 = $[13];
|
|
426
|
+
}
|
|
427
|
+
let t9;
|
|
428
|
+
if ($[14] !== t5 || $[15] !== t7 || $[16] !== t8) {
|
|
429
|
+
t9 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Stack, { children: [
|
|
430
|
+
t5,
|
|
431
|
+
t7,
|
|
432
|
+
t8
|
|
433
|
+
] });
|
|
434
|
+
$[14] = t5;
|
|
435
|
+
$[15] = t7;
|
|
436
|
+
$[16] = t8;
|
|
437
|
+
$[17] = t9;
|
|
438
|
+
} else {
|
|
439
|
+
t9 = $[17];
|
|
440
|
+
}
|
|
441
|
+
let t10;
|
|
442
|
+
if ($[18] !== data.handles || $[19] !== id) {
|
|
443
|
+
t10 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" });
|
|
444
|
+
$[18] = data.handles;
|
|
445
|
+
$[19] = id;
|
|
446
|
+
$[20] = t10;
|
|
447
|
+
} else {
|
|
448
|
+
t10 = $[20];
|
|
449
|
+
}
|
|
450
|
+
let t11;
|
|
451
|
+
if ($[21] !== data || $[22] !== id || $[23] !== selected || $[24] !== t10 || $[25] !== t9 || $[26] !== type) {
|
|
452
|
+
t11 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
453
|
+
t9,
|
|
454
|
+
t10
|
|
455
|
+
] });
|
|
456
|
+
$[21] = data;
|
|
457
|
+
$[22] = id;
|
|
458
|
+
$[23] = selected;
|
|
459
|
+
$[24] = t10;
|
|
460
|
+
$[25] = t9;
|
|
461
|
+
$[26] = type;
|
|
462
|
+
$[27] = t11;
|
|
463
|
+
} else {
|
|
464
|
+
t11 = $[27];
|
|
465
|
+
}
|
|
466
|
+
return t11;
|
|
467
|
+
}
|
|
468
|
+
function _temp2(n) {
|
|
469
|
+
return [n.value * 255, n.value * 255, n.value * 255, 255];
|
|
470
|
+
}
|
|
471
|
+
function _temp(p) {
|
|
472
|
+
return p.noise;
|
|
255
473
|
}
|
|
256
474
|
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
257
475
|
|
|
@@ -261,7 +479,12 @@ var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
|
261
479
|
|
|
262
480
|
|
|
263
481
|
|
|
264
|
-
function PositionsLoggerNode({
|
|
482
|
+
function PositionsLoggerNode({
|
|
483
|
+
id,
|
|
484
|
+
selected,
|
|
485
|
+
data,
|
|
486
|
+
type
|
|
487
|
+
}) {
|
|
265
488
|
const incoming = _hooks.useIncomingComputedData.call(void 0, id);
|
|
266
489
|
const positions = _react.useMemo.call(void 0, () => {
|
|
267
490
|
return _optionalChain([incoming, 'optionalAccess', _24 => _24.map, 'call', _25 => _25((p) => p.positions), 'access', _26 => _26.flat, 'call', _27 => _27()]);
|
|
@@ -688,11 +911,6 @@ var NoiseCurveNodeTemplateFactory = (_class15 = class {constructor() { _class15.
|
|
|
688
911
|
connection: "target",
|
|
689
912
|
maxConnections: 1
|
|
690
913
|
},
|
|
691
|
-
// {
|
|
692
|
-
// position: Position.Left,
|
|
693
|
-
// dataType: CoreHandleType.variableProperty,
|
|
694
|
-
// connection: 'target',
|
|
695
|
-
// },
|
|
696
914
|
{
|
|
697
915
|
position: _system.Position.Right,
|
|
698
916
|
dataType: "module" /* module */,
|
|
@@ -1217,37 +1435,37 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
|
|
|
1217
1435
|
return NoiseNodeType2;
|
|
1218
1436
|
})(NoiseNodeType || {});
|
|
1219
1437
|
var noiseNodeTypes = {
|
|
1220
|
-
["group-module" /* groupModule */]:
|
|
1221
|
-
["position" /* position */]:
|
|
1222
|
-
["grid" /* grid */]:
|
|
1438
|
+
["group-module" /* groupModule */]: _chunkX2GXADE5cjs.module_group_node_default,
|
|
1439
|
+
["position" /* position */]: _chunkO5DVJAMKcjs.position_const_node_default,
|
|
1440
|
+
["grid" /* grid */]: _chunkO5DVJAMKcjs.position_grid_node_default,
|
|
1223
1441
|
["noise-output" /* noiseOutput */]: noise_output_node_default,
|
|
1224
1442
|
["texture-data" /* textureData */]: noise_raw_texture_node_default,
|
|
1225
1443
|
["noise-logger" /* noiseLogger */]: noise_logger_node_default,
|
|
1226
1444
|
["position-logger" /* positionLogger */]: positions_logger_node_default,
|
|
1227
|
-
["noise-constant" /* noiseConst */]:
|
|
1228
|
-
["noise-billow" /* noiseBillow */]:
|
|
1229
|
-
["noise-checkerboard" /* noiseCheckerboard */]:
|
|
1230
|
-
["noise-cylinders" /* noiseCylinders */]:
|
|
1231
|
-
["noise-perlin" /* noisePerlin */]:
|
|
1232
|
-
["noise-ridged-multi" /* noiseRidgedMulti */]:
|
|
1233
|
-
["noise-spheres" /* noiseSpheres */]:
|
|
1234
|
-
["noise-voronoi" /* noiseVoronoi */]:
|
|
1235
|
-
["noise-combiner" /* noiseCombine */]:
|
|
1236
|
-
["noise-clamp" /* noiseClamp */]:
|
|
1237
|
-
["noise-abs" /* noiseAbs */]:
|
|
1238
|
-
["noise-normalize" /* noiseNormalize */]:
|
|
1239
|
-
["noise-curve" /* noiseCurve */]:
|
|
1240
|
-
["noise-exponent" /* noiseExponent */]:
|
|
1241
|
-
["noise-invert" /* noiseInvert */]:
|
|
1242
|
-
["noise-scale-bias" /* noiseScaleBias */]:
|
|
1243
|
-
["noise-terrace" /* noiseTerrace */]:
|
|
1445
|
+
["noise-constant" /* noiseConst */]: _chunkO5DVJAMKcjs.noise_const_node_default,
|
|
1446
|
+
["noise-billow" /* noiseBillow */]: _chunkO5DVJAMKcjs.noise_billow_node_default,
|
|
1447
|
+
["noise-checkerboard" /* noiseCheckerboard */]: _chunkO5DVJAMKcjs.noise_checkerboard_node_default,
|
|
1448
|
+
["noise-cylinders" /* noiseCylinders */]: _chunkO5DVJAMKcjs.noise_cylinders_node_default,
|
|
1449
|
+
["noise-perlin" /* noisePerlin */]: _chunkO5DVJAMKcjs.noise_perlin_node_default,
|
|
1450
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: _chunkO5DVJAMKcjs.noise_ridgedmulti_node_default,
|
|
1451
|
+
["noise-spheres" /* noiseSpheres */]: _chunkO5DVJAMKcjs.noise_spheres_node_default,
|
|
1452
|
+
["noise-voronoi" /* noiseVoronoi */]: _chunkO5DVJAMKcjs.noise_voronoi_node_default,
|
|
1453
|
+
["noise-combiner" /* noiseCombine */]: _chunk76MMGOOYcjs.noise_combine_node_default,
|
|
1454
|
+
["noise-clamp" /* noiseClamp */]: _chunk76MMGOOYcjs.noise_clamp_node_default,
|
|
1455
|
+
["noise-abs" /* noiseAbs */]: _chunk76MMGOOYcjs.noise_abs_node_default,
|
|
1456
|
+
["noise-normalize" /* noiseNormalize */]: _chunk76MMGOOYcjs.noise_normalize_node_default,
|
|
1457
|
+
["noise-curve" /* noiseCurve */]: _chunk76MMGOOYcjs.noise_curve_node_default,
|
|
1458
|
+
["noise-exponent" /* noiseExponent */]: _chunk76MMGOOYcjs.noise_exponent_node_default,
|
|
1459
|
+
["noise-invert" /* noiseInvert */]: _chunk76MMGOOYcjs.noise_invert_node_default,
|
|
1460
|
+
["noise-scale-bias" /* noiseScaleBias */]: _chunk76MMGOOYcjs.noise_scale_bias_node_default,
|
|
1461
|
+
["noise-terrace" /* noiseTerrace */]: _chunk76MMGOOYcjs.noise_terrace_node_default,
|
|
1244
1462
|
["noise-blend" /* noiseBlend */]: noise_blend_node_default,
|
|
1245
1463
|
["noise-select" /* noiseSelect */]: noise_select_node_default,
|
|
1246
|
-
["noise-displace" /* noiseDisplace */]:
|
|
1247
|
-
["noise-rotate-point" /* noiseRotatePoint */]:
|
|
1248
|
-
["noise-scale-point" /* noiseScalePoint */]:
|
|
1249
|
-
["noise-translate-point" /* noiseTranslatePoint */]:
|
|
1250
|
-
["noise-turbulence" /* noiseTurbulence */]:
|
|
1464
|
+
["noise-displace" /* noiseDisplace */]: _chunkD5QJ3563cjs.noise_displace_node_default,
|
|
1465
|
+
["noise-rotate-point" /* noiseRotatePoint */]: _chunkD5QJ3563cjs.noise_rotate_point_node_default,
|
|
1466
|
+
["noise-scale-point" /* noiseScalePoint */]: _chunkD5QJ3563cjs.noise_scale_point_node_default,
|
|
1467
|
+
["noise-translate-point" /* noiseTranslatePoint */]: _chunkD5QJ3563cjs.noise_translate_point_node_default,
|
|
1468
|
+
["noise-turbulence" /* noiseTurbulence */]: _chunkD5QJ3563cjs.noise_turbulence_node_default
|
|
1251
1469
|
};
|
|
1252
1470
|
var noiseNodeTemplates = {
|
|
1253
1471
|
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
@@ -1285,15 +1503,25 @@ var noiseNodeTemplates = {
|
|
|
1285
1503
|
|
|
1286
1504
|
// src/nodes/output/noise-output-node.tsx
|
|
1287
1505
|
|
|
1288
|
-
function NoiseOutputNode(
|
|
1506
|
+
function NoiseOutputNode(t0) {
|
|
1507
|
+
const $ = _compilerruntime.c.call(void 0, 20);
|
|
1508
|
+
const {
|
|
1509
|
+
id,
|
|
1510
|
+
selected,
|
|
1511
|
+
data,
|
|
1512
|
+
type
|
|
1513
|
+
} = t0;
|
|
1289
1514
|
const [size, setSize] = _react.useState.call(void 0, 0);
|
|
1290
1515
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
1291
|
-
|
|
1292
|
-
|
|
1516
|
+
let t1;
|
|
1517
|
+
if ($[0] !== id || $[1] !== updateComputedData) {
|
|
1518
|
+
t1 = (handleData) => {
|
|
1293
1519
|
const incomingPositions = handleData["position" /* position */];
|
|
1294
1520
|
const incomingModule = handleData["module" /* module */];
|
|
1295
1521
|
if (_optionalChain([incomingPositions, 'optionalAccess', _31 => _31.length]) && _optionalChain([incomingModule, 'optionalAccess', _32 => _32.length]) && _optionalChain([incomingModule, 'access', _33 => _33[0], 'optionalAccess', _34 => _34.module])) {
|
|
1296
|
-
const {
|
|
1522
|
+
const {
|
|
1523
|
+
module
|
|
1524
|
+
} = incomingModule[0];
|
|
1297
1525
|
const noise = [];
|
|
1298
1526
|
for (const input of incomingPositions) {
|
|
1299
1527
|
for (const position of input.positions) {
|
|
@@ -1304,30 +1532,69 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
1304
1532
|
});
|
|
1305
1533
|
}
|
|
1306
1534
|
}
|
|
1307
|
-
updateComputedData(id, {
|
|
1535
|
+
updateComputedData(id, {
|
|
1536
|
+
noise,
|
|
1537
|
+
module
|
|
1538
|
+
});
|
|
1308
1539
|
setSize(noise.length);
|
|
1309
1540
|
}
|
|
1310
|
-
}
|
|
1311
|
-
[]
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1541
|
+
};
|
|
1542
|
+
$[0] = id;
|
|
1543
|
+
$[1] = updateComputedData;
|
|
1544
|
+
$[2] = t1;
|
|
1545
|
+
} else {
|
|
1546
|
+
t1 = $[2];
|
|
1547
|
+
}
|
|
1548
|
+
const onDataUpdated = t1;
|
|
1549
|
+
let t2;
|
|
1550
|
+
if ($[3] !== data.handles || $[4] !== id || $[5] !== onDataUpdated) {
|
|
1551
|
+
t2 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, handleKey: "dataType", onDataUpdated, type: "target", resetComputedData: true });
|
|
1552
|
+
$[3] = data.handles;
|
|
1553
|
+
$[4] = id;
|
|
1554
|
+
$[5] = onDataUpdated;
|
|
1555
|
+
$[6] = t2;
|
|
1556
|
+
} else {
|
|
1557
|
+
t2 = $[6];
|
|
1558
|
+
}
|
|
1559
|
+
let t3;
|
|
1560
|
+
if ($[7] !== size) {
|
|
1561
|
+
t3 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Text, { mt: 5, children: [
|
|
1326
1562
|
"Noise points: ",
|
|
1327
1563
|
size
|
|
1328
|
-
] })
|
|
1329
|
-
|
|
1330
|
-
|
|
1564
|
+
] });
|
|
1565
|
+
$[7] = size;
|
|
1566
|
+
$[8] = t3;
|
|
1567
|
+
} else {
|
|
1568
|
+
t3 = $[8];
|
|
1569
|
+
}
|
|
1570
|
+
let t4;
|
|
1571
|
+
if ($[9] !== data.handles || $[10] !== id) {
|
|
1572
|
+
t4 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" });
|
|
1573
|
+
$[9] = data.handles;
|
|
1574
|
+
$[10] = id;
|
|
1575
|
+
$[11] = t4;
|
|
1576
|
+
} else {
|
|
1577
|
+
t4 = $[11];
|
|
1578
|
+
}
|
|
1579
|
+
let t5;
|
|
1580
|
+
if ($[12] !== data || $[13] !== id || $[14] !== selected || $[15] !== t2 || $[16] !== t3 || $[17] !== t4 || $[18] !== type) {
|
|
1581
|
+
t5 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
1582
|
+
t2,
|
|
1583
|
+
t3,
|
|
1584
|
+
t4
|
|
1585
|
+
] });
|
|
1586
|
+
$[12] = data;
|
|
1587
|
+
$[13] = id;
|
|
1588
|
+
$[14] = selected;
|
|
1589
|
+
$[15] = t2;
|
|
1590
|
+
$[16] = t3;
|
|
1591
|
+
$[17] = t4;
|
|
1592
|
+
$[18] = type;
|
|
1593
|
+
$[19] = t5;
|
|
1594
|
+
} else {
|
|
1595
|
+
t5 = $[19];
|
|
1596
|
+
}
|
|
1597
|
+
return t5;
|
|
1331
1598
|
}
|
|
1332
1599
|
var noise_output_node_default = NoiseOutputNode;
|
|
1333
1600
|
|