@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.
Files changed (264) hide show
  1. package/dist/abstract/index.cjs +7 -11
  2. package/dist/abstract/index.d.cts +4 -140
  3. package/dist/abstract/index.d.mts +4 -0
  4. package/dist/abstract/index.mjs +3 -0
  5. package/dist/abstract-3knbwDkz.cjs +1768 -0
  6. package/dist/abstract-3knbwDkz.cjs.map +1 -0
  7. package/dist/{abstract-Dhf_tSuO.js → abstract-DNmiw2MC.mjs} +562 -234
  8. package/dist/abstract-DNmiw2MC.mjs.map +1 -0
  9. package/dist/generators-BF_0y3pd.cjs +337 -0
  10. package/dist/generators-BF_0y3pd.cjs.map +1 -0
  11. package/dist/{generators-BzkwG_6g.js → generators-DSwgPqW2.mjs} +35 -110
  12. package/dist/generators-DSwgPqW2.mjs.map +1 -0
  13. package/dist/groups-BiuJL0DE.mjs +13 -0
  14. package/dist/groups-BiuJL0DE.mjs.map +1 -0
  15. package/dist/groups-DF2FTSBC.cjs +18 -0
  16. package/dist/groups-DF2FTSBC.cjs.map +1 -0
  17. package/dist/index-B09XEo3I.d.cts +496 -0
  18. package/dist/index-B09XEo3I.d.cts.map +1 -0
  19. package/dist/index-BGF1mgi8.d.mts +98 -0
  20. package/dist/index-BGF1mgi8.d.mts.map +1 -0
  21. package/dist/{modules/index.d.ts → index-BbHM1kxc.d.cts} +2 -4
  22. package/dist/index-BbHM1kxc.d.cts.map +1 -0
  23. package/dist/index-BgWB8f25.d.cts +53 -0
  24. package/dist/index-BgWB8f25.d.cts.map +1 -0
  25. package/dist/index-BhJiS2YS.d.mts +496 -0
  26. package/dist/index-BhJiS2YS.d.mts.map +1 -0
  27. package/dist/index-BwLhWefF.d.cts +43 -0
  28. package/dist/index-BwLhWefF.d.cts.map +1 -0
  29. package/dist/index-Bxg8IB-v.d.cts +26 -0
  30. package/dist/index-Bxg8IB-v.d.cts.map +1 -0
  31. package/dist/index-C0hF9uhX.d.mts +12 -0
  32. package/dist/index-C0hF9uhX.d.mts.map +1 -0
  33. package/dist/{index-C7MZeUpC.d.cts → index-CBvjQM3o.d.cts} +4 -2
  34. package/dist/index-CBvjQM3o.d.cts.map +1 -0
  35. package/dist/index-CDJdO0Cl.d.mts +11 -0
  36. package/dist/index-CDJdO0Cl.d.mts.map +1 -0
  37. package/dist/index-CiHIo5l6.d.cts +89 -0
  38. package/dist/index-CiHIo5l6.d.cts.map +1 -0
  39. package/dist/index-CkAu8Jje.d.mts +43 -0
  40. package/dist/index-CkAu8Jje.d.mts.map +1 -0
  41. package/dist/index-DQ5-4LVA.d.mts +26 -0
  42. package/dist/index-DQ5-4LVA.d.mts.map +1 -0
  43. package/dist/index-NvNXQIOG.d.mts +89 -0
  44. package/dist/index-NvNXQIOG.d.mts.map +1 -0
  45. package/dist/index-Rk69VHHb.d.cts +98 -0
  46. package/dist/index-Rk69VHHb.d.cts.map +1 -0
  47. package/dist/index-aAcFA6x8.d.mts +53 -0
  48. package/dist/index-aAcFA6x8.d.mts.map +1 -0
  49. package/dist/modifiers-BLV074OG.cjs +406 -0
  50. package/dist/modifiers-BLV074OG.cjs.map +1 -0
  51. package/dist/{modifiers-MSA4z6Gq.js → modifiers-I7YC0m3o.mjs} +72 -198
  52. package/dist/modifiers-I7YC0m3o.mjs.map +1 -0
  53. package/dist/module-group-template-CE4b0J24.d.cts +42 -0
  54. package/dist/module-group-template-CE4b0J24.d.cts.map +1 -0
  55. package/dist/module-group-template-D5doDEoa.d.mts +42 -0
  56. package/dist/module-group-template-D5doDEoa.d.mts.map +1 -0
  57. package/dist/modules/index.cjs +20 -2
  58. package/dist/modules/index.cjs.map +1 -0
  59. package/dist/modules/index.d.cts +2 -14
  60. package/dist/modules/index.d.mts +2 -0
  61. package/dist/{normalize-noise-module-CTxqByn9.js → modules/index.mjs} +1 -1
  62. package/dist/modules/index.mjs.map +1 -0
  63. package/dist/{node-props-CkXCceW9.d.ts → node-props-CoXzPLD6.d.cts} +11 -10
  64. package/dist/node-props-CoXzPLD6.d.cts.map +1 -0
  65. package/dist/{node-props-wMYPlIzZ.d.cts → node-props-GcUBDDY0.d.mts} +11 -10
  66. package/dist/node-props-GcUBDDY0.d.mts.map +1 -0
  67. package/dist/nodes/generators/index.cjs +2 -1
  68. package/dist/nodes/generators/index.d.cts +2 -3
  69. package/dist/nodes/generators/index.d.mts +2 -0
  70. package/dist/nodes/generators/{index.js → index.mjs} +1 -1
  71. package/dist/nodes/groups/index.cjs +2 -1
  72. package/dist/nodes/groups/index.d.cts +2 -2
  73. package/dist/nodes/groups/index.d.mts +2 -0
  74. package/dist/nodes/groups/index.mjs +3 -0
  75. package/dist/nodes/index.cjs +10 -9
  76. package/dist/nodes/index.d.cts +7 -9
  77. package/dist/nodes/index.d.mts +7 -0
  78. package/dist/nodes/index.mjs +8 -0
  79. package/dist/nodes/modifiers/index.cjs +2 -2
  80. package/dist/nodes/modifiers/index.d.cts +2 -3
  81. package/dist/nodes/modifiers/index.d.mts +2 -0
  82. package/dist/nodes/modifiers/index.mjs +3 -0
  83. package/dist/nodes/output/index.cjs +3 -7
  84. package/dist/nodes/output/index.d.cts +2 -2
  85. package/dist/nodes/output/index.d.mts +2 -0
  86. package/dist/nodes/output/index.mjs +3 -0
  87. package/dist/nodes/selectors/index.cjs +4 -8
  88. package/dist/nodes/selectors/index.d.cts +2 -3
  89. package/dist/nodes/selectors/index.d.mts +2 -0
  90. package/dist/nodes/selectors/index.mjs +3 -0
  91. package/dist/nodes/transformers/index.cjs +2 -1
  92. package/dist/nodes/transformers/index.d.cts +2 -3
  93. package/dist/nodes/transformers/index.d.mts +2 -0
  94. package/dist/nodes/transformers/index.mjs +3 -0
  95. package/dist/position-grid-template-Da_-z-NN.d.cts +79 -0
  96. package/dist/position-grid-template-Da_-z-NN.d.cts.map +1 -0
  97. package/dist/position-grid-template-FY_7BJcV.d.mts +79 -0
  98. package/dist/position-grid-template-FY_7BJcV.d.mts.map +1 -0
  99. package/dist/selectors-35pwVJ7Z.cjs +92 -0
  100. package/dist/selectors-35pwVJ7Z.cjs.map +1 -0
  101. package/dist/selectors-BHPJTidb.mjs +81 -0
  102. package/dist/selectors-BHPJTidb.mjs.map +1 -0
  103. package/dist/templates/generators/index.cjs +2 -7
  104. package/dist/templates/generators/index.d.cts +2 -4
  105. package/dist/templates/generators/index.d.mts +2 -0
  106. package/dist/templates/generators/index.mjs +3 -0
  107. package/dist/templates/groups/index.cjs +2 -7
  108. package/dist/templates/groups/index.d.cts +2 -3
  109. package/dist/templates/groups/index.d.mts +2 -0
  110. package/dist/templates/groups/index.mjs +3 -0
  111. package/dist/templates/index.cjs +9 -13
  112. package/dist/templates/index.d.cts +4 -14
  113. package/dist/templates/index.d.mts +4 -0
  114. package/dist/templates/index.mjs +9 -0
  115. package/dist/templates/modifiers/index.cjs +2 -7
  116. package/dist/templates/modifiers/index.d.cts +2 -4
  117. package/dist/templates/modifiers/index.d.mts +2 -0
  118. package/dist/templates/modifiers/index.mjs +3 -0
  119. package/dist/templates/output/index.cjs +3 -8
  120. package/dist/templates/output/index.d.cts +2 -3
  121. package/dist/templates/output/index.d.mts +2 -0
  122. package/dist/templates/output/index.mjs +3 -0
  123. package/dist/templates/selectors/index.cjs +2 -7
  124. package/dist/templates/selectors/index.d.cts +2 -4
  125. package/dist/templates/selectors/index.d.mts +2 -0
  126. package/dist/templates/selectors/index.mjs +3 -0
  127. package/dist/templates/transformers/index.cjs +2 -7
  128. package/dist/templates/transformers/index.d.cts +2 -4
  129. package/dist/templates/transformers/index.d.mts +2 -0
  130. package/dist/templates/transformers/index.mjs +3 -0
  131. package/dist/{transformers-Cpxm1ER8.js → transformers-D9B9IjR_.mjs} +11 -90
  132. package/dist/transformers-D9B9IjR_.mjs.map +1 -0
  133. package/dist/transformers-D9SfPky8.cjs +226 -0
  134. package/dist/transformers-D9SfPky8.cjs.map +1 -0
  135. package/package.json +26 -24
  136. package/dist/abstract/index.d.cts.map +0 -1
  137. package/dist/abstract/index.d.ts +0 -140
  138. package/dist/abstract/index.d.ts.map +0 -1
  139. package/dist/abstract/index.js +0 -8
  140. package/dist/abstract-Db8fFoLp.cjs +0 -1423
  141. package/dist/abstract-Db8fFoLp.cjs.map +0 -1
  142. package/dist/abstract-Dhf_tSuO.js.map +0 -1
  143. package/dist/chunk-CUT6urMc.cjs +0 -30
  144. package/dist/generators-BzkwG_6g.js.map +0 -1
  145. package/dist/generators-CEKtVh81.cjs +0 -0
  146. package/dist/generators-D3RjZdMN.cjs +0 -413
  147. package/dist/generators-D3RjZdMN.cjs.map +0 -1
  148. package/dist/generators-DUbGjGwn.js +0 -0
  149. package/dist/groups-7QhtZ7S3.js +0 -0
  150. package/dist/groups-BIS2AF5M.cjs +0 -32
  151. package/dist/groups-BIS2AF5M.cjs.map +0 -1
  152. package/dist/groups-CH_lk8Aw.js +0 -26
  153. package/dist/groups-CH_lk8Aw.js.map +0 -1
  154. package/dist/groups-_x04PMtP.cjs +0 -0
  155. package/dist/index-0fK2DhR9.d.ts +0 -96
  156. package/dist/index-0fK2DhR9.d.ts.map +0 -1
  157. package/dist/index-B5F3AfVc.d.ts +0 -1
  158. package/dist/index-BAvw94zl.d.ts +0 -9
  159. package/dist/index-BAvw94zl.d.ts.map +0 -1
  160. package/dist/index-BLREDRDJ.d.cts +0 -1
  161. package/dist/index-BQGb02a-.d.cts +0 -1
  162. package/dist/index-BQbubdsk.d.ts +0 -89
  163. package/dist/index-BQbubdsk.d.ts.map +0 -1
  164. package/dist/index-Be7jjS77.d.ts +0 -1
  165. package/dist/index-BlgxGbc0.d.cts +0 -89
  166. package/dist/index-BlgxGbc0.d.cts.map +0 -1
  167. package/dist/index-C7MZeUpC.d.cts.map +0 -1
  168. package/dist/index-CLcwj8U0.d.ts +0 -1
  169. package/dist/index-CUPkUUOR.d.ts +0 -1
  170. package/dist/index-CnAUb7AL.d.cts +0 -24
  171. package/dist/index-CnAUb7AL.d.cts.map +0 -1
  172. package/dist/index-CtCMUyZA.d.cts +0 -1
  173. package/dist/index-DAwMsCZ3.d.ts +0 -1
  174. package/dist/index-DHdW2oFJ.d.ts +0 -51
  175. package/dist/index-DHdW2oFJ.d.ts.map +0 -1
  176. package/dist/index-DOvrmvAP.d.cts +0 -1
  177. package/dist/index-Dh6J9gb5.d.cts +0 -1
  178. package/dist/index-DiHZ0kDx.d.ts +0 -41
  179. package/dist/index-DiHZ0kDx.d.ts.map +0 -1
  180. package/dist/index-DjNzlSLZ.d.cts +0 -41
  181. package/dist/index-DjNzlSLZ.d.cts.map +0 -1
  182. package/dist/index-Dpmi5zcN.d.cts +0 -1
  183. package/dist/index-DtihvA2Y.d.cts +0 -96
  184. package/dist/index-DtihvA2Y.d.cts.map +0 -1
  185. package/dist/index-I2m6W13H.d.ts +0 -1
  186. package/dist/index-QAtBiMxG.d.cts +0 -1
  187. package/dist/index-kr8Wk7v5.d.ts +0 -1
  188. package/dist/index-nJ2Hzacu.d.ts +0 -24
  189. package/dist/index-nJ2Hzacu.d.ts.map +0 -1
  190. package/dist/index-p2iXZqXH.d.cts +0 -51
  191. package/dist/index-p2iXZqXH.d.cts.map +0 -1
  192. package/dist/modifiers-BFuezug6.js +0 -0
  193. package/dist/modifiers-BPTSn-15.cjs +0 -0
  194. package/dist/modifiers-DU7AkD-K.cjs +0 -545
  195. package/dist/modifiers-DU7AkD-K.cjs.map +0 -1
  196. package/dist/modifiers-MSA4z6Gq.js.map +0 -1
  197. package/dist/module-group-template-8oC4dg0a.d.ts +0 -11
  198. package/dist/module-group-template-8oC4dg0a.d.ts.map +0 -1
  199. package/dist/module-group-template-CBWW-oGM.d.cts +0 -11
  200. package/dist/module-group-template-CBWW-oGM.d.cts.map +0 -1
  201. package/dist/modules/index.d.cts.map +0 -1
  202. package/dist/modules/index.d.ts.map +0 -1
  203. package/dist/modules/index.js +0 -3
  204. package/dist/node-props-CkXCceW9.d.ts.map +0 -1
  205. package/dist/node-props-wMYPlIzZ.d.cts.map +0 -1
  206. package/dist/nodes/generators/index.d.ts +0 -3
  207. package/dist/nodes/groups/index.d.ts +0 -2
  208. package/dist/nodes/groups/index.js +0 -3
  209. package/dist/nodes/index.d.ts +0 -9
  210. package/dist/nodes/index.js +0 -8
  211. package/dist/nodes/modifiers/index.d.ts +0 -3
  212. package/dist/nodes/modifiers/index.js +0 -4
  213. package/dist/nodes/output/index.d.ts +0 -2
  214. package/dist/nodes/output/index.js +0 -8
  215. package/dist/nodes/selectors/index.d.ts +0 -3
  216. package/dist/nodes/selectors/index.js +0 -8
  217. package/dist/nodes/transformers/index.d.ts +0 -3
  218. package/dist/nodes/transformers/index.js +0 -3
  219. package/dist/noise-select-template-DySK_9N4.d.ts +0 -18
  220. package/dist/noise-select-template-DySK_9N4.d.ts.map +0 -1
  221. package/dist/noise-select-template-NyFIrMMB.d.cts +0 -18
  222. package/dist/noise-select-template-NyFIrMMB.d.cts.map +0 -1
  223. package/dist/noise-terrace-template-00K3BKMq.d.ts +0 -60
  224. package/dist/noise-terrace-template-00K3BKMq.d.ts.map +0 -1
  225. package/dist/noise-terrace-template-9_PoAyoY.d.cts +0 -60
  226. package/dist/noise-terrace-template-9_PoAyoY.d.cts.map +0 -1
  227. package/dist/noise-turbulence-template-CMhGn5Ja.d.cts +0 -63
  228. package/dist/noise-turbulence-template-CMhGn5Ja.d.cts.map +0 -1
  229. package/dist/noise-turbulence-template-Xv-hmmfh.d.ts +0 -63
  230. package/dist/noise-turbulence-template-Xv-hmmfh.d.ts.map +0 -1
  231. package/dist/normalize-noise-module-CTxqByn9.js.map +0 -1
  232. package/dist/normalize-noise-module-U3fMmZRj.cjs +0 -26
  233. package/dist/normalize-noise-module-U3fMmZRj.cjs.map +0 -1
  234. package/dist/output-CsgQ-PfN.js +0 -0
  235. package/dist/output-DhHW36T8.cjs +0 -0
  236. package/dist/position-grid-template-2Acjbquv.d.ts +0 -66
  237. package/dist/position-grid-template-2Acjbquv.d.ts.map +0 -1
  238. package/dist/position-grid-template-DWH5cUR0.d.cts +0 -66
  239. package/dist/position-grid-template-DWH5cUR0.d.cts.map +0 -1
  240. package/dist/position-logger-template-CvH32Xjm.d.ts +0 -29
  241. package/dist/position-logger-template-CvH32Xjm.d.ts.map +0 -1
  242. package/dist/position-logger-template-DPBhlahQ.d.cts +0 -29
  243. package/dist/position-logger-template-DPBhlahQ.d.cts.map +0 -1
  244. package/dist/selectors-DOtoPc8O.cjs +0 -0
  245. package/dist/selectors-DPitHA56.js +0 -0
  246. package/dist/templates/generators/index.d.ts +0 -4
  247. package/dist/templates/generators/index.js +0 -9
  248. package/dist/templates/groups/index.d.ts +0 -3
  249. package/dist/templates/groups/index.js +0 -9
  250. package/dist/templates/index.d.ts +0 -14
  251. package/dist/templates/index.js +0 -14
  252. package/dist/templates/modifiers/index.d.ts +0 -4
  253. package/dist/templates/modifiers/index.js +0 -9
  254. package/dist/templates/output/index.d.ts +0 -3
  255. package/dist/templates/output/index.js +0 -9
  256. package/dist/templates/selectors/index.d.ts +0 -4
  257. package/dist/templates/selectors/index.js +0 -9
  258. package/dist/templates/transformers/index.d.ts +0 -4
  259. package/dist/templates/transformers/index.js +0 -9
  260. package/dist/transformers-C-NV_u9j.cjs +0 -324
  261. package/dist/transformers-C-NV_u9j.cjs.map +0 -1
  262. package/dist/transformers-CbfR4wDy.js +0 -0
  263. package/dist/transformers-Cpxm1ER8.js.map +0 -1
  264. package/dist/transformers-iRDXBonP.cjs +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract-DNmiw2MC.mjs","names":["ModuleGroupNode","PositionConstNode","PositionGridNode","NoiseOutputNode","NoiseTextureDataNode","NoiseLoggerNode","PositionsLoggerNode","NoiseConstNode","NoiseBillowNode","NoiseCheckerboardNode","NoiseCylindersNode","NoisePerlinNode","NoiseRidgedMultiNode","NoiseSpheresNode","NoiseVoronoiNode","NoiseCombineNode","NoiseClampNode","NoiseAbsNode","NoiseNormalizeNode","NoiseCurveNode","NoiseExponentNode","NoiseInvertNode","NoiseScaleBiasNode","NoiseTerraceNode","NoiseBlendNode","NoiseSelectNode","NoiseDisplaceNode","NoiseRotatePointNode","NoiseScalePointNode","NoiseTranslatePointNode","NoiseTurbulenceNode"],"sources":["../src/abstract/handle-types.ts","../src/nodes/output/noise-logger-node.tsx","../src/nodes/output/noise-output-node.tsx","../src/nodes/output/noise-texture-data-node.tsx","../src/nodes/output/positions-logger-node.tsx","../src/abstract/templates.ts","../src/middleware/incoming-property-value.ts","../src/templates/generators/noise-billow-template.ts","../src/templates/generators/noise-checkerboard-template.ts","../src/templates/generators/noise-const-template.ts","../src/templates/generators/noise-cylinders-template.ts","../src/templates/generators/noise-perlin-template.ts","../src/templates/generators/noise-ridgedmulti-template.ts","../src/templates/generators/noise-spheres-template.ts","../src/templates/generators/noise-voronoi-template.ts","../src/templates/generators/position-const-template.ts","../src/templates/generators/position-grid-template.ts","../src/templates/groups/module-group-template.ts","../src/templates/modifiers/noise-abs-template.ts","../src/templates/modifiers/noise-clamp-template.ts","../src/abstract/operations.ts","../src/templates/modifiers/noise-combine-template.ts","../src/templates/modifiers/noise-curve-template.ts","../src/templates/modifiers/noise-exponent-template.ts","../src/templates/modifiers/noise-invert-template.ts","../src/templates/modifiers/noise-normalize-template.ts","../src/templates/modifiers/noise-scalebias-template.ts","../src/templates/modifiers/noise-terrace-template.ts","../src/templates/output/noise-logger-template.ts","../src/templates/output/noise-output-template.ts","../src/templates/output/noise-texture-data-template.ts","../src/templates/output/position-logger-template.ts","../src/templates/selectors/noise-blend-template.ts","../src/templates/selectors/noise-select-template.ts","../src/templates/transformers/noise-displace-template.ts","../src/templates/transformers/noise-rotate-point-template.ts","../src/templates/transformers/noise-scale-point-template.ts","../src/templates/transformers/noise-translate-point-template.ts","../src/templates/transformers/noise-turbulence-template.ts","../src/abstract/node-types.ts"],"sourcesContent":["import { CustomNodeHandle } from '@awesome-flow/core/abstract';\r\n\r\nexport enum NoiseHandleType {\r\n textureData = 'texture-data',\r\n noise = 'noise',\r\n position = 'position',\r\n module = 'module'\r\n}\r\n\r\nexport enum DisplacementHandle {\r\n sourceModule = 'source',\r\n xModule = 'x-module',\r\n yModule = 'y-module',\r\n zModule = 'z-module',\r\n output = 'output'\r\n}\r\n\r\nexport enum NoiseSourceControlHandle {\r\n source = 'source',\r\n control = 'control',\r\n output = 'output'\r\n}\r\n\r\nexport type DisplacementModuleHandle = CustomNodeHandle & {\r\n dataId: DisplacementHandle;\r\n};\r\n\r\nexport type NoiseSourceControlModuleHandle = CustomNodeHandle & {\r\n dataId: NoiseSourceControlHandle;\r\n};\r\n","import { BasicNodeData } from '@awesome-flow/core/abstract';\r\nimport { useNodeContext } from '@awesome-flow/core/hooks';\r\nimport { NodeContainer } from '@awesome-flow/core/layout';\r\nimport { Divider, Stack, Text } from '@mantine/core';\r\nimport { Node, NodeProps } from '@xyflow/react';\r\nimport { memo } from 'react';\r\nimport { NoiseHandleType } from '../../abstract';\r\nimport { NoiseLoggerContext } from '../../templates';\r\n\r\nfunction NoiseLoggerNode({ id, selected, data, type }: NodeProps<Node<BasicNodeData>>) {\r\n const context = useNodeContext<NoiseLoggerContext>(id)?.incoming?.[NoiseHandleType.noise];\r\n const noise = context?.filter((c) => c.computed?.noise).flatMap((c) => c.computed.noise) || [];\r\n\r\n return (\r\n <NodeContainer id={id} selected={selected} data={data} type={type}>\r\n <Text>Size: {noise?.length || 0}</Text>\r\n <Divider h={5} />\r\n <Stack>\r\n {noise?.map((v, i) => (\r\n <Text key={i}>\r\n {v.position?.x}:{v.position?.y}:{v.position?.z}: {v.value}\r\n </Text>\r\n ))}\r\n </Stack>\r\n </NodeContainer>\r\n );\r\n}\r\n\r\nexport default memo(NoiseLoggerNode);\r\n","import { BasicNodeData } from '@awesome-flow/core/abstract';\r\nimport { HandlesIncomingDataStatus } from '@awesome-flow/core/components';\r\nimport { useNodeContext } from '@awesome-flow/core/hooks';\r\nimport { NodeContainer } from '@awesome-flow/core/layout';\r\nimport { NoiseOutputContext } from '@awesome-flow/noise/templates';\r\nimport { Text } from '@mantine/core';\r\nimport { Node, NodeProps } from '@xyflow/react';\r\nimport { memo } from 'react';\r\n\r\nfunction NoiseOutputNode({ id, selected, data, type }: NodeProps<Node<BasicNodeData>>) {\r\n const context = useNodeContext<NoiseOutputContext>(id);\r\n\r\n return (\r\n <NodeContainer id={id} selected={selected} data={data} type={type}>\r\n <HandlesIncomingDataStatus nodeId={id} handles={data.handles} />\r\n <Text mt={5}>Noise points: {context?.computed?.noise?.length || 0}</Text>\r\n </NodeContainer>\r\n );\r\n}\r\n\r\nexport default memo(NoiseOutputNode);\r\n","import { BasicNodeData } from '@awesome-flow/core/abstract';\r\nimport { useNodeContext } from '@awesome-flow/core/hooks';\r\nimport { NodeContainer } from '@awesome-flow/core/layout';\r\nimport { NoiseTextureDataContext } from '@awesome-flow/noise/templates';\r\nimport { Group, Stack } from '@mantine/core';\r\nimport { Node, NodeProps } from '@xyflow/react';\r\nimport { memo } from 'react';\r\n\r\nfunction NoiseTextureDataNode({ id, selected, data, type }: NodeProps<Node<BasicNodeData>>) {\r\n const context = useNodeContext<NoiseTextureDataContext>(id)?.computed;\r\n\r\n return (\r\n <NodeContainer id={id} selected={selected} data={data} type={type}>\r\n <Stack>\r\n <Group>\r\n Resolution: {context?.textureResolutionX}x{context?.textureResolutionY}\r\n </Group>\r\n <Group>Input Length: {context?.textureData?.length || 0}</Group>\r\n <Group>\r\n Output Length ({context?.textureResolutionX}*{context?.textureResolutionY}*4): {context?.textureData?.length || 0}\r\n </Group>\r\n </Stack>\r\n </NodeContainer>\r\n );\r\n}\r\n\r\nexport default memo(NoiseTextureDataNode);\r\n","import { BasicNodeData } from '@awesome-flow/core/abstract';\r\nimport { useNodeContext } from '@awesome-flow/core/hooks';\r\nimport { NodeContainer } from '@awesome-flow/core/layout';\r\nimport { Divider, Stack, Text } from '@mantine/core';\r\nimport { Node, NodeProps } from '@xyflow/react';\r\nimport { memo } from 'react';\r\nimport { NoiseHandleType } from '../../abstract';\r\nimport { PositionLoggerNodeContext } from '../../templates';\r\n\r\nfunction PositionsLoggerNode({ id, selected, data, type }: NodeProps<Node<BasicNodeData>>) {\r\n const incoming = useNodeContext<PositionLoggerNodeContext>(id)?.incoming[NoiseHandleType.position];\r\n const positions = incoming\r\n ?.filter((p) => !!p.computed?.positions?.length)\r\n .flatMap((p) => p.computed.positions);\r\n\r\n return (\r\n <NodeContainer id={id} selected={selected} data={data} type={type}>\r\n <Text>Size: {positions?.length || 0}</Text>\r\n <Divider h={5} />\r\n <Stack>\r\n {positions?.map((v, i) => (\r\n <Text key={i}>\r\n {v.x}:{v.y}:{v.z}\r\n </Text>\r\n ))}\r\n </Stack>\r\n </NodeContainer>\r\n );\r\n}\r\n\r\nexport default memo(PositionsLoggerNode);\r\n","export enum NoiseTemplateGroup {\n positions = 'Positions',\n output = 'Output',\n noiseGenerators = 'Noise Generators',\n noiseModifiers = 'Noise Modifiers',\n noiseSelectors = 'Noise Selectors',\n noiseTransformers = 'Noise Transformers'\n}\n","import { IMiddleware } from '@awesome-ecs/abstract/pipelines';\r\nimport { CoreHandleType } from '@awesome-flow/core/abstract';\r\nimport { NoiseGeneratorContext } from '../abstract/node-props';\r\n\r\nexport class IncomingPropertyValueMiddleware implements IMiddleware<NoiseGeneratorContext<any>> {\r\n action(context: NoiseGeneratorContext<any>): void {\r\n const incoming = context.incoming?.[CoreHandleType.variableProperty] ?? [];\r\n\r\n const properties = { ...context.data };\r\n\r\n for (const connection of incoming) {\r\n const overwrite = connection.computed;\r\n\r\n if (overwrite) {\r\n Object.assign(properties, { [overwrite.property]: overwrite.value });\r\n }\r\n }\r\n\r\n context.properties = properties;\r\n }\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { IDGenerator } from '@awesome-flow/core/utils';\r\nimport { Position } from '@xyflow/system';\r\nimport { Billow } from 'libnoise-simplex-ts';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NodeFBMNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseTemplateGroup } from '../../abstract/templates';\r\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\r\n\r\nexport type NoiseBillowContext = NoiseGeneratorContext<NodeFBMNoiseData>;\r\n\r\nexport class NoiseBillowNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeFBMNoiseData> = {\r\n id: IDGenerator.template(),\r\n type: NoiseNodeType.noiseBillow,\r\n group: NoiseTemplateGroup.noiseGenerators,\r\n data: {\r\n title: 'Billow Noise',\r\n frequency: 0.1,\r\n lacunarity: 2.0,\r\n octaves: 5,\r\n persistence: 0.5,\r\n seed: 0\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: CoreHandleType.variableProperty,\r\n connection: 'target'\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseBillowContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\r\n action: (context: NoiseBillowContext) => {\r\n const { properties } = context;\r\n\r\n context.computed = {\r\n module: new Billow(\r\n properties.frequency,\r\n properties.lacunarity,\r\n properties.octaves,\r\n properties.persistence,\r\n properties.seed\r\n )\r\n };\r\n },\r\n cleanup: (context: NoiseBillowContext) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { ComputedModuleData } from '@awesome-flow/noise/abstract';\r\nimport { Position } from '@xyflow/system';\r\nimport { Checkerboard } from 'libnoise-simplex-ts';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseTemplateGroup } from '../../abstract/templates';\r\n\r\nexport type NoiseCheckerboardContext = NodeContext<BasicNodeData, ComputedModuleData>;\r\n\r\nexport class NoiseCheckerboardNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseCheckerboard,\r\n group: NoiseTemplateGroup.noiseGenerators,\r\n data: {\r\n title: 'Checkerboard Noise'\r\n },\r\n handles: [\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseCheckerboardContext> = PipelineFactory.create({\r\n action: (context: NoiseCheckerboardContext) => {\r\n context.computed = {\r\n module: new Checkerboard()\r\n };\r\n },\r\n cleanup: (context: NoiseCheckerboardContext) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Const } from 'libnoise-simplex-ts';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeConstNoiseData } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseTemplateGroup } from '../../abstract/templates';\r\n\r\nexport type NoiseConstContext = NodeContext<NodeConstNoiseData, ComputedModuleData>;\r\n\r\nexport class NoiseConstNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeConstNoiseData> = {\r\n type: NoiseNodeType.noiseConst,\r\n group: NoiseTemplateGroup.noiseGenerators,\r\n data: {\r\n title: 'Const Value Noise',\r\n noise: 0,\r\n min: -1,\r\n max: 1\r\n },\r\n handles: [\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseConstContext> = PipelineFactory.create<NoiseConstContext>({\r\n shouldRun(context: NoiseConstContext) {\r\n return context.data.noise !== undefined && context.data.noise !== null;\r\n },\r\n action(context: NoiseConstContext) {\r\n const module = new Const(context.data.noise);\r\n context.computed = { module };\r\n },\r\n\t\tcleanup(context: NoiseConstContext) {\r\n\t\t\tcontext.computed = null;\r\n\t\t}\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { Cylinders } from 'libnoise-simplex-ts';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport { NodeCylindersNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { NoiseTemplateGroup } from '../../abstract/templates';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoiseCylindersContext = NoiseGeneratorContext<NodeCylindersNoiseData>;\n\nexport class NoiseCylindersNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeCylindersNoiseData> = {\n type: NoiseNodeType.noiseCylinders,\n group: NoiseTemplateGroup.noiseGenerators,\n data: {\n title: 'Cylinders Noise',\n frequency: 0.1\n },\n handles: [\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline?: IPipeline<NoiseCylindersContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n action: (context: NoiseCylindersContext) => {\n const { properties } = context;\n context.computed = {\n module: new Cylinders(properties.frequency)\n };\n },\n cleanup: (context: NoiseCylindersContext) => {\n context.computed = null;\n }\n });\n}\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { Perlin } from 'libnoise-simplex-ts';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport { NodeFBMNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { NoiseTemplateGroup } from '../../abstract/templates';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoisePerlinContext = NoiseGeneratorContext<NodeFBMNoiseData>;\n\nexport class NoisePerlinNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeFBMNoiseData> = {\n type: NoiseNodeType.noisePerlin,\n group: NoiseTemplateGroup.noiseGenerators,\n data: {\n title: 'Perlin Noise',\n frequency: 0.1,\n lacunarity: 2.0,\n octaves: 5,\n persistence: 0.5,\n seed: 0\n },\n handles: [\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline?: IPipeline<NoisePerlinContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n action: (context: NoisePerlinContext) => {\n const { properties } = context;\n context.computed = {\n module: new Perlin(\n properties.frequency,\n properties.lacunarity,\n properties.octaves,\n properties.persistence,\n properties.seed\n )\n };\n },\n\t\tcleanup: (context: NoisePerlinContext) => {\n\t\t\tcontext.computed = null;\n\t\t}\n });\n}\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { RidgedMulti } from 'libnoise-simplex-ts';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport { NodeRidgedNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { NoiseTemplateGroup } from '../../abstract/templates';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoiseRidgedMultiContext = NoiseGeneratorContext<NodeRidgedNoiseData>;\n\nexport class NoiseRidgedMultiNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeRidgedNoiseData> = {\n type: NoiseNodeType.noiseRidgedMulti,\n group: NoiseTemplateGroup.noiseGenerators,\n data: {\n title: 'Ridged Multi Noise',\n frequency: 0.1,\n lacunarity: 2.0,\n octaves: 6,\n offset: 1.0,\n gain: 2.0,\n seed: 0\n },\n handles: [\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline?: IPipeline<NoiseRidgedMultiContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n action: (context: NoiseRidgedMultiContext) => {\n const { properties } = context;\n context.computed = {\n module: new RidgedMulti(\n properties.frequency,\n properties.lacunarity,\n properties.octaves,\n properties.offset,\n properties.gain,\n properties.seed\n )\n };\n },\n cleanup: (context: NoiseRidgedMultiContext) => {\n context.computed = null;\n }\n });\n}\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { Spheres } from 'libnoise-simplex-ts';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport { NodeSpheresNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { NoiseTemplateGroup } from '../../abstract/templates';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoiseSpheresContext = NoiseGeneratorContext<NodeSpheresNoiseData>;\n\nexport class NoiseSpheresNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeSpheresNoiseData> = {\n type: NoiseNodeType.noiseSpheres,\n group: NoiseTemplateGroup.noiseGenerators,\n data: {\n title: 'Spheres Noise',\n frequency: 0.1\n },\n handles: [\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline?: IPipeline<NoiseSpheresContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n action: (context: NoiseSpheresContext) => {\n const { properties } = context;\n context.computed = {\n module: new Spheres(properties.frequency)\n };\n },\n\t\tcleanup: (context: NoiseSpheresContext) => {\n\t\t\tcontext.computed = null;\n\t\t}\n });\n}\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\nimport { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { Voronoi } from 'libnoise-simplex-ts';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport { NodeVoronoiNoiseData, NoiseGeneratorContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { NoiseTemplateGroup } from '../../abstract/templates';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoiseVoronoiContext = NoiseGeneratorContext<NodeVoronoiNoiseData>;\n\nexport class NoiseVoronoiNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeVoronoiNoiseData> = {\n type: NoiseNodeType.noiseVoronoi,\n group: NoiseTemplateGroup.noiseGenerators,\n data: {\n title: 'Voronoi Noise',\n frequency: 0.1,\n displacement: 1.0,\n distance: true,\n seed: 0\n },\n handles: [\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline?: IPipeline<NoiseVoronoiContext> = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n action: (context: NoiseVoronoiContext) => {\n const { properties } = context;\n context.computed = {\n module: new Voronoi(properties.frequency, properties.displacement, properties.distance, properties.seed)\n };\n },\n\t\tcleanup: (context: NoiseVoronoiContext) => {\n\t\t\tcontext.computed = null;\n\t\t}\n });\n}\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedPositionsData, NodePositionData } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseTemplateGroup } from '../../abstract/templates';\r\n\r\nexport type NodePositionContext = NodeContext<NodePositionData, ComputedPositionsData>;\r\n\r\nexport class PositionConstNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodePositionData> = {\r\n type: NoiseNodeType.position,\r\n group: NoiseTemplateGroup.positions,\r\n data: {\r\n title: 'Position Output',\r\n position: { x: 0, y: 0, z: 0 }\r\n },\r\n handles: [\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.position,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NodePositionContext>({\r\n shouldRun(context: NodePositionContext) {\r\n return context.data.position !== undefined && context.data.position !== null;\r\n },\r\n action(context: NodePositionContext) {\r\n const { data } = context;\r\n\r\n context.computed = {\r\n positions: [data.position]\r\n };\r\n },\r\n\t\tcleanup(context: NodePositionContext) {\r\n\t\t\tcontext.computed = null;\r\n\t\t}\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedPositionsData, Position as GridPosition, NodeGridData } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseTemplateGroup } from '../../abstract/templates';\r\n\r\nexport type NodeGridPositionContext = NodeContext<NodeGridData, ComputedPositionsData>;\r\n\r\nexport class PositionGridNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeGridData> = {\r\n type: NoiseNodeType.grid,\r\n group: NoiseTemplateGroup.positions,\r\n data: {\r\n title: 'Grid Output',\r\n center: { x: 0, y: 0, z: 0 },\r\n radius: 1\r\n },\r\n handles: [\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.position,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NodeGridPositionContext>({\r\n shouldRun(context: NodeGridPositionContext) {\r\n const { center, radius } = context.data;\r\n return center !== undefined && radius !== undefined;\r\n },\r\n action(context: NodeGridPositionContext) {\r\n const { data } = context;\r\n const { center, radius } = data;\r\n\r\n const positions: GridPosition[] = [];\r\n\r\n for (let i = -radius; i < radius; i++) {\r\n for (let j = -radius; j < radius; j++) {\r\n positions.push({ x: center.x + i, y: center.y + j, z: center.z });\r\n }\r\n }\r\n\r\n context.computed = {\r\n positions\r\n };\r\n },\r\n cleanup(context: NodeGridPositionContext) {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { BasicNodeData, CoreTemplateGroup, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { IDGenerator } from '@awesome-flow/core/utils';\r\nimport { ComputedModuleData, NoiseModuleContext } from '@awesome-flow/noise/abstract';\r\nimport { Position } from '@xyflow/system';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type ModuleGroupNodeContext = NodeContext<\r\n BasicNodeData,\r\n ComputedModuleData,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class ModuleGroupNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n id: IDGenerator.template(),\r\n type: NoiseNodeType.groupModule,\r\n group: CoreTemplateGroup.groups,\r\n data: {\r\n title: 'Modules Group',\r\n isGroup: true,\r\n initialSize: {\r\n width: 300,\r\n height: 200\r\n },\r\n collapsedSize: {\r\n width: 300,\r\n height: 80\r\n }\r\n },\r\n handles: [\r\n {\r\n position: Position.Bottom,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1,\r\n hideOnCollapse: true\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<ModuleGroupNodeContext> = PipelineFactory.create({\r\n shouldRun(context: ModuleGroupNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action: (context: ModuleGroupNodeContext) => {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n context.computed = { module };\r\n },\r\n cleanup: (context: ModuleGroupNodeContext) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Abs, ModifierModule } from 'libnoise-simplex-ts';\r\nimport { ComputedModuleData, NoiseModuleContext, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseAbsNodeContext = NodeContext<\r\n BasicNodeData,\r\n ComputedModuleData<ModifierModule>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseAbsNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseAbs,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Abs Noise'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseAbsNodeContext> = PipelineFactory.create({\r\n shouldRun(context: NoiseAbsNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseAbsNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (module) {\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = module;\r\n } else {\r\n context.computed = { module: new Abs(module) };\r\n }\r\n }\r\n },\r\n cleanup(context: NoiseAbsNodeContext) {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Clamp, ModifierModule } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeClampNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseClampNodeContext = NodeContext<\r\n NodeClampNoiseData,\r\n ComputedModuleData<ModifierModule>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseClampNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeClampNoiseData> = {\r\n type: NoiseNodeType.noiseClamp,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Clamp Noise',\r\n lowerBound: -1,\r\n upperBound: 1\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseClampNodeContext>({\r\n shouldRun(context: NoiseClampNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseClampNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (module) {\r\n const clampModule = context.computed?.module as Clamp;\r\n\r\n if (clampModule) {\r\n clampModule.sourceModule = module;\r\n clampModule.lowerBound = context.data.lowerBound;\r\n clampModule.upperBound = context.data.upperBound;\r\n } else {\r\n context.computed = {\r\n module: new Clamp(module, context.data.lowerBound, context.data.upperBound)\r\n };\r\n }\r\n }\r\n },\r\n cleanup(context: NoiseClampNodeContext) {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { Add, Max, Min, Multiply, Power } from 'libnoise-simplex-ts';\n\nexport enum NoiseCombineType {\n add = 'add',\n max = 'max',\n min = 'min',\n multiply = 'multiply',\n power = 'power'\n}\n\nexport const noiseCombineModuleMap = {\n [NoiseCombineType.add]: Add,\n [NoiseCombineType.max]: Max,\n [NoiseCombineType.min]: Min,\n [NoiseCombineType.multiply]: Multiply,\n [NoiseCombineType.power]: Power\n};\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { CombinerModule } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeCombineNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NoiseCombineType, noiseCombineModuleMap } from '../../abstract/operations';\r\n\r\nexport type NoiseCombineNodeContext = NodeContext<\r\n NodeCombineNoiseData,\r\n ComputedModuleData<CombinerModule>,\r\n { [NoiseHandleType.module]: NoiseModuleContext[] }\r\n>;\r\n\r\nexport class NoiseCombineNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeCombineNoiseData> = {\r\n type: NoiseNodeType.noiseCombine,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Combine Noise',\r\n operation: NoiseCombineType.add\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n minConnections: 2,\r\n maxConnections: 2\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseCombineNodeContext>({\r\n shouldRun(context: NoiseCombineNodeContext): boolean {\r\n return context.incoming[NoiseHandleType.module]?.length === 2;\r\n },\r\n action(context: NoiseCombineNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n\r\n const ModuleFactory = noiseCombineModuleMap[context.data.operation];\r\n const module = new ModuleFactory(incoming[0].computed?.module, incoming[1].computed?.module);\r\n\r\n context.computed = { module };\r\n },\r\n cleanup(context: NoiseCombineNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Curve, ModifierModule, Tuple } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeCurveNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseCurveNodeContext = NodeContext<\r\n NodeCurveNoiseData,\r\n ComputedModuleData<ModifierModule>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseCurveNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeCurveNoiseData> = {\r\n type: NoiseNodeType.noiseCurve,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Noise Curve',\r\n points: []\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseCurveNodeContext>({\r\n shouldRun(context: NoiseCurveNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseCurveNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (module) {\r\n const curve = new Curve(\r\n module,\r\n context.data.points.map((p) => new Tuple(p.input, p.output))\r\n );\r\n context.computed = { module: curve };\r\n }\r\n },\r\n cleanup(context: NoiseCurveNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Exponent } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeExponentNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseExponentNodeContext = NodeContext<\r\n NodeExponentNoiseData,\r\n ComputedModuleData<Exponent>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseExponentNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeExponentNoiseData> = {\r\n type: NoiseNodeType.noiseExponent,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Noise Exponent',\r\n exponent: 1\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseExponentNodeContext>({\r\n shouldRun(context: NoiseExponentNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseExponentNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.exponent = context.data.exponent;\r\n } else if (module) {\r\n const exponentModule = new Exponent(module, context.data.exponent);\r\n context.computed = { module: exponentModule };\r\n }\r\n },\r\n cleanup(context: NoiseExponentNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Invert } from 'libnoise-simplex-ts';\r\nimport { ComputedModuleData, NoiseModuleContext, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseInvertNodeContext = NodeContext<\r\n BasicNodeData,\r\n ComputedModuleData<Invert>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseInvertNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseInvert,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Invert Noise'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseInvertNodeContext>({\r\n shouldRun(context: NoiseInvertNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseInvertNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = module;\r\n } else if (module) {\r\n context.computed = { module: new Invert(module) };\r\n }\r\n },\r\n cleanup(context: NoiseInvertNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { IDGenerator } from '@awesome-flow/core/utils';\r\nimport { Position } from '@xyflow/system';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeNormalizeNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\nimport { NormalizeNoiseModule } from '../../modules';\r\n\r\nexport type NoiseNormalizeNodeContext = NodeContext<\r\n NodeNormalizeNoiseData,\r\n ComputedModuleData<NormalizeNoiseModule>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseNormalizeNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeNormalizeNoiseData> = {\r\n id: IDGenerator.template(),\r\n type: NoiseNodeType.noiseNormalize,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Normalize Noise',\r\n intervalStart: -1,\r\n intervalEnd: 1\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseNormalizeNodeContext>({\r\n shouldRun(context: NoiseNormalizeNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseNormalizeNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (module) {\r\n const normalizeModule = new NormalizeNoiseModule(module, context.data.intervalStart, context.data.intervalEnd);\r\n context.computed = { module: normalizeModule };\r\n }\r\n },\r\n cleanup(context: NoiseNormalizeNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { ScaleBias } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeScaleBiasNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseScaleBiasNodeContext = NodeContext<\r\n NodeScaleBiasNoiseData,\r\n ComputedModuleData<ScaleBias>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseScaleBiasNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeScaleBiasNoiseData> = {\r\n type: NoiseNodeType.noiseScaleBias,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Scale/Bias Noise',\r\n scale: 1.0,\r\n bias: 0.0\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseScaleBiasNodeContext>({\r\n shouldRun(context: NoiseScaleBiasNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseScaleBiasNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = module;\r\n context.computed.module.scale = context.data.scale;\r\n context.computed.module.bias = context.data.bias;\r\n } else if (module) {\r\n const scaleBiasModule = new ScaleBias(module, context.data.scale, context.data.bias);\r\n context.computed = { module: scaleBiasModule };\r\n }\r\n },\r\n cleanup(context: NoiseScaleBiasNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Terrace } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeTerraceNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseTerraceNodeContext = NodeContext<\r\n NodeTerraceNoiseData,\r\n ComputedModuleData<Terrace>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseTerraceNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeTerraceNoiseData> = {\r\n type: NoiseNodeType.noiseTerrace,\r\n group: NoiseTemplateGroup.noiseModifiers,\r\n data: {\r\n title: 'Noise Terrace',\r\n points: []\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseTerraceNodeContext>({\r\n shouldRun(context: NoiseTerraceNodeContext): boolean {\r\n return !!context.incoming[NoiseHandleType.module];\r\n },\r\n action(context: NoiseTerraceNodeContext): void {\r\n const incoming = context.incoming[NoiseHandleType.module];\r\n const module = incoming.computed?.module;\r\n\r\n if (module) {\r\n const terrace = new Terrace(module, context.data.points);\r\n context.computed = { module: terrace };\r\n }\r\n },\r\n cleanup(context: NoiseTerraceNodeContext): void {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { Position } from '@xyflow/system';\r\nimport { ComputedNoiseData, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseLoggerContext = NodeContext<\r\n BasicNodeData,\r\n never,\r\n { [NoiseHandleType.noise]: NodeContext<any, ComputedNoiseData>[] }\r\n>;\r\n\r\nexport class NoiseLoggerNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseLogger,\r\n group: NoiseTemplateGroup.output,\r\n data: {\r\n title: 'Noise Logger'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.noise,\r\n connection: 'target'\r\n }\r\n ]\r\n };\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport {\r\n ComputedNoiseData,\r\n ComputedPositionsData,\r\n NoiseModuleContext,\r\n NoiseTemplateGroup,\r\n PositionNoiseValue\r\n} from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseOutputContext = NodeContext<\r\n BasicNodeData,\r\n ComputedNoiseData,\r\n {\r\n [NoiseHandleType.position]: NodeContext<any, ComputedPositionsData>[];\r\n [NoiseHandleType.module]: NoiseModuleContext;\r\n }\r\n>;\r\n\r\nexport class NoiseOutputNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseOutput,\r\n group: NoiseTemplateGroup.output,\r\n data: {\r\n title: 'Noise Output'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.position,\r\n connection: 'target'\r\n },\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.noise,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseOutputContext> = PipelineFactory.create({\r\n action: (context) => {\r\n const incomingPositions = context.incoming[NoiseHandleType.position];\r\n const incomingModule = context.incoming[NoiseHandleType.module];\r\n\r\n if (incomingPositions?.length && incomingModule?.computed?.module) {\r\n const { module } = incomingModule.computed;\r\n\r\n const noise: PositionNoiseValue[] = [];\r\n\r\n for (const input of incomingPositions) {\r\n const { positions } = input.computed;\r\n for (const position of positions) {\r\n const value = module.getValue(position.x, position.y, position.z);\r\n\r\n noise.push({\r\n position,\r\n value\r\n });\r\n }\r\n }\r\n\r\n context.computed = {\r\n noise\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { IPipeline } from '@awesome-ecs/abstract/pipelines';\r\nimport { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { ComputedNoiseData, ComputedNoiseTextureData, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseTextureDataContext = NodeContext<\r\n BasicNodeData,\r\n ComputedNoiseTextureData,\r\n { [NoiseHandleType.noise]: NodeContext<any, ComputedNoiseData> }\r\n>;\r\n\r\nexport class NoiseTextureDataTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.textureData,\r\n group: NoiseTemplateGroup.output,\r\n data: {\r\n title: 'Texture Data'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.noise,\r\n connection: 'target',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.textureData,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline?: IPipeline<NoiseTextureDataContext> = PipelineFactory.create({\r\n shouldRun: (context) => {\r\n const incoming = context.incoming[NoiseHandleType.noise];\r\n return !!incoming?.computed?.noise.length;\r\n },\r\n action: (context) => {\r\n const incoming = context.incoming[NoiseHandleType.noise];\r\n const noise = incoming?.computed?.noise;\r\n\r\n const size = Math.ceil(Math.sqrt(noise.length));\r\n\r\n const colors = noise.flatMap((n) => [n.value * 255, n.value * 255, n.value * 255, 255]);\r\n const dataArray = new Uint8Array(size * size * 4);\r\n dataArray.set(colors);\r\n\r\n context.computed = {\r\n textureData: dataArray,\r\n textureResolutionX: size,\r\n textureResolutionY: size\r\n };\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { Position } from '@xyflow/system';\r\nimport { ComputedPositionsData, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type PositionLoggerNodeContext = NodeContext<\r\n BasicNodeData,\r\n never,\r\n { [NoiseNodeType.position]: NodeContext<any, ComputedPositionsData>[] }\r\n>;\r\n\r\nexport class PositionLoggerNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.positionLogger,\r\n group: NoiseTemplateGroup.positions,\r\n data: {\r\n title: 'Position Logger'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.position,\r\n connection: 'target'\r\n }\r\n ]\r\n };\r\n}\r\n","import { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Blend } from 'libnoise-simplex-ts';\r\nimport { ComputedModuleData, NoiseModuleContext, NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType, NoiseSourceControlHandle } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseBlendNodeContext = NodeContext<\r\n BasicNodeData,\r\n ComputedModuleData<Blend>,\r\n {\r\n [NoiseSourceControlHandle.source]: NoiseModuleContext[];\r\n [NoiseSourceControlHandle.control]: NoiseModuleContext;\r\n }\r\n>;\r\n\r\nexport class NoiseBlendNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData> = {\r\n type: NoiseNodeType.noiseBlend,\r\n group: NoiseTemplateGroup.noiseSelectors,\r\n data: {\r\n title: 'Noise Blend'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n label: 'Source Modules',\r\n dataId: NoiseSourceControlHandle.source,\r\n groupBy: 'dataId',\r\n maxConnections: 2,\r\n minConnections: 2\r\n },\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n dataId: NoiseSourceControlHandle.control,\r\n groupBy: 'dataId',\r\n connection: 'target',\r\n label: 'Control Module',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n dataId: NoiseSourceControlHandle.output,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseBlendNodeContext>({\r\n shouldRun: (context) => {\r\n return (\r\n context.incoming[NoiseSourceControlHandle.source]?.length === 2 && !!context.incoming[NoiseSourceControlHandle.control]\r\n );\r\n },\r\n action: (context) => {\r\n const incomingSources = context.incoming[NoiseSourceControlHandle.source];\r\n const incomingControl = context.incoming[NoiseSourceControlHandle.control];\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.controlModule = incomingControl.computed.module;\r\n context.computed.module.sourceModuleA = incomingSources[0].computed.module;\r\n context.computed.module.sourceModuleB = incomingSources[1].computed.module;\r\n } else {\r\n context.computed = {\r\n module: new Blend(\r\n incomingSources[0].computed.module,\r\n incomingSources[1].computed.module,\r\n incomingControl.computed.module\r\n )\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { Position } from '@xyflow/system';\nimport { Select } from 'libnoise-simplex-ts';\nimport { NoiseTemplateGroup } from '../../abstract';\nimport { NoiseHandleType, NoiseSourceControlHandle } from '../../abstract/handle-types';\nimport { ComputedModuleData, NodeSelectNoiseData, NoiseModuleContext } from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\n\nexport type NoiseSelectNodeContext = NodeContext<\n NodeSelectNoiseData,\n ComputedModuleData<Select>,\n {\n [NoiseSourceControlHandle.source]: NoiseModuleContext[];\n [NoiseSourceControlHandle.control]: NoiseModuleContext;\n }\n>;\n\nexport class NoiseSelectNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeSelectNoiseData> = {\n type: NoiseNodeType.noiseSelect,\n group: NoiseTemplateGroup.noiseSelectors,\n data: {\n title: 'Noise Select',\n edgeFalloff: 0.0,\n lowerBound: -1.0,\n upperBound: 1.0\n },\n handles: [\n {\n position: Position.Left,\n dataType: NoiseHandleType.module,\n dataId: NoiseSourceControlHandle.source,\n groupBy: 'dataId',\n connection: 'target',\n label: 'Source Modules',\n maxConnections: 2,\n minConnections: 2\n },\n {\n position: Position.Left,\n dataType: NoiseHandleType.module,\n dataId: NoiseSourceControlHandle.control,\n groupBy: 'dataId',\n connection: 'target',\n label: 'Control Module',\n maxConnections: 1\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n dataId: NoiseSourceControlHandle.output,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline = PipelineFactory.create<NoiseSelectNodeContext>({\n shouldRun: (context) => {\n return (\n context.incoming[NoiseSourceControlHandle.source]?.length === 2 && !!context.incoming[NoiseSourceControlHandle.control]\n );\n },\n action: (context) => {\n const incomingSources = context.incoming[NoiseSourceControlHandle.source];\n const incomingControl = context.incoming[NoiseSourceControlHandle.control];\n\n if (context.computed?.module) {\n context.computed.module.controlModule = incomingControl.computed.module;\n context.computed.module.sourceModuleA = incomingSources[0].computed.module;\n context.computed.module.sourceModuleB = incomingSources[1].computed.module;\n context.computed.module.edgeFalloff = context.data.edgeFalloff;\n context.computed.module.lowerBound = context.data.lowerBound;\n context.computed.module.upperBound = context.data.upperBound;\n } else {\n context.computed = {\n module: new Select(\n incomingSources[0].computed.module,\n incomingSources[1].computed.module,\n incomingControl.computed.module,\n context.data.edgeFalloff,\n context.data.lowerBound,\n context.data.upperBound,\n )\n };\n }\n },\n cleanup: (context) => {\n context.computed = null;\n }\n });\n}\n","import { BasicNodeData, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { Displace } from 'libnoise-simplex-ts';\r\nimport { ComputedModuleData, NoiseModuleContext, NoiseTemplateGroup } from '../../abstract';\r\nimport { DisplacementHandle, DisplacementModuleHandle, NoiseHandleType } from '../../abstract/handle-types';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseDisplaceNodeContext = NodeContext<\r\n BasicNodeData,\r\n ComputedModuleData<Displace>,\r\n {\r\n [DisplacementHandle.sourceModule]: NoiseModuleContext;\r\n [DisplacementHandle.xModule]: NoiseModuleContext;\r\n [DisplacementHandle.yModule]: NoiseModuleContext;\r\n [DisplacementHandle.zModule]: NoiseModuleContext;\r\n }\r\n>;\r\n\r\nexport class NoiseDisplaceNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<BasicNodeData, Omit<DisplacementModuleHandle, 'handleId'>> = {\r\n type: NoiseNodeType.noiseDisplace,\r\n group: NoiseTemplateGroup.noiseTransformers,\r\n data: {\r\n title: 'Noise Displace'\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n connection: 'target',\r\n label: 'Source Module',\r\n dataType: NoiseHandleType.module,\r\n dataId: DisplacementHandle.sourceModule,\r\n groupBy: 'dataId',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Left,\r\n connection: 'target',\r\n label: 'X Module',\r\n dataType: NoiseHandleType.module,\r\n dataId: DisplacementHandle.xModule,\r\n groupBy: 'dataId',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Left,\r\n connection: 'target',\r\n label: 'Y Module',\r\n dataType: NoiseHandleType.module,\r\n dataId: DisplacementHandle.yModule,\r\n groupBy: 'dataId',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Left,\r\n connection: 'target',\r\n label: 'Z Module',\r\n dataType: NoiseHandleType.module,\r\n dataId: DisplacementHandle.zModule,\r\n groupBy: 'dataId',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n dataId: DisplacementHandle.output,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseDisplaceNodeContext>({\r\n shouldRun: (context) => {\r\n return (\r\n !!context.incoming[DisplacementHandle.sourceModule]?.computed?.module &&\r\n !!context.incoming[DisplacementHandle.xModule]?.computed?.module &&\r\n !!context.incoming[DisplacementHandle.yModule]?.computed?.module &&\r\n !!context.incoming[DisplacementHandle.zModule]?.computed?.module\r\n );\r\n },\r\n action: (context) => {\r\n const sourceModule = context.incoming[DisplacementHandle.sourceModule].computed.module;\r\n const xModule = context.incoming[DisplacementHandle.xModule].computed.module;\r\n const yModule = context.incoming[DisplacementHandle.yModule].computed.module;\r\n const zModule = context.incoming[DisplacementHandle.zModule].computed.module;\r\n\r\n const hasModules = !!sourceModule && !!xModule && !!yModule && !!zModule;\r\n\r\n if (context.computed?.module) {\r\n if (hasModules) {\r\n context.computed.module.sourceModule = sourceModule;\r\n context.computed.module.xModule = xModule;\r\n context.computed.module.yModule = yModule;\r\n context.computed.module.zModule = zModule;\r\n }\r\n } else {\r\n context.computed = {\r\n module: new Displace(sourceModule, xModule, yModule, zModule)\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { RotatePoint } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeRotatePointNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseRotatePointNodeContext = NodeContext<\r\n NodeRotatePointNoiseData,\r\n ComputedModuleData<RotatePoint>,\r\n {\r\n [NoiseHandleType.module]: NoiseModuleContext;\r\n }\r\n>;\r\n\r\nexport class NoiseRotatePointNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeRotatePointNoiseData> = {\r\n type: NoiseNodeType.noiseRotatePoint,\r\n group: NoiseTemplateGroup.noiseTransformers,\r\n data: {\r\n title: 'Noise Rotate Point',\r\n xAngle: 0.0,\r\n yAngle: 0.0,\r\n zAngle: 0.0\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n label: 'Source Module',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseRotatePointNodeContext>({\r\n shouldRun: (context) => {\r\n return !!context.incoming[NoiseHandleType.module]?.computed?.module;\r\n },\r\n action: (context) => {\r\n const sourceModule = context.incoming[NoiseHandleType.module].computed.module;\r\n const { xAngle, yAngle, zAngle } = context.data;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = sourceModule;\r\n context.computed.module.xAngle = xAngle;\r\n context.computed.module.yAngle = yAngle;\r\n context.computed.module.zAngle = zAngle;\r\n } else {\r\n context.computed = {\r\n module: new RotatePoint(sourceModule, xAngle, yAngle, zAngle)\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { ScalePoint } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeScalePointNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseScalePointNodeContext = NodeContext<\r\n NodeScalePointNoiseData,\r\n ComputedModuleData<ScalePoint>,\r\n {\r\n [NoiseHandleType.module]: NoiseModuleContext;\r\n }\r\n>;\r\n\r\nexport class NoiseScalePointNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeScalePointNoiseData> = {\r\n type: NoiseNodeType.noiseScalePoint,\r\n group: NoiseTemplateGroup.noiseTransformers,\r\n data: {\r\n title: 'Noise Scale Point',\r\n xScale: 1.0,\r\n yScale: 1.0,\r\n zScale: 1.0\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n label: 'Source Module',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseScalePointNodeContext>({\r\n shouldRun: (context) => {\r\n return !!context.incoming[NoiseHandleType.module]?.computed?.module;\r\n },\r\n action: (context) => {\r\n const sourceModule = context.incoming[NoiseHandleType.module].computed.module;\r\n const { xScale, yScale, zScale } = context.data;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = sourceModule;\r\n context.computed.module.xScale = xScale;\r\n context.computed.module.yScale = yScale;\r\n context.computed.module.zScale = zScale;\r\n } else {\r\n context.computed = {\r\n module: new ScalePoint(sourceModule, xScale, yScale, zScale)\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\r\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\r\nimport { PipelineFactory } from '@awesome-flow/core/factories';\r\nimport { Position } from '@xyflow/system';\r\nimport { TranslatePoint } from 'libnoise-simplex-ts';\r\nimport { NoiseTemplateGroup } from '../../abstract';\r\nimport { NoiseHandleType } from '../../abstract/handle-types';\r\nimport { ComputedModuleData, NodeTranslatePointNoiseData, NoiseModuleContext } from '../../abstract/node-props';\r\nimport { NoiseNodeType } from '../../abstract/node-types';\r\n\r\nexport type NoiseTranslatePointNodeContext = NodeContext<\r\n NodeTranslatePointNoiseData,\r\n ComputedModuleData<TranslatePoint>,\r\n { [NoiseHandleType.module]: NoiseModuleContext }\r\n>;\r\n\r\nexport class NoiseTranslatePointNodeTemplateFactory implements ITemplateFactory {\r\n readonly template: NodeTemplate<NodeTranslatePointNoiseData> = {\r\n type: NoiseNodeType.noiseTranslatePoint,\r\n group: NoiseTemplateGroup.noiseTransformers,\r\n data: {\r\n title: 'Noise Translate Point',\r\n translateX: 0.0,\r\n translateY: 0.0,\r\n translateZ: 0.0\r\n },\r\n handles: [\r\n {\r\n position: Position.Left,\r\n dataType: NoiseHandleType.module,\r\n connection: 'target',\r\n label: 'Source Module',\r\n maxConnections: 1\r\n },\r\n {\r\n position: Position.Right,\r\n dataType: NoiseHandleType.module,\r\n connection: 'source'\r\n }\r\n ]\r\n };\r\n\r\n readonly pipeline = PipelineFactory.create<NoiseTranslatePointNodeContext>({\r\n shouldRun: (context) => {\r\n return !!context.incoming[NoiseHandleType.module]?.computed?.module;\r\n },\r\n action: (context) => {\r\n const sourceModule = context.incoming[NoiseHandleType.module].computed.module;\r\n const { translateX, translateY, translateZ } = context.data;\r\n\r\n if (context.computed?.module) {\r\n context.computed.module.sourceModule = sourceModule;\r\n context.computed.module.translateX = translateX;\r\n context.computed.module.translateY = translateY;\r\n context.computed.module.translateZ = translateZ;\r\n } else {\r\n context.computed = {\r\n module: new TranslatePoint(sourceModule, translateX, translateY, translateZ)\r\n };\r\n }\r\n },\r\n cleanup: (context) => {\r\n context.computed = null;\r\n }\r\n });\r\n}\r\n","import { CoreHandleType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { NodeContext } from '@awesome-flow/core/abstract/pipelines';\nimport { PipelineFactory } from '@awesome-flow/core/factories';\nimport { NodeVariablePropertyContext } from '@awesome-flow/core/templates';\nimport { Position } from '@xyflow/system';\nimport { Turbulence } from 'libnoise-simplex-ts';\nimport { NoiseTemplateGroup } from '../../abstract';\nimport { NoiseHandleType } from '../../abstract/handle-types';\nimport {\n ComputedModuleData,\n NodeTurbulenceNoiseData,\n NoiseGeneratorContext,\n NoiseModuleContext\n} from '../../abstract/node-props';\nimport { NoiseNodeType } from '../../abstract/node-types';\nimport { IncomingPropertyValueMiddleware } from '../../middleware/incoming-property-value';\n\nexport type NoiseTurbulenceNodeContext = NodeContext<\n NodeTurbulenceNoiseData,\n ComputedModuleData<Turbulence>,\n {\n [NoiseHandleType.module]: NoiseModuleContext;\n [CoreHandleType.variableProperty]: NodeVariablePropertyContext[];\n }\n> &\n NoiseGeneratorContext<NodeTurbulenceNoiseData>;\n\nexport class NoiseTurbulenceNodeTemplateFactory implements ITemplateFactory {\n readonly template: NodeTemplate<NodeTurbulenceNoiseData> = {\n type: NoiseNodeType.noiseTurbulence,\n group: NoiseTemplateGroup.noiseTransformers,\n data: {\n title: 'Noise Turbulence',\n frequency: 1.0,\n power: 1.0,\n roughness: 1.0,\n seed: 0\n },\n handles: [\n {\n position: Position.Left,\n dataType: NoiseHandleType.module,\n connection: 'target',\n label: 'Source Module',\n maxConnections: 1\n },\n {\n position: Position.Left,\n dataType: CoreHandleType.variableProperty,\n label: 'Variable Properties',\n connection: 'target'\n },\n {\n position: Position.Right,\n dataType: NoiseHandleType.module,\n connection: 'source'\n }\n ]\n };\n\n readonly pipeline = PipelineFactory.create(new IncomingPropertyValueMiddleware(), {\n shouldRun: (context) => {\n return !!context.incoming[NoiseHandleType.module]?.computed?.module;\n },\n action: (context: NoiseTurbulenceNodeContext) => {\n const { properties } = context;\n const incoming = context.incoming[NoiseHandleType.module].computed.module;\n\n if (context.computed?.module) {\n context.computed.module.sourceModule = incoming;\n context.computed.module.frequency = properties.frequency;\n context.computed.module.power = properties.power;\n context.computed.module.roughness = properties.roughness;\n context.computed.module.seed = properties.seed;\n } else {\n context.computed = {\n module: new Turbulence(incoming, properties.frequency, properties.power, properties.roughness, properties.seed)\n };\n }\n },\n cleanup: (context) => {\n context.computed = null;\n }\n });\n}\n","import { ITemplateFactory } from '@awesome-flow/core/abstract';\r\nimport { NodeTypes } from '@xyflow/react';\r\nimport { ModuleGroupNode } from '../nodes';\r\nimport NoiseBillowNode from '../nodes/generators/noise-billow-node';\r\nimport NoiseCheckerboardNode from '../nodes/generators/noise-checkerboard-node';\r\nimport NoiseConstNode from '../nodes/generators/noise-const-node';\r\nimport NoiseCylindersNode from '../nodes/generators/noise-cylinders-node';\r\nimport NoisePerlinNode from '../nodes/generators/noise-perlin-node';\r\nimport NoiseRidgedMultiNode from '../nodes/generators/noise-ridgedmulti-node';\r\nimport NoiseSpheresNode from '../nodes/generators/noise-spheres-node';\r\nimport NoiseVoronoiNode from '../nodes/generators/noise-voronoi-node';\r\nimport PositionConstNode from '../nodes/generators/position-const-node';\r\nimport PositionGridNode from '../nodes/generators/position-grid-node';\r\nimport NoiseAbsNode from '../nodes/modifiers/noise-abs-node';\r\nimport NoiseClampNode from '../nodes/modifiers/noise-clamp-node';\r\nimport NoiseCombineNode from '../nodes/modifiers/noise-combine-node';\r\nimport NoiseCurveNode from '../nodes/modifiers/noise-curve-node';\r\nimport NoiseExponentNode from '../nodes/modifiers/noise-exponent-node';\r\nimport NoiseInvertNode from '../nodes/modifiers/noise-invert-node';\r\nimport NoiseNormalizeNode from '../nodes/modifiers/noise-normalize-node';\r\nimport NoiseScaleBiasNode from '../nodes/modifiers/noise-scale-bias-node';\r\nimport NoiseTerraceNode from '../nodes/modifiers/noise-terrace-node';\r\nimport NoiseLoggerNode from '../nodes/output/noise-logger-node';\r\nimport NoiseOutputNode from '../nodes/output/noise-output-node';\r\nimport NoiseTextureDataNode from '../nodes/output/noise-texture-data-node';\r\nimport PositionsLoggerNode from '../nodes/output/positions-logger-node';\r\nimport NoiseBlendNode from '../nodes/selectors/noise-blend-node';\r\nimport NoiseSelectNode from '../nodes/selectors/noise-select-node';\r\nimport NoiseDisplaceNode from '../nodes/transformers/noise-displace-node';\r\nimport NoiseRotatePointNode from '../nodes/transformers/noise-rotate-point-node';\r\nimport NoiseScalePointNode from '../nodes/transformers/noise-scale-point-node';\r\nimport NoiseTranslatePointNode from '../nodes/transformers/noise-translate-point-node';\r\nimport NoiseTurbulenceNode from '../nodes/transformers/noise-turbulence-node';\r\nimport { NoiseBillowNodeTemplateFactory } from '../templates/generators/noise-billow-template';\r\nimport { NoiseCheckerboardNodeTemplateFactory } from '../templates/generators/noise-checkerboard-template';\r\nimport { NoiseConstNodeTemplateFactory } from '../templates/generators/noise-const-template';\r\nimport { NoiseCylindersNodeTemplateFactory } from '../templates/generators/noise-cylinders-template';\r\nimport { NoisePerlinNodeTemplateFactory } from '../templates/generators/noise-perlin-template';\r\nimport { NoiseRidgedMultiNodeTemplateFactory } from '../templates/generators/noise-ridgedmulti-template';\r\nimport { NoiseSpheresNodeTemplateFactory } from '../templates/generators/noise-spheres-template';\r\nimport { NoiseVoronoiNodeTemplateFactory } from '../templates/generators/noise-voronoi-template';\r\nimport { PositionConstNodeTemplateFactory } from '../templates/generators/position-const-template';\r\nimport { PositionGridNodeTemplateFactory } from '../templates/generators/position-grid-template';\r\nimport { ModuleGroupNodeTemplateFactory } from '../templates/groups/module-group-template';\r\nimport { NoiseAbsNodeTemplateFactory } from '../templates/modifiers/noise-abs-template';\r\nimport { NoiseClampNodeTemplateFactory } from '../templates/modifiers/noise-clamp-template';\r\nimport { NoiseCombineNodeTemplateFactory } from '../templates/modifiers/noise-combine-template';\r\nimport { NoiseCurveNodeTemplateFactory } from '../templates/modifiers/noise-curve-template';\r\nimport { NoiseExponentNodeTemplateFactory } from '../templates/modifiers/noise-exponent-template';\r\nimport { NoiseInvertNodeTemplateFactory } from '../templates/modifiers/noise-invert-template';\r\nimport { NoiseNormalizeNodeTemplateFactory } from '../templates/modifiers/noise-normalize-template';\r\nimport { NoiseScaleBiasNodeTemplateFactory } from '../templates/modifiers/noise-scalebias-template';\r\nimport { NoiseTerraceNodeTemplateFactory } from '../templates/modifiers/noise-terrace-template';\r\nimport { NoiseLoggerNodeTemplateFactory } from '../templates/output/noise-logger-template';\r\nimport { NoiseOutputNodeTemplateFactory } from '../templates/output/noise-output-template';\r\nimport { NoiseTextureDataTemplateFactory } from '../templates/output/noise-texture-data-template';\r\nimport { PositionLoggerNodeTemplateFactory } from '../templates/output/position-logger-template';\r\nimport { NoiseBlendNodeTemplateFactory } from '../templates/selectors/noise-blend-template';\r\nimport { NoiseSelectNodeTemplateFactory } from '../templates/selectors/noise-select-template';\r\nimport { NoiseDisplaceNodeTemplateFactory } from '../templates/transformers/noise-displace-template';\r\nimport { NoiseRotatePointNodeTemplateFactory } from '../templates/transformers/noise-rotate-point-template';\r\nimport { NoiseScalePointNodeTemplateFactory } from '../templates/transformers/noise-scale-point-template';\r\nimport { NoiseTranslatePointNodeTemplateFactory } from '../templates/transformers/noise-translate-point-template';\r\nimport { NoiseTurbulenceNodeTemplateFactory } from '../templates/transformers/noise-turbulence-template';\r\n\r\nexport enum NoiseNodeType {\r\n position = 'position',\r\n grid = 'grid',\r\n textureData = 'texture-data',\r\n groupModule = 'group-module',\r\n positionLogger = 'position-logger',\r\n noiseLogger = 'noise-logger',\r\n noiseOutput = 'noise-output',\r\n noiseConst = 'noise-constant',\r\n noiseBillow = 'noise-billow',\r\n noiseCheckerboard = 'noise-checkerboard',\r\n noiseNormalize = 'noise-normalize',\r\n noiseCylinders = 'noise-cylinders',\r\n noisePerlin = 'noise-perlin',\r\n noiseRidgedMulti = 'noise-ridged-multi',\r\n noiseSpheres = 'noise-spheres',\r\n noiseVoronoi = 'noise-voronoi',\r\n noiseCombine = 'noise-combiner',\r\n noiseClamp = 'noise-clamp',\r\n noiseAbs = 'noise-abs',\r\n noiseCurve = 'noise-curve',\r\n noiseExponent = 'noise-exponent',\r\n noiseInvert = 'noise-invert',\r\n noiseScaleBias = 'noise-scale-bias',\r\n noiseTerrace = 'noise-terrace',\r\n noiseBlend = 'noise-blend',\r\n noiseSelect = 'noise-select',\r\n noiseDisplace = 'noise-displace',\r\n noiseRotatePoint = 'noise-rotate-point',\r\n noiseScalePoint = 'noise-scale-point',\r\n noiseTranslatePoint = 'noise-translate-point',\r\n noiseTurbulence = 'noise-turbulence'\r\n}\r\n\r\nexport const noiseNodeTypes = {\r\n [NoiseNodeType.groupModule]: ModuleGroupNode,\r\n [NoiseNodeType.position]: PositionConstNode,\r\n [NoiseNodeType.grid]: PositionGridNode,\r\n [NoiseNodeType.noiseOutput]: NoiseOutputNode,\r\n [NoiseNodeType.textureData]: NoiseTextureDataNode,\r\n [NoiseNodeType.noiseLogger]: NoiseLoggerNode,\r\n [NoiseNodeType.positionLogger]: PositionsLoggerNode,\r\n [NoiseNodeType.noiseConst]: NoiseConstNode,\r\n [NoiseNodeType.noiseBillow]: NoiseBillowNode,\r\n [NoiseNodeType.noiseCheckerboard]: NoiseCheckerboardNode,\r\n [NoiseNodeType.noiseCylinders]: NoiseCylindersNode,\r\n [NoiseNodeType.noisePerlin]: NoisePerlinNode,\r\n [NoiseNodeType.noiseRidgedMulti]: NoiseRidgedMultiNode,\r\n [NoiseNodeType.noiseSpheres]: NoiseSpheresNode,\r\n [NoiseNodeType.noiseVoronoi]: NoiseVoronoiNode,\r\n [NoiseNodeType.noiseCombine]: NoiseCombineNode,\r\n [NoiseNodeType.noiseClamp]: NoiseClampNode,\r\n [NoiseNodeType.noiseAbs]: NoiseAbsNode,\r\n [NoiseNodeType.noiseNormalize]: NoiseNormalizeNode,\r\n [NoiseNodeType.noiseCurve]: NoiseCurveNode,\r\n [NoiseNodeType.noiseExponent]: NoiseExponentNode,\r\n [NoiseNodeType.noiseInvert]: NoiseInvertNode,\r\n [NoiseNodeType.noiseScaleBias]: NoiseScaleBiasNode,\r\n [NoiseNodeType.noiseTerrace]: NoiseTerraceNode,\r\n [NoiseNodeType.noiseBlend]: NoiseBlendNode,\r\n [NoiseNodeType.noiseSelect]: NoiseSelectNode,\r\n [NoiseNodeType.noiseDisplace]: NoiseDisplaceNode,\r\n [NoiseNodeType.noiseRotatePoint]: NoiseRotatePointNode,\r\n [NoiseNodeType.noiseScalePoint]: NoiseScalePointNode,\r\n [NoiseNodeType.noiseTranslatePoint]: NoiseTranslatePointNode,\r\n [NoiseNodeType.noiseTurbulence]: NoiseTurbulenceNode\r\n} satisfies NodeTypes;\r\n\r\nexport const noiseNodeTemplates = {\r\n [NoiseNodeType.noiseOutput]: new NoiseOutputNodeTemplateFactory(),\r\n [NoiseNodeType.noiseBillow]: new NoiseBillowNodeTemplateFactory(),\r\n [NoiseNodeType.noiseCheckerboard]: new NoiseCheckerboardNodeTemplateFactory(),\r\n [NoiseNodeType.noiseNormalize]: new NoiseNormalizeNodeTemplateFactory(),\r\n [NoiseNodeType.noiseLogger]: new NoiseLoggerNodeTemplateFactory(),\r\n [NoiseNodeType.noiseConst]: new NoiseConstNodeTemplateFactory(),\r\n [NoiseNodeType.position]: new PositionConstNodeTemplateFactory(),\r\n [NoiseNodeType.positionLogger]: new PositionLoggerNodeTemplateFactory(),\r\n [NoiseNodeType.grid]: new PositionGridNodeTemplateFactory(),\r\n [NoiseNodeType.textureData]: new NoiseTextureDataTemplateFactory(),\r\n [NoiseNodeType.noiseCylinders]: new NoiseCylindersNodeTemplateFactory(),\r\n [NoiseNodeType.noisePerlin]: new NoisePerlinNodeTemplateFactory(),\r\n [NoiseNodeType.noiseRidgedMulti]: new NoiseRidgedMultiNodeTemplateFactory(),\r\n [NoiseNodeType.noiseSpheres]: new NoiseSpheresNodeTemplateFactory(),\r\n [NoiseNodeType.noiseVoronoi]: new NoiseVoronoiNodeTemplateFactory(),\r\n [NoiseNodeType.noiseCombine]: new NoiseCombineNodeTemplateFactory(),\r\n [NoiseNodeType.noiseClamp]: new NoiseClampNodeTemplateFactory(),\r\n [NoiseNodeType.noiseAbs]: new NoiseAbsNodeTemplateFactory(),\r\n [NoiseNodeType.noiseCurve]: new NoiseCurveNodeTemplateFactory(),\r\n [NoiseNodeType.noiseExponent]: new NoiseExponentNodeTemplateFactory(),\r\n [NoiseNodeType.noiseInvert]: new NoiseInvertNodeTemplateFactory(),\r\n [NoiseNodeType.noiseScaleBias]: new NoiseScaleBiasNodeTemplateFactory(),\r\n [NoiseNodeType.noiseTerrace]: new NoiseTerraceNodeTemplateFactory(),\r\n [NoiseNodeType.noiseBlend]: new NoiseBlendNodeTemplateFactory(),\r\n [NoiseNodeType.noiseSelect]: new NoiseSelectNodeTemplateFactory(),\r\n [NoiseNodeType.noiseDisplace]: new NoiseDisplaceNodeTemplateFactory(),\r\n [NoiseNodeType.noiseRotatePoint]: new NoiseRotatePointNodeTemplateFactory(),\r\n [NoiseNodeType.noiseScalePoint]: new NoiseScalePointNodeTemplateFactory(),\r\n [NoiseNodeType.noiseTranslatePoint]: new NoiseTranslatePointNodeTemplateFactory(),\r\n [NoiseNodeType.noiseTurbulence]: new NoiseTurbulenceNodeTemplateFactory(),\r\n [NoiseNodeType.groupModule]: new ModuleGroupNodeTemplateFactory()\r\n} satisfies Record<NoiseNodeType, ITemplateFactory>;\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAY,kBAAL;AACL;AACA;AACA;AACA;;KACD;AAED,IAAY,qBAAL;AACL;AACA;AACA;AACA;AACA;;KACD;AAED,IAAY,2BAAL;AACL;AACA;AACA;;KACD;;;;ACZD,SAAS,gBAAgB,EAAE,IAAI,UAAU,MAAM,QAAwC;CAErF,MAAM,SADU,eAAmC,GAAG,EAAE,WAAW,gBAAgB,SAC5D,QAAQ,MAAM,EAAE,UAAU,MAAM,CAAC,SAAS,MAAM,EAAE,SAAS,MAAM,IAAI,EAAE;AAE9F,QACE,qBAAC,eAAD;EAAmB;EAAc;EAAgB;EAAY;YAA7D;GACE,qBAAC,MAAD,aAAM,UAAO,OAAO,UAAU,EAAS;GACvC,oBAAC,SAAD,EAAS,GAAG,GAAK;GACjB,oBAAC,OAAD,YACG,OAAO,KAAK,GAAG,MACd,qBAAC,MAAD;IACG,EAAE,UAAU;IAAE;IAAE,EAAE,UAAU;IAAE;IAAE,EAAE,UAAU;IAAE;IAAG,EAAE;IAC/C,IAFI,EAEJ,CACP,EACI;GACM;;;AAIpB,gCA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AAsC;EAC5E,cAAc,iBAAiB,IAAI,mCAAmC;EACtE,cAAc,cAAc,IAAI,gCAAgC;EAChE,cAAc,aAAa,IAAI,+BAA+B;EAC9D,cAAc,WAAW,IAAI,kCAAkC;EAC/D,cAAc,iBAAiB,IAAI,mCAAmC;EACtE,cAAc,OAAO,IAAI,iCAAiC;EAC1D,cAAc,cAAc,IAAI,iCAAiC;EACjE,cAAc,iBAAiB,IAAI,mCAAmC;EACtE,cAAc,cAAc,IAAI,gCAAgC;EAChE,cAAc,mBAAmB,IAAI,qCAAqC;EAC1E,cAAc,eAAe,IAAI,iCAAiC;EAClE,cAAc,eAAe,IAAI,iCAAiC;EAClE,cAAc,eAAe,IAAI,iCAAiC;EAClE,cAAc,aAAa,IAAI,+BAA+B;EAC9D,cAAc,WAAW,IAAI,6BAA6B;EAC1D,cAAc,aAAa,IAAI,+BAA+B;EAC9D,cAAc,gBAAgB,IAAI,kCAAkC;EACpE,cAAc,cAAc,IAAI,gCAAgC;EAChE,cAAc,iBAAiB,IAAI,mCAAmC;EACtE,cAAc,eAAe,IAAI,iCAAiC;EAClE,cAAc,aAAa,IAAI,+BAA+B;EAC9D,cAAc,cAAc,IAAI,gCAAgC;EAChE,cAAc,gBAAgB,IAAI,kCAAkC;EACpE,cAAc,mBAAmB,IAAI,qCAAqC;EAC1E,cAAc,kBAAkB,IAAI,oCAAoC;EACxE,cAAc,sBAAsB,IAAI,wCAAwC;EAChF,cAAc,kBAAkB,IAAI,oCAAoC;EACxE,cAAc,cAAc,IAAI,gCAAgC;CAClE"}
@@ -0,0 +1,337 @@
1
+ let _awesome_flow_core_components = require("@awesome-flow/core/components");
2
+ let _awesome_flow_core_layout = require("@awesome-flow/core/layout");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let _awesome_flow_core_hooks = require("@awesome-flow/core/hooks");
6
+ let _mantine_core = require("@mantine/core");
7
+
8
+ //#region src/nodes/generators/noise-billow-node.tsx
9
+ function NoiseBillowNode({ id, selected, data, type }) {
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
11
+ id,
12
+ selected,
13
+ data,
14
+ type,
15
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
16
+ data,
17
+ nodeId: id
18
+ })
19
+ });
20
+ }
21
+ var noise_billow_node_default = (0, react.memo)(NoiseBillowNode);
22
+
23
+ //#endregion
24
+ //#region src/nodes/generators/noise-checkerboard-node.tsx
25
+ function NoiseCheckerboardNode({ id, selected, data, type }) {
26
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
27
+ id,
28
+ selected,
29
+ data,
30
+ type
31
+ });
32
+ }
33
+ var noise_checkerboard_node_default = (0, react.memo)(NoiseCheckerboardNode);
34
+
35
+ //#endregion
36
+ //#region src/nodes/generators/noise-const-node.tsx
37
+ function NoiseConstNode({ id, selected, data, type }) {
38
+ const [min, setMin] = (0, react.useState)(data.min);
39
+ const [max, setMax] = (0, react.useState)(data.max);
40
+ const [noise, setNoise] = (0, react.useState)(data.noise);
41
+ const updateNodeData = (0, _awesome_flow_core_hooks.useUpdateNodeData)();
42
+ (0, react.useEffect)(() => {
43
+ updateNodeData(id, {
44
+ noise,
45
+ min,
46
+ max
47
+ });
48
+ }, [
49
+ id,
50
+ noise,
51
+ min,
52
+ max,
53
+ updateNodeData
54
+ ]);
55
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
56
+ id,
57
+ selected,
58
+ data,
59
+ type,
60
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
61
+ size: "xs",
62
+ w: 100,
63
+ value: min,
64
+ onChange: (e) => setMin(Number(e))
65
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
66
+ size: "xs",
67
+ w: 100,
68
+ value: max,
69
+ onChange: (e) => setMax(Number(e))
70
+ })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["Noise:", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
71
+ size: "xs",
72
+ value: noise,
73
+ onChange: (e) => setNoise(Number(e)),
74
+ max,
75
+ min,
76
+ step: .1
77
+ })] })] })
78
+ });
79
+ }
80
+ var noise_const_node_default = (0, react.memo)(NoiseConstNode);
81
+
82
+ //#endregion
83
+ //#region src/nodes/generators/noise-cylinders-node.tsx
84
+ function NoiseCylindersNode({ id, selected, data, type }) {
85
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
86
+ id,
87
+ selected,
88
+ data,
89
+ type,
90
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
91
+ data,
92
+ nodeId: id
93
+ })
94
+ });
95
+ }
96
+ var noise_cylinders_node_default = (0, react.memo)(NoiseCylindersNode);
97
+
98
+ //#endregion
99
+ //#region src/nodes/generators/noise-perlin-node.tsx
100
+ function NoisePerlinNode({ id, selected, data, type }) {
101
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
102
+ id,
103
+ selected,
104
+ data,
105
+ type,
106
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
107
+ data,
108
+ nodeId: id
109
+ })
110
+ });
111
+ }
112
+ var noise_perlin_node_default = (0, react.memo)(NoisePerlinNode);
113
+
114
+ //#endregion
115
+ //#region src/nodes/generators/noise-ridgedmulti-node.tsx
116
+ function NoiseRidgedMultiNode({ id, selected, data, type }) {
117
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
118
+ id,
119
+ selected,
120
+ data,
121
+ type,
122
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
123
+ data,
124
+ nodeId: id
125
+ })
126
+ });
127
+ }
128
+ var noise_ridgedmulti_node_default = (0, react.memo)(NoiseRidgedMultiNode);
129
+
130
+ //#endregion
131
+ //#region src/nodes/generators/noise-spheres-node.tsx
132
+ function NoiseSpheresNode({ id, selected, data, type }) {
133
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
134
+ id,
135
+ selected,
136
+ data,
137
+ type,
138
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
139
+ data,
140
+ nodeId: id
141
+ })
142
+ });
143
+ }
144
+ var noise_spheres_node_default = (0, react.memo)(NoiseSpheresNode);
145
+
146
+ //#endregion
147
+ //#region src/nodes/generators/noise-voronoi-node.tsx
148
+ function NoiseVoronoiNode({ id, selected, data, type }) {
149
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
150
+ id,
151
+ selected,
152
+ data,
153
+ type,
154
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_components.NodePropertiesList, {
155
+ data,
156
+ nodeId: id
157
+ })
158
+ });
159
+ }
160
+ var noise_voronoi_node_default = (0, react.memo)(NoiseVoronoiNode);
161
+
162
+ //#endregion
163
+ //#region src/nodes/generators/position-const-node.tsx
164
+ function PositionConstNode({ id, selected, data, type }) {
165
+ const position = data.position ?? {
166
+ x: 0,
167
+ y: 0,
168
+ z: 0
169
+ };
170
+ const [x, setX] = (0, react.useState)(position.x);
171
+ const [y, setY] = (0, react.useState)(position.y);
172
+ const [z, setZ] = (0, react.useState)(position.z);
173
+ const updateNodeData = (0, _awesome_flow_core_hooks.useUpdateNodeData)();
174
+ (0, react.useEffect)(() => {
175
+ updateNodeData(id, { position: {
176
+ x,
177
+ y,
178
+ z
179
+ } });
180
+ }, [
181
+ x,
182
+ y,
183
+ z,
184
+ id,
185
+ updateNodeData
186
+ ]);
187
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
188
+ id,
189
+ selected,
190
+ data,
191
+ type,
192
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, { children: [
193
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["x: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
194
+ size: "xs",
195
+ w: 100,
196
+ value: x,
197
+ onChange: (e) => setX(Number(e))
198
+ })] }),
199
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["y: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
200
+ size: "xs",
201
+ w: 100,
202
+ value: y,
203
+ onChange: (e) => setY(Number(e))
204
+ })] }),
205
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["z: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
206
+ size: "xs",
207
+ w: 100,
208
+ value: z,
209
+ onChange: (e) => setZ(Number(e))
210
+ })] })
211
+ ] })
212
+ });
213
+ }
214
+ var position_const_node_default = (0, react.memo)(PositionConstNode);
215
+
216
+ //#endregion
217
+ //#region src/nodes/generators/position-grid-node.tsx
218
+ function PositionGridNode({ id, selected, data, type }) {
219
+ const [x, setX] = (0, react.useState)(data.center?.x);
220
+ const [y, setY] = (0, react.useState)(data.center?.y);
221
+ const [z, setZ] = (0, react.useState)(data.center?.z);
222
+ const [radius, setRadius] = (0, react.useState)(data.radius);
223
+ const updateNodeData = (0, _awesome_flow_core_hooks.useUpdateNodeData)();
224
+ (0, react.useEffect)(() => {
225
+ updateNodeData(id, {
226
+ center: {
227
+ x,
228
+ y,
229
+ z
230
+ },
231
+ radius
232
+ });
233
+ }, [
234
+ x,
235
+ y,
236
+ z,
237
+ radius,
238
+ id,
239
+ updateNodeData
240
+ ]);
241
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_awesome_flow_core_layout.NodeContainer, {
242
+ id,
243
+ selected,
244
+ data,
245
+ type,
246
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, { children: [
247
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["x: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
248
+ size: "xs",
249
+ w: 100,
250
+ value: x,
251
+ onChange: (e) => setX(Number(e))
252
+ })] }),
253
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["y: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
254
+ size: "xs",
255
+ w: 100,
256
+ value: y,
257
+ onChange: (e) => setY(Number(e))
258
+ })] }),
259
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["z: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
260
+ size: "xs",
261
+ w: 100,
262
+ value: z,
263
+ onChange: (e) => setZ(Number(e))
264
+ })] }),
265
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, { children: ["r: ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NumberInput, {
266
+ size: "xs",
267
+ w: 100,
268
+ value: radius,
269
+ onChange: (e) => setRadius(Number(e))
270
+ })] })
271
+ ] })
272
+ });
273
+ }
274
+ var position_grid_node_default = (0, react.memo)(PositionGridNode);
275
+
276
+ //#endregion
277
+ Object.defineProperty(exports, 'noise_billow_node_default', {
278
+ enumerable: true,
279
+ get: function () {
280
+ return noise_billow_node_default;
281
+ }
282
+ });
283
+ Object.defineProperty(exports, 'noise_checkerboard_node_default', {
284
+ enumerable: true,
285
+ get: function () {
286
+ return noise_checkerboard_node_default;
287
+ }
288
+ });
289
+ Object.defineProperty(exports, 'noise_const_node_default', {
290
+ enumerable: true,
291
+ get: function () {
292
+ return noise_const_node_default;
293
+ }
294
+ });
295
+ Object.defineProperty(exports, 'noise_cylinders_node_default', {
296
+ enumerable: true,
297
+ get: function () {
298
+ return noise_cylinders_node_default;
299
+ }
300
+ });
301
+ Object.defineProperty(exports, 'noise_perlin_node_default', {
302
+ enumerable: true,
303
+ get: function () {
304
+ return noise_perlin_node_default;
305
+ }
306
+ });
307
+ Object.defineProperty(exports, 'noise_ridgedmulti_node_default', {
308
+ enumerable: true,
309
+ get: function () {
310
+ return noise_ridgedmulti_node_default;
311
+ }
312
+ });
313
+ Object.defineProperty(exports, 'noise_spheres_node_default', {
314
+ enumerable: true,
315
+ get: function () {
316
+ return noise_spheres_node_default;
317
+ }
318
+ });
319
+ Object.defineProperty(exports, 'noise_voronoi_node_default', {
320
+ enumerable: true,
321
+ get: function () {
322
+ return noise_voronoi_node_default;
323
+ }
324
+ });
325
+ Object.defineProperty(exports, 'position_const_node_default', {
326
+ enumerable: true,
327
+ get: function () {
328
+ return position_const_node_default;
329
+ }
330
+ });
331
+ Object.defineProperty(exports, 'position_grid_node_default', {
332
+ enumerable: true,
333
+ get: function () {
334
+ return position_grid_node_default;
335
+ }
336
+ });
337
+ //# sourceMappingURL=generators-BF_0y3pd.cjs.map