@divinevoxel/vlox 0.0.2 → 0.0.4

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 (773) hide show
  1. package/Archive/Functions/ArchiveColumn.js +17 -17
  2. package/Archive/Functions/ImportColumn.js +14 -14
  3. package/Archive/Functions/Palettes.d.ts +1 -1
  4. package/Cache/Cache.types.d.ts +17 -0
  5. package/Cache/CacheManager.d.ts +11 -0
  6. package/Cache/CacheManager.js +17 -0
  7. package/{Data → Contexts/Base}/DataHooks.d.ts +8 -8
  8. package/{Data → Contexts/Base}/DataHooks.js +4 -4
  9. package/Contexts/Base/Main/Generator/DataGenerator.types.d.ts +12 -0
  10. package/Contexts/Base/Main/Generator/InitDataGenerator.d.ts +3 -0
  11. package/Contexts/Base/Main/Generator/InitDataGenerator.js +201 -0
  12. package/Contexts/Base/Main/Generator/Segments/MaterialDataGenerator.d.ts +6 -0
  13. package/Contexts/Base/Main/Generator/Segments/MaterialDataGenerator.js +12 -0
  14. package/Contexts/Base/Main/Generator/Segments/SubstanceDataGenerator.d.ts +6 -0
  15. package/Contexts/Base/Main/Generator/Segments/SubstanceDataGenerator.js +35 -0
  16. package/Contexts/{World/Data/Generators → Base/Main/Generator/Segments}/VoxelDataGenerator.d.ts +3 -2
  17. package/Contexts/{World/Data/Generators → Base/Main/Generator/Segments}/VoxelDataGenerator.js +16 -23
  18. package/Contexts/Base/Remote/Sync/DataSync.types.d.ts +34 -0
  19. package/Contexts/Base/Remote/Sync/InitDataSync.d.ts +4 -0
  20. package/Contexts/Base/Remote/Sync/InitDataSync.js +43 -0
  21. package/Contexts/Base/Remote/Sync/InitWorldDataSync.js +37 -0
  22. package/{Interfaces/Classes → Contexts/Base}/ThreadManager.d.ts +3 -5
  23. package/{Interfaces/Classes → Contexts/Base}/ThreadManager.js +3 -3
  24. package/Contexts/Constructor/{Threads/ConstrcutorTheads.d.ts → ConstrcutorTheads.d.ts} +1 -3
  25. package/Contexts/Constructor/ConstrcutorTheads.js +14 -0
  26. package/Contexts/Constructor/DivineVoxelEngineConstructor.d.ts +4 -9
  27. package/Contexts/Constructor/DivineVoxelEngineConstructor.js +3 -17
  28. package/Contexts/Constructor/Tasks/DVEConstructorTasksQueues.js +2 -3
  29. package/Contexts/Nexus/DivineVoxelEngineNexus.d.ts +3 -11
  30. package/Contexts/Nexus/DivineVoxelEngineNexus.js +2 -12
  31. package/Contexts/Nexus/{Threads/NexusTheads.d.ts → NexusTheads.d.ts} +1 -3
  32. package/Contexts/Nexus/NexusTheads.js +15 -0
  33. package/Contexts/Render/DVERenderThreads.d.ts +1 -1
  34. package/Contexts/Render/DVERenderThreads.js +1 -28
  35. package/Contexts/Render/DivineVoxelEngineRender.d.ts +7 -38
  36. package/Contexts/Render/DivineVoxelEngineRender.js +3 -23
  37. package/Contexts/Render/Scene/MeshRegister.d.ts +38 -31
  38. package/Contexts/Render/Scene/MeshRegister.js +207 -184
  39. package/Contexts/Render/Tasks/RenderTasks.js +5 -9
  40. package/Contexts/Render/Tasks/RenderTasks.types.d.ts +5 -11
  41. package/Contexts/World/Data/DataSync.d.ts +3 -25
  42. package/Contexts/World/Data/DataSync.js +4 -115
  43. package/Contexts/World/DivineVoxelEngineWorld.d.ts +3 -14
  44. package/Contexts/World/DivineVoxelEngineWorld.js +11 -28
  45. package/Contexts/World/Lock/WorldLock.d.ts +2 -2
  46. package/Contexts/World/Tasks/WorldTasks.js +11 -5
  47. package/Contexts/World/WorldThreads.d.ts +8 -0
  48. package/Contexts/World/WorldThreads.js +15 -0
  49. package/Data/Cursor/Interfaces/DataCursor.interface.d.ts +5 -0
  50. package/Data/Cursor/Interfaces/DataCursor.interface.js +2 -0
  51. package/Data/Cursor/Interfaces/VoxelCursor.interface.d.ts +63 -0
  52. package/Data/Cursor/Interfaces/VoxelCursor.interface.js +233 -0
  53. package/Data/Cursor/Template/TemplateCursor.d.ts +11 -0
  54. package/Data/Cursor/Template/TemplateCursor.js +20 -0
  55. package/Data/Cursor/Template/TemplateVoxelCursor.d.ts +13 -0
  56. package/Data/Cursor/Template/TemplateVoxelCursor.js +31 -0
  57. package/Data/Cursor/VoxelCursor.d.ts +12 -0
  58. package/Data/Cursor/VoxelCursor.js +25 -0
  59. package/Data/Cursor/World/ChunkCursor.d.ts +16 -0
  60. package/Data/Cursor/World/ChunkCursor.js +59 -0
  61. package/Data/Cursor/World/ColumnCursor.d.ts +16 -0
  62. package/Data/Cursor/World/ColumnCursor.js +57 -0
  63. package/Data/Cursor/World/WorldCursor.d.ts +12 -0
  64. package/Data/Cursor/World/WorldCursor.js +50 -0
  65. package/Data/Cursor/World/WorldSectionCursor.interface.d.ts +7 -0
  66. package/Data/Cursor/World/WorldVoxelCursor.d.ts +22 -0
  67. package/Data/Cursor/World/WorldVoxelCursor.js +55 -0
  68. package/Data/Palettes/MaterialPalette.d.ts +9 -0
  69. package/Data/Palettes/MaterialPalette.js +11 -0
  70. package/Data/Palettes/SubstancePalette.d.ts +9 -0
  71. package/Data/Palettes/SubstancePalette.js +11 -0
  72. package/Data/Palettes/VoxelPalette.d.ts +11 -0
  73. package/Data/Palettes/VoxelPalette.js +15 -0
  74. package/Data/Register/MappedDataRegister.js +1 -0
  75. package/{Contexts/World/Data/Classes → Data/Structs/Builder}/StructBuilder.d.ts +3 -2
  76. package/{Contexts/World/Data/Classes → Data/Structs/Builder}/StructBuilder.js +11 -27
  77. package/Data/Structs/Builder/SubstanceStructBuilder.d.ts +2 -0
  78. package/Data/Structs/Builder/SubstanceStructBuilder.js +42 -0
  79. package/Data/Structs/Builder/VoxelStructBuilder.d.ts +2 -0
  80. package/{Contexts/World/Data/StructBuilders → Data/Structs/Builder}/VoxelStructBuilder.js +22 -17
  81. package/Data/Structs/ChunkStruct.d.ts +1 -0
  82. package/{Contexts/World/Data → Data}/Structs/ChunkStruct.js +4 -4
  83. package/Data/Structs/ColumnStruct.d.ts +1 -0
  84. package/{Contexts/World/Data → Data}/Structs/ColumnStruct.js +13 -13
  85. package/Data/Structs/Constants/ChunkStructProperties.d.ts +10 -0
  86. package/Data/Structs/Constants/ChunkStructProperties.js +11 -0
  87. package/Data/Structs/Constants/SubstanceStructIds.d.ts +0 -0
  88. package/Data/Structs/Constants/SubstanceStructIds.js +1 -0
  89. package/Data/Structs/Constants/WorldDataStructProperties.d.ts +8 -0
  90. package/Data/Structs/Constants/WorldDataStructProperties.js +9 -0
  91. package/{Contexts/World/Data → Data}/Structs/RegionStruct.d.ts +0 -1
  92. package/{Contexts/World/Data → Data}/Structs/RegionStruct.js +9 -9
  93. package/Data/Structs/SubstanceStruct.d.ts +16 -0
  94. package/Data/{Substance → Structs}/SubstanceStruct.js +3 -3
  95. package/Data/Structs/VoxelStruct.d.ts +27 -0
  96. package/Data/{Voxel → Structs}/VoxelStruct.js +2 -2
  97. package/Data/Types/WorldData.types.d.ts +2 -2
  98. package/Data/Types/WorldData.types.js +2 -2
  99. package/Data/World/Classes/Chunk.d.ts +8 -3
  100. package/Data/World/Classes/Chunk.js +48 -19
  101. package/Data/World/Classes/Column.d.ts +5 -3
  102. package/Data/World/Classes/Column.js +10 -6
  103. package/Data/World/Classes/Region.js +1 -1
  104. package/Data/World/DimensionsRegister.js +1 -1
  105. package/Data/{RegionHeaderRegister.d.ts → World/RegionHeaderRegister.d.ts} +1 -1
  106. package/Data/{RegionHeaderRegister.js → World/RegionHeaderRegister.js} +2 -2
  107. package/Data/World/WorldBounds.d.ts +1 -0
  108. package/Data/World/WorldBounds.js +15 -0
  109. package/Data/World/WorldPainter.d.ts +6 -5
  110. package/Data/World/WorldPainter.js +30 -45
  111. package/Data/World/WorldRegister.js +21 -13
  112. package/Data/World/WorldRegisterCache.js +1 -1
  113. package/Data/World/WorldSpaces.d.ts +1 -1
  114. package/Init/StartConstructor.d.ts +2 -2
  115. package/Init/StartConstructor.js +51 -6
  116. package/Init/StartNexus.d.ts +2 -0
  117. package/Init/StartNexus.js +29 -0
  118. package/Init/StartRenderer.d.ts +15 -0
  119. package/Init/StartRenderer.js +84 -0
  120. package/Init/StartWorld.d.ts +3 -6
  121. package/Init/StartWorld.js +130 -6
  122. package/Math/Constants/Faces.d.ts +1 -1
  123. package/Mesher/Functions/CompactMesh.d.ts +3 -0
  124. package/Mesher/Functions/CompactMesh.js +37 -0
  125. package/Mesher/Functions/CompactVoxelMesh.d.ts +3 -0
  126. package/Mesher/Functions/CompactVoxelMesh.js +111 -0
  127. package/Mesher/Geometry/VoxelGeometry.d.ts +1 -1
  128. package/Mesher/Geometry/VoxelGeometry.js +13 -9
  129. package/Mesher/Mesher.d.ts +5 -69
  130. package/Mesher/Mesher.js +28 -46
  131. package/Mesher/Meshers/MesherInterface.d.ts +5 -0
  132. package/Mesher/Meshers/MesherManager.d.ts +3 -3
  133. package/Mesher/Meshers/MesherManager.js +2 -2
  134. package/Mesher/Meshers/{Meshers/TextureMesher.d.ts → TextureMesher.d.ts} +5 -3
  135. package/Mesher/Meshers/{Meshers/TextureMesher.js → TextureMesher.js} +18 -13
  136. package/Mesher/Meshers/VoxelMesher.d.ts +15 -0
  137. package/Mesher/Meshers/VoxelMesher.js +47 -0
  138. package/Mesher/Models/Common/BoundsFunctions.d.ts +4 -0
  139. package/Mesher/Models/Common/BoundsFunctions.js +56 -0
  140. package/Mesher/Models/Common/BoxGeometryNode.d.ts +10 -0
  141. package/Mesher/Models/Common/BoxGeometryNode.js +74 -0
  142. package/Mesher/{Calc → Models/Common/Calc}/CalcConstants.d.ts +3 -4
  143. package/Mesher/{Calc → Models/Common/Calc}/CalcConstants.js +3 -3
  144. package/Mesher/{Calc/Light → Models/Common/Calc}/FaceDataCalc.d.ts +2 -2
  145. package/Mesher/{Calc/Light → Models/Common/Calc}/FaceDataCalc.js +8 -10
  146. package/Mesher/Models/Common/QuadGeometryNode.d.ts +11 -0
  147. package/Mesher/Models/Common/QuadGeometryNode.js +51 -0
  148. package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +6 -0
  149. package/Mesher/{Calc/Flow → Models/Nodes/Custom/Liquid}/FlowGradient.js +12 -15
  150. package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +15 -0
  151. package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +269 -0
  152. package/Mesher/Models/Nodes/Custom/index.d.ts +0 -0
  153. package/Mesher/Models/Nodes/Custom/index.js +1 -0
  154. package/Mesher/Models/Nodes/GeometryNode.d.ts +22 -0
  155. package/{VoxelModels/Constructor → Mesher/Models}/Nodes/GeometryNode.js +5 -1
  156. package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +25 -0
  157. package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruled/BoxVoxelGeometryNode.js +20 -83
  158. package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +21 -0
  159. package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruled/QuadVoxelGeometryNode.js +21 -51
  160. package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +19 -0
  161. package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +75 -0
  162. package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +20 -0
  163. package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +18 -48
  164. package/Mesher/Models/Nodes/VoxelGeometryConstructor.d.ts +13 -0
  165. package/Mesher/Models/Nodes/VoxelGeometryConstructor.js +68 -0
  166. package/Mesher/Models/VoxelConstructor.d.ts +30 -0
  167. package/{VoxelModels/Constructor/VoxelModelVoxelConstructor.js → Mesher/Models/VoxelConstructor.js} +34 -20
  168. package/{VoxelModels/Constructor → Mesher/Models}/VoxelGeometryLookUp.d.ts +6 -5
  169. package/{VoxelModels/Constructor → Mesher/Models}/VoxelGeometryLookUp.js +28 -25
  170. package/Mesher/Models/VoxelModelConstructorRegister.d.ts +21 -0
  171. package/Mesher/Models/VoxelModelConstructorRegister.js +53 -0
  172. package/Mesher/Models/VoxelModelEffect.d.ts +13 -0
  173. package/Mesher/Models/VoxelModelEffect.js +43 -0
  174. package/Mesher/Processors/ChunkProcessor.d.ts +6 -2
  175. package/Mesher/Processors/ChunkProcessor.js +68 -30
  176. package/Mesher/{Rules → Substances}/RenderedSubstances.d.ts +0 -1
  177. package/Mesher/Substances/RenderedSubstances.js +7 -0
  178. package/Mesher/Tasks/BuidlerTasks.types.d.ts +2 -2
  179. package/Mesher/Tools/OutlinedVoxelTool.js +46 -29
  180. package/Mesher/Tools/VoxelMeshBVHBuilder.d.ts +85 -0
  181. package/Mesher/Tools/VoxelMeshBVHBuilder.js +233 -0
  182. package/Mesher/Tools/VoxelMeshVertexStructCursor.d.ts +54 -0
  183. package/Mesher/Tools/VoxelMeshVertexStructCursor.js +145 -0
  184. package/Mesher/Tools/VoxelMesherDataTool.d.ts +22 -11
  185. package/Mesher/Tools/VoxelMesherDataTool.js +44 -62
  186. package/Mesher/Tools/VoxelTemplateDataTool.d.ts +2 -2
  187. package/Mesher/Tools/VoxelTemplateDataTool.js +1 -1
  188. package/Mesher/Types/Mesher.types.d.ts +21 -0
  189. package/Mesher/Types/VoxelMesh.types.d.ts +5 -0
  190. package/Mesher/Types/VoxelMesh.types.js +14 -0
  191. package/Mesher/Types/index.d.ts +2 -1
  192. package/Mesher/Types/index.js +2 -1
  193. package/Models/Defaults/LiquidVoxelModel.d.ts +7 -0
  194. package/Models/Defaults/LiquidVoxelModel.js +47 -0
  195. package/{VoxelModels → Models}/Examples.d.ts +4 -0
  196. package/{VoxelModels → Models}/Examples.js +369 -99
  197. package/{VoxelModels → Models}/Input/BoxVoxelGometryInputs.js +4 -1
  198. package/{VoxelModels → Models}/Rules/Classes/OcclusionFace.js +2 -2
  199. package/Models/Rules/Classes/VoxelRulesGeometry.d.ts +15 -0
  200. package/{VoxelModels → Models}/Rules/Classes/VoxelRulesGeometry.js +9 -12
  201. package/{VoxelModels → Models}/Rules/Classes/VoxelRulesModel.d.ts +1 -1
  202. package/{VoxelModels → Models}/Rules/Functions/BuildGeomtryInputs.js +20 -2
  203. package/{VoxelModels → Models}/Rules/Functions/BuildRules.d.ts +1 -1
  204. package/{VoxelModels → Models}/Rules/Functions/GetOcclusionFaces.d.ts +1 -1
  205. package/{VoxelModels → Models}/Rules/Functions/GetOcclusionFaces.js +1 -1
  206. package/{VoxelModels → Models}/Rules/VoxelModelManager.d.ts +1 -1
  207. package/{VoxelModels → Models}/Rules/VoxelModelManager.js +9 -7
  208. package/{VoxelModels → Models}/Shared/Transform.d.ts +2 -2
  209. package/{VoxelModels → Models}/Shared/Transform.js +1 -1
  210. package/{VoxelModels → Models}/VoxelModel.types.d.ts +13 -26
  211. package/Renderer/Classes/ChunkMesh.d.ts +10 -0
  212. package/Renderer/Classes/ChunkMesh.js +13 -0
  213. package/Renderer/Classes/MeshRegisterColumn.d.ts +7 -0
  214. package/Renderer/Classes/MeshRegisterColumn.js +7 -0
  215. package/Renderer/Classes/MushRegisterRegion.d.ts +4 -0
  216. package/Renderer/Classes/MushRegisterRegion.js +3 -0
  217. package/Renderer/DVEChunkMeshInterface.d.ts +3 -0
  218. package/Renderer/DVEChunkMeshes.d.ts +6 -0
  219. package/Renderer/DVEChunkMeshes.js +2 -0
  220. package/{Interfaces/Render/Nodes → Renderer}/DVERenderNode.types.d.ts +3 -3
  221. package/Renderer/DVERenderer.d.ts +6 -0
  222. package/Renderer/MeshManager.d.ts +11 -0
  223. package/Renderer/MeshManager.js +79 -0
  224. package/Renderer/MeshRegister.d.ts +39 -0
  225. package/Renderer/MeshRegister.js +218 -0
  226. package/{Data/Settings → Settings}/EngineSettings.d.ts +1 -1
  227. package/{Data/Settings → Settings}/EngineSettings.js +5 -5
  228. package/{Types → Settings}/EngineSettings.types.d.ts +5 -5
  229. package/{Types → Settings}/EngineSettings.types.js +3 -5
  230. package/Tasks/Analyzer/Analyzer.d.ts +19 -0
  231. package/Tasks/Analyzer/Analyzer.js +156 -0
  232. package/{Analyzer → Tasks/Analyzer}/AnalyzerUpdater.d.ts +2 -2
  233. package/Tasks/Analyzer/InitTasks.js +16 -0
  234. package/{DataLoader → Tasks/DataLoader}/Broswer/DataHandler.d.ts +2 -2
  235. package/{DataLoader → Tasks/DataLoader}/Broswer/DataHandler.js +1 -1
  236. package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataTool.d.ts +2 -2
  237. package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataTool.js +1 -1
  238. package/{DataLoader → Tasks/DataLoader}/Constructor/WorldDataSerializer.d.ts +5 -5
  239. package/{DataLoader → Tasks/DataLoader}/Constructor/WorldDataSerializer.js +3 -3
  240. package/{DataLoader → Tasks/DataLoader}/Node/DivineVoxelEngineData.d.ts +1 -1
  241. package/{DataLoader → Tasks/DataLoader}/Node/DivineVoxelEngineData.js +1 -1
  242. package/{DataLoader → Tasks/DataLoader}/Node/System/RegionSystem.d.ts +1 -1
  243. package/{DataLoader → Tasks/DataLoader}/Node/Tools/NodeRegionTool.d.ts +1 -1
  244. package/{DataLoader → Tasks/DataLoader}/Node/Util/DVED.util.js +3 -3
  245. package/{Interfaces/DataLoader → Tasks/DataLoader/Types}/DVEDataHandler.d.ts +1 -1
  246. package/{Interfaces/DataLoader → Tasks/DataLoader/Types}/DVEDataHandler.js +1 -1
  247. package/{DataLoader → Tasks/DataLoader}/World/DataHandlerWrapper.d.ts +3 -5
  248. package/{DataLoader → Tasks/DataLoader}/World/DataHandlerWrapper.js +5 -32
  249. package/{DataLoader → Tasks/DataLoader}/World/DataLoaderTasks.js +2 -2
  250. package/{DataLoader → Tasks/DataLoader}/World/DivineVoxelEngineDataLoaderWorld.d.ts +1 -1
  251. package/{DataLoader → Tasks/DataLoader}/World/Tools/DataLoaderTool.d.ts +2 -2
  252. package/{DataLoader → Tasks/DataLoader}/World/Tools/DataLoaderTool.js +7 -7
  253. package/{DataLoader → Tasks/DataLoader}/World/Tools/DataSerializerTool.d.ts +2 -2
  254. package/{DataLoader → Tasks/DataLoader}/World/Tools/DataSerializerTool.js +1 -1
  255. package/{DataLoader → Tasks/DataLoader}/World/Tools/LoaderRegister.d.ts +1 -1
  256. package/{DataLoader → Tasks/DataLoader}/World/Tools/LoaderRegister.js +1 -1
  257. package/Tasks/IWG/Constants/ColumnState.d.ts +6 -0
  258. package/Tasks/IWG/Constants/ColumnState.js +7 -0
  259. package/{IWG → Tasks/IWG}/World/Classes/DebouncedTasks.d.ts +1 -1
  260. package/{IWG → Tasks/IWG}/World/Classes/DebouncedTasks.js +1 -1
  261. package/{IWG → Tasks/IWG}/World/Classes/Generator.d.ts +5 -7
  262. package/{IWG → Tasks/IWG}/World/Classes/Generator.js +19 -22
  263. package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGBatchTask.d.ts +1 -1
  264. package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskBase.d.ts +1 -1
  265. package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskBase.js +1 -1
  266. package/{IWG → Tasks/IWG}/World/IWG.js +1 -1
  267. package/{IWG → Tasks/IWG}/World/Load/SafeExit.js +0 -1
  268. package/{IWG → Tasks/IWG}/World/Load/Teleport.d.ts +1 -1
  269. package/{IWG → Tasks/IWG}/World/Tasks/Rendering/IWGBuildTasks.js +1 -1
  270. package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveAndUnloadTasks.js +1 -1
  271. package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveTasks.js +1 -1
  272. package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGDecorateTasks.js +3 -3
  273. package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGGenerateTasks.js +3 -3
  274. package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGLoadTasks.js +1 -1
  275. package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGPropagationTasks.js +3 -3
  276. package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGWorldSunTasks.js +3 -3
  277. package/Tasks/Mesher/InitTasks.d.ts +2 -0
  278. package/Tasks/Mesher/InitTasks.js +46 -0
  279. package/Tasks/Propagation/Explosion/ExplosionManager.d.ts +4 -0
  280. package/{Propagation → Tasks/Propagation}/Explosion/ExplosionManager.js +11 -14
  281. package/{Propagation → Tasks/Propagation}/Flow/FlowManager.d.ts +7 -7
  282. package/{Propagation → Tasks/Propagation}/Flow/FlowManager.js +10 -10
  283. package/Tasks/Propagation/Flow/Functions/FlowRemove.d.ts +2 -0
  284. package/{Propagation → Tasks/Propagation}/Flow/Functions/FlowRemove.js +20 -20
  285. package/Tasks/Propagation/Flow/Functions/FlowUpdate.d.ts +2 -0
  286. package/{Propagation → Tasks/Propagation}/Flow/Functions/FlowUpdate.js +10 -10
  287. package/Tasks/Propagation/Illumanation/Functions/RGBUpdate.d.ts +3 -0
  288. package/Tasks/Propagation/Illumanation/Functions/RGBUpdate.js +82 -0
  289. package/Tasks/Propagation/Illumanation/Functions/SunUpdate.d.ts +3 -0
  290. package/Tasks/Propagation/Illumanation/Functions/SunUpdate.js +116 -0
  291. package/Tasks/Propagation/Illumanation/Functions/WorldSun.d.ts +2 -0
  292. package/Tasks/Propagation/Illumanation/Functions/WorldSun.js +115 -0
  293. package/{Propagation → Tasks/Propagation}/Illumanation/IlluminationManager.d.ts +1 -1
  294. package/{Propagation → Tasks/Propagation}/Illumanation/IlluminationManager.js +2 -2
  295. package/Tasks/Propagation/InitTasks.d.ts +1 -0
  296. package/Tasks/Propagation/InitTasks.js +23 -0
  297. package/Tasks/Propagation/Propagation.d.ts +13 -0
  298. package/{Propagation → Tasks/Propagation}/Propagation.js +3 -2
  299. package/{Types → Tasks}/Tasks.types.d.ts +2 -1
  300. package/{Contexts/Constructor/Tasks/ConstructorTasksIds.d.ts → Tasks/TasksIds.d.ts} +1 -1
  301. package/Tasks/TasksIds.js +22 -0
  302. package/Tasks/Update/InitTasks.d.ts +4 -0
  303. package/Tasks/Update/InitTasks.js +38 -0
  304. package/Tasks/Update/UpdateTask.d.ts +53 -0
  305. package/Tasks/Update/UpdateTask.js +136 -0
  306. package/{Contexts/Constructor/Tasks → Tasks/Update}/VoxelUpdate.d.ts +5 -4
  307. package/Tasks/Update/VoxelUpdate.js +164 -0
  308. package/Tasks/WorldGeneration/InitTasks.d.ts +1 -0
  309. package/Tasks/WorldGeneration/InitTasks.js +15 -0
  310. package/{Interfaces/WorldGen → Tasks/WorldGeneration}/WorldGen.types.d.ts +1 -1
  311. package/Tasks/WorldGeneration/WorldGenBrush.d.ts +16 -0
  312. package/Tasks/WorldGeneration/WorldGenBrush.js +115 -0
  313. package/{WorldGeneration → Tasks/WorldGeneration}/WorldGenRegister.d.ts +2 -2
  314. package/{WorldGeneration → Tasks/WorldGeneration}/WorldGenRegister.js +16 -17
  315. package/{WorldGeneration → Tasks/WorldGeneration}/WorldGeneration.d.ts +3 -3
  316. package/{WorldGeneration → Tasks/WorldGeneration}/WorldGeneration.js +1 -13
  317. package/Templates/FullVoxelTemplate.d.ts +13 -0
  318. package/Templates/FullVoxelTemplate.js +54 -0
  319. package/Templates/Functions/CreateTemplate.js +2 -2
  320. package/Templates/VoxelTemplate.d.ts +3 -3
  321. package/Templates/VoxelTemplate.js +6 -6
  322. package/Templates/VoxelTemplates.types.d.ts +8 -0
  323. package/Textures/Texture.types.d.ts +1 -5
  324. package/Textures/TextureAnimations.d.ts +2 -2
  325. package/Textures/TextureAnimations.js +26 -126
  326. package/Textures/TextureArray.d.ts +47 -0
  327. package/Textures/TextureArray.js +202 -0
  328. package/Textures/TextureBuilder.d.ts +3 -6
  329. package/Textures/TextureBuilder.js +53 -178
  330. package/Textures/TextureManager.d.ts +7 -7
  331. package/Textures/TextureManager.js +77 -58
  332. package/Textures/TextureRegister.d.ts +1 -1
  333. package/Textures/TextureRegister.js +3 -8
  334. package/Tools/Brush/AdvancedBrushTool.d.ts +3 -0
  335. package/Tools/Brush/AdvancedBrushTool.js +19 -8
  336. package/Tools/Brush/Brush.d.ts +22 -15
  337. package/Tools/Brush/Brush.js +94 -55
  338. package/Tools/Classes/DataToolBase.js +1 -1
  339. package/Tools/Data/DataTool.d.ts +9 -8
  340. package/Tools/Data/DataTool.js +37 -38
  341. package/Tools/Data/SubstanceDataTool.d.ts +3 -7
  342. package/Tools/Data/SubstanceDataTool.js +13 -25
  343. package/Tools/Data/WorldData/ChunkDataTool.d.ts +1 -1
  344. package/Tools/Data/WorldData/ColumnDataTool.js +15 -15
  345. package/Tools/Data/WorldData/HeightMapTool.js +1 -1
  346. package/Tools/Tasks/TasksTool.d.ts +2 -2
  347. package/Tools/Tasks/TasksTool.js +17 -17
  348. package/Voxels/Effects/VoxelEffect.d.ts +12 -0
  349. package/Voxels/Effects/VoxelEffect.js +6 -0
  350. package/Voxels/Effects/VoxelEffectRegister.d.ts +6 -0
  351. package/Voxels/Effects/VoxelEffectRegister.js +15 -0
  352. package/Voxels/Effects/VoxelEffects.types.d.ts +21 -0
  353. package/{VoxelModels/Rules → Voxels}/Functions/BuildStateData.d.ts +5 -3
  354. package/{VoxelModels/Rules → Voxels}/Functions/BuildStateData.js +49 -5
  355. package/Voxels/Indexes/VoxelIndex.d.ts +39 -0
  356. package/Voxels/Indexes/VoxelIndex.js +133 -0
  357. package/Voxels/Indexes/VoxelModelIndex.d.ts +18 -0
  358. package/Voxels/Indexes/VoxelModelIndex.js +59 -0
  359. package/Voxels/Indexes/VoxelTextureIndex.d.ts +8 -0
  360. package/Voxels/Indexes/VoxelTextureIndex.js +40 -0
  361. package/Voxels/InitVoxelData.d.ts +9 -0
  362. package/{VoxelModels/InitVoxelModels.js → Voxels/InitVoxelData.js} +53 -23
  363. package/{VoxelModels → Voxels}/State/CondiotnalTreeReader.d.ts +1 -1
  364. package/{VoxelModels → Voxels}/State/CondiotnalTreeReader.js +3 -2
  365. package/{VoxelModels → Voxels}/State/LogicStatementReader.d.ts +2 -1
  366. package/{VoxelModels → Voxels}/State/LogicStatementReader.js +2 -2
  367. package/{VoxelModels → Voxels}/State/Schema/BinarySchema.d.ts +3 -1
  368. package/Voxels/State/Schema/BinarySchema.js +103 -0
  369. package/{VoxelModels → Voxels}/State/Schema/BinarySchemaNode.d.ts +1 -1
  370. package/{VoxelModels → Voxels}/State/Schema/BinarySchemaNode.js +1 -1
  371. package/{VoxelModels → Voxels}/State/Schema/Conditions/SameVoxelConditions.d.ts +1 -1
  372. package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +17 -0
  373. package/{VoxelModels → Voxels}/State/Schema/StateSchema.d.ts +6 -3
  374. package/{VoxelModels → Voxels}/State/Schema/StateSchema.js +4 -3
  375. package/Voxels/State/Schema/VoxelSchema.d.ts +7 -0
  376. package/Voxels/State/Schema/VoxelSchema.js +10 -0
  377. package/{VoxelModels → Voxels}/State/SchemaRegister.d.ts +5 -5
  378. package/Voxels/State/SchemaRegister.js +56 -0
  379. package/{VoxelModels → Voxels}/State/State.types.d.ts +25 -2
  380. package/{VoxelModels → Voxels}/State/StateTreeReader.d.ts +1 -1
  381. package/{VoxelModels → Voxels}/State/StateTreeReader.js +3 -0
  382. package/Voxels/State/VoxelTagStates.d.ts +22 -0
  383. package/Voxels/State/VoxelTagStates.js +47 -0
  384. package/Voxels/Voxel.types.d.ts +94 -0
  385. package/Voxels/Voxel.types.js +16 -0
  386. package/Voxels/VoxelMaterial.types.d.ts +8 -0
  387. package/Voxels/VoxelSubstances.types.d.ts +21 -0
  388. package/Voxels/VoxelSubstances.types.js +9 -0
  389. package/{VoxelModels/VoxelModelRules.types.d.ts → Voxels/VoxelSyncData.d.ts} +15 -11
  390. package/Voxels/VoxelSyncData.js +1 -0
  391. package/Voxels/index.d.ts +3 -0
  392. package/Voxels/index.js +3 -0
  393. package/index.d.ts +1 -0
  394. package/index.js +1 -0
  395. package/package.json +9 -7
  396. package/Analyzer/Analyzer.d.ts +0 -18
  397. package/Analyzer/Analyzer.js +0 -91
  398. package/Analyzer/AnalyzerProcessor.d.ts +0 -6
  399. package/Analyzer/AnalyzerProcessor.js +0 -39
  400. package/Contexts/Constructor/InitWorker.d.ts +0 -2
  401. package/Contexts/Constructor/InitWorker.js +0 -20
  402. package/Contexts/Constructor/Tasks/ConstructorTasks.d.ts +0 -2
  403. package/Contexts/Constructor/Tasks/ConstructorTasks.js +0 -82
  404. package/Contexts/Constructor/Tasks/ConstructorTasksIds.js +0 -22
  405. package/Contexts/Constructor/Tasks/TasksRequest.d.ts +0 -141
  406. package/Contexts/Constructor/Tasks/TasksRequest.js +0 -218
  407. package/Contexts/Constructor/Tasks/VoxelUpdate.js +0 -151
  408. package/Contexts/Constructor/Threads/ConstrcutorTheads.js +0 -22
  409. package/Contexts/Constructor/Threads/ConstructorThreadState.d.ts +0 -5
  410. package/Contexts/Constructor/Threads/ConstructorThreadState.js +0 -16
  411. package/Contexts/Nexus/InitWorker.d.ts +0 -2
  412. package/Contexts/Nexus/InitWorker.js +0 -15
  413. package/Contexts/Nexus/Threads/NexusTheads.js +0 -25
  414. package/Contexts/Nexus/Threads/NexusThreadState.d.ts +0 -7
  415. package/Contexts/Nexus/Threads/NexusThreadState.js +0 -10
  416. package/Contexts/Render/InitThreads.d.ts +0 -2
  417. package/Contexts/Render/InitThreads.js +0 -53
  418. package/Contexts/Render/Scene/MeshManager.d.ts +0 -15
  419. package/Contexts/Render/Scene/MeshManager.js +0 -105
  420. package/Contexts/Render/Scene/MeshRegister.types.d.ts +0 -13
  421. package/Contexts/RichWorld/DivineVoxelEngineRichWorld.d.ts +0 -21
  422. package/Contexts/RichWorld/DivineVoxelEngineRichWorld.js +0 -33
  423. package/Contexts/RichWorld/InitWorker.d.ts +0 -2
  424. package/Contexts/RichWorld/InitWorker.js +0 -15
  425. package/Contexts/RichWorld/RichDataRegister.d.ts +0 -24
  426. package/Contexts/RichWorld/RichDataRegister.js +0 -110
  427. package/Contexts/RichWorld/RichWorldTasks.d.ts +0 -2
  428. package/Contexts/RichWorld/RichWorldTasks.js +0 -58
  429. package/Contexts/RichWorld/Threads/RichWorldThreadState.d.ts +0 -7
  430. package/Contexts/RichWorld/Threads/RichWorldThreadState.js +0 -10
  431. package/Contexts/RichWorld/Threads/RichWorldThreads.d.ts +0 -10
  432. package/Contexts/RichWorld/Threads/RichWorldThreads.js +0 -22
  433. package/Contexts/RichWorld/Tools/RichColumnDataTool.d.ts +0 -7
  434. package/Contexts/RichWorld/Tools/RichColumnDataTool.js +0 -18
  435. package/Contexts/RichWorld/Tools/RichDataTool.d.ts +0 -14
  436. package/Contexts/RichWorld/Tools/RichDataTool.js +0 -71
  437. package/Contexts/RichWorld/index.d.ts +0 -1
  438. package/Contexts/RichWorld/index.js +0 -1
  439. package/Contexts/World/Data/Classes/RegisterDataManager.d.ts +0 -8
  440. package/Contexts/World/Data/Classes/RegisterDataManager.js +0 -22
  441. package/Contexts/World/Data/DataRegister.d.ts +0 -8
  442. package/Contexts/World/Data/DataRegister.js +0 -9
  443. package/Contexts/World/Data/DataStructBuilders.d.ts +0 -12
  444. package/Contexts/World/Data/DataStructBuilders.js +0 -23
  445. package/Contexts/World/Data/Generators/SubstanceDataGenerator.d.ts +0 -5
  446. package/Contexts/World/Data/Generators/SubstanceDataGenerator.js +0 -36
  447. package/Contexts/World/Data/Generators/WorldDataGenerator.d.ts +0 -12
  448. package/Contexts/World/Data/Generators/WorldDataGenerator.js +0 -24
  449. package/Contexts/World/Data/Managers/DataManagers.d.ts +0 -5
  450. package/Contexts/World/Data/Managers/DataManagers.js +0 -126
  451. package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.d.ts +0 -2
  452. package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.js +0 -57
  453. package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.d.ts +0 -2
  454. package/Contexts/World/Data/Structs/ChunkStruct.d.ts +0 -3
  455. package/Contexts/World/Data/Structs/ColumnStruct.d.ts +0 -3
  456. package/Contexts/World/Data/WorldDataHooks.js +0 -96
  457. package/Contexts/World/InitWorker.d.ts +0 -2
  458. package/Contexts/World/InitWorker.js +0 -35
  459. package/Contexts/World/Threads/WorldThreadState.d.ts +0 -4
  460. package/Contexts/World/Threads/WorldThreadState.js +0 -6
  461. package/Contexts/World/Threads/WorldThreads.d.ts +0 -14
  462. package/Contexts/World/Threads/WorldThreads.js +0 -36
  463. package/Data/Constants/Structs/ChunkStructProperties.d.ts +0 -10
  464. package/Data/Constants/Structs/ChunkStructProperties.js +0 -10
  465. package/Data/Constants/Structs/SubstanceStructProperties.d.ts +0 -8
  466. package/Data/Constants/Structs/SubstanceStructProperties.js +0 -8
  467. package/Data/Constants/Structs/VoxelStructProperties.d.ts +0 -11
  468. package/Data/Constants/Structs/VoxelStructProperties.js +0 -11
  469. package/Data/Constants/Structs/WorldDataStructProperties.d.ts +0 -8
  470. package/Data/Constants/Structs/WorldDataStructProperties.js +0 -8
  471. package/Data/Constants/SubstanceTagIds.d.ts +0 -12
  472. package/Data/Constants/SubstanceTagIds.js +0 -13
  473. package/Data/Constants/VoxelTagIds.d.ts +0 -14
  474. package/Data/Constants/VoxelTagIds.js +0 -15
  475. package/Data/DVEDataCore.d.ts +0 -6
  476. package/Data/DVEDataCore.js +0 -6
  477. package/Data/DVEDataManager.d.ts +0 -31
  478. package/Data/DVEDataManager.js +0 -23
  479. package/Data/DVEDataSyncNode.d.ts +0 -20
  480. package/Data/DVEDataSyncNode.js +0 -53
  481. package/Data/Substance/SubstancePalette.d.ts +0 -9
  482. package/Data/Substance/SubstancePalette.js +0 -16
  483. package/Data/Substance/SubstanceStruct.d.ts +0 -20
  484. package/Data/Types/DataSync.types.d.ts +0 -3
  485. package/Data/Types/VoxelData.types.d.ts +0 -7
  486. package/Data/Voxel/VoxelPalette.d.ts +0 -12
  487. package/Data/Voxel/VoxelPalette.js +0 -22
  488. package/Data/Voxel/VoxelStruct.d.ts +0 -26
  489. package/IWG/Constants/ColumnState.d.ts +0 -6
  490. package/IWG/Constants/ColumnState.js +0 -7
  491. package/Interfaces/Anaylzer/DVEAnaylzer.d.ts +0 -5
  492. package/Interfaces/Anaylzer/DVEAnaylzer.js +0 -2
  493. package/Interfaces/Classes/ThreadState.d.ts +0 -7
  494. package/Interfaces/Classes/ThreadState.js +0 -7
  495. package/Interfaces/Data/DataManager.d.ts +0 -13
  496. package/Interfaces/Data/DataManager.js +0 -14
  497. package/Interfaces/Data/RemoteDataSyncNode.d.ts +0 -16
  498. package/Interfaces/Data/RemoteDataSyncNode.js +0 -36
  499. package/Interfaces/Render/DVEFOManager.d.ts +0 -7
  500. package/Interfaces/Render/DVEFOManager.js +0 -6
  501. package/Interfaces/Render/DVEMeshCuller.d.ts +0 -7
  502. package/Interfaces/Render/DVEMeshCuller.js +0 -8
  503. package/Interfaces/Render/DVERenderer.d.ts +0 -14
  504. package/Interfaces/Render/Nodes/DVENodeManager.d.ts +0 -6
  505. package/Interfaces/Render/Nodes/DVENodeManager.js +0 -2
  506. package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.d.ts +0 -5
  507. package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.js +0 -2
  508. package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.d.ts +0 -13
  509. package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.js +0 -6
  510. package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.d.ts +0 -5
  511. package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.js +0 -2
  512. package/Mesher/Calc/Flow/FlowGradient.d.ts +0 -5
  513. package/Mesher/Calc/Light/LightGradient.d.ts +0 -13
  514. package/Mesher/Calc/Light/LightGradient.js +0 -255
  515. package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.d.ts +0 -13
  516. package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.js +0 -77
  517. package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.d.ts +0 -27
  518. package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.js +0 -75
  519. package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.d.ts +0 -13
  520. package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.js +0 -56
  521. package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.d.ts +0 -13
  522. package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.js +0 -80
  523. package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.d.ts +0 -16
  524. package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.js +0 -58
  525. package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.d.ts +0 -12
  526. package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.js +0 -46
  527. package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.d.ts +0 -12
  528. package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.js +0 -23
  529. package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.d.ts +0 -12
  530. package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.js +0 -23
  531. package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.d.ts +0 -12
  532. package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.js +0 -50
  533. package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.d.ts +0 -12
  534. package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.js +0 -45
  535. package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.d.ts +0 -7
  536. package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.js +0 -3
  537. package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.d.ts +0 -44
  538. package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.js +0 -75
  539. package/Mesher/Meshers/Classes/Mesher.d.ts +0 -6
  540. package/Mesher/Meshers/Classes/Mesher.js +0 -6
  541. package/Mesher/Meshers/Meshers/VoxelMesher.d.ts +0 -11
  542. package/Mesher/Meshers/Meshers/VoxelMesher.js +0 -47
  543. package/Mesher/Processors/TemplateProcessor.d.ts +0 -16
  544. package/Mesher/Processors/TemplateProcessor.js +0 -71
  545. package/Mesher/Rules/Overrides/OverrideBase.d.ts +0 -8
  546. package/Mesher/Rules/Overrides/OverrideBase.js +0 -20
  547. package/Mesher/Rules/Overrides/OverridesManager.d.ts +0 -10
  548. package/Mesher/Rules/Overrides/OverridesManager.js +0 -10
  549. package/Mesher/Rules/RenderedSubstances.js +0 -13
  550. package/Mesher/Rules/SubstanceRules.d.ts +0 -7
  551. package/Mesher/Rules/SubstanceRules.js +0 -60
  552. package/Mesher/Shapes/ShapeTool.d.ts +0 -8
  553. package/Mesher/Shapes/ShapeTool.js +0 -9
  554. package/Mesher/Shapes/VoxelShapeBase.d.ts +0 -5
  555. package/Mesher/Shapes/VoxelShapeBase.js +0 -3
  556. package/Mesher/Shapes/VoxelShapeManager.d.ts +0 -10
  557. package/Mesher/Shapes/VoxelShapeManager.js +0 -37
  558. package/Mesher/Shapes/default/Cube/Cube.voxel.shape.d.ts +0 -15
  559. package/Mesher/Shapes/default/Cube/Cube.voxel.shape.js +0 -234
  560. package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.d.ts +0 -24
  561. package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.js +0 -231
  562. package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.d.ts +0 -16
  563. package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.js +0 -250
  564. package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.d.ts +0 -8
  565. package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.js +0 -67
  566. package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.d.ts +0 -8
  567. package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.js +0 -68
  568. package/Mesher/Shapes/default/Panel/PanelStates.d.ts +0 -8
  569. package/Mesher/Shapes/default/Panel/PanelStates.js +0 -9
  570. package/Mesher/Shapes/default/RegisterDefaultShapes.js +0 -10
  571. package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.d.ts +0 -15
  572. package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.js +0 -31
  573. package/Mesher/Shapes/default/Stairs/StairOverrides.d.ts +0 -17
  574. package/Mesher/Shapes/default/Stairs/StairOverrides.js +0 -151
  575. package/Mesher/Shapes/default/Stairs/StairShapes.d.ts +0 -2
  576. package/Mesher/Shapes/default/Stairs/StairShapes.js +0 -546
  577. package/Mesher/Shapes/default/Stairs/StairStates.d.ts +0 -19
  578. package/Mesher/Shapes/default/Stairs/StairStates.js +0 -37
  579. package/Mesher/Shapes/default/index.d.ts +0 -6
  580. package/Mesher/Shapes/default/index.js +0 -6
  581. package/Mesher/Tools/BuilderDataTool.d.ts +0 -4
  582. package/Mesher/Tools/BuilderDataTool.js +0 -7
  583. package/Mesher/Types/Override.types.d.ts +0 -8
  584. package/Propagation/Explosion/ExplosionManager.d.ts +0 -4
  585. package/Propagation/Flow/Functions/FlowRemove.d.ts +0 -2
  586. package/Propagation/Flow/Functions/FlowUpdate.d.ts +0 -2
  587. package/Propagation/Illumanation/Functions/RGBUpdate.d.ts +0 -3
  588. package/Propagation/Illumanation/Functions/RGBUpdate.js +0 -169
  589. package/Propagation/Illumanation/Functions/SunUpdate.d.ts +0 -3
  590. package/Propagation/Illumanation/Functions/SunUpdate.js +0 -187
  591. package/Propagation/Illumanation/Functions/WorldSun.d.ts +0 -2
  592. package/Propagation/Illumanation/Functions/WorldSun.js +0 -190
  593. package/Propagation/Propagation.d.ts +0 -13
  594. package/Shaders/Code/Functions/FogShaders.d.ts +0 -2
  595. package/Shaders/Code/Functions/FogShaders.js +0 -59
  596. package/Shaders/Code/Functions/FragmentFunctions.d.ts +0 -2
  597. package/Shaders/Code/Functions/FragmentFunctions.js +0 -155
  598. package/Shaders/Code/Functions/UtilShaders.d.ts +0 -2
  599. package/Shaders/Code/Functions/UtilShaders.js +0 -209
  600. package/Shaders/Code/Functions/VertexFunctions.d.ts +0 -2
  601. package/Shaders/Code/Functions/VertexFunctions.js +0 -73
  602. package/Shaders/Code/Snippets/FragmentSnippets.d.ts +0 -2
  603. package/Shaders/Code/Snippets/FragmentSnippets.js +0 -93
  604. package/Shaders/Code/Snippets/VertexSnippets.d.ts +0 -2
  605. package/Shaders/Code/Snippets/VertexSnippets.js +0 -28
  606. package/Shaders/Code/Snippets/VoxelSnippets.d.ts +0 -2
  607. package/Shaders/Code/Snippets/VoxelSnippets.js +0 -137
  608. package/Shaders/DVEShaderRegister.d.ts +0 -42
  609. package/Shaders/DVEShaderRegister.js +0 -15
  610. package/Shaders/DVEShaders.d.ts +0 -55
  611. package/Shaders/DVEShaders.js +0 -369
  612. package/Shaders/Types/Shader.types.d.ts +0 -14
  613. package/Textures/TextureType.d.ts +0 -63
  614. package/Textures/TextureType.js +0 -287
  615. package/Tools/Data/RichDataTool.d.ts +0 -25
  616. package/Tools/Data/RichDataTool.js +0 -121
  617. package/Types/DataSync.types.d.ts +0 -25
  618. package/Types/Substances.types.d.ts +0 -4
  619. package/Types/Voxel.types.d.ts +0 -12
  620. package/Types/index.d.ts +0 -2
  621. package/Types/index.js +0 -2
  622. package/VoxelModels/Constructor/InitVoxelModelsConstructor.d.ts +0 -2
  623. package/VoxelModels/Constructor/InitVoxelModelsConstructor.js +0 -20
  624. package/VoxelModels/Constructor/Nodes/GeometryNode.d.ts +0 -15
  625. package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +0 -22
  626. package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +0 -23
  627. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +0 -21
  628. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +0 -138
  629. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +0 -22
  630. package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.d.ts +0 -15
  631. package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.js +0 -14
  632. package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.d.ts +0 -13
  633. package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.js +0 -33
  634. package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.d.ts +0 -9
  635. package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.js +0 -27
  636. package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.d.ts +0 -14
  637. package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.js +0 -31
  638. package/VoxelModels/Constructor/Register/VoxelModelsConstructor.d.ts +0 -13
  639. package/VoxelModels/Constructor/Register/VoxelModelsConstructor.js +0 -21
  640. package/VoxelModels/Constructor/VoxelModelVoxelConstructor.d.ts +0 -24
  641. package/VoxelModels/InitVoxelModels.d.ts +0 -10
  642. package/VoxelModels/Rules/Classes/VoxelRulesGeometry.d.ts +0 -19
  643. package/VoxelModels/State/Schema/BinarySchema.js +0 -52
  644. package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.js +0 -13
  645. package/VoxelModels/State/SchemaRegister.js +0 -50
  646. package/VoxelModels/Tags/TagsOverrides.d.ts +0 -5
  647. package/VoxelModels/Tags/TagsOverrides.js +0 -4
  648. package/VoxelModels/World/InitVoxelModelsWorld.d.ts +0 -2
  649. package/VoxelModels/World/InitVoxelModelsWorld.js +0 -11
  650. package/WorldGeneration/WorldGenBrush.d.ts +0 -75
  651. package/WorldGeneration/WorldGenBrush.js +0 -136
  652. /package/{Contexts/Render/Scene/MeshRegister.types.js → Cache/Cache.types.js} +0 -0
  653. /package/{Data/Types/DataSync.types.js → Contexts/Base/Main/Generator/DataGenerator.types.js} +0 -0
  654. /package/{Types → Contexts/Base/Remote/Sync}/DataSync.types.js +0 -0
  655. /package/{Interfaces/Common → Contexts/Base/Remote/Sync}/DataSyncIds.d.ts +0 -0
  656. /package/{Interfaces/Common → Contexts/Base/Remote/Sync}/DataSyncIds.js +0 -0
  657. /package/Contexts/{World/Data/WorldDataHooks.d.ts → Base/Remote/Sync/InitWorldDataSync.d.ts} +0 -0
  658. /package/Data/{Types/VoxelData.types.js → Cursor/World/WorldSectionCursor.interface.js} +0 -0
  659. /package/{Types → Data/Types}/StructBuilder.types.d.ts +0 -0
  660. /package/{Types → Data/Types}/StructBuilder.types.js +0 -0
  661. /package/{DataLoader/Types/DVED.types.js → Mesher/Meshers/MesherInterface.js} +0 -0
  662. /package/{Interfaces/Render/Nodes/DVERenderNode.types.js → Mesher/Types/Mesher.types.js} +0 -0
  663. /package/{VoxelModels → Models}/Defaults/CubeVoxelGeometry.d.ts +0 -0
  664. /package/{VoxelModels → Models}/Defaults/CubeVoxelGeometry.js +0 -0
  665. /package/{VoxelModels → Models}/Defaults/CubeVoxelModels.d.ts +0 -0
  666. /package/{VoxelModels → Models}/Defaults/CubeVoxelModels.js +0 -0
  667. /package/{VoxelModels → Models}/Defaults/PanelVoxelGeometry.d.ts +0 -0
  668. /package/{VoxelModels → Models}/Defaults/PanelVoxelGeometry.js +0 -0
  669. /package/{VoxelModels → Models}/Defaults/PanelVoxelModels.d.ts +0 -0
  670. /package/{VoxelModels → Models}/Defaults/PanelVoxelModels.js +0 -0
  671. /package/{VoxelModels → Models}/Defaults/StairVoxelModel.d.ts +0 -0
  672. /package/{VoxelModels → Models}/Defaults/StairVoxelModel.js +0 -0
  673. /package/{VoxelModels → Models}/Indexing/VoxelAOResultsIndex.d.ts +0 -0
  674. /package/{VoxelModels → Models}/Indexing/VoxelAOResultsIndex.js +0 -0
  675. /package/{VoxelModels → Models}/Indexing/VoxelFaceCullResultsIndex.d.ts +0 -0
  676. /package/{VoxelModels → Models}/Indexing/VoxelFaceCullResultsIndex.js +0 -0
  677. /package/{VoxelModels → Models}/Indexing/VoxelFaceTransparentResultsIndex.d.ts +0 -0
  678. /package/{VoxelModels → Models}/Indexing/VoxelFaceTransparentResultsIndex.js +0 -0
  679. /package/{VoxelModels → Models}/Indexing/VoxelRelativeCubeIndex.d.ts +0 -0
  680. /package/{VoxelModels → Models}/Indexing/VoxelRelativeCubeIndex.js +0 -0
  681. /package/{VoxelModels → Models}/Input/BoxVoxelGometryInputs.d.ts +0 -0
  682. /package/{VoxelModels → Models}/Input/QuadVoxelGometryInputs.d.ts +0 -0
  683. /package/{VoxelModels → Models}/Input/QuadVoxelGometryInputs.js +0 -0
  684. /package/{VoxelModels → Models}/Rules/Classes/OcclusionFace.d.ts +0 -0
  685. /package/{VoxelModels → Models}/Rules/Classes/VoxelRulesModel.js +0 -0
  686. /package/{VoxelModels → Models}/Rules/Functions/BuildFinalInputs.d.ts +0 -0
  687. /package/{VoxelModels → Models}/Rules/Functions/BuildFinalInputs.js +0 -0
  688. /package/{VoxelModels → Models}/Rules/Functions/BuildGeomtryInputs.d.ts +0 -0
  689. /package/{VoxelModels → Models}/Rules/Functions/BuildRules.js +0 -0
  690. /package/{VoxelModels → Models}/VoxelModel.types.js +0 -0
  691. /package/{Interfaces/WorldGen/WorldGen.types.js → Renderer/DVEChunkMeshInterface.js} +0 -0
  692. /package/{Mesher/Types/Override.types.js → Renderer/DVERenderNode.types.js} +0 -0
  693. /package/{Interfaces/Render → Renderer}/DVERenderer.js +0 -0
  694. /package/{Analyzer → Tasks/Analyzer}/AnalyzerUpdater.js +0 -0
  695. /package/{Mesher/Shapes/default/RegisterDefaultShapes.d.ts → Tasks/Analyzer/InitTasks.d.ts} +0 -0
  696. /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBase.d.ts +0 -0
  697. /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBase.js +0 -0
  698. /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBaseManager.d.ts +0 -0
  699. /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBaseManager.js +0 -0
  700. /package/{DataLoader → Tasks/DataLoader}/Broswer/index.d.ts +0 -0
  701. /package/{DataLoader → Tasks/DataLoader}/Broswer/index.js +0 -0
  702. /package/{DataLoader → Tasks/DataLoader}/Constructor/DataLoaderTasks.d.ts +0 -0
  703. /package/{DataLoader → Tasks/DataLoader}/Constructor/DataLoaderTasks.js +0 -0
  704. /package/{DataLoader → Tasks/DataLoader}/Constructor/DivineVoxelEngineDataLoaderConstructor.d.ts +0 -0
  705. /package/{DataLoader → Tasks/DataLoader}/Constructor/DivineVoxelEngineDataLoaderConstructor.js +0 -0
  706. /package/{DataLoader → Tasks/DataLoader}/Constructor/index.d.ts +0 -0
  707. /package/{DataLoader → Tasks/DataLoader}/Constructor/index.js +0 -0
  708. /package/{DataLoader → Tasks/DataLoader}/Node/System/RegionSystem.js +0 -0
  709. /package/{DataLoader → Tasks/DataLoader}/Node/System/System.d.ts +0 -0
  710. /package/{DataLoader → Tasks/DataLoader}/Node/System/System.js +0 -0
  711. /package/{DataLoader → Tasks/DataLoader}/Node/System/SystemPath.d.ts +0 -0
  712. /package/{DataLoader → Tasks/DataLoader}/Node/System/SystemPath.js +0 -0
  713. /package/{DataLoader → Tasks/DataLoader}/Node/Tools/NodeRegionTool.js +0 -0
  714. /package/{DataLoader → Tasks/DataLoader}/Node/Util/DVED.util.d.ts +0 -0
  715. /package/{DataLoader → Tasks/DataLoader}/Node/index.d.ts +0 -0
  716. /package/{DataLoader → Tasks/DataLoader}/Node/index.js +0 -0
  717. /package/{DataLoader → Tasks/DataLoader}/Types/DVED.types.d.ts +0 -0
  718. /package/{Shaders/Types/Shader.types.js → Tasks/DataLoader/Types/DVED.types.js} +0 -0
  719. /package/{DataLoader → Tasks/DataLoader}/World/DataLoaderTasks.d.ts +0 -0
  720. /package/{DataLoader → Tasks/DataLoader}/World/DivineVoxelEngineDataLoaderWorld.js +0 -0
  721. /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGBatchTask.js +0 -0
  722. /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGSingleTask.d.ts +0 -0
  723. /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGSingleTask.js +0 -0
  724. /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskRegister.d.ts +0 -0
  725. /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskRegister.js +0 -0
  726. /package/{IWG → Tasks/IWG}/World/IWG.d.ts +0 -0
  727. /package/{IWG → Tasks/IWG}/World/Load/InitLoad.d.ts +0 -0
  728. /package/{IWG → Tasks/IWG}/World/Load/InitLoad.js +0 -0
  729. /package/{IWG → Tasks/IWG}/World/Load/LoaderBase.d.ts +0 -0
  730. /package/{IWG → Tasks/IWG}/World/Load/LoaderBase.js +0 -0
  731. /package/{IWG → Tasks/IWG}/World/Load/SafeExit.d.ts +0 -0
  732. /package/{IWG → Tasks/IWG}/World/Load/Teleport.js +0 -0
  733. /package/{IWG → Tasks/IWG}/World/Tasks/RegisterDefaultTasks.d.ts +0 -0
  734. /package/{IWG → Tasks/IWG}/World/Tasks/RegisterDefaultTasks.js +0 -0
  735. /package/{IWG → Tasks/IWG}/World/Tasks/Rendering/IWGBuildTasks.d.ts +0 -0
  736. /package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveAndUnloadTasks.d.ts +0 -0
  737. /package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveTasks.d.ts +0 -0
  738. /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGDecorateTasks.d.ts +0 -0
  739. /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGGenerateTasks.d.ts +0 -0
  740. /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGLoadTasks.d.ts +0 -0
  741. /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGPropagationTasks.d.ts +0 -0
  742. /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGWorldSunTasks.d.ts +0 -0
  743. /package/{IWG → Tasks/IWG}/World/Types/IWG.types.d.ts +0 -0
  744. /package/{IWG → Tasks/IWG}/World/Types/IWG.types.js +0 -0
  745. /package/{IWG → Tasks/IWG}/World/index.d.ts +0 -0
  746. /package/{IWG → Tasks/IWG}/World/index.js +0 -0
  747. /package/{IWG → Tasks/IWG}/index.d.ts +0 -0
  748. /package/{IWG → Tasks/IWG}/index.js +0 -0
  749. /package/{Propagation → Tasks/Propagation}/index.d.ts +0 -0
  750. /package/{Propagation → Tasks/Propagation}/index.js +0 -0
  751. /package/{Types → Tasks}/Tasks.types.js +0 -0
  752. /package/{Types/Substances.types.js → Tasks/WorldGeneration/WorldGen.types.js} +0 -0
  753. /package/{Interfaces/Data → Tools/Classes}/LocationBoundToolBase.d.ts +0 -0
  754. /package/{Interfaces/Data → Tools/Classes}/LocationBoundToolBase.js +0 -0
  755. /package/{Interfaces/Data → Util}/NumberPalette.d.ts +0 -0
  756. /package/{Interfaces/Data → Util}/NumberPalette.js +0 -0
  757. /package/{Interfaces/Data → Util}/StringPalette.d.ts +0 -0
  758. /package/{Interfaces/Data → Util}/StringPalette.js +0 -0
  759. /package/{Types → Util}/Util.types.d.ts +0 -0
  760. /package/{Types → Util}/Util.types.js +0 -0
  761. /package/{Types/Voxel.types.js → Voxels/Effects/VoxelEffects.types.js} +0 -0
  762. /package/{Data → Voxels}/LightData.d.ts +0 -0
  763. /package/{Data → Voxels}/LightData.js +0 -0
  764. /package/{VoxelModels → Voxels}/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +0 -0
  765. /package/{VoxelModels → Voxels}/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +0 -0
  766. /package/{VoxelModels → Voxels}/State/Schema/ShapeStateRelationsNode.d.ts +0 -0
  767. /package/{VoxelModels → Voxels}/State/Schema/ShapeStateRelationsNode.js +0 -0
  768. /package/{VoxelModels → Voxels}/State/State.types.js +0 -0
  769. /package/{VoxelModels/VoxelModelRules.types.js → Voxels/VoxelMaterial.types.js} +0 -0
  770. /package/{Data → Voxels}/VoxelShaderData.d.ts +0 -0
  771. /package/{Data → Voxels}/VoxelShaderData.js +0 -0
  772. /package/{Data → Voxels}/VoxelStateReader.d.ts +0 -0
  773. /package/{Data → Voxels}/VoxelStateReader.js +0 -0
