@awesome-flow/noise 0.9.5 → 0.11.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 +7 -11
- package/dist/abstract/index.d.cts +4 -140
- package/dist/abstract/index.d.mts +4 -0
- package/dist/abstract/index.mjs +3 -0
- package/dist/abstract-3knbwDkz.cjs +1768 -0
- package/dist/abstract-3knbwDkz.cjs.map +1 -0
- package/dist/{abstract-Dhf_tSuO.js → abstract-DNmiw2MC.mjs} +562 -234
- package/dist/abstract-DNmiw2MC.mjs.map +1 -0
- package/dist/generators-BF_0y3pd.cjs +337 -0
- package/dist/generators-BF_0y3pd.cjs.map +1 -0
- package/dist/{generators-BzkwG_6g.js → generators-DSwgPqW2.mjs} +35 -110
- package/dist/generators-DSwgPqW2.mjs.map +1 -0
- package/dist/groups-BiuJL0DE.mjs +13 -0
- package/dist/groups-BiuJL0DE.mjs.map +1 -0
- package/dist/groups-DF2FTSBC.cjs +18 -0
- package/dist/groups-DF2FTSBC.cjs.map +1 -0
- package/dist/index-B09XEo3I.d.cts +496 -0
- package/dist/index-B09XEo3I.d.cts.map +1 -0
- package/dist/index-BGF1mgi8.d.mts +98 -0
- package/dist/index-BGF1mgi8.d.mts.map +1 -0
- package/dist/{modules/index.d.ts → index-BbHM1kxc.d.cts} +2 -4
- package/dist/index-BbHM1kxc.d.cts.map +1 -0
- package/dist/index-BgWB8f25.d.cts +53 -0
- package/dist/index-BgWB8f25.d.cts.map +1 -0
- package/dist/index-BhJiS2YS.d.mts +496 -0
- package/dist/index-BhJiS2YS.d.mts.map +1 -0
- package/dist/index-BwLhWefF.d.cts +43 -0
- package/dist/index-BwLhWefF.d.cts.map +1 -0
- package/dist/index-Bxg8IB-v.d.cts +26 -0
- package/dist/index-Bxg8IB-v.d.cts.map +1 -0
- package/dist/index-C0hF9uhX.d.mts +12 -0
- package/dist/index-C0hF9uhX.d.mts.map +1 -0
- package/dist/{index-C7MZeUpC.d.cts → index-CBvjQM3o.d.cts} +4 -2
- package/dist/index-CBvjQM3o.d.cts.map +1 -0
- package/dist/index-CDJdO0Cl.d.mts +11 -0
- package/dist/index-CDJdO0Cl.d.mts.map +1 -0
- package/dist/index-CiHIo5l6.d.cts +89 -0
- package/dist/index-CiHIo5l6.d.cts.map +1 -0
- package/dist/index-CkAu8Jje.d.mts +43 -0
- package/dist/index-CkAu8Jje.d.mts.map +1 -0
- package/dist/index-DQ5-4LVA.d.mts +26 -0
- package/dist/index-DQ5-4LVA.d.mts.map +1 -0
- package/dist/index-NvNXQIOG.d.mts +89 -0
- package/dist/index-NvNXQIOG.d.mts.map +1 -0
- package/dist/index-Rk69VHHb.d.cts +98 -0
- package/dist/index-Rk69VHHb.d.cts.map +1 -0
- package/dist/index-aAcFA6x8.d.mts +53 -0
- package/dist/index-aAcFA6x8.d.mts.map +1 -0
- package/dist/modifiers-BLV074OG.cjs +406 -0
- package/dist/modifiers-BLV074OG.cjs.map +1 -0
- package/dist/{modifiers-MSA4z6Gq.js → modifiers-I7YC0m3o.mjs} +72 -198
- package/dist/modifiers-I7YC0m3o.mjs.map +1 -0
- package/dist/module-group-template-CE4b0J24.d.cts +42 -0
- package/dist/module-group-template-CE4b0J24.d.cts.map +1 -0
- package/dist/module-group-template-D5doDEoa.d.mts +42 -0
- package/dist/module-group-template-D5doDEoa.d.mts.map +1 -0
- package/dist/modules/index.cjs +20 -2
- package/dist/modules/index.cjs.map +1 -0
- package/dist/modules/index.d.cts +2 -14
- package/dist/modules/index.d.mts +2 -0
- package/dist/{normalize-noise-module-CTxqByn9.js → modules/index.mjs} +1 -1
- package/dist/modules/index.mjs.map +1 -0
- package/dist/{node-props-CkXCceW9.d.ts → node-props-CoXzPLD6.d.cts} +11 -10
- package/dist/node-props-CoXzPLD6.d.cts.map +1 -0
- package/dist/{node-props-wMYPlIzZ.d.cts → node-props-GcUBDDY0.d.mts} +11 -10
- package/dist/node-props-GcUBDDY0.d.mts.map +1 -0
- package/dist/nodes/generators/index.cjs +2 -1
- package/dist/nodes/generators/index.d.cts +2 -3
- package/dist/nodes/generators/index.d.mts +2 -0
- package/dist/nodes/generators/{index.js → index.mjs} +1 -1
- package/dist/nodes/groups/index.cjs +2 -1
- package/dist/nodes/groups/index.d.cts +2 -2
- package/dist/nodes/groups/index.d.mts +2 -0
- package/dist/nodes/groups/index.mjs +3 -0
- package/dist/nodes/index.cjs +10 -9
- package/dist/nodes/index.d.cts +7 -9
- package/dist/nodes/index.d.mts +7 -0
- package/dist/nodes/index.mjs +8 -0
- package/dist/nodes/modifiers/index.cjs +2 -2
- package/dist/nodes/modifiers/index.d.cts +2 -3
- package/dist/nodes/modifiers/index.d.mts +2 -0
- package/dist/nodes/modifiers/index.mjs +3 -0
- package/dist/nodes/output/index.cjs +3 -7
- package/dist/nodes/output/index.d.cts +2 -2
- package/dist/nodes/output/index.d.mts +2 -0
- package/dist/nodes/output/index.mjs +3 -0
- package/dist/nodes/selectors/index.cjs +4 -8
- package/dist/nodes/selectors/index.d.cts +2 -3
- package/dist/nodes/selectors/index.d.mts +2 -0
- package/dist/nodes/selectors/index.mjs +3 -0
- package/dist/nodes/transformers/index.cjs +2 -1
- package/dist/nodes/transformers/index.d.cts +2 -3
- package/dist/nodes/transformers/index.d.mts +2 -0
- package/dist/nodes/transformers/index.mjs +3 -0
- package/dist/position-grid-template-Da_-z-NN.d.cts +79 -0
- package/dist/position-grid-template-Da_-z-NN.d.cts.map +1 -0
- package/dist/position-grid-template-FY_7BJcV.d.mts +79 -0
- package/dist/position-grid-template-FY_7BJcV.d.mts.map +1 -0
- package/dist/selectors-35pwVJ7Z.cjs +92 -0
- package/dist/selectors-35pwVJ7Z.cjs.map +1 -0
- package/dist/selectors-BHPJTidb.mjs +81 -0
- package/dist/selectors-BHPJTidb.mjs.map +1 -0
- package/dist/templates/generators/index.cjs +2 -7
- package/dist/templates/generators/index.d.cts +2 -4
- package/dist/templates/generators/index.d.mts +2 -0
- package/dist/templates/generators/index.mjs +3 -0
- package/dist/templates/groups/index.cjs +2 -7
- package/dist/templates/groups/index.d.cts +2 -3
- package/dist/templates/groups/index.d.mts +2 -0
- package/dist/templates/groups/index.mjs +3 -0
- package/dist/templates/index.cjs +9 -13
- package/dist/templates/index.d.cts +4 -14
- package/dist/templates/index.d.mts +4 -0
- package/dist/templates/index.mjs +9 -0
- package/dist/templates/modifiers/index.cjs +2 -7
- package/dist/templates/modifiers/index.d.cts +2 -4
- package/dist/templates/modifiers/index.d.mts +2 -0
- package/dist/templates/modifiers/index.mjs +3 -0
- package/dist/templates/output/index.cjs +3 -8
- package/dist/templates/output/index.d.cts +2 -3
- package/dist/templates/output/index.d.mts +2 -0
- package/dist/templates/output/index.mjs +3 -0
- package/dist/templates/selectors/index.cjs +2 -7
- package/dist/templates/selectors/index.d.cts +2 -4
- package/dist/templates/selectors/index.d.mts +2 -0
- package/dist/templates/selectors/index.mjs +3 -0
- package/dist/templates/transformers/index.cjs +2 -7
- package/dist/templates/transformers/index.d.cts +2 -4
- package/dist/templates/transformers/index.d.mts +2 -0
- package/dist/templates/transformers/index.mjs +3 -0
- package/dist/{transformers-Cpxm1ER8.js → transformers-D9B9IjR_.mjs} +11 -90
- package/dist/transformers-D9B9IjR_.mjs.map +1 -0
- package/dist/transformers-D9SfPky8.cjs +226 -0
- package/dist/transformers-D9SfPky8.cjs.map +1 -0
- package/package.json +26 -24
- package/dist/abstract/index.d.cts.map +0 -1
- package/dist/abstract/index.d.ts +0 -140
- package/dist/abstract/index.d.ts.map +0 -1
- package/dist/abstract/index.js +0 -8
- package/dist/abstract-Db8fFoLp.cjs +0 -1423
- package/dist/abstract-Db8fFoLp.cjs.map +0 -1
- package/dist/abstract-Dhf_tSuO.js.map +0 -1
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/generators-BzkwG_6g.js.map +0 -1
- package/dist/generators-CEKtVh81.cjs +0 -0
- package/dist/generators-D3RjZdMN.cjs +0 -413
- package/dist/generators-D3RjZdMN.cjs.map +0 -1
- package/dist/generators-DUbGjGwn.js +0 -0
- package/dist/groups-7QhtZ7S3.js +0 -0
- package/dist/groups-BIS2AF5M.cjs +0 -32
- package/dist/groups-BIS2AF5M.cjs.map +0 -1
- package/dist/groups-CH_lk8Aw.js +0 -26
- package/dist/groups-CH_lk8Aw.js.map +0 -1
- package/dist/groups-_x04PMtP.cjs +0 -0
- package/dist/index-0fK2DhR9.d.ts +0 -96
- package/dist/index-0fK2DhR9.d.ts.map +0 -1
- package/dist/index-B5F3AfVc.d.ts +0 -1
- package/dist/index-BAvw94zl.d.ts +0 -9
- package/dist/index-BAvw94zl.d.ts.map +0 -1
- package/dist/index-BLREDRDJ.d.cts +0 -1
- package/dist/index-BQGb02a-.d.cts +0 -1
- package/dist/index-BQbubdsk.d.ts +0 -89
- package/dist/index-BQbubdsk.d.ts.map +0 -1
- package/dist/index-Be7jjS77.d.ts +0 -1
- package/dist/index-BlgxGbc0.d.cts +0 -89
- package/dist/index-BlgxGbc0.d.cts.map +0 -1
- package/dist/index-C7MZeUpC.d.cts.map +0 -1
- package/dist/index-CLcwj8U0.d.ts +0 -1
- package/dist/index-CUPkUUOR.d.ts +0 -1
- package/dist/index-CnAUb7AL.d.cts +0 -24
- package/dist/index-CnAUb7AL.d.cts.map +0 -1
- package/dist/index-CtCMUyZA.d.cts +0 -1
- package/dist/index-DAwMsCZ3.d.ts +0 -1
- package/dist/index-DHdW2oFJ.d.ts +0 -51
- package/dist/index-DHdW2oFJ.d.ts.map +0 -1
- package/dist/index-DOvrmvAP.d.cts +0 -1
- package/dist/index-Dh6J9gb5.d.cts +0 -1
- package/dist/index-DiHZ0kDx.d.ts +0 -41
- package/dist/index-DiHZ0kDx.d.ts.map +0 -1
- package/dist/index-DjNzlSLZ.d.cts +0 -41
- package/dist/index-DjNzlSLZ.d.cts.map +0 -1
- package/dist/index-Dpmi5zcN.d.cts +0 -1
- package/dist/index-DtihvA2Y.d.cts +0 -96
- package/dist/index-DtihvA2Y.d.cts.map +0 -1
- package/dist/index-I2m6W13H.d.ts +0 -1
- package/dist/index-QAtBiMxG.d.cts +0 -1
- package/dist/index-kr8Wk7v5.d.ts +0 -1
- package/dist/index-nJ2Hzacu.d.ts +0 -24
- package/dist/index-nJ2Hzacu.d.ts.map +0 -1
- package/dist/index-p2iXZqXH.d.cts +0 -51
- package/dist/index-p2iXZqXH.d.cts.map +0 -1
- package/dist/modifiers-BFuezug6.js +0 -0
- package/dist/modifiers-BPTSn-15.cjs +0 -0
- package/dist/modifiers-DU7AkD-K.cjs +0 -545
- package/dist/modifiers-DU7AkD-K.cjs.map +0 -1
- package/dist/modifiers-MSA4z6Gq.js.map +0 -1
- package/dist/module-group-template-8oC4dg0a.d.ts +0 -11
- package/dist/module-group-template-8oC4dg0a.d.ts.map +0 -1
- package/dist/module-group-template-CBWW-oGM.d.cts +0 -11
- package/dist/module-group-template-CBWW-oGM.d.cts.map +0 -1
- package/dist/modules/index.d.cts.map +0 -1
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/index.js +0 -3
- package/dist/node-props-CkXCceW9.d.ts.map +0 -1
- package/dist/node-props-wMYPlIzZ.d.cts.map +0 -1
- package/dist/nodes/generators/index.d.ts +0 -3
- package/dist/nodes/groups/index.d.ts +0 -2
- package/dist/nodes/groups/index.js +0 -3
- package/dist/nodes/index.d.ts +0 -9
- package/dist/nodes/index.js +0 -8
- package/dist/nodes/modifiers/index.d.ts +0 -3
- package/dist/nodes/modifiers/index.js +0 -4
- package/dist/nodes/output/index.d.ts +0 -2
- package/dist/nodes/output/index.js +0 -8
- package/dist/nodes/selectors/index.d.ts +0 -3
- package/dist/nodes/selectors/index.js +0 -8
- package/dist/nodes/transformers/index.d.ts +0 -3
- package/dist/nodes/transformers/index.js +0 -3
- package/dist/noise-select-template-DySK_9N4.d.ts +0 -18
- package/dist/noise-select-template-DySK_9N4.d.ts.map +0 -1
- package/dist/noise-select-template-NyFIrMMB.d.cts +0 -18
- package/dist/noise-select-template-NyFIrMMB.d.cts.map +0 -1
- package/dist/noise-terrace-template-00K3BKMq.d.ts +0 -60
- package/dist/noise-terrace-template-00K3BKMq.d.ts.map +0 -1
- package/dist/noise-terrace-template-9_PoAyoY.d.cts +0 -60
- package/dist/noise-terrace-template-9_PoAyoY.d.cts.map +0 -1
- package/dist/noise-turbulence-template-CMhGn5Ja.d.cts +0 -63
- package/dist/noise-turbulence-template-CMhGn5Ja.d.cts.map +0 -1
- package/dist/noise-turbulence-template-Xv-hmmfh.d.ts +0 -63
- package/dist/noise-turbulence-template-Xv-hmmfh.d.ts.map +0 -1
- package/dist/normalize-noise-module-CTxqByn9.js.map +0 -1
- package/dist/normalize-noise-module-U3fMmZRj.cjs +0 -26
- package/dist/normalize-noise-module-U3fMmZRj.cjs.map +0 -1
- package/dist/output-CsgQ-PfN.js +0 -0
- package/dist/output-DhHW36T8.cjs +0 -0
- package/dist/position-grid-template-2Acjbquv.d.ts +0 -66
- package/dist/position-grid-template-2Acjbquv.d.ts.map +0 -1
- package/dist/position-grid-template-DWH5cUR0.d.cts +0 -66
- package/dist/position-grid-template-DWH5cUR0.d.cts.map +0 -1
- package/dist/position-logger-template-CvH32Xjm.d.ts +0 -29
- package/dist/position-logger-template-CvH32Xjm.d.ts.map +0 -1
- package/dist/position-logger-template-DPBhlahQ.d.cts +0 -29
- package/dist/position-logger-template-DPBhlahQ.d.cts.map +0 -1
- package/dist/selectors-DOtoPc8O.cjs +0 -0
- package/dist/selectors-DPitHA56.js +0 -0
- package/dist/templates/generators/index.d.ts +0 -4
- package/dist/templates/generators/index.js +0 -9
- package/dist/templates/groups/index.d.ts +0 -3
- package/dist/templates/groups/index.js +0 -9
- package/dist/templates/index.d.ts +0 -14
- package/dist/templates/index.js +0 -14
- package/dist/templates/modifiers/index.d.ts +0 -4
- package/dist/templates/modifiers/index.js +0 -9
- package/dist/templates/output/index.d.ts +0 -3
- package/dist/templates/output/index.js +0 -9
- package/dist/templates/selectors/index.d.ts +0 -4
- package/dist/templates/selectors/index.js +0 -9
- package/dist/templates/transformers/index.d.ts +0 -4
- package/dist/templates/transformers/index.js +0 -9
- package/dist/transformers-C-NV_u9j.cjs +0 -324
- package/dist/transformers-C-NV_u9j.cjs.map +0 -1
- package/dist/transformers-CbfR4wDy.js +0 -0
- package/dist/transformers-Cpxm1ER8.js.map +0 -1
- package/dist/transformers-iRDXBonP.cjs +0 -0
|
@@ -0,0 +1,1768 @@
|
|
|
1
|
+
const require_generators = require('./generators-BF_0y3pd.cjs');
|
|
2
|
+
const require_groups = require('./groups-DF2FTSBC.cjs');
|
|
3
|
+
const require_modifiers = require('./modifiers-BLV074OG.cjs');
|
|
4
|
+
const require_selectors = require('./selectors-35pwVJ7Z.cjs');
|
|
5
|
+
const require_transformers = require('./transformers-D9SfPky8.cjs');
|
|
6
|
+
const require_modules_index = require('./modules/index.cjs');
|
|
7
|
+
let _awesome_flow_core_components = require("@awesome-flow/core/components");
|
|
8
|
+
let _awesome_flow_core_layout = require("@awesome-flow/core/layout");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _awesome_flow_core_hooks = require("@awesome-flow/core/hooks");
|
|
12
|
+
let _mantine_core = require("@mantine/core");
|
|
13
|
+
let _awesome_flow_core_abstract = require("@awesome-flow/core/abstract");
|
|
14
|
+
let _awesome_flow_core_factories = require("@awesome-flow/core/factories");
|
|
15
|
+
let _awesome_flow_core_utils = require("@awesome-flow/core/utils");
|
|
16
|
+
let _xyflow_system = require("@xyflow/system");
|
|
17
|
+
let libnoise_simplex_ts = require("libnoise-simplex-ts");
|
|
18
|
+
|
|
19
|
+
//#region src/abstract/handle-types.ts
|
|
20
|
+
let NoiseHandleType = /* @__PURE__ */ function(NoiseHandleType) {
|
|
21
|
+
NoiseHandleType["textureData"] = "texture-data";
|
|
22
|
+
NoiseHandleType["noise"] = "noise";
|
|
23
|
+
NoiseHandleType["position"] = "position";
|
|
24
|
+
NoiseHandleType["module"] = "module";
|
|
25
|
+
return NoiseHandleType;
|
|
26
|
+
}({});
|
|
27
|
+
let DisplacementHandle = /* @__PURE__ */ function(DisplacementHandle) {
|
|
28
|
+
DisplacementHandle["sourceModule"] = "source";
|
|
29
|
+
DisplacementHandle["xModule"] = "x-module";
|
|
30
|
+
DisplacementHandle["yModule"] = "y-module";
|
|
31
|
+
DisplacementHandle["zModule"] = "z-module";
|
|
32
|
+
DisplacementHandle["output"] = "output";
|
|
33
|
+
return DisplacementHandle;
|
|
34
|
+
}({});
|
|
35
|
+
let NoiseSourceControlHandle = /* @__PURE__ */ function(NoiseSourceControlHandle) {
|
|
36
|
+
NoiseSourceControlHandle["source"] = "source";
|
|
37
|
+
NoiseSourceControlHandle["control"] = "control";
|
|
38
|
+
NoiseSourceControlHandle["output"] = "output";
|
|
39
|
+
return NoiseSourceControlHandle;
|
|
40
|
+
}({});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/nodes/output/noise-logger-node.tsx
|
|
44
|
+
function NoiseLoggerNode({ id, selected, data, type }) {
|
|
45
|
+
const noise = ((0, _awesome_flow_core_hooks.useNodeContext)(id)?.incoming?.[NoiseHandleType.noise])?.filter((c) => c.computed?.noise).flatMap((c) => c.computed.noise) || [];
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_awesome_flow_core_layout.NodeContainer, {
|
|
47
|
+
id,
|
|
48
|
+
selected,
|
|
49
|
+
data,
|
|
50
|
+
type,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Text, { children: ["Size: ", noise?.length || 0] }),
|
|
53
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Divider, { h: 5 }),
|
|
54
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, { children: noise?.map((v, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Text, { children: [
|
|
55
|
+
v.position?.x,
|
|
56
|
+
":",
|
|
57
|
+
v.position?.y,
|
|
58
|
+
":",
|
|
59
|
+
v.position?.z,
|
|
60
|
+
": ",
|
|
61
|
+
v.value
|
|
62
|
+
] }, i)) })
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var noise_logger_node_default = (0, react.memo)(NoiseLoggerNode);
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/nodes/output/noise-output-node.tsx
|
|
70
|
+
function NoiseOutputNode({ id, selected, data, type }) {
|
|
71
|
+
const context = (0, _awesome_flow_core_hooks.useNodeContext)(id);
|
|
72
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_awesome_flow_core_layout.NodeContainer, {
|
|
73
|
+
id,
|
|
74
|
+
selected,
|
|
75
|
+
data,
|
|
76
|
+
type,
|
|
77
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.HandlesIncomingDataStatus, {
|
|
78
|
+
nodeId: id,
|
|
79
|
+
handles: data.handles
|
|
80
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Text, {
|
|
81
|
+
mt: 5,
|
|
82
|
+
children: ["Noise points: ", context?.computed?.noise?.length || 0]
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
var noise_output_node_default = (0, react.memo)(NoiseOutputNode);
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/nodes/output/noise-texture-data-node.tsx
|
|
90
|
+
function NoiseTextureDataNode({ id, selected, data, type }) {
|
|
91
|
+
const context = (0, _awesome_flow_core_hooks.useNodeContext)(id)?.computed;
|
|
92
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
|
|
93
|
+
id,
|
|
94
|
+
selected,
|
|
95
|
+
data,
|
|
96
|
+
type,
|
|
97
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, { children: [
|
|
98
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: [
|
|
99
|
+
"Resolution: ",
|
|
100
|
+
context?.textureResolutionX,
|
|
101
|
+
"x",
|
|
102
|
+
context?.textureResolutionY
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["Input Length: ", context?.textureData?.length || 0] }),
|
|
105
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: [
|
|
106
|
+
"Output Length (",
|
|
107
|
+
context?.textureResolutionX,
|
|
108
|
+
"*",
|
|
109
|
+
context?.textureResolutionY,
|
|
110
|
+
"*4): ",
|
|
111
|
+
context?.textureData?.length || 0
|
|
112
|
+
] })
|
|
113
|
+
] })
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
var noise_texture_data_node_default = (0, react.memo)(NoiseTextureDataNode);
|
|
117
|
+
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/nodes/output/positions-logger-node.tsx
|
|
120
|
+
function PositionsLoggerNode({ id, selected, data, type }) {
|
|
121
|
+
const positions = ((0, _awesome_flow_core_hooks.useNodeContext)(id)?.incoming[NoiseHandleType.position])?.filter((p) => !!p.computed?.positions?.length).flatMap((p) => p.computed.positions);
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_awesome_flow_core_layout.NodeContainer, {
|
|
123
|
+
id,
|
|
124
|
+
selected,
|
|
125
|
+
data,
|
|
126
|
+
type,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Text, { children: ["Size: ", positions?.length || 0] }),
|
|
129
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Divider, { h: 5 }),
|
|
130
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, { children: positions?.map((v, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Text, { children: [
|
|
131
|
+
v.x,
|
|
132
|
+
":",
|
|
133
|
+
v.y,
|
|
134
|
+
":",
|
|
135
|
+
v.z
|
|
136
|
+
] }, i)) })
|
|
137
|
+
]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
var positions_logger_node_default = (0, react.memo)(PositionsLoggerNode);
|
|
141
|
+
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/abstract/templates.ts
|
|
144
|
+
let NoiseTemplateGroup = /* @__PURE__ */ function(NoiseTemplateGroup) {
|
|
145
|
+
NoiseTemplateGroup["positions"] = "Positions";
|
|
146
|
+
NoiseTemplateGroup["output"] = "Output";
|
|
147
|
+
NoiseTemplateGroup["noiseGenerators"] = "Noise Generators";
|
|
148
|
+
NoiseTemplateGroup["noiseModifiers"] = "Noise Modifiers";
|
|
149
|
+
NoiseTemplateGroup["noiseSelectors"] = "Noise Selectors";
|
|
150
|
+
NoiseTemplateGroup["noiseTransformers"] = "Noise Transformers";
|
|
151
|
+
return NoiseTemplateGroup;
|
|
152
|
+
}({});
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/middleware/incoming-property-value.ts
|
|
156
|
+
var IncomingPropertyValueMiddleware = class {
|
|
157
|
+
action(context) {
|
|
158
|
+
const incoming = context.incoming?.[_awesome_flow_core_abstract.CoreHandleType.variableProperty] ?? [];
|
|
159
|
+
const properties = { ...context.data };
|
|
160
|
+
for (const connection of incoming) {
|
|
161
|
+
const overwrite = connection.computed;
|
|
162
|
+
if (overwrite) Object.assign(properties, { [overwrite.property]: overwrite.value });
|
|
163
|
+
}
|
|
164
|
+
context.properties = properties;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/templates/generators/noise-billow-template.ts
|
|
170
|
+
var NoiseBillowNodeTemplateFactory = class {
|
|
171
|
+
template = {
|
|
172
|
+
id: _awesome_flow_core_utils.IDGenerator.template(),
|
|
173
|
+
type: NoiseNodeType.noiseBillow,
|
|
174
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
175
|
+
data: {
|
|
176
|
+
title: "Billow Noise",
|
|
177
|
+
frequency: .1,
|
|
178
|
+
lacunarity: 2,
|
|
179
|
+
octaves: 5,
|
|
180
|
+
persistence: .5,
|
|
181
|
+
seed: 0
|
|
182
|
+
},
|
|
183
|
+
handles: [{
|
|
184
|
+
position: _xyflow_system.Position.Left,
|
|
185
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
186
|
+
connection: "target"
|
|
187
|
+
}, {
|
|
188
|
+
position: _xyflow_system.Position.Right,
|
|
189
|
+
dataType: NoiseHandleType.module,
|
|
190
|
+
connection: "source"
|
|
191
|
+
}]
|
|
192
|
+
};
|
|
193
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
194
|
+
action: (context) => {
|
|
195
|
+
const { properties } = context;
|
|
196
|
+
context.computed = { module: new libnoise_simplex_ts.Billow(properties.frequency, properties.lacunarity, properties.octaves, properties.persistence, properties.seed) };
|
|
197
|
+
},
|
|
198
|
+
cleanup: (context) => {
|
|
199
|
+
context.computed = null;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/templates/generators/noise-checkerboard-template.ts
|
|
206
|
+
var NoiseCheckerboardNodeTemplateFactory = class {
|
|
207
|
+
template = {
|
|
208
|
+
type: NoiseNodeType.noiseCheckerboard,
|
|
209
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
210
|
+
data: { title: "Checkerboard Noise" },
|
|
211
|
+
handles: [{
|
|
212
|
+
position: _xyflow_system.Position.Right,
|
|
213
|
+
dataType: NoiseHandleType.module,
|
|
214
|
+
connection: "source"
|
|
215
|
+
}]
|
|
216
|
+
};
|
|
217
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
218
|
+
action: (context) => {
|
|
219
|
+
context.computed = { module: new libnoise_simplex_ts.Checkerboard() };
|
|
220
|
+
},
|
|
221
|
+
cleanup: (context) => {
|
|
222
|
+
context.computed = null;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/templates/generators/noise-const-template.ts
|
|
229
|
+
var NoiseConstNodeTemplateFactory = class {
|
|
230
|
+
template = {
|
|
231
|
+
type: NoiseNodeType.noiseConst,
|
|
232
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
233
|
+
data: {
|
|
234
|
+
title: "Const Value Noise",
|
|
235
|
+
noise: 0,
|
|
236
|
+
min: -1,
|
|
237
|
+
max: 1
|
|
238
|
+
},
|
|
239
|
+
handles: [{
|
|
240
|
+
position: _xyflow_system.Position.Right,
|
|
241
|
+
dataType: NoiseHandleType.module,
|
|
242
|
+
connection: "source"
|
|
243
|
+
}]
|
|
244
|
+
};
|
|
245
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
246
|
+
shouldRun(context) {
|
|
247
|
+
return context.data.noise !== void 0 && context.data.noise !== null;
|
|
248
|
+
},
|
|
249
|
+
action(context) {
|
|
250
|
+
context.computed = { module: new libnoise_simplex_ts.Const(context.data.noise) };
|
|
251
|
+
},
|
|
252
|
+
cleanup(context) {
|
|
253
|
+
context.computed = null;
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/templates/generators/noise-cylinders-template.ts
|
|
260
|
+
var NoiseCylindersNodeTemplateFactory = class {
|
|
261
|
+
template = {
|
|
262
|
+
type: NoiseNodeType.noiseCylinders,
|
|
263
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
264
|
+
data: {
|
|
265
|
+
title: "Cylinders Noise",
|
|
266
|
+
frequency: .1
|
|
267
|
+
},
|
|
268
|
+
handles: [{
|
|
269
|
+
position: _xyflow_system.Position.Left,
|
|
270
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
271
|
+
connection: "target"
|
|
272
|
+
}, {
|
|
273
|
+
position: _xyflow_system.Position.Right,
|
|
274
|
+
dataType: NoiseHandleType.module,
|
|
275
|
+
connection: "source"
|
|
276
|
+
}]
|
|
277
|
+
};
|
|
278
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
279
|
+
action: (context) => {
|
|
280
|
+
const { properties } = context;
|
|
281
|
+
context.computed = { module: new libnoise_simplex_ts.Cylinders(properties.frequency) };
|
|
282
|
+
},
|
|
283
|
+
cleanup: (context) => {
|
|
284
|
+
context.computed = null;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/templates/generators/noise-perlin-template.ts
|
|
291
|
+
var NoisePerlinNodeTemplateFactory = class {
|
|
292
|
+
template = {
|
|
293
|
+
type: NoiseNodeType.noisePerlin,
|
|
294
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
295
|
+
data: {
|
|
296
|
+
title: "Perlin Noise",
|
|
297
|
+
frequency: .1,
|
|
298
|
+
lacunarity: 2,
|
|
299
|
+
octaves: 5,
|
|
300
|
+
persistence: .5,
|
|
301
|
+
seed: 0
|
|
302
|
+
},
|
|
303
|
+
handles: [{
|
|
304
|
+
position: _xyflow_system.Position.Left,
|
|
305
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
306
|
+
connection: "target"
|
|
307
|
+
}, {
|
|
308
|
+
position: _xyflow_system.Position.Right,
|
|
309
|
+
dataType: NoiseHandleType.module,
|
|
310
|
+
connection: "source"
|
|
311
|
+
}]
|
|
312
|
+
};
|
|
313
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
314
|
+
action: (context) => {
|
|
315
|
+
const { properties } = context;
|
|
316
|
+
context.computed = { module: new libnoise_simplex_ts.Perlin(properties.frequency, properties.lacunarity, properties.octaves, properties.persistence, properties.seed) };
|
|
317
|
+
},
|
|
318
|
+
cleanup: (context) => {
|
|
319
|
+
context.computed = null;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/templates/generators/noise-ridgedmulti-template.ts
|
|
326
|
+
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
327
|
+
template = {
|
|
328
|
+
type: NoiseNodeType.noiseRidgedMulti,
|
|
329
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
330
|
+
data: {
|
|
331
|
+
title: "Ridged Multi Noise",
|
|
332
|
+
frequency: .1,
|
|
333
|
+
lacunarity: 2,
|
|
334
|
+
octaves: 6,
|
|
335
|
+
offset: 1,
|
|
336
|
+
gain: 2,
|
|
337
|
+
seed: 0
|
|
338
|
+
},
|
|
339
|
+
handles: [{
|
|
340
|
+
position: _xyflow_system.Position.Left,
|
|
341
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
342
|
+
connection: "target"
|
|
343
|
+
}, {
|
|
344
|
+
position: _xyflow_system.Position.Right,
|
|
345
|
+
dataType: NoiseHandleType.module,
|
|
346
|
+
connection: "source"
|
|
347
|
+
}]
|
|
348
|
+
};
|
|
349
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
350
|
+
action: (context) => {
|
|
351
|
+
const { properties } = context;
|
|
352
|
+
context.computed = { module: new libnoise_simplex_ts.RidgedMulti(properties.frequency, properties.lacunarity, properties.octaves, properties.offset, properties.gain, properties.seed) };
|
|
353
|
+
},
|
|
354
|
+
cleanup: (context) => {
|
|
355
|
+
context.computed = null;
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/templates/generators/noise-spheres-template.ts
|
|
362
|
+
var NoiseSpheresNodeTemplateFactory = class {
|
|
363
|
+
template = {
|
|
364
|
+
type: NoiseNodeType.noiseSpheres,
|
|
365
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
366
|
+
data: {
|
|
367
|
+
title: "Spheres Noise",
|
|
368
|
+
frequency: .1
|
|
369
|
+
},
|
|
370
|
+
handles: [{
|
|
371
|
+
position: _xyflow_system.Position.Left,
|
|
372
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
373
|
+
connection: "target"
|
|
374
|
+
}, {
|
|
375
|
+
position: _xyflow_system.Position.Right,
|
|
376
|
+
dataType: NoiseHandleType.module,
|
|
377
|
+
connection: "source"
|
|
378
|
+
}]
|
|
379
|
+
};
|
|
380
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
381
|
+
action: (context) => {
|
|
382
|
+
const { properties } = context;
|
|
383
|
+
context.computed = { module: new libnoise_simplex_ts.Spheres(properties.frequency) };
|
|
384
|
+
},
|
|
385
|
+
cleanup: (context) => {
|
|
386
|
+
context.computed = null;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region src/templates/generators/noise-voronoi-template.ts
|
|
393
|
+
var NoiseVoronoiNodeTemplateFactory = class {
|
|
394
|
+
template = {
|
|
395
|
+
type: NoiseNodeType.noiseVoronoi,
|
|
396
|
+
group: NoiseTemplateGroup.noiseGenerators,
|
|
397
|
+
data: {
|
|
398
|
+
title: "Voronoi Noise",
|
|
399
|
+
frequency: .1,
|
|
400
|
+
displacement: 1,
|
|
401
|
+
distance: true,
|
|
402
|
+
seed: 0
|
|
403
|
+
},
|
|
404
|
+
handles: [{
|
|
405
|
+
position: _xyflow_system.Position.Left,
|
|
406
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
407
|
+
connection: "target"
|
|
408
|
+
}, {
|
|
409
|
+
position: _xyflow_system.Position.Right,
|
|
410
|
+
dataType: NoiseHandleType.module,
|
|
411
|
+
connection: "source"
|
|
412
|
+
}]
|
|
413
|
+
};
|
|
414
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
415
|
+
action: (context) => {
|
|
416
|
+
const { properties } = context;
|
|
417
|
+
context.computed = { module: new libnoise_simplex_ts.Voronoi(properties.frequency, properties.displacement, properties.distance, properties.seed) };
|
|
418
|
+
},
|
|
419
|
+
cleanup: (context) => {
|
|
420
|
+
context.computed = null;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region src/templates/generators/position-const-template.ts
|
|
427
|
+
var PositionConstNodeTemplateFactory = class {
|
|
428
|
+
template = {
|
|
429
|
+
type: NoiseNodeType.position,
|
|
430
|
+
group: NoiseTemplateGroup.positions,
|
|
431
|
+
data: {
|
|
432
|
+
title: "Position Output",
|
|
433
|
+
position: {
|
|
434
|
+
x: 0,
|
|
435
|
+
y: 0,
|
|
436
|
+
z: 0
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
handles: [{
|
|
440
|
+
position: _xyflow_system.Position.Right,
|
|
441
|
+
dataType: NoiseHandleType.position,
|
|
442
|
+
connection: "source"
|
|
443
|
+
}]
|
|
444
|
+
};
|
|
445
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
446
|
+
shouldRun(context) {
|
|
447
|
+
return context.data.position !== void 0 && context.data.position !== null;
|
|
448
|
+
},
|
|
449
|
+
action(context) {
|
|
450
|
+
const { data } = context;
|
|
451
|
+
context.computed = { positions: [data.position] };
|
|
452
|
+
},
|
|
453
|
+
cleanup(context) {
|
|
454
|
+
context.computed = null;
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/templates/generators/position-grid-template.ts
|
|
461
|
+
var PositionGridNodeTemplateFactory = class {
|
|
462
|
+
template = {
|
|
463
|
+
type: NoiseNodeType.grid,
|
|
464
|
+
group: NoiseTemplateGroup.positions,
|
|
465
|
+
data: {
|
|
466
|
+
title: "Grid Output",
|
|
467
|
+
center: {
|
|
468
|
+
x: 0,
|
|
469
|
+
y: 0,
|
|
470
|
+
z: 0
|
|
471
|
+
},
|
|
472
|
+
radius: 1
|
|
473
|
+
},
|
|
474
|
+
handles: [{
|
|
475
|
+
position: _xyflow_system.Position.Right,
|
|
476
|
+
dataType: NoiseHandleType.position,
|
|
477
|
+
connection: "source"
|
|
478
|
+
}]
|
|
479
|
+
};
|
|
480
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
481
|
+
shouldRun(context) {
|
|
482
|
+
const { center, radius } = context.data;
|
|
483
|
+
return center !== void 0 && radius !== void 0;
|
|
484
|
+
},
|
|
485
|
+
action(context) {
|
|
486
|
+
const { data } = context;
|
|
487
|
+
const { center, radius } = data;
|
|
488
|
+
const positions = [];
|
|
489
|
+
for (let i = -radius; i < radius; i++) for (let j = -radius; j < radius; j++) positions.push({
|
|
490
|
+
x: center.x + i,
|
|
491
|
+
y: center.y + j,
|
|
492
|
+
z: center.z
|
|
493
|
+
});
|
|
494
|
+
context.computed = { positions };
|
|
495
|
+
},
|
|
496
|
+
cleanup(context) {
|
|
497
|
+
context.computed = null;
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/templates/groups/module-group-template.ts
|
|
504
|
+
var ModuleGroupNodeTemplateFactory = class {
|
|
505
|
+
template = {
|
|
506
|
+
id: _awesome_flow_core_utils.IDGenerator.template(),
|
|
507
|
+
type: NoiseNodeType.groupModule,
|
|
508
|
+
group: _awesome_flow_core_abstract.CoreTemplateGroup.groups,
|
|
509
|
+
data: {
|
|
510
|
+
title: "Modules Group",
|
|
511
|
+
isGroup: true,
|
|
512
|
+
initialSize: {
|
|
513
|
+
width: 300,
|
|
514
|
+
height: 200
|
|
515
|
+
},
|
|
516
|
+
collapsedSize: {
|
|
517
|
+
width: 300,
|
|
518
|
+
height: 80
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
handles: [{
|
|
522
|
+
position: _xyflow_system.Position.Bottom,
|
|
523
|
+
dataType: NoiseHandleType.module,
|
|
524
|
+
connection: "target",
|
|
525
|
+
maxConnections: 1,
|
|
526
|
+
hideOnCollapse: true
|
|
527
|
+
}, {
|
|
528
|
+
position: _xyflow_system.Position.Right,
|
|
529
|
+
dataType: NoiseHandleType.module,
|
|
530
|
+
connection: "source"
|
|
531
|
+
}]
|
|
532
|
+
};
|
|
533
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
534
|
+
shouldRun(context) {
|
|
535
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
536
|
+
},
|
|
537
|
+
action: (context) => {
|
|
538
|
+
context.computed = { module: context.incoming[NoiseHandleType.module].computed?.module };
|
|
539
|
+
},
|
|
540
|
+
cleanup: (context) => {
|
|
541
|
+
context.computed = null;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/templates/modifiers/noise-abs-template.ts
|
|
548
|
+
var NoiseAbsNodeTemplateFactory = class {
|
|
549
|
+
template = {
|
|
550
|
+
type: NoiseNodeType.noiseAbs,
|
|
551
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
552
|
+
data: { title: "Abs Noise" },
|
|
553
|
+
handles: [{
|
|
554
|
+
position: _xyflow_system.Position.Left,
|
|
555
|
+
dataType: NoiseHandleType.module,
|
|
556
|
+
connection: "target",
|
|
557
|
+
maxConnections: 1
|
|
558
|
+
}, {
|
|
559
|
+
position: _xyflow_system.Position.Right,
|
|
560
|
+
dataType: NoiseHandleType.module,
|
|
561
|
+
connection: "source"
|
|
562
|
+
}]
|
|
563
|
+
};
|
|
564
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
565
|
+
shouldRun(context) {
|
|
566
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
567
|
+
},
|
|
568
|
+
action(context) {
|
|
569
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
570
|
+
if (module) if (context.computed?.module) context.computed.module.sourceModule = module;
|
|
571
|
+
else context.computed = { module: new libnoise_simplex_ts.Abs(module) };
|
|
572
|
+
},
|
|
573
|
+
cleanup(context) {
|
|
574
|
+
context.computed = null;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/templates/modifiers/noise-clamp-template.ts
|
|
581
|
+
var NoiseClampNodeTemplateFactory = class {
|
|
582
|
+
template = {
|
|
583
|
+
type: NoiseNodeType.noiseClamp,
|
|
584
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
585
|
+
data: {
|
|
586
|
+
title: "Clamp Noise",
|
|
587
|
+
lowerBound: -1,
|
|
588
|
+
upperBound: 1
|
|
589
|
+
},
|
|
590
|
+
handles: [{
|
|
591
|
+
position: _xyflow_system.Position.Left,
|
|
592
|
+
dataType: NoiseHandleType.module,
|
|
593
|
+
connection: "target",
|
|
594
|
+
maxConnections: 1
|
|
595
|
+
}, {
|
|
596
|
+
position: _xyflow_system.Position.Right,
|
|
597
|
+
dataType: NoiseHandleType.module,
|
|
598
|
+
connection: "source"
|
|
599
|
+
}]
|
|
600
|
+
};
|
|
601
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
602
|
+
shouldRun(context) {
|
|
603
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
604
|
+
},
|
|
605
|
+
action(context) {
|
|
606
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
607
|
+
if (module) {
|
|
608
|
+
const clampModule = context.computed?.module;
|
|
609
|
+
if (clampModule) {
|
|
610
|
+
clampModule.sourceModule = module;
|
|
611
|
+
clampModule.lowerBound = context.data.lowerBound;
|
|
612
|
+
clampModule.upperBound = context.data.upperBound;
|
|
613
|
+
} else context.computed = { module: new libnoise_simplex_ts.Clamp(module, context.data.lowerBound, context.data.upperBound) };
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
cleanup(context) {
|
|
617
|
+
context.computed = null;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/abstract/operations.ts
|
|
624
|
+
let NoiseCombineType = /* @__PURE__ */ function(NoiseCombineType) {
|
|
625
|
+
NoiseCombineType["add"] = "add";
|
|
626
|
+
NoiseCombineType["max"] = "max";
|
|
627
|
+
NoiseCombineType["min"] = "min";
|
|
628
|
+
NoiseCombineType["multiply"] = "multiply";
|
|
629
|
+
NoiseCombineType["power"] = "power";
|
|
630
|
+
return NoiseCombineType;
|
|
631
|
+
}({});
|
|
632
|
+
const noiseCombineModuleMap = {
|
|
633
|
+
[NoiseCombineType.add]: libnoise_simplex_ts.Add,
|
|
634
|
+
[NoiseCombineType.max]: libnoise_simplex_ts.Max,
|
|
635
|
+
[NoiseCombineType.min]: libnoise_simplex_ts.Min,
|
|
636
|
+
[NoiseCombineType.multiply]: libnoise_simplex_ts.Multiply,
|
|
637
|
+
[NoiseCombineType.power]: libnoise_simplex_ts.Power
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region src/templates/modifiers/noise-combine-template.ts
|
|
642
|
+
var NoiseCombineNodeTemplateFactory = class {
|
|
643
|
+
template = {
|
|
644
|
+
type: NoiseNodeType.noiseCombine,
|
|
645
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
646
|
+
data: {
|
|
647
|
+
title: "Combine Noise",
|
|
648
|
+
operation: NoiseCombineType.add
|
|
649
|
+
},
|
|
650
|
+
handles: [{
|
|
651
|
+
position: _xyflow_system.Position.Left,
|
|
652
|
+
dataType: NoiseHandleType.module,
|
|
653
|
+
connection: "target",
|
|
654
|
+
minConnections: 2,
|
|
655
|
+
maxConnections: 2
|
|
656
|
+
}, {
|
|
657
|
+
position: _xyflow_system.Position.Right,
|
|
658
|
+
dataType: NoiseHandleType.module,
|
|
659
|
+
connection: "source"
|
|
660
|
+
}]
|
|
661
|
+
};
|
|
662
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
663
|
+
shouldRun(context) {
|
|
664
|
+
return context.incoming[NoiseHandleType.module]?.length === 2;
|
|
665
|
+
},
|
|
666
|
+
action(context) {
|
|
667
|
+
const incoming = context.incoming[NoiseHandleType.module];
|
|
668
|
+
const ModuleFactory = noiseCombineModuleMap[context.data.operation];
|
|
669
|
+
context.computed = { module: new ModuleFactory(incoming[0].computed?.module, incoming[1].computed?.module) };
|
|
670
|
+
},
|
|
671
|
+
cleanup(context) {
|
|
672
|
+
context.computed = null;
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region src/templates/modifiers/noise-curve-template.ts
|
|
679
|
+
var NoiseCurveNodeTemplateFactory = class {
|
|
680
|
+
template = {
|
|
681
|
+
type: NoiseNodeType.noiseCurve,
|
|
682
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
683
|
+
data: {
|
|
684
|
+
title: "Noise Curve",
|
|
685
|
+
points: []
|
|
686
|
+
},
|
|
687
|
+
handles: [{
|
|
688
|
+
position: _xyflow_system.Position.Left,
|
|
689
|
+
dataType: NoiseHandleType.module,
|
|
690
|
+
connection: "target",
|
|
691
|
+
maxConnections: 1
|
|
692
|
+
}, {
|
|
693
|
+
position: _xyflow_system.Position.Right,
|
|
694
|
+
dataType: NoiseHandleType.module,
|
|
695
|
+
connection: "source"
|
|
696
|
+
}]
|
|
697
|
+
};
|
|
698
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
699
|
+
shouldRun(context) {
|
|
700
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
701
|
+
},
|
|
702
|
+
action(context) {
|
|
703
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
704
|
+
if (module) context.computed = { module: new libnoise_simplex_ts.Curve(module, context.data.points.map((p) => new libnoise_simplex_ts.Tuple(p.input, p.output))) };
|
|
705
|
+
},
|
|
706
|
+
cleanup(context) {
|
|
707
|
+
context.computed = null;
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/templates/modifiers/noise-exponent-template.ts
|
|
714
|
+
var NoiseExponentNodeTemplateFactory = class {
|
|
715
|
+
template = {
|
|
716
|
+
type: NoiseNodeType.noiseExponent,
|
|
717
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
718
|
+
data: {
|
|
719
|
+
title: "Noise Exponent",
|
|
720
|
+
exponent: 1
|
|
721
|
+
},
|
|
722
|
+
handles: [{
|
|
723
|
+
position: _xyflow_system.Position.Left,
|
|
724
|
+
dataType: NoiseHandleType.module,
|
|
725
|
+
connection: "target",
|
|
726
|
+
maxConnections: 1
|
|
727
|
+
}, {
|
|
728
|
+
position: _xyflow_system.Position.Right,
|
|
729
|
+
dataType: NoiseHandleType.module,
|
|
730
|
+
connection: "source"
|
|
731
|
+
}]
|
|
732
|
+
};
|
|
733
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
734
|
+
shouldRun(context) {
|
|
735
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
736
|
+
},
|
|
737
|
+
action(context) {
|
|
738
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
739
|
+
if (context.computed?.module) context.computed.module.exponent = context.data.exponent;
|
|
740
|
+
else if (module) context.computed = { module: new libnoise_simplex_ts.Exponent(module, context.data.exponent) };
|
|
741
|
+
},
|
|
742
|
+
cleanup(context) {
|
|
743
|
+
context.computed = null;
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/templates/modifiers/noise-invert-template.ts
|
|
750
|
+
var NoiseInvertNodeTemplateFactory = class {
|
|
751
|
+
template = {
|
|
752
|
+
type: NoiseNodeType.noiseInvert,
|
|
753
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
754
|
+
data: { title: "Invert Noise" },
|
|
755
|
+
handles: [{
|
|
756
|
+
position: _xyflow_system.Position.Left,
|
|
757
|
+
dataType: NoiseHandleType.module,
|
|
758
|
+
connection: "target",
|
|
759
|
+
maxConnections: 1
|
|
760
|
+
}, {
|
|
761
|
+
position: _xyflow_system.Position.Right,
|
|
762
|
+
dataType: NoiseHandleType.module,
|
|
763
|
+
connection: "source"
|
|
764
|
+
}]
|
|
765
|
+
};
|
|
766
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
767
|
+
shouldRun(context) {
|
|
768
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
769
|
+
},
|
|
770
|
+
action(context) {
|
|
771
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
772
|
+
if (context.computed?.module) context.computed.module.sourceModule = module;
|
|
773
|
+
else if (module) context.computed = { module: new libnoise_simplex_ts.Invert(module) };
|
|
774
|
+
},
|
|
775
|
+
cleanup(context) {
|
|
776
|
+
context.computed = null;
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region src/templates/modifiers/noise-normalize-template.ts
|
|
783
|
+
var NoiseNormalizeNodeTemplateFactory = class {
|
|
784
|
+
template = {
|
|
785
|
+
id: _awesome_flow_core_utils.IDGenerator.template(),
|
|
786
|
+
type: NoiseNodeType.noiseNormalize,
|
|
787
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
788
|
+
data: {
|
|
789
|
+
title: "Normalize Noise",
|
|
790
|
+
intervalStart: -1,
|
|
791
|
+
intervalEnd: 1
|
|
792
|
+
},
|
|
793
|
+
handles: [{
|
|
794
|
+
position: _xyflow_system.Position.Left,
|
|
795
|
+
dataType: NoiseHandleType.module,
|
|
796
|
+
connection: "target",
|
|
797
|
+
maxConnections: 1
|
|
798
|
+
}, {
|
|
799
|
+
position: _xyflow_system.Position.Right,
|
|
800
|
+
dataType: NoiseHandleType.module,
|
|
801
|
+
connection: "source"
|
|
802
|
+
}]
|
|
803
|
+
};
|
|
804
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
805
|
+
shouldRun(context) {
|
|
806
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
807
|
+
},
|
|
808
|
+
action(context) {
|
|
809
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
810
|
+
if (module) context.computed = { module: new require_modules_index.NormalizeNoiseModule(module, context.data.intervalStart, context.data.intervalEnd) };
|
|
811
|
+
},
|
|
812
|
+
cleanup(context) {
|
|
813
|
+
context.computed = null;
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/templates/modifiers/noise-scalebias-template.ts
|
|
820
|
+
var NoiseScaleBiasNodeTemplateFactory = class {
|
|
821
|
+
template = {
|
|
822
|
+
type: NoiseNodeType.noiseScaleBias,
|
|
823
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
824
|
+
data: {
|
|
825
|
+
title: "Scale/Bias Noise",
|
|
826
|
+
scale: 1,
|
|
827
|
+
bias: 0
|
|
828
|
+
},
|
|
829
|
+
handles: [{
|
|
830
|
+
position: _xyflow_system.Position.Left,
|
|
831
|
+
dataType: NoiseHandleType.module,
|
|
832
|
+
connection: "target",
|
|
833
|
+
maxConnections: 1
|
|
834
|
+
}, {
|
|
835
|
+
position: _xyflow_system.Position.Right,
|
|
836
|
+
dataType: NoiseHandleType.module,
|
|
837
|
+
connection: "source"
|
|
838
|
+
}]
|
|
839
|
+
};
|
|
840
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
841
|
+
shouldRun(context) {
|
|
842
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
843
|
+
},
|
|
844
|
+
action(context) {
|
|
845
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
846
|
+
if (context.computed?.module) {
|
|
847
|
+
context.computed.module.sourceModule = module;
|
|
848
|
+
context.computed.module.scale = context.data.scale;
|
|
849
|
+
context.computed.module.bias = context.data.bias;
|
|
850
|
+
} else if (module) context.computed = { module: new libnoise_simplex_ts.ScaleBias(module, context.data.scale, context.data.bias) };
|
|
851
|
+
},
|
|
852
|
+
cleanup(context) {
|
|
853
|
+
context.computed = null;
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region src/templates/modifiers/noise-terrace-template.ts
|
|
860
|
+
var NoiseTerraceNodeTemplateFactory = class {
|
|
861
|
+
template = {
|
|
862
|
+
type: NoiseNodeType.noiseTerrace,
|
|
863
|
+
group: NoiseTemplateGroup.noiseModifiers,
|
|
864
|
+
data: {
|
|
865
|
+
title: "Noise Terrace",
|
|
866
|
+
points: []
|
|
867
|
+
},
|
|
868
|
+
handles: [{
|
|
869
|
+
position: _xyflow_system.Position.Left,
|
|
870
|
+
dataType: NoiseHandleType.module,
|
|
871
|
+
connection: "target",
|
|
872
|
+
maxConnections: 1
|
|
873
|
+
}, {
|
|
874
|
+
position: _xyflow_system.Position.Right,
|
|
875
|
+
dataType: NoiseHandleType.module,
|
|
876
|
+
connection: "source"
|
|
877
|
+
}]
|
|
878
|
+
};
|
|
879
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
880
|
+
shouldRun(context) {
|
|
881
|
+
return !!context.incoming[NoiseHandleType.module];
|
|
882
|
+
},
|
|
883
|
+
action(context) {
|
|
884
|
+
const module = context.incoming[NoiseHandleType.module].computed?.module;
|
|
885
|
+
if (module) context.computed = { module: new libnoise_simplex_ts.Terrace(module, context.data.points) };
|
|
886
|
+
},
|
|
887
|
+
cleanup(context) {
|
|
888
|
+
context.computed = null;
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region src/templates/output/noise-logger-template.ts
|
|
895
|
+
var NoiseLoggerNodeTemplateFactory = class {
|
|
896
|
+
template = {
|
|
897
|
+
type: NoiseNodeType.noiseLogger,
|
|
898
|
+
group: NoiseTemplateGroup.output,
|
|
899
|
+
data: { title: "Noise Logger" },
|
|
900
|
+
handles: [{
|
|
901
|
+
position: _xyflow_system.Position.Left,
|
|
902
|
+
dataType: NoiseHandleType.noise,
|
|
903
|
+
connection: "target"
|
|
904
|
+
}]
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
//#endregion
|
|
909
|
+
//#region src/templates/output/noise-output-template.ts
|
|
910
|
+
var NoiseOutputNodeTemplateFactory = class {
|
|
911
|
+
template = {
|
|
912
|
+
type: NoiseNodeType.noiseOutput,
|
|
913
|
+
group: NoiseTemplateGroup.output,
|
|
914
|
+
data: { title: "Noise Output" },
|
|
915
|
+
handles: [
|
|
916
|
+
{
|
|
917
|
+
position: _xyflow_system.Position.Left,
|
|
918
|
+
dataType: NoiseHandleType.position,
|
|
919
|
+
connection: "target"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
position: _xyflow_system.Position.Left,
|
|
923
|
+
dataType: NoiseHandleType.module,
|
|
924
|
+
connection: "target",
|
|
925
|
+
maxConnections: 1
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
position: _xyflow_system.Position.Right,
|
|
929
|
+
dataType: NoiseHandleType.noise,
|
|
930
|
+
connection: "source"
|
|
931
|
+
}
|
|
932
|
+
]
|
|
933
|
+
};
|
|
934
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
935
|
+
action: (context) => {
|
|
936
|
+
const incomingPositions = context.incoming[NoiseHandleType.position];
|
|
937
|
+
const incomingModule = context.incoming[NoiseHandleType.module];
|
|
938
|
+
if (incomingPositions?.length && incomingModule?.computed?.module) {
|
|
939
|
+
const { module } = incomingModule.computed;
|
|
940
|
+
const noise = [];
|
|
941
|
+
for (const input of incomingPositions) {
|
|
942
|
+
const { positions } = input.computed;
|
|
943
|
+
for (const position of positions) {
|
|
944
|
+
const value = module.getValue(position.x, position.y, position.z);
|
|
945
|
+
noise.push({
|
|
946
|
+
position,
|
|
947
|
+
value
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
context.computed = { noise };
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
cleanup: (context) => {
|
|
955
|
+
context.computed = null;
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
//#endregion
|
|
961
|
+
//#region src/templates/output/noise-texture-data-template.ts
|
|
962
|
+
var NoiseTextureDataTemplateFactory = class {
|
|
963
|
+
template = {
|
|
964
|
+
type: NoiseNodeType.textureData,
|
|
965
|
+
group: NoiseTemplateGroup.output,
|
|
966
|
+
data: { title: "Texture Data" },
|
|
967
|
+
handles: [{
|
|
968
|
+
position: _xyflow_system.Position.Left,
|
|
969
|
+
dataType: NoiseHandleType.noise,
|
|
970
|
+
connection: "target",
|
|
971
|
+
maxConnections: 1
|
|
972
|
+
}, {
|
|
973
|
+
position: _xyflow_system.Position.Right,
|
|
974
|
+
dataType: NoiseHandleType.textureData,
|
|
975
|
+
connection: "source"
|
|
976
|
+
}]
|
|
977
|
+
};
|
|
978
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
979
|
+
shouldRun: (context) => {
|
|
980
|
+
return !!context.incoming[NoiseHandleType.noise]?.computed?.noise.length;
|
|
981
|
+
},
|
|
982
|
+
action: (context) => {
|
|
983
|
+
const noise = context.incoming[NoiseHandleType.noise]?.computed?.noise;
|
|
984
|
+
const size = Math.ceil(Math.sqrt(noise.length));
|
|
985
|
+
const colors = noise.flatMap((n) => [
|
|
986
|
+
n.value * 255,
|
|
987
|
+
n.value * 255,
|
|
988
|
+
n.value * 255,
|
|
989
|
+
255
|
|
990
|
+
]);
|
|
991
|
+
const dataArray = new Uint8Array(size * size * 4);
|
|
992
|
+
dataArray.set(colors);
|
|
993
|
+
context.computed = {
|
|
994
|
+
textureData: dataArray,
|
|
995
|
+
textureResolutionX: size,
|
|
996
|
+
textureResolutionY: size
|
|
997
|
+
};
|
|
998
|
+
},
|
|
999
|
+
cleanup: (context) => {
|
|
1000
|
+
context.computed = null;
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
//#endregion
|
|
1006
|
+
//#region src/templates/output/position-logger-template.ts
|
|
1007
|
+
var PositionLoggerNodeTemplateFactory = class {
|
|
1008
|
+
template = {
|
|
1009
|
+
type: NoiseNodeType.positionLogger,
|
|
1010
|
+
group: NoiseTemplateGroup.positions,
|
|
1011
|
+
data: { title: "Position Logger" },
|
|
1012
|
+
handles: [{
|
|
1013
|
+
position: _xyflow_system.Position.Left,
|
|
1014
|
+
dataType: NoiseHandleType.position,
|
|
1015
|
+
connection: "target"
|
|
1016
|
+
}]
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
//#endregion
|
|
1021
|
+
//#region src/templates/selectors/noise-blend-template.ts
|
|
1022
|
+
var NoiseBlendNodeTemplateFactory = class {
|
|
1023
|
+
template = {
|
|
1024
|
+
type: NoiseNodeType.noiseBlend,
|
|
1025
|
+
group: NoiseTemplateGroup.noiseSelectors,
|
|
1026
|
+
data: { title: "Noise Blend" },
|
|
1027
|
+
handles: [
|
|
1028
|
+
{
|
|
1029
|
+
position: _xyflow_system.Position.Left,
|
|
1030
|
+
dataType: NoiseHandleType.module,
|
|
1031
|
+
connection: "target",
|
|
1032
|
+
label: "Source Modules",
|
|
1033
|
+
dataId: NoiseSourceControlHandle.source,
|
|
1034
|
+
groupBy: "dataId",
|
|
1035
|
+
maxConnections: 2,
|
|
1036
|
+
minConnections: 2
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
position: _xyflow_system.Position.Left,
|
|
1040
|
+
dataType: NoiseHandleType.module,
|
|
1041
|
+
dataId: NoiseSourceControlHandle.control,
|
|
1042
|
+
groupBy: "dataId",
|
|
1043
|
+
connection: "target",
|
|
1044
|
+
label: "Control Module",
|
|
1045
|
+
maxConnections: 1
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
position: _xyflow_system.Position.Right,
|
|
1049
|
+
dataType: NoiseHandleType.module,
|
|
1050
|
+
dataId: NoiseSourceControlHandle.output,
|
|
1051
|
+
connection: "source"
|
|
1052
|
+
}
|
|
1053
|
+
]
|
|
1054
|
+
};
|
|
1055
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1056
|
+
shouldRun: (context) => {
|
|
1057
|
+
return context.incoming[NoiseSourceControlHandle.source]?.length === 2 && !!context.incoming[NoiseSourceControlHandle.control];
|
|
1058
|
+
},
|
|
1059
|
+
action: (context) => {
|
|
1060
|
+
const incomingSources = context.incoming[NoiseSourceControlHandle.source];
|
|
1061
|
+
const incomingControl = context.incoming[NoiseSourceControlHandle.control];
|
|
1062
|
+
if (context.computed?.module) {
|
|
1063
|
+
context.computed.module.controlModule = incomingControl.computed.module;
|
|
1064
|
+
context.computed.module.sourceModuleA = incomingSources[0].computed.module;
|
|
1065
|
+
context.computed.module.sourceModuleB = incomingSources[1].computed.module;
|
|
1066
|
+
} else context.computed = { module: new libnoise_simplex_ts.Blend(incomingSources[0].computed.module, incomingSources[1].computed.module, incomingControl.computed.module) };
|
|
1067
|
+
},
|
|
1068
|
+
cleanup: (context) => {
|
|
1069
|
+
context.computed = null;
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
//#endregion
|
|
1075
|
+
//#region src/templates/selectors/noise-select-template.ts
|
|
1076
|
+
var NoiseSelectNodeTemplateFactory = class {
|
|
1077
|
+
template = {
|
|
1078
|
+
type: NoiseNodeType.noiseSelect,
|
|
1079
|
+
group: NoiseTemplateGroup.noiseSelectors,
|
|
1080
|
+
data: {
|
|
1081
|
+
title: "Noise Select",
|
|
1082
|
+
edgeFalloff: 0,
|
|
1083
|
+
lowerBound: -1,
|
|
1084
|
+
upperBound: 1
|
|
1085
|
+
},
|
|
1086
|
+
handles: [
|
|
1087
|
+
{
|
|
1088
|
+
position: _xyflow_system.Position.Left,
|
|
1089
|
+
dataType: NoiseHandleType.module,
|
|
1090
|
+
dataId: NoiseSourceControlHandle.source,
|
|
1091
|
+
groupBy: "dataId",
|
|
1092
|
+
connection: "target",
|
|
1093
|
+
label: "Source Modules",
|
|
1094
|
+
maxConnections: 2,
|
|
1095
|
+
minConnections: 2
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
position: _xyflow_system.Position.Left,
|
|
1099
|
+
dataType: NoiseHandleType.module,
|
|
1100
|
+
dataId: NoiseSourceControlHandle.control,
|
|
1101
|
+
groupBy: "dataId",
|
|
1102
|
+
connection: "target",
|
|
1103
|
+
label: "Control Module",
|
|
1104
|
+
maxConnections: 1
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
position: _xyflow_system.Position.Right,
|
|
1108
|
+
dataType: NoiseHandleType.module,
|
|
1109
|
+
dataId: NoiseSourceControlHandle.output,
|
|
1110
|
+
connection: "source"
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
};
|
|
1114
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1115
|
+
shouldRun: (context) => {
|
|
1116
|
+
return context.incoming[NoiseSourceControlHandle.source]?.length === 2 && !!context.incoming[NoiseSourceControlHandle.control];
|
|
1117
|
+
},
|
|
1118
|
+
action: (context) => {
|
|
1119
|
+
const incomingSources = context.incoming[NoiseSourceControlHandle.source];
|
|
1120
|
+
const incomingControl = context.incoming[NoiseSourceControlHandle.control];
|
|
1121
|
+
if (context.computed?.module) {
|
|
1122
|
+
context.computed.module.controlModule = incomingControl.computed.module;
|
|
1123
|
+
context.computed.module.sourceModuleA = incomingSources[0].computed.module;
|
|
1124
|
+
context.computed.module.sourceModuleB = incomingSources[1].computed.module;
|
|
1125
|
+
context.computed.module.edgeFalloff = context.data.edgeFalloff;
|
|
1126
|
+
context.computed.module.lowerBound = context.data.lowerBound;
|
|
1127
|
+
context.computed.module.upperBound = context.data.upperBound;
|
|
1128
|
+
} else context.computed = { module: new libnoise_simplex_ts.Select(incomingSources[0].computed.module, incomingSources[1].computed.module, incomingControl.computed.module, context.data.edgeFalloff, context.data.lowerBound, context.data.upperBound) };
|
|
1129
|
+
},
|
|
1130
|
+
cleanup: (context) => {
|
|
1131
|
+
context.computed = null;
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
//#endregion
|
|
1137
|
+
//#region src/templates/transformers/noise-displace-template.ts
|
|
1138
|
+
var NoiseDisplaceNodeTemplateFactory = class {
|
|
1139
|
+
template = {
|
|
1140
|
+
type: NoiseNodeType.noiseDisplace,
|
|
1141
|
+
group: NoiseTemplateGroup.noiseTransformers,
|
|
1142
|
+
data: { title: "Noise Displace" },
|
|
1143
|
+
handles: [
|
|
1144
|
+
{
|
|
1145
|
+
position: _xyflow_system.Position.Left,
|
|
1146
|
+
connection: "target",
|
|
1147
|
+
label: "Source Module",
|
|
1148
|
+
dataType: NoiseHandleType.module,
|
|
1149
|
+
dataId: DisplacementHandle.sourceModule,
|
|
1150
|
+
groupBy: "dataId",
|
|
1151
|
+
maxConnections: 1
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
position: _xyflow_system.Position.Left,
|
|
1155
|
+
connection: "target",
|
|
1156
|
+
label: "X Module",
|
|
1157
|
+
dataType: NoiseHandleType.module,
|
|
1158
|
+
dataId: DisplacementHandle.xModule,
|
|
1159
|
+
groupBy: "dataId",
|
|
1160
|
+
maxConnections: 1
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
position: _xyflow_system.Position.Left,
|
|
1164
|
+
connection: "target",
|
|
1165
|
+
label: "Y Module",
|
|
1166
|
+
dataType: NoiseHandleType.module,
|
|
1167
|
+
dataId: DisplacementHandle.yModule,
|
|
1168
|
+
groupBy: "dataId",
|
|
1169
|
+
maxConnections: 1
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
position: _xyflow_system.Position.Left,
|
|
1173
|
+
connection: "target",
|
|
1174
|
+
label: "Z Module",
|
|
1175
|
+
dataType: NoiseHandleType.module,
|
|
1176
|
+
dataId: DisplacementHandle.zModule,
|
|
1177
|
+
groupBy: "dataId",
|
|
1178
|
+
maxConnections: 1
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
position: _xyflow_system.Position.Right,
|
|
1182
|
+
dataType: NoiseHandleType.module,
|
|
1183
|
+
dataId: DisplacementHandle.output,
|
|
1184
|
+
connection: "source"
|
|
1185
|
+
}
|
|
1186
|
+
]
|
|
1187
|
+
};
|
|
1188
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1189
|
+
shouldRun: (context) => {
|
|
1190
|
+
return !!context.incoming[DisplacementHandle.sourceModule]?.computed?.module && !!context.incoming[DisplacementHandle.xModule]?.computed?.module && !!context.incoming[DisplacementHandle.yModule]?.computed?.module && !!context.incoming[DisplacementHandle.zModule]?.computed?.module;
|
|
1191
|
+
},
|
|
1192
|
+
action: (context) => {
|
|
1193
|
+
const sourceModule = context.incoming[DisplacementHandle.sourceModule].computed.module;
|
|
1194
|
+
const xModule = context.incoming[DisplacementHandle.xModule].computed.module;
|
|
1195
|
+
const yModule = context.incoming[DisplacementHandle.yModule].computed.module;
|
|
1196
|
+
const zModule = context.incoming[DisplacementHandle.zModule].computed.module;
|
|
1197
|
+
const hasModules = !!sourceModule && !!xModule && !!yModule && !!zModule;
|
|
1198
|
+
if (context.computed?.module) {
|
|
1199
|
+
if (hasModules) {
|
|
1200
|
+
context.computed.module.sourceModule = sourceModule;
|
|
1201
|
+
context.computed.module.xModule = xModule;
|
|
1202
|
+
context.computed.module.yModule = yModule;
|
|
1203
|
+
context.computed.module.zModule = zModule;
|
|
1204
|
+
}
|
|
1205
|
+
} else context.computed = { module: new libnoise_simplex_ts.Displace(sourceModule, xModule, yModule, zModule) };
|
|
1206
|
+
},
|
|
1207
|
+
cleanup: (context) => {
|
|
1208
|
+
context.computed = null;
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
//#endregion
|
|
1214
|
+
//#region src/templates/transformers/noise-rotate-point-template.ts
|
|
1215
|
+
var NoiseRotatePointNodeTemplateFactory = class {
|
|
1216
|
+
template = {
|
|
1217
|
+
type: NoiseNodeType.noiseRotatePoint,
|
|
1218
|
+
group: NoiseTemplateGroup.noiseTransformers,
|
|
1219
|
+
data: {
|
|
1220
|
+
title: "Noise Rotate Point",
|
|
1221
|
+
xAngle: 0,
|
|
1222
|
+
yAngle: 0,
|
|
1223
|
+
zAngle: 0
|
|
1224
|
+
},
|
|
1225
|
+
handles: [{
|
|
1226
|
+
position: _xyflow_system.Position.Left,
|
|
1227
|
+
dataType: NoiseHandleType.module,
|
|
1228
|
+
connection: "target",
|
|
1229
|
+
label: "Source Module",
|
|
1230
|
+
maxConnections: 1
|
|
1231
|
+
}, {
|
|
1232
|
+
position: _xyflow_system.Position.Right,
|
|
1233
|
+
dataType: NoiseHandleType.module,
|
|
1234
|
+
connection: "source"
|
|
1235
|
+
}]
|
|
1236
|
+
};
|
|
1237
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1238
|
+
shouldRun: (context) => {
|
|
1239
|
+
return !!context.incoming[NoiseHandleType.module]?.computed?.module;
|
|
1240
|
+
},
|
|
1241
|
+
action: (context) => {
|
|
1242
|
+
const sourceModule = context.incoming[NoiseHandleType.module].computed.module;
|
|
1243
|
+
const { xAngle, yAngle, zAngle } = context.data;
|
|
1244
|
+
if (context.computed?.module) {
|
|
1245
|
+
context.computed.module.sourceModule = sourceModule;
|
|
1246
|
+
context.computed.module.xAngle = xAngle;
|
|
1247
|
+
context.computed.module.yAngle = yAngle;
|
|
1248
|
+
context.computed.module.zAngle = zAngle;
|
|
1249
|
+
} else context.computed = { module: new libnoise_simplex_ts.RotatePoint(sourceModule, xAngle, yAngle, zAngle) };
|
|
1250
|
+
},
|
|
1251
|
+
cleanup: (context) => {
|
|
1252
|
+
context.computed = null;
|
|
1253
|
+
}
|
|
1254
|
+
});
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region src/templates/transformers/noise-scale-point-template.ts
|
|
1259
|
+
var NoiseScalePointNodeTemplateFactory = class {
|
|
1260
|
+
template = {
|
|
1261
|
+
type: NoiseNodeType.noiseScalePoint,
|
|
1262
|
+
group: NoiseTemplateGroup.noiseTransformers,
|
|
1263
|
+
data: {
|
|
1264
|
+
title: "Noise Scale Point",
|
|
1265
|
+
xScale: 1,
|
|
1266
|
+
yScale: 1,
|
|
1267
|
+
zScale: 1
|
|
1268
|
+
},
|
|
1269
|
+
handles: [{
|
|
1270
|
+
position: _xyflow_system.Position.Left,
|
|
1271
|
+
dataType: NoiseHandleType.module,
|
|
1272
|
+
connection: "target",
|
|
1273
|
+
label: "Source Module",
|
|
1274
|
+
maxConnections: 1
|
|
1275
|
+
}, {
|
|
1276
|
+
position: _xyflow_system.Position.Right,
|
|
1277
|
+
dataType: NoiseHandleType.module,
|
|
1278
|
+
connection: "source"
|
|
1279
|
+
}]
|
|
1280
|
+
};
|
|
1281
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1282
|
+
shouldRun: (context) => {
|
|
1283
|
+
return !!context.incoming[NoiseHandleType.module]?.computed?.module;
|
|
1284
|
+
},
|
|
1285
|
+
action: (context) => {
|
|
1286
|
+
const sourceModule = context.incoming[NoiseHandleType.module].computed.module;
|
|
1287
|
+
const { xScale, yScale, zScale } = context.data;
|
|
1288
|
+
if (context.computed?.module) {
|
|
1289
|
+
context.computed.module.sourceModule = sourceModule;
|
|
1290
|
+
context.computed.module.xScale = xScale;
|
|
1291
|
+
context.computed.module.yScale = yScale;
|
|
1292
|
+
context.computed.module.zScale = zScale;
|
|
1293
|
+
} else context.computed = { module: new libnoise_simplex_ts.ScalePoint(sourceModule, xScale, yScale, zScale) };
|
|
1294
|
+
},
|
|
1295
|
+
cleanup: (context) => {
|
|
1296
|
+
context.computed = null;
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region src/templates/transformers/noise-translate-point-template.ts
|
|
1303
|
+
var NoiseTranslatePointNodeTemplateFactory = class {
|
|
1304
|
+
template = {
|
|
1305
|
+
type: NoiseNodeType.noiseTranslatePoint,
|
|
1306
|
+
group: NoiseTemplateGroup.noiseTransformers,
|
|
1307
|
+
data: {
|
|
1308
|
+
title: "Noise Translate Point",
|
|
1309
|
+
translateX: 0,
|
|
1310
|
+
translateY: 0,
|
|
1311
|
+
translateZ: 0
|
|
1312
|
+
},
|
|
1313
|
+
handles: [{
|
|
1314
|
+
position: _xyflow_system.Position.Left,
|
|
1315
|
+
dataType: NoiseHandleType.module,
|
|
1316
|
+
connection: "target",
|
|
1317
|
+
label: "Source Module",
|
|
1318
|
+
maxConnections: 1
|
|
1319
|
+
}, {
|
|
1320
|
+
position: _xyflow_system.Position.Right,
|
|
1321
|
+
dataType: NoiseHandleType.module,
|
|
1322
|
+
connection: "source"
|
|
1323
|
+
}]
|
|
1324
|
+
};
|
|
1325
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create({
|
|
1326
|
+
shouldRun: (context) => {
|
|
1327
|
+
return !!context.incoming[NoiseHandleType.module]?.computed?.module;
|
|
1328
|
+
},
|
|
1329
|
+
action: (context) => {
|
|
1330
|
+
const sourceModule = context.incoming[NoiseHandleType.module].computed.module;
|
|
1331
|
+
const { translateX, translateY, translateZ } = context.data;
|
|
1332
|
+
if (context.computed?.module) {
|
|
1333
|
+
context.computed.module.sourceModule = sourceModule;
|
|
1334
|
+
context.computed.module.translateX = translateX;
|
|
1335
|
+
context.computed.module.translateY = translateY;
|
|
1336
|
+
context.computed.module.translateZ = translateZ;
|
|
1337
|
+
} else context.computed = { module: new libnoise_simplex_ts.TranslatePoint(sourceModule, translateX, translateY, translateZ) };
|
|
1338
|
+
},
|
|
1339
|
+
cleanup: (context) => {
|
|
1340
|
+
context.computed = null;
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
};
|
|
1344
|
+
|
|
1345
|
+
//#endregion
|
|
1346
|
+
//#region src/templates/transformers/noise-turbulence-template.ts
|
|
1347
|
+
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
1348
|
+
template = {
|
|
1349
|
+
type: NoiseNodeType.noiseTurbulence,
|
|
1350
|
+
group: NoiseTemplateGroup.noiseTransformers,
|
|
1351
|
+
data: {
|
|
1352
|
+
title: "Noise Turbulence",
|
|
1353
|
+
frequency: 1,
|
|
1354
|
+
power: 1,
|
|
1355
|
+
roughness: 1,
|
|
1356
|
+
seed: 0
|
|
1357
|
+
},
|
|
1358
|
+
handles: [
|
|
1359
|
+
{
|
|
1360
|
+
position: _xyflow_system.Position.Left,
|
|
1361
|
+
dataType: NoiseHandleType.module,
|
|
1362
|
+
connection: "target",
|
|
1363
|
+
label: "Source Module",
|
|
1364
|
+
maxConnections: 1
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
position: _xyflow_system.Position.Left,
|
|
1368
|
+
dataType: _awesome_flow_core_abstract.CoreHandleType.variableProperty,
|
|
1369
|
+
label: "Variable Properties",
|
|
1370
|
+
connection: "target"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
position: _xyflow_system.Position.Right,
|
|
1374
|
+
dataType: NoiseHandleType.module,
|
|
1375
|
+
connection: "source"
|
|
1376
|
+
}
|
|
1377
|
+
]
|
|
1378
|
+
};
|
|
1379
|
+
pipeline = _awesome_flow_core_factories.PipelineFactory.create(new IncomingPropertyValueMiddleware(), {
|
|
1380
|
+
shouldRun: (context) => {
|
|
1381
|
+
return !!context.incoming[NoiseHandleType.module]?.computed?.module;
|
|
1382
|
+
},
|
|
1383
|
+
action: (context) => {
|
|
1384
|
+
const { properties } = context;
|
|
1385
|
+
const incoming = context.incoming[NoiseHandleType.module].computed.module;
|
|
1386
|
+
if (context.computed?.module) {
|
|
1387
|
+
context.computed.module.sourceModule = incoming;
|
|
1388
|
+
context.computed.module.frequency = properties.frequency;
|
|
1389
|
+
context.computed.module.power = properties.power;
|
|
1390
|
+
context.computed.module.roughness = properties.roughness;
|
|
1391
|
+
context.computed.module.seed = properties.seed;
|
|
1392
|
+
} else context.computed = { module: new libnoise_simplex_ts.Turbulence(incoming, properties.frequency, properties.power, properties.roughness, properties.seed) };
|
|
1393
|
+
},
|
|
1394
|
+
cleanup: (context) => {
|
|
1395
|
+
context.computed = null;
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
//#endregion
|
|
1401
|
+
//#region src/abstract/node-types.ts
|
|
1402
|
+
let NoiseNodeType = /* @__PURE__ */ function(NoiseNodeType) {
|
|
1403
|
+
NoiseNodeType["position"] = "position";
|
|
1404
|
+
NoiseNodeType["grid"] = "grid";
|
|
1405
|
+
NoiseNodeType["textureData"] = "texture-data";
|
|
1406
|
+
NoiseNodeType["groupModule"] = "group-module";
|
|
1407
|
+
NoiseNodeType["positionLogger"] = "position-logger";
|
|
1408
|
+
NoiseNodeType["noiseLogger"] = "noise-logger";
|
|
1409
|
+
NoiseNodeType["noiseOutput"] = "noise-output";
|
|
1410
|
+
NoiseNodeType["noiseConst"] = "noise-constant";
|
|
1411
|
+
NoiseNodeType["noiseBillow"] = "noise-billow";
|
|
1412
|
+
NoiseNodeType["noiseCheckerboard"] = "noise-checkerboard";
|
|
1413
|
+
NoiseNodeType["noiseNormalize"] = "noise-normalize";
|
|
1414
|
+
NoiseNodeType["noiseCylinders"] = "noise-cylinders";
|
|
1415
|
+
NoiseNodeType["noisePerlin"] = "noise-perlin";
|
|
1416
|
+
NoiseNodeType["noiseRidgedMulti"] = "noise-ridged-multi";
|
|
1417
|
+
NoiseNodeType["noiseSpheres"] = "noise-spheres";
|
|
1418
|
+
NoiseNodeType["noiseVoronoi"] = "noise-voronoi";
|
|
1419
|
+
NoiseNodeType["noiseCombine"] = "noise-combiner";
|
|
1420
|
+
NoiseNodeType["noiseClamp"] = "noise-clamp";
|
|
1421
|
+
NoiseNodeType["noiseAbs"] = "noise-abs";
|
|
1422
|
+
NoiseNodeType["noiseCurve"] = "noise-curve";
|
|
1423
|
+
NoiseNodeType["noiseExponent"] = "noise-exponent";
|
|
1424
|
+
NoiseNodeType["noiseInvert"] = "noise-invert";
|
|
1425
|
+
NoiseNodeType["noiseScaleBias"] = "noise-scale-bias";
|
|
1426
|
+
NoiseNodeType["noiseTerrace"] = "noise-terrace";
|
|
1427
|
+
NoiseNodeType["noiseBlend"] = "noise-blend";
|
|
1428
|
+
NoiseNodeType["noiseSelect"] = "noise-select";
|
|
1429
|
+
NoiseNodeType["noiseDisplace"] = "noise-displace";
|
|
1430
|
+
NoiseNodeType["noiseRotatePoint"] = "noise-rotate-point";
|
|
1431
|
+
NoiseNodeType["noiseScalePoint"] = "noise-scale-point";
|
|
1432
|
+
NoiseNodeType["noiseTranslatePoint"] = "noise-translate-point";
|
|
1433
|
+
NoiseNodeType["noiseTurbulence"] = "noise-turbulence";
|
|
1434
|
+
return NoiseNodeType;
|
|
1435
|
+
}({});
|
|
1436
|
+
const noiseNodeTypes = {
|
|
1437
|
+
[NoiseNodeType.groupModule]: require_groups.module_group_node_default,
|
|
1438
|
+
[NoiseNodeType.position]: require_generators.position_const_node_default,
|
|
1439
|
+
[NoiseNodeType.grid]: require_generators.position_grid_node_default,
|
|
1440
|
+
[NoiseNodeType.noiseOutput]: noise_output_node_default,
|
|
1441
|
+
[NoiseNodeType.textureData]: noise_texture_data_node_default,
|
|
1442
|
+
[NoiseNodeType.noiseLogger]: noise_logger_node_default,
|
|
1443
|
+
[NoiseNodeType.positionLogger]: positions_logger_node_default,
|
|
1444
|
+
[NoiseNodeType.noiseConst]: require_generators.noise_const_node_default,
|
|
1445
|
+
[NoiseNodeType.noiseBillow]: require_generators.noise_billow_node_default,
|
|
1446
|
+
[NoiseNodeType.noiseCheckerboard]: require_generators.noise_checkerboard_node_default,
|
|
1447
|
+
[NoiseNodeType.noiseCylinders]: require_generators.noise_cylinders_node_default,
|
|
1448
|
+
[NoiseNodeType.noisePerlin]: require_generators.noise_perlin_node_default,
|
|
1449
|
+
[NoiseNodeType.noiseRidgedMulti]: require_generators.noise_ridgedmulti_node_default,
|
|
1450
|
+
[NoiseNodeType.noiseSpheres]: require_generators.noise_spheres_node_default,
|
|
1451
|
+
[NoiseNodeType.noiseVoronoi]: require_generators.noise_voronoi_node_default,
|
|
1452
|
+
[NoiseNodeType.noiseCombine]: require_modifiers.noise_combine_node_default,
|
|
1453
|
+
[NoiseNodeType.noiseClamp]: require_modifiers.noise_clamp_node_default,
|
|
1454
|
+
[NoiseNodeType.noiseAbs]: require_modifiers.noise_abs_node_default,
|
|
1455
|
+
[NoiseNodeType.noiseNormalize]: require_modifiers.noise_normalize_node_default,
|
|
1456
|
+
[NoiseNodeType.noiseCurve]: require_modifiers.noise_curve_node_default,
|
|
1457
|
+
[NoiseNodeType.noiseExponent]: require_modifiers.noise_exponent_node_default,
|
|
1458
|
+
[NoiseNodeType.noiseInvert]: require_modifiers.noise_invert_node_default,
|
|
1459
|
+
[NoiseNodeType.noiseScaleBias]: require_modifiers.noise_scale_bias_node_default,
|
|
1460
|
+
[NoiseNodeType.noiseTerrace]: require_modifiers.noise_terrace_node_default,
|
|
1461
|
+
[NoiseNodeType.noiseBlend]: require_selectors.noise_blend_node_default,
|
|
1462
|
+
[NoiseNodeType.noiseSelect]: require_selectors.noise_select_node_default,
|
|
1463
|
+
[NoiseNodeType.noiseDisplace]: require_transformers.noise_displace_node_default,
|
|
1464
|
+
[NoiseNodeType.noiseRotatePoint]: require_transformers.noise_rotate_point_node_default,
|
|
1465
|
+
[NoiseNodeType.noiseScalePoint]: require_transformers.noise_scale_point_node_default,
|
|
1466
|
+
[NoiseNodeType.noiseTranslatePoint]: require_transformers.noise_translate_point_node_default,
|
|
1467
|
+
[NoiseNodeType.noiseTurbulence]: require_transformers.noise_turbulence_node_default
|
|
1468
|
+
};
|
|
1469
|
+
const noiseNodeTemplates = {
|
|
1470
|
+
[NoiseNodeType.noiseOutput]: new NoiseOutputNodeTemplateFactory(),
|
|
1471
|
+
[NoiseNodeType.noiseBillow]: new NoiseBillowNodeTemplateFactory(),
|
|
1472
|
+
[NoiseNodeType.noiseCheckerboard]: new NoiseCheckerboardNodeTemplateFactory(),
|
|
1473
|
+
[NoiseNodeType.noiseNormalize]: new NoiseNormalizeNodeTemplateFactory(),
|
|
1474
|
+
[NoiseNodeType.noiseLogger]: new NoiseLoggerNodeTemplateFactory(),
|
|
1475
|
+
[NoiseNodeType.noiseConst]: new NoiseConstNodeTemplateFactory(),
|
|
1476
|
+
[NoiseNodeType.position]: new PositionConstNodeTemplateFactory(),
|
|
1477
|
+
[NoiseNodeType.positionLogger]: new PositionLoggerNodeTemplateFactory(),
|
|
1478
|
+
[NoiseNodeType.grid]: new PositionGridNodeTemplateFactory(),
|
|
1479
|
+
[NoiseNodeType.textureData]: new NoiseTextureDataTemplateFactory(),
|
|
1480
|
+
[NoiseNodeType.noiseCylinders]: new NoiseCylindersNodeTemplateFactory(),
|
|
1481
|
+
[NoiseNodeType.noisePerlin]: new NoisePerlinNodeTemplateFactory(),
|
|
1482
|
+
[NoiseNodeType.noiseRidgedMulti]: new NoiseRidgedMultiNodeTemplateFactory(),
|
|
1483
|
+
[NoiseNodeType.noiseSpheres]: new NoiseSpheresNodeTemplateFactory(),
|
|
1484
|
+
[NoiseNodeType.noiseVoronoi]: new NoiseVoronoiNodeTemplateFactory(),
|
|
1485
|
+
[NoiseNodeType.noiseCombine]: new NoiseCombineNodeTemplateFactory(),
|
|
1486
|
+
[NoiseNodeType.noiseClamp]: new NoiseClampNodeTemplateFactory(),
|
|
1487
|
+
[NoiseNodeType.noiseAbs]: new NoiseAbsNodeTemplateFactory(),
|
|
1488
|
+
[NoiseNodeType.noiseCurve]: new NoiseCurveNodeTemplateFactory(),
|
|
1489
|
+
[NoiseNodeType.noiseExponent]: new NoiseExponentNodeTemplateFactory(),
|
|
1490
|
+
[NoiseNodeType.noiseInvert]: new NoiseInvertNodeTemplateFactory(),
|
|
1491
|
+
[NoiseNodeType.noiseScaleBias]: new NoiseScaleBiasNodeTemplateFactory(),
|
|
1492
|
+
[NoiseNodeType.noiseTerrace]: new NoiseTerraceNodeTemplateFactory(),
|
|
1493
|
+
[NoiseNodeType.noiseBlend]: new NoiseBlendNodeTemplateFactory(),
|
|
1494
|
+
[NoiseNodeType.noiseSelect]: new NoiseSelectNodeTemplateFactory(),
|
|
1495
|
+
[NoiseNodeType.noiseDisplace]: new NoiseDisplaceNodeTemplateFactory(),
|
|
1496
|
+
[NoiseNodeType.noiseRotatePoint]: new NoiseRotatePointNodeTemplateFactory(),
|
|
1497
|
+
[NoiseNodeType.noiseScalePoint]: new NoiseScalePointNodeTemplateFactory(),
|
|
1498
|
+
[NoiseNodeType.noiseTranslatePoint]: new NoiseTranslatePointNodeTemplateFactory(),
|
|
1499
|
+
[NoiseNodeType.noiseTurbulence]: new NoiseTurbulenceNodeTemplateFactory(),
|
|
1500
|
+
[NoiseNodeType.groupModule]: new ModuleGroupNodeTemplateFactory()
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
//#endregion
|
|
1504
|
+
Object.defineProperty(exports, 'DisplacementHandle', {
|
|
1505
|
+
enumerable: true,
|
|
1506
|
+
get: function () {
|
|
1507
|
+
return DisplacementHandle;
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
Object.defineProperty(exports, 'ModuleGroupNodeTemplateFactory', {
|
|
1511
|
+
enumerable: true,
|
|
1512
|
+
get: function () {
|
|
1513
|
+
return ModuleGroupNodeTemplateFactory;
|
|
1514
|
+
}
|
|
1515
|
+
});
|
|
1516
|
+
Object.defineProperty(exports, 'NoiseAbsNodeTemplateFactory', {
|
|
1517
|
+
enumerable: true,
|
|
1518
|
+
get: function () {
|
|
1519
|
+
return NoiseAbsNodeTemplateFactory;
|
|
1520
|
+
}
|
|
1521
|
+
});
|
|
1522
|
+
Object.defineProperty(exports, 'NoiseBillowNodeTemplateFactory', {
|
|
1523
|
+
enumerable: true,
|
|
1524
|
+
get: function () {
|
|
1525
|
+
return NoiseBillowNodeTemplateFactory;
|
|
1526
|
+
}
|
|
1527
|
+
});
|
|
1528
|
+
Object.defineProperty(exports, 'NoiseBlendNodeTemplateFactory', {
|
|
1529
|
+
enumerable: true,
|
|
1530
|
+
get: function () {
|
|
1531
|
+
return NoiseBlendNodeTemplateFactory;
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
Object.defineProperty(exports, 'NoiseCheckerboardNodeTemplateFactory', {
|
|
1535
|
+
enumerable: true,
|
|
1536
|
+
get: function () {
|
|
1537
|
+
return NoiseCheckerboardNodeTemplateFactory;
|
|
1538
|
+
}
|
|
1539
|
+
});
|
|
1540
|
+
Object.defineProperty(exports, 'NoiseClampNodeTemplateFactory', {
|
|
1541
|
+
enumerable: true,
|
|
1542
|
+
get: function () {
|
|
1543
|
+
return NoiseClampNodeTemplateFactory;
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
Object.defineProperty(exports, 'NoiseCombineNodeTemplateFactory', {
|
|
1547
|
+
enumerable: true,
|
|
1548
|
+
get: function () {
|
|
1549
|
+
return NoiseCombineNodeTemplateFactory;
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1552
|
+
Object.defineProperty(exports, 'NoiseCombineType', {
|
|
1553
|
+
enumerable: true,
|
|
1554
|
+
get: function () {
|
|
1555
|
+
return NoiseCombineType;
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
Object.defineProperty(exports, 'NoiseConstNodeTemplateFactory', {
|
|
1559
|
+
enumerable: true,
|
|
1560
|
+
get: function () {
|
|
1561
|
+
return NoiseConstNodeTemplateFactory;
|
|
1562
|
+
}
|
|
1563
|
+
});
|
|
1564
|
+
Object.defineProperty(exports, 'NoiseCurveNodeTemplateFactory', {
|
|
1565
|
+
enumerable: true,
|
|
1566
|
+
get: function () {
|
|
1567
|
+
return NoiseCurveNodeTemplateFactory;
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
Object.defineProperty(exports, 'NoiseCylindersNodeTemplateFactory', {
|
|
1571
|
+
enumerable: true,
|
|
1572
|
+
get: function () {
|
|
1573
|
+
return NoiseCylindersNodeTemplateFactory;
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
Object.defineProperty(exports, 'NoiseDisplaceNodeTemplateFactory', {
|
|
1577
|
+
enumerable: true,
|
|
1578
|
+
get: function () {
|
|
1579
|
+
return NoiseDisplaceNodeTemplateFactory;
|
|
1580
|
+
}
|
|
1581
|
+
});
|
|
1582
|
+
Object.defineProperty(exports, 'NoiseExponentNodeTemplateFactory', {
|
|
1583
|
+
enumerable: true,
|
|
1584
|
+
get: function () {
|
|
1585
|
+
return NoiseExponentNodeTemplateFactory;
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
Object.defineProperty(exports, 'NoiseHandleType', {
|
|
1589
|
+
enumerable: true,
|
|
1590
|
+
get: function () {
|
|
1591
|
+
return NoiseHandleType;
|
|
1592
|
+
}
|
|
1593
|
+
});
|
|
1594
|
+
Object.defineProperty(exports, 'NoiseInvertNodeTemplateFactory', {
|
|
1595
|
+
enumerable: true,
|
|
1596
|
+
get: function () {
|
|
1597
|
+
return NoiseInvertNodeTemplateFactory;
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
Object.defineProperty(exports, 'NoiseLoggerNodeTemplateFactory', {
|
|
1601
|
+
enumerable: true,
|
|
1602
|
+
get: function () {
|
|
1603
|
+
return NoiseLoggerNodeTemplateFactory;
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
Object.defineProperty(exports, 'NoiseNodeType', {
|
|
1607
|
+
enumerable: true,
|
|
1608
|
+
get: function () {
|
|
1609
|
+
return NoiseNodeType;
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
Object.defineProperty(exports, 'NoiseNormalizeNodeTemplateFactory', {
|
|
1613
|
+
enumerable: true,
|
|
1614
|
+
get: function () {
|
|
1615
|
+
return NoiseNormalizeNodeTemplateFactory;
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
Object.defineProperty(exports, 'NoiseOutputNodeTemplateFactory', {
|
|
1619
|
+
enumerable: true,
|
|
1620
|
+
get: function () {
|
|
1621
|
+
return NoiseOutputNodeTemplateFactory;
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
Object.defineProperty(exports, 'NoisePerlinNodeTemplateFactory', {
|
|
1625
|
+
enumerable: true,
|
|
1626
|
+
get: function () {
|
|
1627
|
+
return NoisePerlinNodeTemplateFactory;
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
Object.defineProperty(exports, 'NoiseRidgedMultiNodeTemplateFactory', {
|
|
1631
|
+
enumerable: true,
|
|
1632
|
+
get: function () {
|
|
1633
|
+
return NoiseRidgedMultiNodeTemplateFactory;
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
Object.defineProperty(exports, 'NoiseRotatePointNodeTemplateFactory', {
|
|
1637
|
+
enumerable: true,
|
|
1638
|
+
get: function () {
|
|
1639
|
+
return NoiseRotatePointNodeTemplateFactory;
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
Object.defineProperty(exports, 'NoiseScaleBiasNodeTemplateFactory', {
|
|
1643
|
+
enumerable: true,
|
|
1644
|
+
get: function () {
|
|
1645
|
+
return NoiseScaleBiasNodeTemplateFactory;
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
Object.defineProperty(exports, 'NoiseScalePointNodeTemplateFactory', {
|
|
1649
|
+
enumerable: true,
|
|
1650
|
+
get: function () {
|
|
1651
|
+
return NoiseScalePointNodeTemplateFactory;
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
Object.defineProperty(exports, 'NoiseSelectNodeTemplateFactory', {
|
|
1655
|
+
enumerable: true,
|
|
1656
|
+
get: function () {
|
|
1657
|
+
return NoiseSelectNodeTemplateFactory;
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
Object.defineProperty(exports, 'NoiseSourceControlHandle', {
|
|
1661
|
+
enumerable: true,
|
|
1662
|
+
get: function () {
|
|
1663
|
+
return NoiseSourceControlHandle;
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
Object.defineProperty(exports, 'NoiseSpheresNodeTemplateFactory', {
|
|
1667
|
+
enumerable: true,
|
|
1668
|
+
get: function () {
|
|
1669
|
+
return NoiseSpheresNodeTemplateFactory;
|
|
1670
|
+
}
|
|
1671
|
+
});
|
|
1672
|
+
Object.defineProperty(exports, 'NoiseTemplateGroup', {
|
|
1673
|
+
enumerable: true,
|
|
1674
|
+
get: function () {
|
|
1675
|
+
return NoiseTemplateGroup;
|
|
1676
|
+
}
|
|
1677
|
+
});
|
|
1678
|
+
Object.defineProperty(exports, 'NoiseTerraceNodeTemplateFactory', {
|
|
1679
|
+
enumerable: true,
|
|
1680
|
+
get: function () {
|
|
1681
|
+
return NoiseTerraceNodeTemplateFactory;
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
Object.defineProperty(exports, 'NoiseTextureDataTemplateFactory', {
|
|
1685
|
+
enumerable: true,
|
|
1686
|
+
get: function () {
|
|
1687
|
+
return NoiseTextureDataTemplateFactory;
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
Object.defineProperty(exports, 'NoiseTranslatePointNodeTemplateFactory', {
|
|
1691
|
+
enumerable: true,
|
|
1692
|
+
get: function () {
|
|
1693
|
+
return NoiseTranslatePointNodeTemplateFactory;
|
|
1694
|
+
}
|
|
1695
|
+
});
|
|
1696
|
+
Object.defineProperty(exports, 'NoiseTurbulenceNodeTemplateFactory', {
|
|
1697
|
+
enumerable: true,
|
|
1698
|
+
get: function () {
|
|
1699
|
+
return NoiseTurbulenceNodeTemplateFactory;
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
Object.defineProperty(exports, 'NoiseVoronoiNodeTemplateFactory', {
|
|
1703
|
+
enumerable: true,
|
|
1704
|
+
get: function () {
|
|
1705
|
+
return NoiseVoronoiNodeTemplateFactory;
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1708
|
+
Object.defineProperty(exports, 'PositionConstNodeTemplateFactory', {
|
|
1709
|
+
enumerable: true,
|
|
1710
|
+
get: function () {
|
|
1711
|
+
return PositionConstNodeTemplateFactory;
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1714
|
+
Object.defineProperty(exports, 'PositionGridNodeTemplateFactory', {
|
|
1715
|
+
enumerable: true,
|
|
1716
|
+
get: function () {
|
|
1717
|
+
return PositionGridNodeTemplateFactory;
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
Object.defineProperty(exports, 'PositionLoggerNodeTemplateFactory', {
|
|
1721
|
+
enumerable: true,
|
|
1722
|
+
get: function () {
|
|
1723
|
+
return PositionLoggerNodeTemplateFactory;
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
Object.defineProperty(exports, 'noiseCombineModuleMap', {
|
|
1727
|
+
enumerable: true,
|
|
1728
|
+
get: function () {
|
|
1729
|
+
return noiseCombineModuleMap;
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
Object.defineProperty(exports, 'noiseNodeTemplates', {
|
|
1733
|
+
enumerable: true,
|
|
1734
|
+
get: function () {
|
|
1735
|
+
return noiseNodeTemplates;
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
Object.defineProperty(exports, 'noiseNodeTypes', {
|
|
1739
|
+
enumerable: true,
|
|
1740
|
+
get: function () {
|
|
1741
|
+
return noiseNodeTypes;
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
Object.defineProperty(exports, 'noise_logger_node_default', {
|
|
1745
|
+
enumerable: true,
|
|
1746
|
+
get: function () {
|
|
1747
|
+
return noise_logger_node_default;
|
|
1748
|
+
}
|
|
1749
|
+
});
|
|
1750
|
+
Object.defineProperty(exports, 'noise_output_node_default', {
|
|
1751
|
+
enumerable: true,
|
|
1752
|
+
get: function () {
|
|
1753
|
+
return noise_output_node_default;
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
Object.defineProperty(exports, 'noise_texture_data_node_default', {
|
|
1757
|
+
enumerable: true,
|
|
1758
|
+
get: function () {
|
|
1759
|
+
return noise_texture_data_node_default;
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
Object.defineProperty(exports, 'positions_logger_node_default', {
|
|
1763
|
+
enumerable: true,
|
|
1764
|
+
get: function () {
|
|
1765
|
+
return positions_logger_node_default;
|
|
1766
|
+
}
|
|
1767
|
+
});
|
|
1768
|
+
//# sourceMappingURL=abstract-3knbwDkz.cjs.map
|