@awesome-flow/noise 0.6.0 → 0.7.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 +663 -734
- package/dist/abstract/index.d.cts +6 -12
- package/dist/abstract/index.d.ts +6 -12
- package/dist/abstract/index.js +449 -522
- package/dist/{index-BungWYrh.d.cts → index-CfiOpOzX.d.cts} +1 -1
- package/dist/{index-DsQSjZC5.d.ts → index-mlK0X4O1.d.ts} +1 -1
- package/dist/modules/index.cjs +4 -30
- package/dist/modules/index.d.cts +2 -10
- package/dist/modules/index.d.ts +2 -10
- package/dist/modules/index.js +2 -17
- package/dist/{node-props-BbqbXDXn.d.cts → node-props-CAV2WNDN.d.cts} +3 -7
- package/dist/{node-props-BbqbXDXn.d.ts → node-props-CAV2WNDN.d.ts} +3 -7
- package/dist/nodes/generators/index.cjs +71 -114
- package/dist/nodes/generators/index.d.cts +3 -8
- package/dist/nodes/generators/index.d.ts +3 -8
- package/dist/nodes/generators/index.js +47 -79
- package/dist/nodes/index.cjs +604 -675
- package/dist/nodes/index.d.cts +3 -6
- package/dist/nodes/index.d.ts +3 -6
- package/dist/nodes/index.js +394 -466
- package/dist/nodes/modifiers/index.cjs +37 -52
- package/dist/nodes/modifiers/index.d.cts +2 -5
- package/dist/nodes/modifiers/index.d.ts +2 -5
- package/dist/nodes/modifiers/index.js +23 -38
- package/dist/nodes/output/index.cjs +239 -285
- package/dist/nodes/output/index.js +252 -290
- package/dist/nodes/selectors/index.cjs +230 -280
- package/dist/nodes/selectors/index.d.cts +2 -5
- package/dist/nodes/selectors/index.d.ts +2 -5
- package/dist/nodes/selectors/index.js +248 -290
- package/dist/nodes/transformers/index.cjs +10 -10
- package/dist/nodes/transformers/index.d.cts +2 -5
- package/dist/nodes/transformers/index.d.ts +2 -5
- package/dist/nodes/transformers/index.js +5 -5
- package/dist/templates/generators/index.cjs +201 -253
- package/dist/templates/generators/index.d.cts +3 -10
- package/dist/templates/generators/index.d.ts +3 -10
- package/dist/templates/generators/index.js +236 -279
- package/dist/templates/groups/index.cjs +201 -251
- package/dist/templates/groups/index.js +236 -278
- package/dist/templates/index.cjs +201 -253
- package/dist/templates/index.d.cts +4 -7
- package/dist/templates/index.d.ts +4 -7
- package/dist/templates/index.js +236 -279
- package/dist/templates/modifiers/index.cjs +201 -251
- package/dist/templates/modifiers/index.d.cts +2 -5
- package/dist/templates/modifiers/index.d.ts +2 -5
- package/dist/templates/modifiers/index.js +236 -278
- package/dist/templates/output/index.cjs +201 -251
- package/dist/templates/output/index.js +236 -278
- package/dist/templates/selectors/index.cjs +201 -251
- package/dist/templates/selectors/index.d.cts +2 -5
- package/dist/templates/selectors/index.d.ts +2 -5
- package/dist/templates/selectors/index.js +236 -278
- package/dist/templates/transformers/index.cjs +201 -251
- package/dist/templates/transformers/index.d.cts +3 -6
- package/dist/templates/transformers/index.d.ts +3 -6
- package/dist/templates/transformers/index.js +236 -278
- package/package.json +6 -4
|
@@ -34,38 +34,28 @@ var require_fast_deep_equal = __commonJS({
|
|
|
34
34
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) {
|
|
35
35
|
"use strict";
|
|
36
36
|
module2.exports = function equal(a, b) {
|
|
37
|
-
if (a === b)
|
|
38
|
-
return true;
|
|
37
|
+
if (a === b) return true;
|
|
39
38
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
40
|
-
if (a.constructor !== b.constructor)
|
|
41
|
-
return false;
|
|
39
|
+
if (a.constructor !== b.constructor) return false;
|
|
42
40
|
var length, i, keys;
|
|
43
41
|
if (Array.isArray(a)) {
|
|
44
42
|
length = a.length;
|
|
45
|
-
if (length != b.length)
|
|
46
|
-
return false;
|
|
43
|
+
if (length != b.length) return false;
|
|
47
44
|
for (i = length; i-- !== 0; )
|
|
48
|
-
if (!equal(a[i], b[i]))
|
|
49
|
-
return false;
|
|
45
|
+
if (!equal(a[i], b[i])) return false;
|
|
50
46
|
return true;
|
|
51
47
|
}
|
|
52
|
-
if (a.constructor === RegExp)
|
|
53
|
-
|
|
54
|
-
if (a.
|
|
55
|
-
return a.valueOf() === b.valueOf();
|
|
56
|
-
if (a.toString !== Object.prototype.toString)
|
|
57
|
-
return a.toString() === b.toString();
|
|
48
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
49
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
50
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
58
51
|
keys = Object.keys(a);
|
|
59
52
|
length = keys.length;
|
|
60
|
-
if (length !== Object.keys(b).length)
|
|
61
|
-
return false;
|
|
53
|
+
if (length !== Object.keys(b).length) return false;
|
|
62
54
|
for (i = length; i-- !== 0; )
|
|
63
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
64
|
-
return false;
|
|
55
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
65
56
|
for (i = length; i-- !== 0; ) {
|
|
66
57
|
var key = keys[i];
|
|
67
|
-
if (!equal(a[key], b[key]))
|
|
68
|
-
return false;
|
|
58
|
+
if (!equal(a[key], b[key])) return false;
|
|
69
59
|
}
|
|
70
60
|
return true;
|
|
71
61
|
}
|
|
@@ -93,14 +83,14 @@ module.exports = __toCommonJS(modifiers_exports);
|
|
|
93
83
|
var import_layout = require("@awesome-flow/core/layout");
|
|
94
84
|
var import_react = require("react");
|
|
95
85
|
var import_hooks = require("@awesome-flow/core/hooks");
|
|
96
|
-
var
|
|
86
|
+
var import_libnoise_simplex_ts = require("libnoise-simplex-ts");
|
|
97
87
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
98
88
|
function NoiseAbsNode({ id, selected, data, type }) {
|
|
99
89
|
const incoming = (0, import_hooks.useIncomingComputedData)(id);
|
|
100
90
|
const updateComputedData = (0, import_hooks.useUpdateNodeComputedData)();
|
|
101
91
|
(0, import_react.useEffect)(() => {
|
|
102
92
|
if (incoming?.length > 0) {
|
|
103
|
-
const module2 = new
|
|
93
|
+
const module2 = new import_libnoise_simplex_ts.Abs(incoming[0].module);
|
|
104
94
|
updateComputedData(id, { module: module2 });
|
|
105
95
|
}
|
|
106
96
|
}, [incoming]);
|
|
@@ -113,7 +103,7 @@ var import_layout2 = require("@awesome-flow/core/layout");
|
|
|
113
103
|
var import_react2 = require("react");
|
|
114
104
|
var import_core = require("@mantine/core");
|
|
115
105
|
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
116
|
-
var
|
|
106
|
+
var import_libnoise_simplex_ts2 = require("libnoise-simplex-ts");
|
|
117
107
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
118
108
|
function NoiseClampNode({ id, selected, data, type }) {
|
|
119
109
|
const [lowerBound, setLowerBound] = (0, import_react2.useState)(data.lowerBound);
|
|
@@ -123,7 +113,7 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
123
113
|
const updateComputedData = (0, import_hooks2.useUpdateNodeComputedData)();
|
|
124
114
|
(0, import_react2.useEffect)(() => {
|
|
125
115
|
if (incoming?.length) {
|
|
126
|
-
const module2 = new
|
|
116
|
+
const module2 = new import_libnoise_simplex_ts2.Clamp(incoming[0].module, lowerBound, upperBound);
|
|
127
117
|
updateComputedData(id, { module: module2 });
|
|
128
118
|
}
|
|
129
119
|
updateNodeData(id, { lowerBound, upperBound });
|
|
@@ -163,13 +153,13 @@ var import_hooks3 = require("@awesome-flow/core/hooks");
|
|
|
163
153
|
var import_icons_react = require("@tabler/icons-react");
|
|
164
154
|
|
|
165
155
|
// src/abstract/operations.ts
|
|
166
|
-
var
|
|
156
|
+
var import_libnoise_simplex_ts3 = require("libnoise-simplex-ts");
|
|
167
157
|
var noiseCombineModuleMap = {
|
|
168
|
-
["add" /* add */]:
|
|
169
|
-
["max" /* max */]:
|
|
170
|
-
["min" /* min */]:
|
|
171
|
-
["multiply" /* multiply */]:
|
|
172
|
-
["power" /* power */]:
|
|
158
|
+
["add" /* add */]: import_libnoise_simplex_ts3.Add,
|
|
159
|
+
["max" /* max */]: import_libnoise_simplex_ts3.Max,
|
|
160
|
+
["min" /* min */]: import_libnoise_simplex_ts3.Min,
|
|
161
|
+
["multiply" /* multiply */]: import_libnoise_simplex_ts3.Multiply,
|
|
162
|
+
["power" /* power */]: import_libnoise_simplex_ts3.Power
|
|
173
163
|
};
|
|
174
164
|
|
|
175
165
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
@@ -463,16 +453,13 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
463
453
|
|
|
464
454
|
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
465
455
|
function set(obj, key, val) {
|
|
466
|
-
if (typeof val.value === "object")
|
|
467
|
-
val.value = klona(val.value);
|
|
456
|
+
if (typeof val.value === "object") val.value = klona(val.value);
|
|
468
457
|
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
|
469
458
|
Object.defineProperty(obj, key, val);
|
|
470
|
-
} else
|
|
471
|
-
obj[key] = val.value;
|
|
459
|
+
} else obj[key] = val.value;
|
|
472
460
|
}
|
|
473
461
|
function klona(x) {
|
|
474
|
-
if (typeof x !== "object")
|
|
475
|
-
return x;
|
|
462
|
+
if (typeof x !== "object") return x;
|
|
476
463
|
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
|
477
464
|
if (str === "[object Object]") {
|
|
478
465
|
tmp = Object.create(x.__proto__ || null);
|
|
@@ -504,8 +491,7 @@ function klona(x) {
|
|
|
504
491
|
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
|
505
492
|
}
|
|
506
493
|
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
|
507
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k])
|
|
508
|
-
continue;
|
|
494
|
+
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
|
509
495
|
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
|
510
496
|
}
|
|
511
497
|
}
|
|
@@ -1118,8 +1104,7 @@ function useForm({
|
|
|
1118
1104
|
|
|
1119
1105
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
1120
1106
|
var import_react11 = require("react");
|
|
1121
|
-
var
|
|
1122
|
-
var import_util = require("libnoise-ts/util");
|
|
1107
|
+
var import_libnoise_simplex_ts4 = require("libnoise-simplex-ts");
|
|
1123
1108
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
1124
1109
|
var import_hooks5 = require("@mantine/hooks");
|
|
1125
1110
|
var import_abstract = require("@awesome-flow/core/abstract");
|
|
@@ -1162,9 +1147,9 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1162
1147
|
}, []);
|
|
1163
1148
|
(0, import_react11.useEffect)(() => {
|
|
1164
1149
|
if (incoming?.length && values?.length >= 4) {
|
|
1165
|
-
const module2 = new
|
|
1150
|
+
const module2 = new import_libnoise_simplex_ts4.Curve(
|
|
1166
1151
|
incoming[0].module,
|
|
1167
|
-
values.map((p) => new
|
|
1152
|
+
values.map((p) => new import_libnoise_simplex_ts4.Tuple(p.input, p.output))
|
|
1168
1153
|
);
|
|
1169
1154
|
updateComputedData(id, { module: module2 });
|
|
1170
1155
|
}
|
|
@@ -1228,7 +1213,7 @@ var import_layout5 = require("@awesome-flow/core/layout");
|
|
|
1228
1213
|
var import_react12 = require("react");
|
|
1229
1214
|
var import_core3 = require("@mantine/core");
|
|
1230
1215
|
var import_hooks6 = require("@awesome-flow/core/hooks");
|
|
1231
|
-
var
|
|
1216
|
+
var import_libnoise_simplex_ts5 = require("libnoise-simplex-ts");
|
|
1232
1217
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1233
1218
|
function NoiseExponentNode({ id, selected, data, type }) {
|
|
1234
1219
|
const [exponent, setExponent] = (0, import_react12.useState)(data.exponent);
|
|
@@ -1237,7 +1222,7 @@ function NoiseExponentNode({ id, selected, data, type }) {
|
|
|
1237
1222
|
const updateComputedData = (0, import_hooks6.useUpdateNodeComputedData)();
|
|
1238
1223
|
(0, import_react12.useEffect)(() => {
|
|
1239
1224
|
if (incoming?.length > 0) {
|
|
1240
|
-
const module2 = new
|
|
1225
|
+
const module2 = new import_libnoise_simplex_ts5.Exponent(incoming[0].module, exponent);
|
|
1241
1226
|
updateComputedData(id, { module: module2 });
|
|
1242
1227
|
}
|
|
1243
1228
|
updateNodeData(id, { exponent });
|
|
@@ -1264,14 +1249,14 @@ var noise_exponent_node_default = NoiseExponentNode;
|
|
|
1264
1249
|
var import_layout6 = require("@awesome-flow/core/layout");
|
|
1265
1250
|
var import_react13 = require("react");
|
|
1266
1251
|
var import_hooks7 = require("@awesome-flow/core/hooks");
|
|
1267
|
-
var
|
|
1252
|
+
var import_libnoise_simplex_ts6 = require("libnoise-simplex-ts");
|
|
1268
1253
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1269
1254
|
function NoiseInvertNode({ id, selected, data, type }) {
|
|
1270
1255
|
const incoming = (0, import_hooks7.useIncomingComputedData)(id);
|
|
1271
1256
|
const updateComputedData = (0, import_hooks7.useUpdateNodeComputedData)();
|
|
1272
1257
|
(0, import_react13.useEffect)(() => {
|
|
1273
1258
|
if (incoming?.length > 0) {
|
|
1274
|
-
const module2 = new
|
|
1259
|
+
const module2 = new import_libnoise_simplex_ts6.Invert(incoming[0].module);
|
|
1275
1260
|
updateComputedData(id, { module: module2 });
|
|
1276
1261
|
}
|
|
1277
1262
|
}, [incoming]);
|
|
@@ -1286,8 +1271,8 @@ var import_core4 = require("@mantine/core");
|
|
|
1286
1271
|
var import_hooks8 = require("@awesome-flow/core/hooks");
|
|
1287
1272
|
|
|
1288
1273
|
// src/modules/normalize-noise-module.ts
|
|
1289
|
-
var
|
|
1290
|
-
var NormalizeNoiseModule = class extends
|
|
1274
|
+
var import_libnoise_simplex_ts7 = require("libnoise-simplex-ts");
|
|
1275
|
+
var NormalizeNoiseModule = class extends import_libnoise_simplex_ts7.ModifierModule {
|
|
1291
1276
|
constructor(source, lowerBound, upperBound) {
|
|
1292
1277
|
super(source);
|
|
1293
1278
|
this.lowerBound = lowerBound;
|
|
@@ -1348,7 +1333,7 @@ var import_layout8 = require("@awesome-flow/core/layout");
|
|
|
1348
1333
|
var import_react15 = require("react");
|
|
1349
1334
|
var import_core5 = require("@mantine/core");
|
|
1350
1335
|
var import_hooks9 = require("@awesome-flow/core/hooks");
|
|
1351
|
-
var
|
|
1336
|
+
var import_libnoise_simplex_ts8 = require("libnoise-simplex-ts");
|
|
1352
1337
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1353
1338
|
function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
1354
1339
|
const [scale, setScale] = (0, import_react15.useState)(data.scale);
|
|
@@ -1358,7 +1343,7 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1358
1343
|
const updateComputedData = (0, import_hooks9.useUpdateNodeComputedData)();
|
|
1359
1344
|
(0, import_react15.useEffect)(() => {
|
|
1360
1345
|
if (incoming?.length > 0) {
|
|
1361
|
-
const module2 = new
|
|
1346
|
+
const module2 = new import_libnoise_simplex_ts8.ScaleBias(incoming[0].module, scale, bias);
|
|
1362
1347
|
updateComputedData(id, { module: module2 });
|
|
1363
1348
|
}
|
|
1364
1349
|
updateNodeData(id, { scale, bias });
|
|
@@ -1402,7 +1387,7 @@ var import_layout9 = require("@awesome-flow/core/layout");
|
|
|
1402
1387
|
var import_core6 = require("@mantine/core");
|
|
1403
1388
|
var import_hooks10 = require("@awesome-flow/core/hooks");
|
|
1404
1389
|
var import_react16 = require("react");
|
|
1405
|
-
var
|
|
1390
|
+
var import_libnoise_simplex_ts9 = require("libnoise-simplex-ts");
|
|
1406
1391
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
1407
1392
|
var import_hooks11 = require("@mantine/hooks");
|
|
1408
1393
|
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
@@ -1434,7 +1419,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1434
1419
|
}, []);
|
|
1435
1420
|
(0, import_react16.useEffect)(() => {
|
|
1436
1421
|
if (incoming?.length && values?.length >= 2) {
|
|
1437
|
-
const module2 = new
|
|
1422
|
+
const module2 = new import_libnoise_simplex_ts9.Terrace(incoming[0].module, values);
|
|
1438
1423
|
updateComputedData(id, { module: module2 });
|
|
1439
1424
|
}
|
|
1440
1425
|
}, [values, incoming]);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { NodeProps, Node } from '@xyflow/react';
|
|
3
3
|
import { BasicNodeData } from '@awesome-flow/core/abstract';
|
|
4
|
-
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-
|
|
5
|
-
import 'libnoise-ts
|
|
6
|
-
import 'libnoise-ts/noisegen';
|
|
7
|
-
import 'libnoise-ts/module/Module';
|
|
8
|
-
import 'libnoise-ts/module/combiner';
|
|
4
|
+
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-CAV2WNDN.cjs';
|
|
5
|
+
import 'libnoise-simplex-ts';
|
|
9
6
|
|
|
10
7
|
declare function NoiseNormalizeNode({ id, selected, data, type }: NodeProps<Node<NodeNormalizeNoiseData>>): react_jsx_runtime.JSX.Element;
|
|
11
8
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { NodeProps, Node } from '@xyflow/react';
|
|
3
3
|
import { BasicNodeData } from '@awesome-flow/core/abstract';
|
|
4
|
-
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-
|
|
5
|
-
import 'libnoise-ts
|
|
6
|
-
import 'libnoise-ts/noisegen';
|
|
7
|
-
import 'libnoise-ts/module/Module';
|
|
8
|
-
import 'libnoise-ts/module/combiner';
|
|
4
|
+
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-CAV2WNDN.js';
|
|
5
|
+
import 'libnoise-simplex-ts';
|
|
9
6
|
|
|
10
7
|
declare function NoiseNormalizeNode({ id, selected, data, type }: NodeProps<Node<NodeNormalizeNoiseData>>): react_jsx_runtime.JSX.Element;
|
|
11
8
|
|
|
@@ -29,38 +29,28 @@ var require_fast_deep_equal = __commonJS({
|
|
|
29
29
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
30
30
|
"use strict";
|
|
31
31
|
module.exports = function equal(a, b) {
|
|
32
|
-
if (a === b)
|
|
33
|
-
return true;
|
|
32
|
+
if (a === b) return true;
|
|
34
33
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
35
|
-
if (a.constructor !== b.constructor)
|
|
36
|
-
return false;
|
|
34
|
+
if (a.constructor !== b.constructor) return false;
|
|
37
35
|
var length, i, keys;
|
|
38
36
|
if (Array.isArray(a)) {
|
|
39
37
|
length = a.length;
|
|
40
|
-
if (length != b.length)
|
|
41
|
-
return false;
|
|
38
|
+
if (length != b.length) return false;
|
|
42
39
|
for (i = length; i-- !== 0; )
|
|
43
|
-
if (!equal(a[i], b[i]))
|
|
44
|
-
return false;
|
|
40
|
+
if (!equal(a[i], b[i])) return false;
|
|
45
41
|
return true;
|
|
46
42
|
}
|
|
47
|
-
if (a.constructor === RegExp)
|
|
48
|
-
|
|
49
|
-
if (a.
|
|
50
|
-
return a.valueOf() === b.valueOf();
|
|
51
|
-
if (a.toString !== Object.prototype.toString)
|
|
52
|
-
return a.toString() === b.toString();
|
|
43
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
44
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
45
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
53
46
|
keys = Object.keys(a);
|
|
54
47
|
length = keys.length;
|
|
55
|
-
if (length !== Object.keys(b).length)
|
|
56
|
-
return false;
|
|
48
|
+
if (length !== Object.keys(b).length) return false;
|
|
57
49
|
for (i = length; i-- !== 0; )
|
|
58
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
59
|
-
return false;
|
|
50
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
60
51
|
for (i = length; i-- !== 0; ) {
|
|
61
52
|
var key = keys[i];
|
|
62
|
-
if (!equal(a[key], b[key]))
|
|
63
|
-
return false;
|
|
53
|
+
if (!equal(a[key], b[key])) return false;
|
|
64
54
|
}
|
|
65
55
|
return true;
|
|
66
56
|
}
|
|
@@ -73,7 +63,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
73
63
|
import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
74
64
|
import { useEffect } from "react";
|
|
75
65
|
import { useIncomingComputedData, useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
|
|
76
|
-
import { Abs } from "libnoise-ts
|
|
66
|
+
import { Abs } from "libnoise-simplex-ts";
|
|
77
67
|
import { jsx } from "react/jsx-runtime";
|
|
78
68
|
function NoiseAbsNode({ id, selected, data, type }) {
|
|
79
69
|
const incoming = useIncomingComputedData(id);
|
|
@@ -97,7 +87,7 @@ import {
|
|
|
97
87
|
useUpdateNodeComputedData as useUpdateNodeComputedData2,
|
|
98
88
|
useUpdateNodeData
|
|
99
89
|
} from "@awesome-flow/core/hooks";
|
|
100
|
-
import { Clamp } from "libnoise-ts
|
|
90
|
+
import { Clamp } from "libnoise-simplex-ts";
|
|
101
91
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
102
92
|
function NoiseClampNode({ id, selected, data, type }) {
|
|
103
93
|
const [lowerBound, setLowerBound] = useState(data.lowerBound);
|
|
@@ -157,7 +147,7 @@ import {
|
|
|
157
147
|
} from "@tabler/icons-react";
|
|
158
148
|
|
|
159
149
|
// src/abstract/operations.ts
|
|
160
|
-
import { Add, Max, Min, Multiply, Power } from "libnoise-ts
|
|
150
|
+
import { Add, Max, Min, Multiply, Power } from "libnoise-simplex-ts";
|
|
161
151
|
var noiseCombineModuleMap = {
|
|
162
152
|
["add" /* add */]: Add,
|
|
163
153
|
["max" /* max */]: Max,
|
|
@@ -461,16 +451,13 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
461
451
|
|
|
462
452
|
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
463
453
|
function set(obj, key, val) {
|
|
464
|
-
if (typeof val.value === "object")
|
|
465
|
-
val.value = klona(val.value);
|
|
454
|
+
if (typeof val.value === "object") val.value = klona(val.value);
|
|
466
455
|
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
|
467
456
|
Object.defineProperty(obj, key, val);
|
|
468
|
-
} else
|
|
469
|
-
obj[key] = val.value;
|
|
457
|
+
} else obj[key] = val.value;
|
|
470
458
|
}
|
|
471
459
|
function klona(x) {
|
|
472
|
-
if (typeof x !== "object")
|
|
473
|
-
return x;
|
|
460
|
+
if (typeof x !== "object") return x;
|
|
474
461
|
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
|
475
462
|
if (str === "[object Object]") {
|
|
476
463
|
tmp = Object.create(x.__proto__ || null);
|
|
@@ -502,8 +489,7 @@ function klona(x) {
|
|
|
502
489
|
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
|
503
490
|
}
|
|
504
491
|
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
|
505
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k])
|
|
506
|
-
continue;
|
|
492
|
+
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
|
507
493
|
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
|
508
494
|
}
|
|
509
495
|
}
|
|
@@ -1116,8 +1102,7 @@ function useForm({
|
|
|
1116
1102
|
|
|
1117
1103
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
1118
1104
|
import { useCallback as useCallback8, useEffect as useEffect6, useState as useState6 } from "react";
|
|
1119
|
-
import { Curve } from "libnoise-ts
|
|
1120
|
-
import { Tuple } from "libnoise-ts/util";
|
|
1105
|
+
import { Curve, Tuple } from "libnoise-simplex-ts";
|
|
1121
1106
|
import { IconX } from "@tabler/icons-react";
|
|
1122
1107
|
import { randomId } from "@mantine/hooks";
|
|
1123
1108
|
import { NodeState } from "@awesome-flow/core/abstract";
|
|
@@ -1230,7 +1215,7 @@ import {
|
|
|
1230
1215
|
useUpdateNodeComputedData as useUpdateNodeComputedData5,
|
|
1231
1216
|
useUpdateNodeData as useUpdateNodeData4
|
|
1232
1217
|
} from "@awesome-flow/core/hooks";
|
|
1233
|
-
import { Exponent } from "libnoise-ts
|
|
1218
|
+
import { Exponent } from "libnoise-simplex-ts";
|
|
1234
1219
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1235
1220
|
function NoiseExponentNode({ id, selected, data, type }) {
|
|
1236
1221
|
const [exponent, setExponent] = useState7(data.exponent);
|
|
@@ -1266,7 +1251,7 @@ var noise_exponent_node_default = NoiseExponentNode;
|
|
|
1266
1251
|
import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
|
|
1267
1252
|
import { useEffect as useEffect8 } from "react";
|
|
1268
1253
|
import { useIncomingComputedData as useIncomingComputedData6, useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
|
|
1269
|
-
import { Invert } from "libnoise-ts
|
|
1254
|
+
import { Invert } from "libnoise-simplex-ts";
|
|
1270
1255
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1271
1256
|
function NoiseInvertNode({ id, selected, data, type }) {
|
|
1272
1257
|
const incoming = useIncomingComputedData6(id);
|
|
@@ -1292,7 +1277,7 @@ import {
|
|
|
1292
1277
|
} from "@awesome-flow/core/hooks";
|
|
1293
1278
|
|
|
1294
1279
|
// src/modules/normalize-noise-module.ts
|
|
1295
|
-
import ModifierModule from "libnoise-ts
|
|
1280
|
+
import { ModifierModule } from "libnoise-simplex-ts";
|
|
1296
1281
|
var NormalizeNoiseModule = class extends ModifierModule {
|
|
1297
1282
|
constructor(source, lowerBound, upperBound) {
|
|
1298
1283
|
super(source);
|
|
@@ -1358,7 +1343,7 @@ import {
|
|
|
1358
1343
|
useUpdateNodeComputedData as useUpdateNodeComputedData8,
|
|
1359
1344
|
useUpdateNodeData as useUpdateNodeData6
|
|
1360
1345
|
} from "@awesome-flow/core/hooks";
|
|
1361
|
-
import { ScaleBias } from "libnoise-ts
|
|
1346
|
+
import { ScaleBias } from "libnoise-simplex-ts";
|
|
1362
1347
|
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1363
1348
|
function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
1364
1349
|
const [scale, setScale] = useState9(data.scale);
|
|
@@ -1416,7 +1401,7 @@ import {
|
|
|
1416
1401
|
useUpdateNodeData as useUpdateNodeData7
|
|
1417
1402
|
} from "@awesome-flow/core/hooks";
|
|
1418
1403
|
import { useCallback as useCallback9, useEffect as useEffect11, useState as useState10 } from "react";
|
|
1419
|
-
import { Terrace } from "libnoise-ts
|
|
1404
|
+
import { Terrace } from "libnoise-simplex-ts";
|
|
1420
1405
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
1421
1406
|
import { randomId as randomId2 } from "@mantine/hooks";
|
|
1422
1407
|
import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
|