@@ -1,27 +1,25 @@
1
1
  //data
2
- import { $3dCardinalNeighbors } from "../../Math/Constants/CardinalNeighbors.js";
2
+ import { $3dCardinalNeighbors } from "../../../Math/Constants/CardinalNeighbors.js";
3
3
  //objects
4
- import { DataTool } from "../../Tools/Data/DataTool.js";
5
- import { LightData } from "../../Data/LightData.js";
4
+ import { DataTool } from "../../../Tools/Data/DataTool.js";
5
+ import { LightData } from "../../../Voxels/LightData.js";
6
6
  //functions
7
7
  import { Distance3D } from "@amodx/math/Vectors/Functions/Distance3d";
8
8
  import { RGBRemove, RGBUpdate } from "../Illumanation/Functions/RGBUpdate.js";
9
9
  import { SunRemove, SunUpdate } from "../Illumanation/Functions/SunUpdate.js";
10
10
  import { FlowManager } from "../Flow/FlowManager.js";
11
+ import { VisitedMap } from "../../../Util/VisistedMap";
11
12
  const dataTool = new DataTool();
12
13
  const nDataTool = new DataTool();
13
14
  export const ExplosionManager = {
14
- runExplosion(tasks) {
15
- tasks.start();
15
+ runExplosion(tasks, radius) {
16
16
  const [dimension, sx, sy, sz] = tasks.origin;
17
17
  FlowManager.setDimension(dimension);
18
- tasks.setPriority(0);
19
- const queue = tasks.queues.queue;
20
- const map = tasks.queues.map;
18
+ const queue = [];
19
+ const map = new VisitedMap();
21
20
  queue.push([sx, sy, sz]);
22
21
  dataTool.setDimension(dimension);
23
22
  nDataTool.setDimension(dimension);
24
- const radius = tasks.getData();
25
23
  while (queue.length) {
26
24
  const node = queue.shift();
27
25
  if (!node)
@@ -93,15 +91,15 @@ export const ExplosionManager = {
93
91
  const l = nDataTool.getLight();
94
92
  if (l > 0) {
95
93
  if (LightData.getS(l) > 0) {
96
- tasks.queues.sun.remove.push(nx, ny, nz);
94
+ tasks.sun.remove.push(nx, ny, nz);
97
95
  }
98
96
  if (LightData.hasRGBLight(l)) {
99
- tasks.queues.rgb.remove.push(nx, ny, nz);
97
+ tasks.rgb.remove.push(nx, ny, nz);
100
98
  }
101
99
  }
102
100
  }
103
101
  }
104
- tasks.addNeighborsToRebuildQueue(x, y, z);
102
+ tasks.bounds.update(x, y, z);
105
103
  if (dataTool.getHardness() > 10_000 ||
106
104
  dataTool.getSubstnaceData().isLiquid()) {
107
105
  continue;
@@ -114,7 +112,6 @@ export const ExplosionManager = {
114
112
  SunRemove(tasks);
115
113
  RGBUpdate(tasks);
116
114
  SunUpdate(tasks);
117
- tasks.runRebuildQueue();
118
- tasks.stop();
115
+ // tasks.runRebuildQueue();
119
116
  },
120
117
  };
@@ -1,7 +1,7 @@
1
- import { DataTool } from "../../Tools/Data/DataTool.js";
2
- import { BrushTool } from "../../Tools/Brush/Brush.js";
3
- import type { FlowTaskRequests } from "../../Contexts/Constructor/Tasks/TasksRequest";
4
- import { SubstanceDataTool } from "../../Tools/Data/SubstanceDataTool.js";
1
+ import { DataTool } from "../../../Tools/Data/DataTool.js";
2
+ import { BrushTool } from "../../../Tools/Brush/Brush.js";
3
+ import { SubstanceDataTool } from "../../../Tools/Data/SubstanceDataTool.js";
4
+ import { UpdateTask } from "../../Update/UpdateTask.js";
5
5
  export declare class FlowManager {
6
6
  static lightData: {
7
7
  SRS: number;
@@ -49,9 +49,9 @@ export declare class FlowManager {
49
49
  static _sDataTool: DataTool;
50
50
  static _nDataTool: DataTool;
51
51
  static _substanceTool: SubstanceDataTool;
52
- static setVoxel(tasks: FlowTaskRequests, vox: string, level: number, levelState: number, x: number, y: number, z: number): void;
52
+ static setVoxel(tasks: UpdateTask, vox: string, level: number, levelState: number, x: number, y: number, z: number): void;
53
53
  static setDimension(dimension: string): void;
54
- static removeVoxel(tasks: FlowTaskRequests, x: number, y: number, z: number): void;
54
+ static removeVoxel(tasks: UpdateTask, x: number, y: number, z: number): void;
55
55
  static getFlowRate(substance: string): number;
56
56
  static getVoxel(x: number, y: number, z: number): false | DataTool;
57
57
  static setLevel(level: number, x: number, y: number, z: number): void;
@@ -62,5 +62,5 @@ export declare class FlowManager {
62
62
  static wait(ms: number): Promise<unknown>;
63
63
  static _lightValues: [s: number, r: number, g: number, b: number];
64
64
  static getAbsorbLight(x: number, y: number, z: number): number;
65
- static sunCheck(tasks: FlowTaskRequests, x: number, y: number, z: number): void;
65
+ static sunCheck(tasks: UpdateTask, x: number, y: number, z: number): void;
66
66
  }
@@ -1,11 +1,11 @@
1
- import { $3dCardinalNeighbors } from "../../Math/Constants/CardinalNeighbors.js";
2
- import { LightData } from "../../Data/LightData.js";
3
- import { DataTool } from "../../Tools/Data/DataTool.js";
4
- import { BrushTool } from "../../Tools/Brush/Brush.js";
1
+ import { $3dCardinalNeighbors } from "../../../Math/Constants/CardinalNeighbors.js";
2
+ import { LightData } from "../../../Voxels/LightData.js";
3
+ import { DataTool } from "../../../Tools/Data/DataTool.js";
4
+ import { BrushTool } from "../../../Tools/Brush/Brush.js";
5
5
  import { SunRemove, SunUpdate } from "../Illumanation/Functions/SunUpdate.js";
6
6
  import { RGBRemove, RGBUpdate } from "../Illumanation/Functions/RGBUpdate.js";
7
7
  import { IlluminationManager } from "../Illumanation/IlluminationManager.js";
8
- import { SubstanceDataTool } from "../../Tools/Data/SubstanceDataTool.js";
8
+ import { SubstanceDataTool } from "../../../Tools/Data/SubstanceDataTool.js";
9
9
  export class FlowManager {
10
10
  static lightData = LightData;
11
11
  static _brush = new BrushTool();
@@ -27,7 +27,7 @@ export class FlowManager {
27
27
  static setDimension(dimension) {
28
28
  this._sDataTool.setDimension(dimension);
29
29
  this._nDataTool.setDimension(dimension);
30
- this._brush.setDimension(dimension);
30
+ // this._brush.setDimension(dimension);
31
31
  IlluminationManager.setDimension(dimension);
32
32
  }
33
33
  static removeVoxel(tasks, x, y, z) {
@@ -41,10 +41,10 @@ export class FlowManager {
41
41
  if (l <= 0)
42
42
  continue;
43
43
  if (this.lightData.getS(l) > 0) {
44
- tasks.queues.sun.update.push(nx, ny, nz);
44
+ tasks.sun.update.push(nx, ny, nz);
45
45
  }
46
46
  if (this.lightData.hasRGBLight(l)) {
47
- tasks.queues.rgb.update.push(nx, ny, nz);
47
+ tasks.rgb.update.push(nx, ny, nz);
48
48
  }
49
49
  }
50
50
  this._nDataTool.loadInAt(x, y, z);
@@ -52,7 +52,7 @@ export class FlowManager {
52
52
  this._brush.setXYZ(x, y, z).erase();
53
53
  this._nDataTool.clear().loadInAt(x, y, z);
54
54
  this._nDataTool.setLight(currentLight).commit();
55
- tasks.queues.rgb.remove.push(x, y, z);
55
+ tasks.rgb.remove.push(x, y, z);
56
56
  RGBRemove(tasks);
57
57
  SunUpdate(tasks);
58
58
  RGBUpdate(tasks);
@@ -148,7 +148,7 @@ export class FlowManager {
148
148
  return;
149
149
  const l = this._nDataTool.getLight();
150
150
  if (this.lightData.getS(l) == 0xf) {
151
- tasks.queues.sun.remove.push(x, y - 1, z);
151
+ tasks.sun.remove.push(x, y - 1, z);
152
152
  }
153
153
  }
154
154
  }
@@ -0,0 +1,2 @@
1
+ import { UpdateTask } from "../../../Update/UpdateTask.js";
2
+ export declare function FlowRemove(tasks: UpdateTask): Promise<void>;
@@ -1,9 +1,9 @@
1
1
  import { FlowUpdate } from "./FlowUpdate.js";
2
2
  import { FlowManager as FM } from "../FlowManager.js";
3
- import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
3
+ import { EngineSettings } from "../../../../Settings/EngineSettings.js";
4
4
  function RunRemoveCheck(tasks, vox) {
5
5
  const [dimension, x, y, z] = tasks.origin;
6
- const queue = tasks.queues.flow.remove.queue;
6
+ const queue = tasks.flow.remove.queue;
7
7
  const cl = FM.getLevel(vox, x, y, z);
8
8
  queue.push([x, y, z]);
9
9
  const n1 = FM.getLevel(vox, x + 1, y, z);
@@ -36,22 +36,22 @@ export async function FlowRemove(tasks) {
36
36
  const voxId = vox.getStringId();
37
37
  const flowRate = vox.getSubstnaceData().getFlowRate();
38
38
  RunRemoveCheck(tasks, voxId);
39
- const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
40
- while (tasks.queues.flow.remove.queue.length != 0) {
39
+ const noRemoveMap = tasks.flow.remove.noRemoveMap;
40
+ while (tasks.flow.remove.queue.length != 0) {
41
41
  FM.setDimension(dimension);
42
42
  RunRemovePropagation(tasks, voxId);
43
43
  RunFlowReduce(tasks, voxId);
44
44
  await FlowUpdate(tasks, false);
45
45
  noRemoveMap.clear();
46
- tasks.runRebuildQueue();
46
+ // tasks.runRebuildQueue();
47
47
  await FM.wait(EngineSettings.settings.flow.baseFlowLimit * flowRate);
48
48
  }
49
49
  }
50
50
  function RunRemovePropagation(tasks, vox) {
51
- const removeQ = tasks.queues.flow.remove.queue;
52
- const updateQ = tasks.queues.flow.update.queue;
53
- const map = tasks.queues.flow.update.map;
54
- const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
51
+ const removeQ = tasks.flow.remove.queue;
52
+ const updateQ = tasks.flow.update.queue;
53
+ const map = tasks.flow.update.map;
54
+ const noRemoveMap = tasks.flow.remove.noRemoveMap;
55
55
  for (let i = 0; i < removeQ.length; i++) {
56
56
  const node = removeQ[i];
57
57
  const x = node[0];
@@ -60,9 +60,9 @@ function RunRemovePropagation(tasks, vox) {
60
60
  const l = FM.getLevel(vox, x, y, z);
61
61
  const s = FM.getLevelState(vox, x, y, z);
62
62
  map.add(x, y, z);
63
- if (noRemoveMap.inMap(x, y, z))
63
+ if (noRemoveMap.has(x, y, z))
64
64
  continue;
65
- n1t: if (!map.inMap(x + 1, y, z)) {
65
+ n1t: if (!map.has(x + 1, y, z)) {
66
66
  const n1 = FM.getLevel(vox, x + 1, y, z);
67
67
  const n1s = FM.getLevelState(vox, x + 1, y, z);
68
68
  if (n1 <= 0 || n1s == 1)
@@ -74,7 +74,7 @@ function RunRemovePropagation(tasks, vox) {
74
74
  updateQ.push([x + 1, y, z]);
75
75
  }
76
76
  }
77
- n2t: if (!map.inMap(x - 1, y, z)) {
77
+ n2t: if (!map.has(x - 1, y, z)) {
78
78
  const n2 = FM.getLevel(vox, x - 1, y, z);
79
79
  const n2s = FM.getLevelState(vox, x - 1, y, z);
80
80
  if (n2 <= 0 || n2s == 1)
@@ -86,7 +86,7 @@ function RunRemovePropagation(tasks, vox) {
86
86
  updateQ.push([x - 1, y, z]);
87
87
  }
88
88
  }
89
- n3t: if (!map.inMap(x, y, z + 1)) {
89
+ n3t: if (!map.has(x, y, z + 1)) {
90
90
  const n3 = FM.getLevel(vox, x, y, z + 1);
91
91
  const n3s = FM.getLevelState(vox, x, y, z + 1);
92
92
  if (n3 <= 0 || n3s == 1)
@@ -98,7 +98,7 @@ function RunRemovePropagation(tasks, vox) {
98
98
  updateQ.push([x, y, z + 1]);
99
99
  }
100
100
  }
101
- n4t: if (!map.inMap(x, y, z - 1)) {
101
+ n4t: if (!map.has(x, y, z - 1)) {
102
102
  const n4 = FM.getLevel(vox, x, y, z - 1);
103
103
  const n4s = FM.getLevelState(vox, x, y, z - 1);
104
104
  if (n4 <= 0 || n4s == 1)
@@ -110,7 +110,7 @@ function RunRemovePropagation(tasks, vox) {
110
110
  updateQ.push([x, y, z - 1]);
111
111
  }
112
112
  }
113
- if (!map.inMap(x, y - 1, z)) {
113
+ if (!map.has(x, y - 1, z)) {
114
114
  const n5 = FM.getLevel(vox, x, y - 1, z);
115
115
  if (n5 < 0)
116
116
  continue;
@@ -132,8 +132,8 @@ function RunRemovePropagation(tasks, vox) {
132
132
  map.clear();
133
133
  }
134
134
  function RunFlowReduce(tasks, vox) {
135
- const queue = tasks.queues.flow.remove.queue;
136
- const map = tasks.queues.flow.remove.map;
135
+ const queue = tasks.flow.remove.queue;
136
+ const map = tasks.flow.remove.map;
137
137
  const reque = [];
138
138
  while (queue.length != 0) {
139
139
  const node = queue.shift();
@@ -143,7 +143,7 @@ function RunFlowReduce(tasks, vox) {
143
143
  const x = node[0];
144
144
  const y = node[1];
145
145
  const z = node[2];
146
- if (map.inMap(x, y, z))
146
+ if (map.has(x, y, z))
147
147
  continue;
148
148
  map.add(x, y, z);
149
149
  const l = FM.getLevel(vox, x, y, z);
@@ -155,8 +155,8 @@ function RunFlowReduce(tasks, vox) {
155
155
  FM.setLevel(l - 1, x, y, z);
156
156
  reque.push([x, y, z]);
157
157
  }
158
- tasks.addToRebuildQueue(x, y, z);
158
+ tasks.bounds.update(x, y, z);
159
159
  }
160
- tasks.queues.flow.remove.queue = reque;
160
+ tasks.flow.remove.queue = reque;
161
161
  map.clear();
162
162
  }
@@ -0,0 +1,2 @@
1
+ import { UpdateTask } from "../../../Update/UpdateTask.js";
2
+ export declare function FlowUpdate(tasks: UpdateTask, rebuild?: boolean): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { FlowManager as FM } from "../FlowManager.js";
2
- import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
2
+ import { EngineSettings } from "../../../../Settings/EngineSettings.js";
3
3
  export async function FlowUpdate(tasks, rebuild = true) {
4
4
  const [dimension, x, y, z] = tasks.origin;
5
5
  FM.setDimension(dimension);
@@ -11,20 +11,20 @@ export async function FlowUpdate(tasks, rebuild = true) {
11
11
  if (level < 0)
12
12
  return;
13
13
  const levelState = FM.getLevelState(vox.getStringId(), x, y, z);
14
- tasks.queues.flow.update.queue.push([x, y, z, level, levelState]);
15
- while (tasks.queues.flow.update.queue.length != 0) {
14
+ tasks.flow.update.queue.push([x, y, z, level, levelState]);
15
+ while (tasks.flow.update.queue.length != 0) {
16
16
  FM.setDimension(dimension);
17
17
  RunFlowPropagation(tasks, vox.getStringId());
18
18
  RunFlowIncrease(tasks, vox.getStringId());
19
19
  if (rebuild) {
20
- tasks.runRebuildQueue();
20
+ // tasks.runRebuildQueue();
21
21
  await FM.wait(EngineSettings.settings.flow.baseFlowLimit * flowRate);
22
22
  }
23
23
  }
24
24
  }
25
25
  function RunFlowPropagation(tasks, vox) {
26
- const que = tasks.queues.flow.update.queue;
27
- const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
26
+ const que = tasks.flow.update.queue;
27
+ const noRemoveMap = tasks.flow.remove.noRemoveMap;
28
28
  for (let i = 0; i < que.length; i++) {
29
29
  const node = que[i];
30
30
  const x = node[0];
@@ -68,8 +68,8 @@ function RunFlowPropagation(tasks, vox) {
68
68
  }
69
69
  }
70
70
  function RunFlowIncrease(tasks, vox) {
71
- const que = tasks.queues.flow.update.queue;
72
- const map = tasks.queues.flow.update.map;
71
+ const que = tasks.flow.update.queue;
72
+ const map = tasks.flow.update.map;
73
73
  const reque = [];
74
74
  while (que.length != 0) {
75
75
  const node = que.shift();
@@ -81,14 +81,14 @@ function RunFlowIncrease(tasks, vox) {
81
81
  const z = node[2];
82
82
  const level = node[3];
83
83
  const levelState = node[4];
84
- if (map.inMap(x, y, z))
84
+ if (map.has(x, y, z))
85
85
  continue;
86
86
  map.add(x, y, z);
87
87
  if (level > -1) {
88
88
  FM.setVoxel(tasks, vox, level, levelState, x, y, z);
89
89
  reque.push([x, y, z, -1]);
90
90
  }
91
- tasks.addToRebuildQueue(x, y, z);
91
+ tasks.bounds.update(x, y, z);
92
92
  }
93
93
  //@ts-ignore
94
94
  tasks.queues.flow.update.queue = reque;
@@ -0,0 +1,3 @@
1
+ import { UpdateTask } from "../../../Update/UpdateTask";
2
+ export declare function RGBUpdate(tasks: UpdateTask): void;
3
+ export declare function RGBRemove(tasks: UpdateTask): void;
@@ -0,0 +1,82 @@
1
+ import { $3dCardinalNeighbors } from "../../../../Math/Constants/CardinalNeighbors";
2
+ import { LightData } from "../../../../Voxels/LightData";
3
+ //@todo change array to not use push and shift
4
+ export function RGBUpdate(tasks) {
5
+ const queue = tasks.rgb.update;
6
+ while (queue.length) {
7
+ const x = queue.shift();
8
+ const y = queue.shift();
9
+ const z = queue.shift();
10
+ const voxel = tasks.sDataCursor.getVoxel(x, y, z);
11
+ if (!voxel)
12
+ continue;
13
+ const sl = voxel.getLight();
14
+ if (sl <= 0)
15
+ continue;
16
+ for (let i = 0; i < 6; i++) {
17
+ const nx = $3dCardinalNeighbors[i][0] + x;
18
+ const ny = $3dCardinalNeighbors[i][1] + y;
19
+ const nz = $3dCardinalNeighbors[i][2] + z;
20
+ if (!tasks.nDataCursor.inBounds(nx, ny, nz))
21
+ continue;
22
+ const voxel = tasks.nDataCursor.getVoxel(nx, ny, nz);
23
+ if (!voxel)
24
+ continue;
25
+ const nl = voxel.getLight();
26
+ if (nl > -1 && LightData.isLessThanForRGBAdd(nl, sl)) {
27
+ queue.push(nx, ny, nz);
28
+ voxel.setLight(LightData.getMinusOneForRGB(sl, nl));
29
+ }
30
+ }
31
+ tasks.bounds.update(x, y, z);
32
+ }
33
+ }
34
+ export function RGBRemove(tasks) {
35
+ const remove = tasks.rgb.remove;
36
+ const update = tasks.rgb.update;
37
+ const removeMap = tasks.rgb.removeMap;
38
+ const updateMap = tasks.sun.updateMap;
39
+ while (remove.length) {
40
+ const x = remove.shift();
41
+ const y = remove.shift();
42
+ const z = remove.shift();
43
+ if (removeMap.has(x, y, z))
44
+ continue;
45
+ removeMap.add(x, y, z);
46
+ const voxel = tasks.sDataCursor.getVoxel(x, y, z);
47
+ if (!voxel)
48
+ continue;
49
+ const sl = voxel.getLight();
50
+ if (sl <= 0)
51
+ continue;
52
+ for (let i = 0; i < 6; i++) {
53
+ const nx = $3dCardinalNeighbors[i][0] + x;
54
+ const ny = $3dCardinalNeighbors[i][1] + y;
55
+ const nz = $3dCardinalNeighbors[i][2] + z;
56
+ if (!tasks.nDataCursor.inBounds(nx, ny, nz))
57
+ continue;
58
+ const voxel = tasks.nDataCursor.getVoxel(nx, ny, nz);
59
+ if (!voxel)
60
+ continue;
61
+ const nl = voxel.getLight();
62
+ const n1HasRGB = LightData.hasRGBLight(nl);
63
+ if (n1HasRGB && LightData.isLessThanForRGBRemove(nl, sl)) {
64
+ remove.push(nx, ny, nz);
65
+ if (voxel.isLightSource()) {
66
+ update.push(nx, ny, nz);
67
+ }
68
+ }
69
+ else {
70
+ if (n1HasRGB &&
71
+ LightData.isGreaterOrEqualThanForRGBRemove(nl, sl) &&
72
+ !updateMap.has(nx, ny, nz)) {
73
+ updateMap.add(nx, ny, nz);
74
+ update.push(nx, ny, nz);
75
+ }
76
+ }
77
+ }
78
+ tasks.bounds.update(x, y, z);
79
+ voxel.setLight(LightData.removeRGBLight(sl));
80
+ }
81
+ removeMap.clear();
82
+ }
@@ -0,0 +1,3 @@
1
+ import { UpdateTask } from "../../../Update/UpdateTask";
2
+ export declare function SunUpdate(tasks: UpdateTask): void;
3
+ export declare function SunRemove(tasks: UpdateTask, clearUpdateMap?: boolean): void;
@@ -0,0 +1,116 @@
1
+ import { LightData } from "../../../../Voxels/LightData";
2
+ const FloodOutPositions = [
3
+ [1, 0, 0],
4
+ [-1, 0, 0],
5
+ [0, 0, 1],
6
+ [0, 0, -1],
7
+ [0, 1, 0],
8
+ ];
9
+ export function SunUpdate(tasks) {
10
+ const queue = tasks.sun.update;
11
+ while (queue.length) {
12
+ const x = queue.shift();
13
+ const y = queue.shift();
14
+ const z = queue.shift();
15
+ const voxel = tasks.sDataCursor.getVoxel(x, y, z);
16
+ if (!voxel)
17
+ continue;
18
+ const sl = voxel.getLight();
19
+ if (sl <= 0)
20
+ continue;
21
+ for (let i = 0; i < 5; i++) {
22
+ const nx = FloodOutPositions[i][0] + x;
23
+ const ny = FloodOutPositions[i][1] + y;
24
+ const nz = FloodOutPositions[i][2] + z;
25
+ if (!tasks.nDataCursor.inBounds(nx, ny, nz))
26
+ continue;
27
+ const nVoxel = tasks.nDataCursor.getVoxel(nx, ny, nz);
28
+ if (nVoxel) {
29
+ const nl = nVoxel.getLight();
30
+ if (nl > -1 && LightData.isLessThanForSunAdd(nl, sl)) {
31
+ queue.push(nx, ny, nz);
32
+ nVoxel.setLight(LightData.getMinusOneForSun(sl, nl));
33
+ }
34
+ }
35
+ }
36
+ if (tasks.nDataCursor.inBounds(x, y - 1, z)) {
37
+ const nVoxel = tasks.nDataCursor.getVoxel(x, y - 1, z);
38
+ if (nVoxel) {
39
+ const nl = nVoxel.getLight();
40
+ if (nl > -1 && LightData.isLessThanForSunAddDown(nl, sl)) {
41
+ if (nVoxel.isAir()) {
42
+ queue.push(x, y - 1, z);
43
+ nVoxel.setLight(LightData.getSunLightForUnderVoxel(sl, nl));
44
+ }
45
+ else {
46
+ if (!nVoxel.isOpaque()) {
47
+ queue.push(x, y - 1, z);
48
+ nVoxel.setLight(LightData.getMinusOneForSun(sl, nl));
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ tasks.bounds.update(x, y, z);
55
+ }
56
+ }
57
+ export function SunRemove(tasks, clearUpdateMap = true) {
58
+ const remove = tasks.sun.remove;
59
+ const update = tasks.sun.update;
60
+ const removeMap = tasks.sun.removeMap;
61
+ const updateMap = tasks.sun.updateMap;
62
+ while (remove.length) {
63
+ const x = remove.shift();
64
+ const y = remove.shift();
65
+ const z = remove.shift();
66
+ if (removeMap.has(x, y, z))
67
+ continue;
68
+ removeMap.add(x, y, z);
69
+ const voxel = tasks.sDataCursor.getVoxel(x, y, z);
70
+ if (!voxel)
71
+ continue;
72
+ const sl = voxel.getLight();
73
+ if (sl <= 0)
74
+ continue;
75
+ for (let i = 0; i < 5; i++) {
76
+ const nx = FloodOutPositions[i][0] + x;
77
+ const ny = FloodOutPositions[i][1] + y;
78
+ const nz = FloodOutPositions[i][2] + z;
79
+ if (!tasks.nDataCursor.inBounds(nx, ny, nz))
80
+ continue;
81
+ const nVoxel = tasks.nDataCursor.getVoxel(nx, ny, nz);
82
+ if (nVoxel) {
83
+ const nl = nVoxel.getLight();
84
+ if (nl > 0) {
85
+ if (LightData.isLessThanForSunRemove(nl, sl)) {
86
+ remove.push(nx, ny, nz);
87
+ }
88
+ else if (LightData.isGreaterOrEqualThanForSunRemove(nl, sl) &&
89
+ !updateMap.has(nx, ny, nz)) {
90
+ updateMap.add(nx, ny, nz);
91
+ update.push(nx, ny, nz);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ if (tasks.nDataCursor.inBounds(x, y - 1, z)) {
97
+ const nVoxel = tasks.nDataCursor.getVoxel(x, y - 1, z);
98
+ if (nVoxel) {
99
+ const nl = nVoxel.getLight();
100
+ if (nl > 0) {
101
+ if (LightData.sunLightCompareForDownSunRemove(nl, sl)) {
102
+ remove.push(x, y - 1, z);
103
+ }
104
+ else if (LightData.isGreaterOrEqualThanForSunRemove(nl, sl) &&
105
+ !updateMap.has(x, y - 1, z)) {
106
+ updateMap.add(x, y - 1, z);
107
+ update.push(x, y - 1, z);
108
+ }
109
+ }
110
+ }
111
+ }
112
+ tasks.bounds.update(x, y, z);
113
+ voxel.setLight(LightData.removeSunLight(sl));
114
+ }
115
+ removeMap.clear();
116
+ }
@@ -0,0 +1,2 @@
1
+ import { UpdateTask } from "../../../Update/UpdateTask.js";
2
+ export declare function RunWorldSun(tasks: UpdateTask): false | undefined;
@@ -0,0 +1,115 @@
1
+ //types
2
+ //data
3
+ import { WorldBounds } from "../../../../Data/World/WorldBounds.js";
4
+ import { WorldRegister } from "../../../../Data/World/WorldRegister.js";
5
+ import { $3dCardinalNeighbors } from "../../../../Math/Constants/CardinalNeighbors.js";
6
+ import { WorldSpaces } from "../../../../Data/World/WorldSpaces.js";
7
+ import { IlluminationManager as IM } from "../IlluminationManager.js";
8
+ import { HeightMapTool } from "../../../../Tools/Data/WorldData/HeightMapTool.js";
9
+ import { LightData } from "../../../../Voxels/LightData";
10
+ import { WorldCursor } from "../../../../Data/Cursor/World/WorldCursor";
11
+ const worldCursor = new WorldCursor();
12
+ const heightMapTool = new HeightMapTool();
13
+ const FloodOutPositions = [
14
+ [1, 0, 0],
15
+ [-1, 0, 0],
16
+ [0, 0, 1],
17
+ [0, 0, -1],
18
+ [0, 1, 0],
19
+ ];
20
+ const queue = [];
21
+ export function RunWorldSun(tasks) {
22
+ IM.setDimension(tasks.origin[0]);
23
+ WorldRegister.instance.setDimension(tasks.origin[0]);
24
+ if (!WorldRegister.instance.column.get(tasks.origin[1], tasks.origin[2], tasks.origin[2]))
25
+ return false;
26
+ const [dimension, cx, cy, cz] = tasks.origin;
27
+ IM._sDataTool.setDimension(dimension);
28
+ const RmaxY = heightMapTool.column.getRelative(tasks.origin);
29
+ const AmaxY = heightMapTool.column.getAbsolute(tasks.origin);
30
+ const maxX = cx + WorldSpaces.chunk._bounds.x;
31
+ const maxY = WorldBounds.bounds.MaxY;
32
+ const maxZ = cz + WorldSpaces.chunk._bounds.z;
33
+ worldCursor.setFocalPoint(...tasks.origin);
34
+ const columnCursor = worldCursor.getColumn(tasks.origin[1], tasks.origin[2], tasks.origin[3]);
35
+ if (!columnCursor)
36
+ return;
37
+ const minY = AmaxY - 1 < 0 ? 0 : AmaxY;
38
+ //fill
39
+ for (let iy = minY; iy < maxY; iy++) {
40
+ for (let iz = cz; iz < maxZ; iz++) {
41
+ for (let ix = cx; ix < maxX; ix++) {
42
+ const voxel = columnCursor.getVoxel(ix, iy, iz);
43
+ if (!voxel)
44
+ continue;
45
+ const l = voxel.getLight();
46
+ if (l < 0)
47
+ continue;
48
+ voxel.setLight(LightData.setS(0xf, l));
49
+ }
50
+ }
51
+ }
52
+ const maxAcculamteY = AmaxY == RmaxY ? RmaxY + 1 : RmaxY;
53
+ //accumulate
54
+ for (let iy = minY; iy <= maxAcculamteY; iy++) {
55
+ for (let iz = cz; iz < maxZ; iz++) {
56
+ for (let ix = cx; ix < maxX; ix++) {
57
+ const l = columnCursor.getVoxel(ix, iy, iz)?.getLight();
58
+ if (l && l < 0 && LightData.getS(l) != 0xf)
59
+ continue;
60
+ for (let i = 0; i < $3dCardinalNeighbors.length; i++) {
61
+ const n = $3dCardinalNeighbors[i];
62
+ const nx = ix + n[0];
63
+ const ny = iy + n[1];
64
+ const nz = iz + n[2];
65
+ const nVoxel = worldCursor.getVoxel(nx, ny, nz);
66
+ if (!nVoxel)
67
+ continue;
68
+ const nl = nVoxel.getLight();
69
+ if (nl > -1 && LightData.getS(nl) < 0xf) {
70
+ queue.push(ix, iy, iz);
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ //flood
78
+ while (queue.length) {
79
+ const x = queue.shift();
80
+ const y = queue.shift();
81
+ const z = queue.shift();
82
+ const sl = worldCursor.getVoxel(x, y, z)?.getLight();
83
+ if (!sl || sl < 0)
84
+ continue;
85
+ for (let i = 0; i < 5; i++) {
86
+ const nx = x + FloodOutPositions[i][0];
87
+ const ny = y + FloodOutPositions[i][1];
88
+ const nz = z + FloodOutPositions[i][2];
89
+ const nVoxel = worldCursor.getVoxel(nx, ny, nz);
90
+ if (nVoxel) {
91
+ const nl = nVoxel.getLight();
92
+ if (nl > -1 && LightData.isLessThanForSunAdd(nl, sl)) {
93
+ queue.push(nx, ny, nz);
94
+ nVoxel.setLight(LightData.getMinusOneForSun(sl, nl));
95
+ }
96
+ }
97
+ }
98
+ const nVoxel = worldCursor.getVoxel(x, y - 1, z);
99
+ if (nVoxel) {
100
+ const nl = nVoxel.getLight();
101
+ if (nl > -1 && LightData.isLessThanForSunAddDown(nl, sl)) {
102
+ if (nVoxel.isAir()) {
103
+ queue.push(x, y - 1, z);
104
+ nVoxel.setLight(LightData.getSunLightForUnderVoxel(sl, nl));
105
+ }
106
+ else {
107
+ if (!nVoxel.isOpaque()) {
108
+ queue.push(x, y - 1, z);
109
+ nVoxel.setLight(LightData.getMinusOneForSun(sl, nl));
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -1,4 +1,4 @@
1
- import { DataTool } from "../../Tools/Data/DataTool.js";
1
+ import { DataTool } from "../../../Tools/Data/DataTool.js";
2
2
  export declare const IlluminationManager: {
3
3
  lightData: {
4
4
  SRS: number;