@awesome-flow/noise 0.9.0 → 0.9.2
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-36USJJC4.cjs +576 -0
- package/dist/chunk-DQE5NXY7.cjs +911 -0
- package/dist/chunk-FMJZTXJQ.js +576 -0
- package/dist/chunk-LKDSXT7I.cjs +896 -0
- package/dist/chunk-M26CSOHC.js +911 -0
- package/dist/chunk-NUA3VGOA.js +896 -0
- package/dist/{chunk-ACWBUUZ7.cjs → chunk-OLJKWO2H.cjs} +419 -204
- package/dist/chunk-R6TU3SBX.js +49 -0
- package/dist/{chunk-BG6U3TYO.js → chunk-W4T6Q7A5.js} +411 -196
- package/dist/chunk-XC7VF5YC.cjs +49 -0
- package/dist/{index-mlK0X4O1.d.ts → index-BZr1EROK.d.cts} +2 -2
- package/dist/{index-CfiOpOzX.d.cts → index-DzD3jbPF.d.ts} +2 -2
- 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 +13 -12
- 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 _chunk36USJJC4cjs = require('./chunk-36USJJC4.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 _chunkLKDSXT7Icjs = require('./chunk-LKDSXT7I.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkXC7VF5YCcjs = require('./chunk-XC7VF5YC.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 _chunkDQE5NXY7cjs = require('./chunk-DQE5NXY7.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: [
|
|
@@ -55,13 +60,13 @@ function NoiseLoggerNode({ id, selected, data, type }) {
|
|
|
55
60
|
_optionalChain([v, 'access', _12 => _12.position, 'optionalAccess', _13 => _13.z]),
|
|
56
61
|
": ",
|
|
57
62
|
v.value
|
|
58
|
-
] }, i))]) })
|
|
59
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
63
|
+
] }, i))]) })
|
|
60
64
|
] });
|
|
61
65
|
}
|
|
62
66
|
var noise_logger_node_default = NoiseLoggerNode;
|
|
63
67
|
|
|
64
68
|
// src/nodes/output/noise-output-node.tsx
|
|
69
|
+
var _compilerruntime = require('react/compiler-runtime');
|
|
65
70
|
var _components = require('@awesome-flow/core/components');
|
|
66
71
|
|
|
67
72
|
|
|
@@ -72,40 +77,60 @@ var _components = require('@awesome-flow/core/components');
|
|
|
72
77
|
|
|
73
78
|
|
|
74
79
|
|
|
75
|
-
var _libnoisesimplexts = require('libnoise-simplex-ts');
|
|
76
80
|
|
|
81
|
+
var _libnoisesimplexts = require('libnoise-simplex-ts');
|
|
77
82
|
|
|
78
|
-
function NoiseBlendNode(
|
|
83
|
+
function NoiseBlendNode(t0) {
|
|
84
|
+
const $ = _compilerruntime.c.call(void 0, 13);
|
|
85
|
+
const {
|
|
86
|
+
id,
|
|
87
|
+
selected,
|
|
88
|
+
data,
|
|
89
|
+
type
|
|
90
|
+
} = t0;
|
|
79
91
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
let t1;
|
|
93
|
+
if ($[0] !== id || $[1] !== updateComputedData) {
|
|
94
|
+
t1 = (incomingData) => {
|
|
82
95
|
const incomingSources = incomingData["source" /* source */];
|
|
83
96
|
const incomingControl = incomingData["control" /* control */];
|
|
84
97
|
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 });
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
[]
|
|
94
|
-
);
|
|
95
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
96
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
97
|
-
_components.HandlesIncomingDataStatus,
|
|
98
|
-
{
|
|
99
|
-
nodeId: id,
|
|
100
|
-
handles: data.handles,
|
|
101
|
-
handleKey: "dataId",
|
|
102
|
-
onDataUpdated,
|
|
103
|
-
type: "target",
|
|
104
|
-
resetComputedData: true
|
|
98
|
+
const module = new (0, _libnoisesimplexts.Blend)(incomingSources[0].module, incomingSources[1].module, incomingControl[0].module);
|
|
99
|
+
updateComputedData(id, {
|
|
100
|
+
module
|
|
101
|
+
});
|
|
105
102
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
};
|
|
104
|
+
$[0] = id;
|
|
105
|
+
$[1] = updateComputedData;
|
|
106
|
+
$[2] = t1;
|
|
107
|
+
} else {
|
|
108
|
+
t1 = $[2];
|
|
109
|
+
}
|
|
110
|
+
const onDataUpdated = t1;
|
|
111
|
+
let t2;
|
|
112
|
+
if ($[3] !== data.handles || $[4] !== id || $[5] !== onDataUpdated) {
|
|
113
|
+
t2 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, groupBy: "dataId", onDataUpdated, type: "target", resetComputedData: true });
|
|
114
|
+
$[3] = data.handles;
|
|
115
|
+
$[4] = id;
|
|
116
|
+
$[5] = onDataUpdated;
|
|
117
|
+
$[6] = t2;
|
|
118
|
+
} else {
|
|
119
|
+
t2 = $[6];
|
|
120
|
+
}
|
|
121
|
+
let t3;
|
|
122
|
+
if ($[7] !== data || $[8] !== id || $[9] !== selected || $[10] !== t2 || $[11] !== type) {
|
|
123
|
+
t3 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: t2 });
|
|
124
|
+
$[7] = data;
|
|
125
|
+
$[8] = id;
|
|
126
|
+
$[9] = selected;
|
|
127
|
+
$[10] = t2;
|
|
128
|
+
$[11] = type;
|
|
129
|
+
$[12] = t3;
|
|
130
|
+
} else {
|
|
131
|
+
t3 = $[12];
|
|
132
|
+
}
|
|
133
|
+
return t3;
|
|
109
134
|
}
|
|
110
135
|
var noise_blend_node_default = NoiseBlendNode;
|
|
111
136
|
|
|
@@ -117,88 +142,158 @@ var noise_blend_node_default = NoiseBlendNode;
|
|
|
117
142
|
|
|
118
143
|
|
|
119
144
|
|
|
120
|
-
|
|
145
|
+
|
|
146
|
+
function NoiseSelectNode(t0) {
|
|
147
|
+
const $ = _compilerruntime.c.call(void 0, 37);
|
|
148
|
+
const {
|
|
149
|
+
id,
|
|
150
|
+
selected,
|
|
151
|
+
data,
|
|
152
|
+
type
|
|
153
|
+
} = t0;
|
|
121
154
|
const [edgeFalloff, setEdgeFalloff] = _react.useState.call(void 0, data.edgeFalloff);
|
|
122
155
|
const [lowerBound, setLowerBound] = _react.useState.call(void 0, data.lowerBound);
|
|
123
156
|
const [upperBound, setUpperBound] = _react.useState.call(void 0, data.upperBound);
|
|
124
157
|
const updateNodeData = _hooks.useUpdateNodeData.call(void 0, );
|
|
125
158
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
159
|
+
let t1;
|
|
160
|
+
let t2;
|
|
161
|
+
if ($[0] !== edgeFalloff || $[1] !== id || $[2] !== lowerBound || $[3] !== updateNodeData || $[4] !== upperBound) {
|
|
162
|
+
t1 = () => {
|
|
163
|
+
updateNodeData(id, {
|
|
164
|
+
edgeFalloff,
|
|
165
|
+
lowerBound,
|
|
166
|
+
upperBound
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
t2 = [edgeFalloff, lowerBound, upperBound, id, updateNodeData];
|
|
170
|
+
$[0] = edgeFalloff;
|
|
171
|
+
$[1] = id;
|
|
172
|
+
$[2] = lowerBound;
|
|
173
|
+
$[3] = updateNodeData;
|
|
174
|
+
$[4] = upperBound;
|
|
175
|
+
$[5] = t1;
|
|
176
|
+
$[6] = t2;
|
|
177
|
+
} else {
|
|
178
|
+
t1 = $[5];
|
|
179
|
+
t2 = $[6];
|
|
180
|
+
}
|
|
181
|
+
_react.useEffect.call(void 0, t1, t2);
|
|
182
|
+
let t3;
|
|
183
|
+
if ($[7] !== edgeFalloff || $[8] !== id || $[9] !== lowerBound || $[10] !== updateComputedData || $[11] !== upperBound) {
|
|
184
|
+
t3 = (incomingData) => {
|
|
131
185
|
const incomingSources = incomingData["source" /* source */];
|
|
132
186
|
const incomingControl = incomingData["control" /* control */];
|
|
133
187
|
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 });
|
|
188
|
+
const module = new (0, _libnoisesimplexts.Select)(incomingSources[0].module, incomingSources[1].module, incomingControl[0].module, edgeFalloff, lowerBound, upperBound);
|
|
189
|
+
updateComputedData(id, {
|
|
190
|
+
module
|
|
191
|
+
});
|
|
143
192
|
}
|
|
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
|
-
|
|
193
|
+
};
|
|
194
|
+
$[7] = edgeFalloff;
|
|
195
|
+
$[8] = id;
|
|
196
|
+
$[9] = lowerBound;
|
|
197
|
+
$[10] = updateComputedData;
|
|
198
|
+
$[11] = upperBound;
|
|
199
|
+
$[12] = t3;
|
|
200
|
+
} else {
|
|
201
|
+
t3 = $[12];
|
|
202
|
+
}
|
|
203
|
+
const onDataUpdated = t3;
|
|
204
|
+
let t4;
|
|
205
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
206
|
+
t4 = (e) => setEdgeFalloff(Number(e));
|
|
207
|
+
$[13] = t4;
|
|
208
|
+
} else {
|
|
209
|
+
t4 = $[13];
|
|
210
|
+
}
|
|
211
|
+
let t5;
|
|
212
|
+
if ($[14] !== edgeFalloff) {
|
|
213
|
+
t5 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
214
|
+
"Edge Falloff:",
|
|
215
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: edgeFalloff, onChange: t4, step: 0.1 })
|
|
216
|
+
] });
|
|
217
|
+
$[14] = edgeFalloff;
|
|
218
|
+
$[15] = t5;
|
|
219
|
+
} else {
|
|
220
|
+
t5 = $[15];
|
|
221
|
+
}
|
|
222
|
+
let t6;
|
|
223
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
224
|
+
t6 = (e_0) => setLowerBound(Number(e_0));
|
|
225
|
+
$[16] = t6;
|
|
226
|
+
} else {
|
|
227
|
+
t6 = $[16];
|
|
228
|
+
}
|
|
229
|
+
let t7;
|
|
230
|
+
if ($[17] !== lowerBound) {
|
|
231
|
+
t7 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
232
|
+
"Lower Bound:",
|
|
233
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: lowerBound, onChange: t6, step: 0.1 })
|
|
234
|
+
] });
|
|
235
|
+
$[17] = lowerBound;
|
|
236
|
+
$[18] = t7;
|
|
237
|
+
} else {
|
|
238
|
+
t7 = $[18];
|
|
239
|
+
}
|
|
240
|
+
let t8;
|
|
241
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
242
|
+
t8 = (e_1) => setUpperBound(Number(e_1));
|
|
243
|
+
$[19] = t8;
|
|
244
|
+
} else {
|
|
245
|
+
t8 = $[19];
|
|
246
|
+
}
|
|
247
|
+
let t9;
|
|
248
|
+
if ($[20] !== upperBound) {
|
|
249
|
+
t9 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
250
|
+
"Upper Bound:",
|
|
251
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.NumberInput, { size: "xs", w: 100, value: upperBound, onChange: t8, step: 0.1 })
|
|
252
|
+
] });
|
|
253
|
+
$[20] = upperBound;
|
|
254
|
+
$[21] = t9;
|
|
255
|
+
} else {
|
|
256
|
+
t9 = $[21];
|
|
257
|
+
}
|
|
258
|
+
let t10;
|
|
259
|
+
if ($[22] !== data.handles || $[23] !== id || $[24] !== onDataUpdated) {
|
|
260
|
+
t10 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, groupBy: "dataId", onDataUpdated, type: "target", resetComputedData: true });
|
|
261
|
+
$[22] = data.handles;
|
|
262
|
+
$[23] = id;
|
|
263
|
+
$[24] = onDataUpdated;
|
|
264
|
+
$[25] = t10;
|
|
265
|
+
} else {
|
|
266
|
+
t10 = $[25];
|
|
267
|
+
}
|
|
268
|
+
let t11;
|
|
269
|
+
if ($[26] !== t10 || $[27] !== t5 || $[28] !== t7 || $[29] !== t9) {
|
|
270
|
+
t11 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Stack, { children: [
|
|
271
|
+
t5,
|
|
272
|
+
t7,
|
|
273
|
+
t9,
|
|
274
|
+
t10
|
|
275
|
+
] });
|
|
276
|
+
$[26] = t10;
|
|
277
|
+
$[27] = t5;
|
|
278
|
+
$[28] = t7;
|
|
279
|
+
$[29] = t9;
|
|
280
|
+
$[30] = t11;
|
|
281
|
+
} else {
|
|
282
|
+
t11 = $[30];
|
|
283
|
+
}
|
|
284
|
+
let t12;
|
|
285
|
+
if ($[31] !== data || $[32] !== id || $[33] !== selected || $[34] !== t11 || $[35] !== type) {
|
|
286
|
+
t12 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: t11 });
|
|
287
|
+
$[31] = data;
|
|
288
|
+
$[32] = id;
|
|
289
|
+
$[33] = selected;
|
|
290
|
+
$[34] = t11;
|
|
291
|
+
$[35] = type;
|
|
292
|
+
$[36] = t12;
|
|
293
|
+
} else {
|
|
294
|
+
t12 = $[36];
|
|
295
|
+
}
|
|
296
|
+
return t12;
|
|
202
297
|
}
|
|
203
298
|
var noise_select_node_default = NoiseSelectNode;
|
|
204
299
|
|
|
@@ -208,50 +303,133 @@ var noise_select_node_default = NoiseSelectNode;
|
|
|
208
303
|
|
|
209
304
|
|
|
210
305
|
|
|
211
|
-
|
|
306
|
+
|
|
307
|
+
function NoiseRawTextureNode(t0) {
|
|
308
|
+
const $ = _compilerruntime.c.call(void 0, 24);
|
|
309
|
+
const {
|
|
310
|
+
id,
|
|
311
|
+
selected,
|
|
312
|
+
data,
|
|
313
|
+
type
|
|
314
|
+
} = t0;
|
|
212
315
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
213
316
|
const [dataLength, setDataLength] = _react.useState.call(void 0, 0);
|
|
214
317
|
const [resolution, setResolution] = _react.useState.call(void 0, 0);
|
|
215
318
|
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
|
-
|
|
319
|
+
let t1;
|
|
320
|
+
let t2;
|
|
321
|
+
if ($[0] !== incoming) {
|
|
322
|
+
t2 = _optionalChain([incoming, 'optionalAccess', _18 => _18.map, 'call', _19 => _19(_temp), 'access', _20 => _20.flat, 'call', _21 => _21()]);
|
|
323
|
+
$[0] = incoming;
|
|
324
|
+
$[1] = t2;
|
|
325
|
+
} else {
|
|
326
|
+
t2 = $[1];
|
|
327
|
+
}
|
|
328
|
+
t1 = t2;
|
|
329
|
+
const noise = t1;
|
|
330
|
+
let t3;
|
|
331
|
+
let t4;
|
|
332
|
+
if ($[2] !== id || $[3] !== noise || $[4] !== updateComputedData) {
|
|
333
|
+
t3 = () => {
|
|
334
|
+
if (_optionalChain([noise, 'optionalAccess', _22 => _22.length])) {
|
|
335
|
+
const size = Math.ceil(Math.sqrt(noise.length));
|
|
336
|
+
const colors = noise.map(_temp2).flat();
|
|
337
|
+
const dataArray = new Uint8Array(size * size * 4);
|
|
338
|
+
dataArray.set(colors);
|
|
339
|
+
setResolution(size);
|
|
340
|
+
setDataLength(dataArray.length);
|
|
341
|
+
updateComputedData(id, {
|
|
342
|
+
textureData: dataArray,
|
|
343
|
+
textureResolutionX: size,
|
|
344
|
+
textureResolutionY: size
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
t4 = [noise, updateComputedData, id];
|
|
349
|
+
$[2] = id;
|
|
350
|
+
$[3] = noise;
|
|
351
|
+
$[4] = updateComputedData;
|
|
352
|
+
$[5] = t3;
|
|
353
|
+
$[6] = t4;
|
|
354
|
+
} else {
|
|
355
|
+
t3 = $[5];
|
|
356
|
+
t4 = $[6];
|
|
357
|
+
}
|
|
358
|
+
_react.useEffect.call(void 0, t3, t4);
|
|
359
|
+
let t5;
|
|
360
|
+
if ($[7] !== resolution) {
|
|
361
|
+
t5 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
362
|
+
"Resolution: ",
|
|
363
|
+
resolution,
|
|
364
|
+
"x",
|
|
365
|
+
resolution
|
|
366
|
+
] });
|
|
367
|
+
$[7] = resolution;
|
|
368
|
+
$[8] = t5;
|
|
369
|
+
} else {
|
|
370
|
+
t5 = $[8];
|
|
371
|
+
}
|
|
372
|
+
const t6 = _optionalChain([noise, 'optionalAccess', _23 => _23.length]) || 0;
|
|
373
|
+
let t7;
|
|
374
|
+
if ($[9] !== t6) {
|
|
375
|
+
t7 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
376
|
+
"Input Length: ",
|
|
377
|
+
t6
|
|
378
|
+
] });
|
|
379
|
+
$[9] = t6;
|
|
380
|
+
$[10] = t7;
|
|
381
|
+
} else {
|
|
382
|
+
t7 = $[10];
|
|
383
|
+
}
|
|
384
|
+
let t8;
|
|
385
|
+
if ($[11] !== dataLength || $[12] !== resolution) {
|
|
386
|
+
t8 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Group, { children: [
|
|
387
|
+
"Output Length (",
|
|
388
|
+
resolution,
|
|
389
|
+
"*",
|
|
390
|
+
resolution,
|
|
391
|
+
"*4): ",
|
|
392
|
+
dataLength
|
|
393
|
+
] });
|
|
394
|
+
$[11] = dataLength;
|
|
395
|
+
$[12] = resolution;
|
|
396
|
+
$[13] = t8;
|
|
397
|
+
} else {
|
|
398
|
+
t8 = $[13];
|
|
399
|
+
}
|
|
400
|
+
let t9;
|
|
401
|
+
if ($[14] !== t5 || $[15] !== t7 || $[16] !== t8) {
|
|
402
|
+
t9 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Stack, { children: [
|
|
403
|
+
t5,
|
|
404
|
+
t7,
|
|
405
|
+
t8
|
|
406
|
+
] });
|
|
407
|
+
$[14] = t5;
|
|
408
|
+
$[15] = t7;
|
|
409
|
+
$[16] = t8;
|
|
410
|
+
$[17] = t9;
|
|
411
|
+
} else {
|
|
412
|
+
t9 = $[17];
|
|
413
|
+
}
|
|
414
|
+
let t10;
|
|
415
|
+
if ($[18] !== data || $[19] !== id || $[20] !== selected || $[21] !== t9 || $[22] !== type) {
|
|
416
|
+
t10 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: t9 });
|
|
417
|
+
$[18] = data;
|
|
418
|
+
$[19] = id;
|
|
419
|
+
$[20] = selected;
|
|
420
|
+
$[21] = t9;
|
|
421
|
+
$[22] = type;
|
|
422
|
+
$[23] = t10;
|
|
423
|
+
} else {
|
|
424
|
+
t10 = $[23];
|
|
425
|
+
}
|
|
426
|
+
return t10;
|
|
427
|
+
}
|
|
428
|
+
function _temp2(n) {
|
|
429
|
+
return [n.value * 255, n.value * 255, n.value * 255, 255];
|
|
430
|
+
}
|
|
431
|
+
function _temp(p) {
|
|
432
|
+
return p.noise;
|
|
255
433
|
}
|
|
256
434
|
var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
257
435
|
|
|
@@ -261,7 +439,12 @@ var noise_raw_texture_node_default = NoiseRawTextureNode;
|
|
|
261
439
|
|
|
262
440
|
|
|
263
441
|
|
|
264
|
-
function PositionsLoggerNode({
|
|
442
|
+
function PositionsLoggerNode({
|
|
443
|
+
id,
|
|
444
|
+
selected,
|
|
445
|
+
data,
|
|
446
|
+
type
|
|
447
|
+
}) {
|
|
265
448
|
const incoming = _hooks.useIncomingComputedData.call(void 0, id);
|
|
266
449
|
const positions = _react.useMemo.call(void 0, () => {
|
|
267
450
|
return _optionalChain([incoming, 'optionalAccess', _24 => _24.map, 'call', _25 => _25((p) => p.positions), 'access', _26 => _26.flat, 'call', _27 => _27()]);
|
|
@@ -278,8 +461,7 @@ function PositionsLoggerNode({ id, selected, data, type }) {
|
|
|
278
461
|
v.y,
|
|
279
462
|
":",
|
|
280
463
|
v.z
|
|
281
|
-
] }, i))]) })
|
|
282
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _layout.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
|
|
464
|
+
] }, i))]) })
|
|
283
465
|
] });
|
|
284
466
|
}
|
|
285
467
|
var positions_logger_node_default = PositionsLoggerNode;
|
|
@@ -688,11 +870,6 @@ var NoiseCurveNodeTemplateFactory = (_class15 = class {constructor() { _class15.
|
|
|
688
870
|
connection: "target",
|
|
689
871
|
maxConnections: 1
|
|
690
872
|
},
|
|
691
|
-
// {
|
|
692
|
-
// position: Position.Left,
|
|
693
|
-
// dataType: CoreHandleType.variableProperty,
|
|
694
|
-
// connection: 'target',
|
|
695
|
-
// },
|
|
696
873
|
{
|
|
697
874
|
position: _system.Position.Right,
|
|
698
875
|
dataType: "module" /* module */,
|
|
@@ -1217,37 +1394,37 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
|
|
|
1217
1394
|
return NoiseNodeType2;
|
|
1218
1395
|
})(NoiseNodeType || {});
|
|
1219
1396
|
var noiseNodeTypes = {
|
|
1220
|
-
["group-module" /* groupModule */]:
|
|
1221
|
-
["position" /* position */]:
|
|
1222
|
-
["grid" /* grid */]:
|
|
1397
|
+
["group-module" /* groupModule */]: _chunkXC7VF5YCcjs.module_group_node_default,
|
|
1398
|
+
["position" /* position */]: _chunkLKDSXT7Icjs.position_const_node_default,
|
|
1399
|
+
["grid" /* grid */]: _chunkLKDSXT7Icjs.position_grid_node_default,
|
|
1223
1400
|
["noise-output" /* noiseOutput */]: noise_output_node_default,
|
|
1224
1401
|
["texture-data" /* textureData */]: noise_raw_texture_node_default,
|
|
1225
1402
|
["noise-logger" /* noiseLogger */]: noise_logger_node_default,
|
|
1226
1403
|
["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 */]:
|
|
1404
|
+
["noise-constant" /* noiseConst */]: _chunkLKDSXT7Icjs.noise_const_node_default,
|
|
1405
|
+
["noise-billow" /* noiseBillow */]: _chunkLKDSXT7Icjs.noise_billow_node_default,
|
|
1406
|
+
["noise-checkerboard" /* noiseCheckerboard */]: _chunkLKDSXT7Icjs.noise_checkerboard_node_default,
|
|
1407
|
+
["noise-cylinders" /* noiseCylinders */]: _chunkLKDSXT7Icjs.noise_cylinders_node_default,
|
|
1408
|
+
["noise-perlin" /* noisePerlin */]: _chunkLKDSXT7Icjs.noise_perlin_node_default,
|
|
1409
|
+
["noise-ridged-multi" /* noiseRidgedMulti */]: _chunkLKDSXT7Icjs.noise_ridgedmulti_node_default,
|
|
1410
|
+
["noise-spheres" /* noiseSpheres */]: _chunkLKDSXT7Icjs.noise_spheres_node_default,
|
|
1411
|
+
["noise-voronoi" /* noiseVoronoi */]: _chunkLKDSXT7Icjs.noise_voronoi_node_default,
|
|
1412
|
+
["noise-combiner" /* noiseCombine */]: _chunkDQE5NXY7cjs.noise_combine_node_default,
|
|
1413
|
+
["noise-clamp" /* noiseClamp */]: _chunkDQE5NXY7cjs.noise_clamp_node_default,
|
|
1414
|
+
["noise-abs" /* noiseAbs */]: _chunkDQE5NXY7cjs.noise_abs_node_default,
|
|
1415
|
+
["noise-normalize" /* noiseNormalize */]: _chunkDQE5NXY7cjs.noise_normalize_node_default,
|
|
1416
|
+
["noise-curve" /* noiseCurve */]: _chunkDQE5NXY7cjs.noise_curve_node_default,
|
|
1417
|
+
["noise-exponent" /* noiseExponent */]: _chunkDQE5NXY7cjs.noise_exponent_node_default,
|
|
1418
|
+
["noise-invert" /* noiseInvert */]: _chunkDQE5NXY7cjs.noise_invert_node_default,
|
|
1419
|
+
["noise-scale-bias" /* noiseScaleBias */]: _chunkDQE5NXY7cjs.noise_scale_bias_node_default,
|
|
1420
|
+
["noise-terrace" /* noiseTerrace */]: _chunkDQE5NXY7cjs.noise_terrace_node_default,
|
|
1244
1421
|
["noise-blend" /* noiseBlend */]: noise_blend_node_default,
|
|
1245
1422
|
["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 */]:
|
|
1423
|
+
["noise-displace" /* noiseDisplace */]: _chunk36USJJC4cjs.noise_displace_node_default,
|
|
1424
|
+
["noise-rotate-point" /* noiseRotatePoint */]: _chunk36USJJC4cjs.noise_rotate_point_node_default,
|
|
1425
|
+
["noise-scale-point" /* noiseScalePoint */]: _chunk36USJJC4cjs.noise_scale_point_node_default,
|
|
1426
|
+
["noise-translate-point" /* noiseTranslatePoint */]: _chunk36USJJC4cjs.noise_translate_point_node_default,
|
|
1427
|
+
["noise-turbulence" /* noiseTurbulence */]: _chunk36USJJC4cjs.noise_turbulence_node_default
|
|
1251
1428
|
};
|
|
1252
1429
|
var noiseNodeTemplates = {
|
|
1253
1430
|
["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
|
|
@@ -1285,15 +1462,25 @@ var noiseNodeTemplates = {
|
|
|
1285
1462
|
|
|
1286
1463
|
// src/nodes/output/noise-output-node.tsx
|
|
1287
1464
|
|
|
1288
|
-
function NoiseOutputNode(
|
|
1465
|
+
function NoiseOutputNode(t0) {
|
|
1466
|
+
const $ = _compilerruntime.c.call(void 0, 16);
|
|
1467
|
+
const {
|
|
1468
|
+
id,
|
|
1469
|
+
selected,
|
|
1470
|
+
data,
|
|
1471
|
+
type
|
|
1472
|
+
} = t0;
|
|
1289
1473
|
const [size, setSize] = _react.useState.call(void 0, 0);
|
|
1290
1474
|
const updateComputedData = _hooks.useUpdateNodeComputedData.call(void 0, );
|
|
1291
|
-
|
|
1292
|
-
|
|
1475
|
+
let t1;
|
|
1476
|
+
if ($[0] !== id || $[1] !== updateComputedData) {
|
|
1477
|
+
t1 = (handleData) => {
|
|
1293
1478
|
const incomingPositions = handleData["position" /* position */];
|
|
1294
1479
|
const incomingModule = handleData["module" /* module */];
|
|
1295
1480
|
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 {
|
|
1481
|
+
const {
|
|
1482
|
+
module
|
|
1483
|
+
} = incomingModule[0];
|
|
1297
1484
|
const noise = [];
|
|
1298
1485
|
for (const input of incomingPositions) {
|
|
1299
1486
|
for (const position of input.positions) {
|
|
@@ -1304,30 +1491,58 @@ function NoiseOutputNode({ id, selected, data, type }) {
|
|
|
1304
1491
|
});
|
|
1305
1492
|
}
|
|
1306
1493
|
}
|
|
1307
|
-
updateComputedData(id, {
|
|
1494
|
+
updateComputedData(id, {
|
|
1495
|
+
noise,
|
|
1496
|
+
module
|
|
1497
|
+
});
|
|
1308
1498
|
setSize(noise.length);
|
|
1309
1499
|
}
|
|
1310
|
-
}
|
|
1311
|
-
[]
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1500
|
+
};
|
|
1501
|
+
$[0] = id;
|
|
1502
|
+
$[1] = updateComputedData;
|
|
1503
|
+
$[2] = t1;
|
|
1504
|
+
} else {
|
|
1505
|
+
t1 = $[2];
|
|
1506
|
+
}
|
|
1507
|
+
const onDataUpdated = t1;
|
|
1508
|
+
let t2;
|
|
1509
|
+
if ($[3] !== data.handles || $[4] !== id || $[5] !== onDataUpdated) {
|
|
1510
|
+
t2 = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _components.HandlesIncomingDataStatus, { nodeId: id, handles: data.handles, groupBy: "dataType", onDataUpdated, type: "target", resetComputedData: true });
|
|
1511
|
+
$[3] = data.handles;
|
|
1512
|
+
$[4] = id;
|
|
1513
|
+
$[5] = onDataUpdated;
|
|
1514
|
+
$[6] = t2;
|
|
1515
|
+
} else {
|
|
1516
|
+
t2 = $[6];
|
|
1517
|
+
}
|
|
1518
|
+
let t3;
|
|
1519
|
+
if ($[7] !== size) {
|
|
1520
|
+
t3 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _core.Text, { mt: 5, children: [
|
|
1326
1521
|
"Noise points: ",
|
|
1327
1522
|
size
|
|
1328
|
-
] })
|
|
1329
|
-
|
|
1330
|
-
|
|
1523
|
+
] });
|
|
1524
|
+
$[7] = size;
|
|
1525
|
+
$[8] = t3;
|
|
1526
|
+
} else {
|
|
1527
|
+
t3 = $[8];
|
|
1528
|
+
}
|
|
1529
|
+
let t4;
|
|
1530
|
+
if ($[9] !== data || $[10] !== id || $[11] !== selected || $[12] !== t2 || $[13] !== t3 || $[14] !== type) {
|
|
1531
|
+
t4 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _layout.NodeContainer, { id, selected, data, type, children: [
|
|
1532
|
+
t2,
|
|
1533
|
+
t3
|
|
1534
|
+
] });
|
|
1535
|
+
$[9] = data;
|
|
1536
|
+
$[10] = id;
|
|
1537
|
+
$[11] = selected;
|
|
1538
|
+
$[12] = t2;
|
|
1539
|
+
$[13] = t3;
|
|
1540
|
+
$[14] = type;
|
|
1541
|
+
$[15] = t4;
|
|
1542
|
+
} else {
|
|
1543
|
+
t4 = $[15];
|
|
1544
|
+
}
|
|
1545
|
+
return t4;
|
|
1331
1546
|
}
|
|
1332
1547
|
var noise_output_node_default = NoiseOutputNode;
|
|
1333
1548
|
|