@divinevoxel/vlox 0.0.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 (723) hide show
  1. package/Analyzer/Analyzer.d.ts +18 -0
  2. package/Analyzer/Analyzer.js +91 -0
  3. package/Analyzer/AnalyzerProcessor.d.ts +6 -0
  4. package/Analyzer/AnalyzerProcessor.js +39 -0
  5. package/Analyzer/AnalyzerUpdater.d.ts +10 -0
  6. package/Analyzer/AnalyzerUpdater.js +13 -0
  7. package/Archive/Archive.types.d.ts +176 -0
  8. package/Archive/Archive.types.js +1 -0
  9. package/Archive/Functions/ArchiveArea.d.ts +10 -0
  10. package/Archive/Functions/ArchiveArea.js +315 -0
  11. package/Archive/Functions/ArchiveColumn.d.ts +8 -0
  12. package/Archive/Functions/ArchiveColumn.js +293 -0
  13. package/Archive/Functions/ImportColumn.d.ts +9 -0
  14. package/Archive/Functions/ImportColumn.js +213 -0
  15. package/Archive/Functions/Palettes.d.ts +5 -0
  16. package/Archive/Functions/Palettes.js +46 -0
  17. package/Archive/Functions/index.d.ts +3 -0
  18. package/Archive/Functions/index.js +3 -0
  19. package/Archive/index.d.ts +2 -0
  20. package/Archive/index.js +2 -0
  21. package/Contexts/Constructor/ConstrcutorTheads.d.ts +9 -0
  22. package/Contexts/Constructor/ConstrcutorTheads.js +22 -0
  23. package/Contexts/Constructor/ConstructorRemoteThreadTasks.d.ts +7 -0
  24. package/Contexts/Constructor/ConstructorRemoteThreadTasks.js +8 -0
  25. package/Contexts/Constructor/ConstructorTasks.d.ts +2 -0
  26. package/Contexts/Constructor/ConstructorTasks.js +82 -0
  27. package/Contexts/Constructor/ConstructorTasksIds.d.ts +21 -0
  28. package/Contexts/Constructor/ConstructorTasksIds.js +22 -0
  29. package/Contexts/Constructor/ConstructorThreadState.d.ts +5 -0
  30. package/Contexts/Constructor/ConstructorThreadState.js +16 -0
  31. package/Contexts/Constructor/DVEConstructorTasksQueues.d.ts +27 -0
  32. package/Contexts/Constructor/DVEConstructorTasksQueues.js +73 -0
  33. package/Contexts/Constructor/DivineVoxelEngineConstructor.d.ts +17 -0
  34. package/Contexts/Constructor/DivineVoxelEngineConstructor.js +30 -0
  35. package/Contexts/Constructor/InitWorker.d.ts +2 -0
  36. package/Contexts/Constructor/InitWorker.js +20 -0
  37. package/Contexts/Constructor/Tasks/TasksRequest.d.ts +141 -0
  38. package/Contexts/Constructor/Tasks/TasksRequest.js +218 -0
  39. package/Contexts/Constructor/Tasks/VoxelUpdate.d.ts +4 -0
  40. package/Contexts/Constructor/Tasks/VoxelUpdate.js +151 -0
  41. package/Contexts/Constructor/index.d.ts +1 -0
  42. package/Contexts/Constructor/index.js +1 -0
  43. package/Contexts/Nexus/DivineVoxelEngineNexus.d.ts +19 -0
  44. package/Contexts/Nexus/DivineVoxelEngineNexus.js +29 -0
  45. package/Contexts/Nexus/InitWorker.d.ts +2 -0
  46. package/Contexts/Nexus/InitWorker.js +15 -0
  47. package/Contexts/Nexus/Threads/NexusTheads.d.ts +13 -0
  48. package/Contexts/Nexus/Threads/NexusTheads.js +25 -0
  49. package/Contexts/Nexus/Threads/NexusThreadState.d.ts +7 -0
  50. package/Contexts/Nexus/Threads/NexusThreadState.js +10 -0
  51. package/Contexts/Nexus/index.d.ts +1 -0
  52. package/Contexts/Nexus/index.js +1 -0
  53. package/Contexts/Render/DVERenderThreads.d.ts +11 -0
  54. package/Contexts/Render/DVERenderThreads.js +47 -0
  55. package/Contexts/Render/DivineVoxelEngineRender.d.ts +70 -0
  56. package/Contexts/Render/DivineVoxelEngineRender.js +54 -0
  57. package/Contexts/Render/InitThreads.d.ts +2 -0
  58. package/Contexts/Render/InitThreads.js +53 -0
  59. package/Contexts/Render/Scene/MeshManager.d.ts +15 -0
  60. package/Contexts/Render/Scene/MeshManager.js +105 -0
  61. package/Contexts/Render/Scene/MeshRegister.d.ts +32 -0
  62. package/Contexts/Render/Scene/MeshRegister.js +195 -0
  63. package/Contexts/Render/Scene/MeshRegister.types.d.ts +13 -0
  64. package/Contexts/Render/Scene/MeshRegister.types.js +1 -0
  65. package/Contexts/Render/Tasks/RenderTasks.d.ts +7 -0
  66. package/Contexts/Render/Tasks/RenderTasks.js +24 -0
  67. package/Contexts/Render/Tasks/RenderTasks.types.d.ts +27 -0
  68. package/Contexts/Render/Tasks/RenderTasks.types.js +1 -0
  69. package/Contexts/Render/index.d.ts +1 -0
  70. package/Contexts/Render/index.js +1 -0
  71. package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.d.ts +21 -0
  72. package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.js +33 -0
  73. package/Contexts/RichWorld/InitWorker.d.ts +2 -0
  74. package/Contexts/RichWorld/InitWorker.js +15 -0
  75. package/Contexts/RichWorld/RichDataRegister.d.ts +24 -0
  76. package/Contexts/RichWorld/RichDataRegister.js +110 -0
  77. package/Contexts/RichWorld/RichWorldTasks.d.ts +2 -0
  78. package/Contexts/RichWorld/RichWorldTasks.js +58 -0
  79. package/Contexts/RichWorld/Threads/RichWorldThreadState.d.ts +7 -0
  80. package/Contexts/RichWorld/Threads/RichWorldThreadState.js +10 -0
  81. package/Contexts/RichWorld/Threads/RichWorldThreads.d.ts +10 -0
  82. package/Contexts/RichWorld/Threads/RichWorldThreads.js +22 -0
  83. package/Contexts/RichWorld/Tools/RichColumnDataTool.d.ts +7 -0
  84. package/Contexts/RichWorld/Tools/RichColumnDataTool.js +18 -0
  85. package/Contexts/RichWorld/Tools/RichDataTool.d.ts +14 -0
  86. package/Contexts/RichWorld/Tools/RichDataTool.js +71 -0
  87. package/Contexts/RichWorld/index.d.ts +1 -0
  88. package/Contexts/RichWorld/index.js +1 -0
  89. package/Contexts/World/Data/Classes/RegisterDataManager.d.ts +8 -0
  90. package/Contexts/World/Data/Classes/RegisterDataManager.js +22 -0
  91. package/Contexts/World/Data/Classes/StructBuilder.d.ts +31 -0
  92. package/Contexts/World/Data/Classes/StructBuilder.js +173 -0
  93. package/Contexts/World/Data/DVEFDataStructs.d.ts +7 -0
  94. package/Contexts/World/Data/DVEFDataStructs.js +21 -0
  95. package/Contexts/World/Data/DataRegister.d.ts +8 -0
  96. package/Contexts/World/Data/DataRegister.js +9 -0
  97. package/Contexts/World/Data/DataStructBuilders.d.ts +12 -0
  98. package/Contexts/World/Data/DataStructBuilders.js +23 -0
  99. package/Contexts/World/Data/DataSync.d.ts +51 -0
  100. package/Contexts/World/Data/DataSync.js +215 -0
  101. package/Contexts/World/Data/DataSyncNode.d.ts +28 -0
  102. package/Contexts/World/Data/DataSyncNode.js +54 -0
  103. package/Contexts/World/Data/Generators/SubstanceDataGenerator.d.ts +5 -0
  104. package/Contexts/World/Data/Generators/SubstanceDataGenerator.js +36 -0
  105. package/Contexts/World/Data/Generators/VoxelDataGenerator.d.ts +9 -0
  106. package/Contexts/World/Data/Generators/VoxelDataGenerator.js +64 -0
  107. package/Contexts/World/Data/Generators/WorldDataGenerator.d.ts +12 -0
  108. package/Contexts/World/Data/Generators/WorldDataGenerator.js +24 -0
  109. package/Contexts/World/Data/Managers/DataManagers.d.ts +5 -0
  110. package/Contexts/World/Data/Managers/DataManagers.js +126 -0
  111. package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.d.ts +2 -0
  112. package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.js +57 -0
  113. package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.d.ts +2 -0
  114. package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.js +68 -0
  115. package/Contexts/World/Data/Structs/ChunkStruct.d.ts +3 -0
  116. package/Contexts/World/Data/Structs/ChunkStruct.js +29 -0
  117. package/Contexts/World/Data/Structs/ColumnStruct.d.ts +3 -0
  118. package/Contexts/World/Data/Structs/ColumnStruct.js +45 -0
  119. package/Contexts/World/Data/Structs/RegionStruct.d.ts +4 -0
  120. package/Contexts/World/Data/Structs/RegionStruct.js +50 -0
  121. package/Contexts/World/DivineVoxelEngineWorld.d.ts +34 -0
  122. package/Contexts/World/DivineVoxelEngineWorld.js +64 -0
  123. package/Contexts/World/InitWorker.d.ts +2 -0
  124. package/Contexts/World/InitWorker.js +35 -0
  125. package/Contexts/World/Lock/WorldLock.d.ts +12 -0
  126. package/Contexts/World/Lock/WorldLock.js +86 -0
  127. package/Contexts/World/Tasks/WorldTasks.d.ts +11 -0
  128. package/Contexts/World/Tasks/WorldTasks.js +98 -0
  129. package/Contexts/World/WorldDataHooks.d.ts +1 -0
  130. package/Contexts/World/WorldDataHooks.js +96 -0
  131. package/Contexts/World/WorldThreadState.d.ts +4 -0
  132. package/Contexts/World/WorldThreadState.js +6 -0
  133. package/Contexts/World/WorldThreads.d.ts +14 -0
  134. package/Contexts/World/WorldThreads.js +34 -0
  135. package/Contexts/World/index.d.ts +1 -0
  136. package/Contexts/World/index.js +1 -0
  137. package/Data/Constants/DVEFDataSyncIds.d.ts +12 -0
  138. package/Data/Constants/DVEFDataSyncIds.js +13 -0
  139. package/Data/Constants/DataHeaders.d.ts +6 -0
  140. package/Data/Constants/DataHeaders.js +6 -0
  141. package/Data/Constants/Structs/ChunkStructProperties.d.ts +10 -0
  142. package/Data/Constants/Structs/ChunkStructProperties.js +10 -0
  143. package/Data/Constants/Structs/SubstanceStructProperties.d.ts +8 -0
  144. package/Data/Constants/Structs/SubstanceStructProperties.js +8 -0
  145. package/Data/Constants/Structs/VoxelStructProperties.d.ts +11 -0
  146. package/Data/Constants/Structs/VoxelStructProperties.js +11 -0
  147. package/Data/Constants/Structs/WorldDataStructProperties.d.ts +8 -0
  148. package/Data/Constants/Structs/WorldDataStructProperties.js +8 -0
  149. package/Data/Constants/SubstanceTagIds.d.ts +12 -0
  150. package/Data/Constants/SubstanceTagIds.js +13 -0
  151. package/Data/Constants/VoxelTagIds.d.ts +14 -0
  152. package/Data/Constants/VoxelTagIds.js +15 -0
  153. package/Data/DVEFDataCore.d.ts +7 -0
  154. package/Data/DVEFDataCore.js +7 -0
  155. package/Data/DVEFDataManager.d.ts +31 -0
  156. package/Data/DVEFDataManager.js +23 -0
  157. package/Data/DVEFDataSyncNode.d.ts +20 -0
  158. package/Data/DVEFDataSyncNode.js +53 -0
  159. package/Data/DataHooks.d.ts +51 -0
  160. package/Data/DataHooks.js +29 -0
  161. package/Data/LightData.d.ts +150 -0
  162. package/Data/LightData.js +402 -0
  163. package/Data/RegionHeaderRegister.d.ts +29 -0
  164. package/Data/RegionHeaderRegister.js +56 -0
  165. package/Data/Register/MappedDataRegister.d.ts +5 -0
  166. package/Data/Register/MappedDataRegister.js +8 -0
  167. package/Data/Register/MappedRegisterBase.d.ts +14 -0
  168. package/Data/Register/MappedRegisterBase.js +50 -0
  169. package/Data/Settings/EngineSettings.d.ts +27 -0
  170. package/Data/Settings/EngineSettings.js +81 -0
  171. package/Data/Substance/SubstancePalette.d.ts +9 -0
  172. package/Data/Substance/SubstancePalette.js +16 -0
  173. package/Data/Substance/SubstanceStruct.d.ts +20 -0
  174. package/Data/Substance/SubstanceStruct.js +19 -0
  175. package/Data/Types/DataSync.types.d.ts +3 -0
  176. package/Data/Types/DataSync.types.js +1 -0
  177. package/Data/Types/DimensionData.types.d.ts +9 -0
  178. package/Data/Types/DimensionData.types.js +1 -0
  179. package/Data/Types/RichWorldData.types.d.ts +15 -0
  180. package/Data/Types/RichWorldData.types.js +1 -0
  181. package/Data/Types/VoxelData.types.d.ts +7 -0
  182. package/Data/Types/VoxelData.types.js +1 -0
  183. package/Data/Types/WorldData.types.d.ts +10 -0
  184. package/Data/Types/WorldData.types.js +19 -0
  185. package/Data/Voxel/VoxelPalette.d.ts +12 -0
  186. package/Data/Voxel/VoxelPalette.js +22 -0
  187. package/Data/Voxel/VoxelStruct.d.ts +26 -0
  188. package/Data/Voxel/VoxelStruct.js +29 -0
  189. package/Data/VoxelShaderData.d.ts +17 -0
  190. package/Data/VoxelShaderData.js +34 -0
  191. package/Data/VoxelStateReader.d.ts +12 -0
  192. package/Data/VoxelStateReader.js +30 -0
  193. package/Data/World/Classes/Chunk.d.ts +21 -0
  194. package/Data/World/Classes/Chunk.js +46 -0
  195. package/Data/World/Classes/Column.d.ts +17 -0
  196. package/Data/World/Classes/Column.js +31 -0
  197. package/Data/World/Classes/Dimension.d.ts +14 -0
  198. package/Data/World/Classes/Dimension.js +20 -0
  199. package/Data/World/Classes/Region.d.ts +23 -0
  200. package/Data/World/Classes/Region.js +67 -0
  201. package/Data/World/Classes/index.d.ts +4 -0
  202. package/Data/World/Classes/index.js +4 -0
  203. package/Data/World/DimensionsRegister.d.ts +14 -0
  204. package/Data/World/DimensionsRegister.js +53 -0
  205. package/Data/World/WorldBounds.d.ts +19 -0
  206. package/Data/World/WorldBounds.js +34 -0
  207. package/Data/World/WorldPainter.d.ts +11 -0
  208. package/Data/World/WorldPainter.js +71 -0
  209. package/Data/World/WorldRegister.d.ts +51 -0
  210. package/Data/World/WorldRegister.js +220 -0
  211. package/Data/World/WorldRegisterCache.d.ts +23 -0
  212. package/Data/World/WorldRegisterCache.js +68 -0
  213. package/Data/World/WorldSpaces.d.ts +4 -0
  214. package/Data/World/WorldSpaces.js +23 -0
  215. package/DataLoader/Broswer/DataHandler.d.ts +20 -0
  216. package/DataLoader/Broswer/DataHandler.js +54 -0
  217. package/DataLoader/Broswer/WorldDataBase.d.ts +26 -0
  218. package/DataLoader/Broswer/WorldDataBase.js +81 -0
  219. package/DataLoader/Broswer/WorldDataBaseManager.d.ts +6 -0
  220. package/DataLoader/Broswer/WorldDataBaseManager.js +30 -0
  221. package/DataLoader/Broswer/WorldDataTool.d.ts +16 -0
  222. package/DataLoader/Broswer/WorldDataTool.js +64 -0
  223. package/DataLoader/Broswer/index.d.ts +1 -0
  224. package/DataLoader/Broswer/index.js +1 -0
  225. package/DataLoader/Constructor/DataLoaderTasks.d.ts +2 -0
  226. package/DataLoader/Constructor/DataLoaderTasks.js +14 -0
  227. package/DataLoader/Constructor/DivineVoxelEngineDataLoaderConstructor.d.ts +9 -0
  228. package/DataLoader/Constructor/DivineVoxelEngineDataLoaderConstructor.js +17 -0
  229. package/DataLoader/Constructor/WorldDataSerializer.d.ts +15 -0
  230. package/DataLoader/Constructor/WorldDataSerializer.js +54 -0
  231. package/DataLoader/Constructor/index.d.ts +1 -0
  232. package/DataLoader/Constructor/index.js +1 -0
  233. package/DataLoader/Node/DivineVoxelEngineData.d.ts +48 -0
  234. package/DataLoader/Node/DivineVoxelEngineData.js +47 -0
  235. package/DataLoader/Node/System/RegionSystem.d.ts +28 -0
  236. package/DataLoader/Node/System/RegionSystem.js +147 -0
  237. package/DataLoader/Node/System/System.d.ts +13 -0
  238. package/DataLoader/Node/System/System.js +168 -0
  239. package/DataLoader/Node/System/SystemPath.d.ts +12 -0
  240. package/DataLoader/Node/System/SystemPath.js +29 -0
  241. package/DataLoader/Node/Tools/NodeRegionTool.d.ts +28 -0
  242. package/DataLoader/Node/Tools/NodeRegionTool.js +134 -0
  243. package/DataLoader/Node/Util/DVED.util.d.ts +17 -0
  244. package/DataLoader/Node/Util/DVED.util.js +25 -0
  245. package/DataLoader/Node/index.d.ts +3 -0
  246. package/DataLoader/Node/index.js +3 -0
  247. package/DataLoader/Types/DVED.types.d.ts +13 -0
  248. package/DataLoader/Types/DVED.types.js +1 -0
  249. package/DataLoader/World/DataHandlerWrapper.d.ts +23 -0
  250. package/DataLoader/World/DataHandlerWrapper.js +179 -0
  251. package/DataLoader/World/DataLoaderTasks.d.ts +2 -0
  252. package/DataLoader/World/DataLoaderTasks.js +70 -0
  253. package/DataLoader/World/DivineVoxelEngineDataLoaderWorld.d.ts +12 -0
  254. package/DataLoader/World/DivineVoxelEngineDataLoaderWorld.js +17 -0
  255. package/DataLoader/World/Tools/DataLoaderTool.d.ts +24 -0
  256. package/DataLoader/World/Tools/DataLoaderTool.js +113 -0
  257. package/DataLoader/World/Tools/DataSerializerTool.d.ts +8 -0
  258. package/DataLoader/World/Tools/DataSerializerTool.js +27 -0
  259. package/DataLoader/World/Tools/LoaderRegister.d.ts +9 -0
  260. package/DataLoader/World/Tools/LoaderRegister.js +29 -0
  261. package/IWG/Constants/ColumnState.d.ts +6 -0
  262. package/IWG/Constants/ColumnState.js +7 -0
  263. package/IWG/World/Classes/DebouncedTasks.d.ts +16 -0
  264. package/IWG/World/Classes/DebouncedTasks.js +34 -0
  265. package/IWG/World/Classes/Generator.d.ts +52 -0
  266. package/IWG/World/Classes/Generator.js +485 -0
  267. package/IWG/World/Classes/Tasks/IWGBatchTask.d.ts +7 -0
  268. package/IWG/World/Classes/Tasks/IWGBatchTask.js +35 -0
  269. package/IWG/World/Classes/Tasks/IWGSingleTask.d.ts +6 -0
  270. package/IWG/World/Classes/Tasks/IWGSingleTask.js +29 -0
  271. package/IWG/World/Classes/Tasks/IWGTaskBase.d.ts +27 -0
  272. package/IWG/World/Classes/Tasks/IWGTaskBase.js +34 -0
  273. package/IWG/World/Classes/Tasks/IWGTaskRegister.d.ts +6 -0
  274. package/IWG/World/Classes/Tasks/IWGTaskRegister.js +14 -0
  275. package/IWG/World/IWG.d.ts +22 -0
  276. package/IWG/World/IWG.js +83 -0
  277. package/IWG/World/Load/InitLoad.d.ts +5 -0
  278. package/IWG/World/Load/InitLoad.js +17 -0
  279. package/IWG/World/Load/LoaderBase.d.ts +16 -0
  280. package/IWG/World/Load/LoaderBase.js +57 -0
  281. package/IWG/World/Load/SafeExit.d.ts +5 -0
  282. package/IWG/World/Load/SafeExit.js +16 -0
  283. package/IWG/World/Load/Teleport.d.ts +9 -0
  284. package/IWG/World/Load/Teleport.js +26 -0
  285. package/IWG/World/Tasks/RegisterDefaultTasks.d.ts +1 -0
  286. package/IWG/World/Tasks/RegisterDefaultTasks.js +12 -0
  287. package/IWG/World/Tasks/Rendering/IWGBuildTasks.d.ts +8 -0
  288. package/IWG/World/Tasks/Rendering/IWGBuildTasks.js +26 -0
  289. package/IWG/World/Tasks/Saving/IWGSaveAndUnloadTasks.d.ts +8 -0
  290. package/IWG/World/Tasks/Saving/IWGSaveAndUnloadTasks.js +22 -0
  291. package/IWG/World/Tasks/Saving/IWGSaveTasks.d.ts +8 -0
  292. package/IWG/World/Tasks/Saving/IWGSaveTasks.js +22 -0
  293. package/IWG/World/Tasks/WorldGen/IWGDecorateTasks.d.ts +8 -0
  294. package/IWG/World/Tasks/WorldGen/IWGDecorateTasks.js +29 -0
  295. package/IWG/World/Tasks/WorldGen/IWGGenerateTasks.d.ts +8 -0
  296. package/IWG/World/Tasks/WorldGen/IWGGenerateTasks.js +29 -0
  297. package/IWG/World/Tasks/WorldGen/IWGLoadTasks.d.ts +8 -0
  298. package/IWG/World/Tasks/WorldGen/IWGLoadTasks.js +58 -0
  299. package/IWG/World/Tasks/WorldGen/IWGPropagationTasks.d.ts +8 -0
  300. package/IWG/World/Tasks/WorldGen/IWGPropagationTasks.js +27 -0
  301. package/IWG/World/Tasks/WorldGen/IWGWorldSunTasks.d.ts +8 -0
  302. package/IWG/World/Tasks/WorldGen/IWGWorldSunTasks.js +27 -0
  303. package/IWG/World/Types/IWG.types.d.ts +20 -0
  304. package/IWG/World/Types/IWG.types.js +7 -0
  305. package/IWG/World/index.d.ts +2 -0
  306. package/IWG/World/index.js +2 -0
  307. package/IWG/index.d.ts +1 -0
  308. package/IWG/index.js +1 -0
  309. package/Init/StartConstructor.d.ts +2 -0
  310. package/Init/StartConstructor.js +8 -0
  311. package/Init/StartWorld.d.ts +7 -0
  312. package/Init/StartWorld.js +9 -0
  313. package/Interfaces/Anaylzer/DVEAnaylzer.d.ts +5 -0
  314. package/Interfaces/Anaylzer/DVEAnaylzer.js +2 -0
  315. package/Interfaces/Classes/ThreadManager.d.ts +16 -0
  316. package/Interfaces/Classes/ThreadManager.js +42 -0
  317. package/Interfaces/Classes/ThreadState.d.ts +7 -0
  318. package/Interfaces/Classes/ThreadState.js +7 -0
  319. package/Interfaces/Common/DataSyncIds.d.ts +8 -0
  320. package/Interfaces/Common/DataSyncIds.js +9 -0
  321. package/Interfaces/Data/DVEDataCore.d.ts +6 -0
  322. package/Interfaces/Data/DVEDataCore.js +2 -0
  323. package/Interfaces/Data/DataManager.d.ts +13 -0
  324. package/Interfaces/Data/DataManager.js +14 -0
  325. package/Interfaces/Data/LocationBoundToolBase.d.ts +24 -0
  326. package/Interfaces/Data/LocationBoundToolBase.js +61 -0
  327. package/Interfaces/Data/NumberPalette.d.ts +13 -0
  328. package/Interfaces/Data/NumberPalette.js +40 -0
  329. package/Interfaces/Data/RemoteDataSyncNode.d.ts +16 -0
  330. package/Interfaces/Data/RemoteDataSyncNode.js +36 -0
  331. package/Interfaces/Data/StringPalette.d.ts +13 -0
  332. package/Interfaces/Data/StringPalette.js +38 -0
  333. package/Interfaces/DataLoader/DVEDataHandler.d.ts +17 -0
  334. package/Interfaces/DataLoader/DVEDataHandler.js +14 -0
  335. package/Interfaces/Render/DVEFOManager.d.ts +7 -0
  336. package/Interfaces/Render/DVEFOManager.js +6 -0
  337. package/Interfaces/Render/DVEMeshCuller.d.ts +7 -0
  338. package/Interfaces/Render/DVEMeshCuller.js +8 -0
  339. package/Interfaces/Render/DVERenderer.d.ts +14 -0
  340. package/Interfaces/Render/DVERenderer.js +2 -0
  341. package/Interfaces/Render/Nodes/DVENodeManager.d.ts +6 -0
  342. package/Interfaces/Render/Nodes/DVENodeManager.js +2 -0
  343. package/Interfaces/Render/Nodes/DVERenderNode.types.d.ts +39 -0
  344. package/Interfaces/Render/Nodes/DVERenderNode.types.js +1 -0
  345. package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.d.ts +5 -0
  346. package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.js +2 -0
  347. package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.d.ts +13 -0
  348. package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.js +6 -0
  349. package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.d.ts +5 -0
  350. package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.js +2 -0
  351. package/Interfaces/WorldGen/WorldGen.types.d.ts +5 -0
  352. package/Interfaces/WorldGen/WorldGen.types.js +1 -0
  353. package/LICENSE.md +9 -0
  354. package/Math/Classes/BoundingBox.d.ts +27 -0
  355. package/Math/Classes/BoundingBox.js +44 -0
  356. package/Math/Classes/MatrixArray.d.ts +66 -0
  357. package/Math/Classes/MatrixArray.js +243 -0
  358. package/Math/Classes/Plane.d.ts +22 -0
  359. package/Math/Classes/Plane.js +53 -0
  360. package/Math/Classes/Scalar.d.ts +5 -0
  361. package/Math/Classes/Scalar.js +9 -0
  362. package/Math/Classes/SimpleBoundingBox.d.ts +40 -0
  363. package/Math/Classes/SimpleBoundingBox.js +157 -0
  364. package/Math/Classes/Vector3.d.ts +54 -0
  365. package/Math/Classes/Vector3.js +236 -0
  366. package/Math/Constants/CardinalNeighbors.d.ts +3 -0
  367. package/Math/Constants/CardinalNeighbors.js +25 -0
  368. package/Math/Constants/ConstantMartrix.d.ts +3 -0
  369. package/Math/Constants/ConstantMartrix.js +8 -0
  370. package/Math/Constants/Faces.d.ts +5 -0
  371. package/Math/Constants/Faces.js +28 -0
  372. package/Math/Constants/VoxelFaces.d.ts +20 -0
  373. package/Math/Constants/VoxelFaces.js +92 -0
  374. package/Math/Math.types.d.ts +25 -0
  375. package/Math/Math.types.js +1 -0
  376. package/Math/Objects/CompassDirection.d.ts +9 -0
  377. package/Math/Objects/CompassDirection.js +19 -0
  378. package/Math/Spaces/VoxelSpace.d.ts +32 -0
  379. package/Math/Spaces/VoxelSpace.js +99 -0
  380. package/Math/Spaces/VoxelSpaces.d.ts +50 -0
  381. package/Math/Spaces/VoxelSpaces.js +117 -0
  382. package/Math/Spaces/VoxelSpaces.types.d.ts +6 -0
  383. package/Math/Spaces/VoxelSpaces.types.js +1 -0
  384. package/Math/VisitAll.d.ts +10 -0
  385. package/Math/VisitAll.js +69 -0
  386. package/Math/VoxelMath.d.ts +21 -0
  387. package/Math/VoxelMath.js +47 -0
  388. package/Math/index.d.ts +11 -0
  389. package/Math/index.js +11 -0
  390. package/Mesher/Calc/CalcConstants.d.ts +16 -0
  391. package/Mesher/Calc/CalcConstants.js +375 -0
  392. package/Mesher/Calc/Flow/FlowGradient.d.ts +5 -0
  393. package/Mesher/Calc/Flow/FlowGradient.js +74 -0
  394. package/Mesher/Calc/Light/FaceDataCalc.d.ts +9 -0
  395. package/Mesher/Calc/Light/FaceDataCalc.js +58 -0
  396. package/Mesher/Calc/Light/LightGradient.d.ts +13 -0
  397. package/Mesher/Calc/Light/LightGradient.js +255 -0
  398. package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.d.ts +13 -0
  399. package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.js +77 -0
  400. package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.d.ts +27 -0
  401. package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.js +75 -0
  402. package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.d.ts +13 -0
  403. package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.js +56 -0
  404. package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.d.ts +13 -0
  405. package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.js +80 -0
  406. package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.d.ts +16 -0
  407. package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.js +58 -0
  408. package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.d.ts +12 -0
  409. package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.js +46 -0
  410. package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.d.ts +12 -0
  411. package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.js +23 -0
  412. package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.d.ts +12 -0
  413. package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.js +23 -0
  414. package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.d.ts +12 -0
  415. package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.js +50 -0
  416. package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.d.ts +12 -0
  417. package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.js +45 -0
  418. package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.d.ts +7 -0
  419. package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.js +3 -0
  420. package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.d.ts +44 -0
  421. package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.js +75 -0
  422. package/Mesher/Geometry/VoxelGeometry.d.ts +7 -0
  423. package/Mesher/Geometry/VoxelGeometry.js +111 -0
  424. package/Mesher/Mesher.d.ts +80 -0
  425. package/Mesher/Mesher.js +62 -0
  426. package/Mesher/Meshers/Classes/Mesher.d.ts +6 -0
  427. package/Mesher/Meshers/Classes/Mesher.js +6 -0
  428. package/Mesher/Meshers/MesherManager.d.ts +7 -0
  429. package/Mesher/Meshers/MesherManager.js +16 -0
  430. package/Mesher/Meshers/Meshers/TextureMesher.d.ts +13 -0
  431. package/Mesher/Meshers/Meshers/TextureMesher.js +186 -0
  432. package/Mesher/Meshers/Meshers/VoxelMesher.d.ts +11 -0
  433. package/Mesher/Meshers/Meshers/VoxelMesher.js +47 -0
  434. package/Mesher/Processors/ChunkProcessor.d.ts +9 -0
  435. package/Mesher/Processors/ChunkProcessor.js +79 -0
  436. package/Mesher/Processors/TemplateProcessor.d.ts +16 -0
  437. package/Mesher/Processors/TemplateProcessor.js +71 -0
  438. package/Mesher/Rules/Overrides/OverrideBase.d.ts +8 -0
  439. package/Mesher/Rules/Overrides/OverrideBase.js +20 -0
  440. package/Mesher/Rules/Overrides/OverridesManager.d.ts +10 -0
  441. package/Mesher/Rules/Overrides/OverridesManager.js +10 -0
  442. package/Mesher/Rules/RenderedSubstances.d.ts +6 -0
  443. package/Mesher/Rules/RenderedSubstances.js +13 -0
  444. package/Mesher/Rules/SubstanceRules.d.ts +7 -0
  445. package/Mesher/Rules/SubstanceRules.js +60 -0
  446. package/Mesher/Shapes/ShapeTool.d.ts +8 -0
  447. package/Mesher/Shapes/ShapeTool.js +9 -0
  448. package/Mesher/Shapes/VoxelShapeBase.d.ts +5 -0
  449. package/Mesher/Shapes/VoxelShapeBase.js +3 -0
  450. package/Mesher/Shapes/VoxelShapeManager.d.ts +10 -0
  451. package/Mesher/Shapes/VoxelShapeManager.js +37 -0
  452. package/Mesher/Shapes/default/Cube/Cube.voxel.shape.d.ts +15 -0
  453. package/Mesher/Shapes/default/Cube/Cube.voxel.shape.js +234 -0
  454. package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.d.ts +24 -0
  455. package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.js +231 -0
  456. package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.d.ts +16 -0
  457. package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.js +250 -0
  458. package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.d.ts +8 -0
  459. package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.js +67 -0
  460. package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.d.ts +8 -0
  461. package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.js +68 -0
  462. package/Mesher/Shapes/default/Panel/PanelStates.d.ts +8 -0
  463. package/Mesher/Shapes/default/Panel/PanelStates.js +9 -0
  464. package/Mesher/Shapes/default/RegisterDefaultShapes.d.ts +1 -0
  465. package/Mesher/Shapes/default/RegisterDefaultShapes.js +10 -0
  466. package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.d.ts +15 -0
  467. package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.js +31 -0
  468. package/Mesher/Shapes/default/Stairs/StairOverrides.d.ts +17 -0
  469. package/Mesher/Shapes/default/Stairs/StairOverrides.js +151 -0
  470. package/Mesher/Shapes/default/Stairs/StairShapes.d.ts +2 -0
  471. package/Mesher/Shapes/default/Stairs/StairShapes.js +546 -0
  472. package/Mesher/Shapes/default/Stairs/StairStates.d.ts +19 -0
  473. package/Mesher/Shapes/default/Stairs/StairStates.js +37 -0
  474. package/Mesher/Shapes/default/index.d.ts +6 -0
  475. package/Mesher/Shapes/default/index.js +6 -0
  476. package/Mesher/Tasks/BuidlerTasks.types.d.ts +7 -0
  477. package/Mesher/Tasks/BuidlerTasks.types.js +1 -0
  478. package/Mesher/Tools/BuilderDataTool.d.ts +4 -0
  479. package/Mesher/Tools/BuilderDataTool.js +7 -0
  480. package/Mesher/Tools/OutlinedVoxelTool.d.ts +15 -0
  481. package/Mesher/Tools/OutlinedVoxelTool.js +186 -0
  482. package/Mesher/Tools/VoxelMesherDataTool.d.ts +31 -0
  483. package/Mesher/Tools/VoxelMesherDataTool.js +166 -0
  484. package/Mesher/Tools/VoxelTemplateDataTool.d.ts +15 -0
  485. package/Mesher/Tools/VoxelTemplateDataTool.js +112 -0
  486. package/Mesher/Types/Override.types.d.ts +8 -0
  487. package/Mesher/Types/Override.types.js +1 -0
  488. package/Mesher/Types/index.d.ts +1 -0
  489. package/Mesher/Types/index.js +1 -0
  490. package/Propagation/Explosion/ExplosionManager.d.ts +4 -0
  491. package/Propagation/Explosion/ExplosionManager.js +120 -0
  492. package/Propagation/Flow/FlowManager.d.ts +66 -0
  493. package/Propagation/Flow/FlowManager.js +154 -0
  494. package/Propagation/Flow/Functions/FlowRemove.d.ts +2 -0
  495. package/Propagation/Flow/Functions/FlowRemove.js +162 -0
  496. package/Propagation/Flow/Functions/FlowUpdate.d.ts +2 -0
  497. package/Propagation/Flow/Functions/FlowUpdate.js +96 -0
  498. package/Propagation/Illumanation/Functions/RGBUpdate.d.ts +3 -0
  499. package/Propagation/Illumanation/Functions/RGBUpdate.js +169 -0
  500. package/Propagation/Illumanation/Functions/SunUpdate.d.ts +3 -0
  501. package/Propagation/Illumanation/Functions/SunUpdate.js +187 -0
  502. package/Propagation/Illumanation/Functions/WorldSun.d.ts +2 -0
  503. package/Propagation/Illumanation/Functions/WorldSun.js +190 -0
  504. package/Propagation/Illumanation/IlluminationManager.d.ts +48 -0
  505. package/Propagation/Illumanation/IlluminationManager.js +13 -0
  506. package/Propagation/Propagation.d.ts +13 -0
  507. package/Propagation/Propagation.js +37 -0
  508. package/Propagation/index.d.ts +1 -0
  509. package/Propagation/index.js +1 -0
  510. package/README.md +11 -0
  511. package/Shaders/Code/Functions/FogShaders.d.ts +2 -0
  512. package/Shaders/Code/Functions/FogShaders.js +59 -0
  513. package/Shaders/Code/Functions/FragmentFunctions.d.ts +2 -0
  514. package/Shaders/Code/Functions/FragmentFunctions.js +155 -0
  515. package/Shaders/Code/Functions/UtilShaders.d.ts +2 -0
  516. package/Shaders/Code/Functions/UtilShaders.js +209 -0
  517. package/Shaders/Code/Functions/VertexFunctions.d.ts +2 -0
  518. package/Shaders/Code/Functions/VertexFunctions.js +73 -0
  519. package/Shaders/Code/Snippets/FragmentSnippets.d.ts +2 -0
  520. package/Shaders/Code/Snippets/FragmentSnippets.js +93 -0
  521. package/Shaders/Code/Snippets/VertexSnippets.d.ts +2 -0
  522. package/Shaders/Code/Snippets/VertexSnippets.js +28 -0
  523. package/Shaders/Code/Snippets/VoxelSnippets.d.ts +2 -0
  524. package/Shaders/Code/Snippets/VoxelSnippets.js +137 -0
  525. package/Shaders/DVEShaderRegister.d.ts +42 -0
  526. package/Shaders/DVEShaderRegister.js +15 -0
  527. package/Shaders/DVEShaders.d.ts +55 -0
  528. package/Shaders/DVEShaders.js +369 -0
  529. package/Shaders/Types/Shader.types.d.ts +14 -0
  530. package/Shaders/Types/Shader.types.js +1 -0
  531. package/Templates/Functions/CreateTemplate.d.ts +3 -0
  532. package/Templates/Functions/CreateTemplate.js +113 -0
  533. package/Templates/Functions/FlipTemplate.d.ts +3 -0
  534. package/Templates/Functions/FlipTemplate.js +47 -0
  535. package/Templates/Functions/RotateTemplate.d.ts +4 -0
  536. package/Templates/Functions/RotateTemplate.js +110 -0
  537. package/Templates/Functions/index.d.ts +3 -0
  538. package/Templates/Functions/index.js +3 -0
  539. package/Templates/VoxelTemplate.d.ts +31 -0
  540. package/Templates/VoxelTemplate.js +122 -0
  541. package/Templates/VoxelTemplates.types.d.ts +23 -0
  542. package/Templates/VoxelTemplates.types.js +1 -0
  543. package/Templates/index.d.ts +1 -0
  544. package/Templates/index.js +1 -0
  545. package/Textures/Constructor.types.d.ts +5 -0
  546. package/Textures/Constructor.types.js +1 -0
  547. package/Textures/Texture.types.d.ts +79 -0
  548. package/Textures/Texture.types.js +1 -0
  549. package/Textures/TextureAnimations.d.ts +4 -0
  550. package/Textures/TextureAnimations.js +135 -0
  551. package/Textures/TextureBuilder.d.ts +16 -0
  552. package/Textures/TextureBuilder.js +245 -0
  553. package/Textures/TextureManager.d.ts +22 -0
  554. package/Textures/TextureManager.js +153 -0
  555. package/Textures/TextureRegister.d.ts +10 -0
  556. package/Textures/TextureRegister.js +33 -0
  557. package/Textures/TextureType.d.ts +63 -0
  558. package/Textures/TextureType.js +287 -0
  559. package/Tools/Anaylzer/AnaylzerTool.d.ts +6 -0
  560. package/Tools/Anaylzer/AnaylzerTool.js +31 -0
  561. package/Tools/Brush/AdvancedBrushTool.d.ts +15 -0
  562. package/Tools/Brush/AdvancedBrushTool.js +69 -0
  563. package/Tools/Brush/Brush.d.ts +28 -0
  564. package/Tools/Brush/Brush.js +124 -0
  565. package/Tools/Classes/DataToolBase.d.ts +43 -0
  566. package/Tools/Classes/DataToolBase.js +85 -0
  567. package/Tools/Classes/LocationBoundTool.d.ts +20 -0
  568. package/Tools/Classes/LocationBoundTool.js +45 -0
  569. package/Tools/Classes/RichDataToolBase.d.ts +10 -0
  570. package/Tools/Classes/RichDataToolBase.js +26 -0
  571. package/Tools/Data/DataTool.d.ts +101 -0
  572. package/Tools/Data/DataTool.js +431 -0
  573. package/Tools/Data/RichDataTool.d.ts +25 -0
  574. package/Tools/Data/RichDataTool.js +121 -0
  575. package/Tools/Data/SubstanceDataTool.d.ts +16 -0
  576. package/Tools/Data/SubstanceDataTool.js +62 -0
  577. package/Tools/Data/WorldData/ChunkDataTool.d.ts +11 -0
  578. package/Tools/Data/WorldData/ChunkDataTool.js +38 -0
  579. package/Tools/Data/WorldData/ColumnDataTool.d.ts +26 -0
  580. package/Tools/Data/WorldData/ColumnDataTool.js +81 -0
  581. package/Tools/Data/WorldData/HeightMapTool.d.ts +24 -0
  582. package/Tools/Data/WorldData/HeightMapTool.js +117 -0
  583. package/Tools/Data/WorldData/RegionDataTool.d.ts +13 -0
  584. package/Tools/Data/WorldData/RegionDataTool.js +39 -0
  585. package/Tools/Mesher/MesherTool.d.ts +19 -0
  586. package/Tools/Mesher/MesherTool.js +52 -0
  587. package/Tools/Tasks/TasksTool.d.ts +92 -0
  588. package/Tools/Tasks/TasksTool.js +217 -0
  589. package/Tools/index.d.ts +0 -0
  590. package/Tools/index.js +1 -0
  591. package/Types/DataSync.types.d.ts +25 -0
  592. package/Types/DataSync.types.js +1 -0
  593. package/Types/EngineSettings.types.d.ts +73 -0
  594. package/Types/EngineSettings.types.js +73 -0
  595. package/Types/StructBuilder.types.d.ts +30 -0
  596. package/Types/StructBuilder.types.js +1 -0
  597. package/Types/Substances.types.d.ts +4 -0
  598. package/Types/Substances.types.js +1 -0
  599. package/Types/Tasks.types.d.ts +85 -0
  600. package/Types/Tasks.types.js +1 -0
  601. package/Types/Util.types.d.ts +5 -0
  602. package/Types/Util.types.js +1 -0
  603. package/Types/Voxel.types.d.ts +12 -0
  604. package/Types/Voxel.types.js +1 -0
  605. package/Types/index.d.ts +2 -0
  606. package/Types/index.js +2 -0
  607. package/Util/DataMatrix.d.ts +23 -0
  608. package/Util/DataMatrix.js +90 -0
  609. package/Util/LocationVisitedMap.d.ts +9 -0
  610. package/Util/LocationVisitedMap.js +18 -0
  611. package/Util/VisistedMap.d.ts +10 -0
  612. package/Util/VisistedMap.js +29 -0
  613. package/Util/VoxelIDMatrix.d.ts +15 -0
  614. package/Util/VoxelIDMatrix.js +55 -0
  615. package/VoxelModels/Constructor/InitVoxelModelsConstructor.d.ts +2 -0
  616. package/VoxelModels/Constructor/InitVoxelModelsConstructor.js +20 -0
  617. package/VoxelModels/Constructor/Nodes/GeometryNode.d.ts +15 -0
  618. package/VoxelModels/Constructor/Nodes/GeometryNode.js +14 -0
  619. package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +22 -0
  620. package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.js +220 -0
  621. package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +23 -0
  622. package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.js +185 -0
  623. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +21 -0
  624. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +138 -0
  625. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +22 -0
  626. package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +109 -0
  627. package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.d.ts +15 -0
  628. package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.js +14 -0
  629. package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.d.ts +13 -0
  630. package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.js +33 -0
  631. package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.d.ts +9 -0
  632. package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.js +27 -0
  633. package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.d.ts +14 -0
  634. package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.js +31 -0
  635. package/VoxelModels/Constructor/Register/VoxelModelsConstructor.d.ts +13 -0
  636. package/VoxelModels/Constructor/Register/VoxelModelsConstructor.js +21 -0
  637. package/VoxelModels/Constructor/VoxelGeometryLookUp.d.ts +20 -0
  638. package/VoxelModels/Constructor/VoxelGeometryLookUp.js +77 -0
  639. package/VoxelModels/Constructor/VoxelModelVoxelConstructor.d.ts +24 -0
  640. package/VoxelModels/Constructor/VoxelModelVoxelConstructor.js +75 -0
  641. package/VoxelModels/Defaults/CubeVoxelGeometry.d.ts +9 -0
  642. package/VoxelModels/Defaults/CubeVoxelGeometry.js +922 -0
  643. package/VoxelModels/Defaults/CubeVoxelModels.d.ts +5 -0
  644. package/VoxelModels/Defaults/CubeVoxelModels.js +825 -0
  645. package/VoxelModels/Defaults/PanelVoxelGeometry.d.ts +6 -0
  646. package/VoxelModels/Defaults/PanelVoxelGeometry.js +500 -0
  647. package/VoxelModels/Defaults/PanelVoxelModels.d.ts +3 -0
  648. package/VoxelModels/Defaults/PanelVoxelModels.js +1061 -0
  649. package/VoxelModels/Defaults/StairVoxelModel.d.ts +2 -0
  650. package/VoxelModels/Defaults/StairVoxelModel.js +1358 -0
  651. package/VoxelModels/Examples.d.ts +14 -0
  652. package/VoxelModels/Examples.js +1910 -0
  653. package/VoxelModels/Indexing/VoxelAOResultsIndex.d.ts +12 -0
  654. package/VoxelModels/Indexing/VoxelAOResultsIndex.js +20 -0
  655. package/VoxelModels/Indexing/VoxelFaceCullResultsIndex.d.ts +12 -0
  656. package/VoxelModels/Indexing/VoxelFaceCullResultsIndex.js +21 -0
  657. package/VoxelModels/Indexing/VoxelFaceTransparentResultsIndex.d.ts +11 -0
  658. package/VoxelModels/Indexing/VoxelFaceTransparentResultsIndex.js +15 -0
  659. package/VoxelModels/Indexing/VoxelRelativeCubeIndex.d.ts +6 -0
  660. package/VoxelModels/Indexing/VoxelRelativeCubeIndex.js +14 -0
  661. package/VoxelModels/InitVoxelModels.d.ts +10 -0
  662. package/VoxelModels/InitVoxelModels.js +109 -0
  663. package/VoxelModels/Input/BoxVoxelGometryInputs.d.ts +23 -0
  664. package/VoxelModels/Input/BoxVoxelGometryInputs.js +33 -0
  665. package/VoxelModels/Input/QuadVoxelGometryInputs.d.ts +24 -0
  666. package/VoxelModels/Input/QuadVoxelGometryInputs.js +29 -0
  667. package/VoxelModels/Rules/Classes/OcclusionFace.d.ts +65 -0
  668. package/VoxelModels/Rules/Classes/OcclusionFace.js +492 -0
  669. package/VoxelModels/Rules/Classes/VoxelRulesGeometry.d.ts +19 -0
  670. package/VoxelModels/Rules/Classes/VoxelRulesGeometry.js +32 -0
  671. package/VoxelModels/Rules/Classes/VoxelRulesModel.d.ts +18 -0
  672. package/VoxelModels/Rules/Classes/VoxelRulesModel.js +29 -0
  673. package/VoxelModels/Rules/Functions/BuildFinalInputs.d.ts +7 -0
  674. package/VoxelModels/Rules/Functions/BuildFinalInputs.js +91 -0
  675. package/VoxelModels/Rules/Functions/BuildGeomtryInputs.d.ts +6 -0
  676. package/VoxelModels/Rules/Functions/BuildGeomtryInputs.js +223 -0
  677. package/VoxelModels/Rules/Functions/BuildRules.d.ts +8 -0
  678. package/VoxelModels/Rules/Functions/BuildRules.js +187 -0
  679. package/VoxelModels/Rules/Functions/BuildStateData.d.ts +23 -0
  680. package/VoxelModels/Rules/Functions/BuildStateData.js +337 -0
  681. package/VoxelModels/Rules/Functions/GetOcclusionFaces.d.ts +4 -0
  682. package/VoxelModels/Rules/Functions/GetOcclusionFaces.js +112 -0
  683. package/VoxelModels/Rules/VoxelModelManager.d.ts +18 -0
  684. package/VoxelModels/Rules/VoxelModelManager.js +80 -0
  685. package/VoxelModels/Shared/Transform.d.ts +4 -0
  686. package/VoxelModels/Shared/Transform.js +264 -0
  687. package/VoxelModels/State/CondiotnalTreeReader.d.ts +10 -0
  688. package/VoxelModels/State/CondiotnalTreeReader.js +22 -0
  689. package/VoxelModels/State/LogicStatementReader.d.ts +8 -0
  690. package/VoxelModels/State/LogicStatementReader.js +50 -0
  691. package/VoxelModels/State/Schema/BinarySchema.d.ts +14 -0
  692. package/VoxelModels/State/Schema/BinarySchema.js +52 -0
  693. package/VoxelModels/State/Schema/BinarySchemaNode.d.ts +11 -0
  694. package/VoxelModels/State/Schema/BinarySchemaNode.js +21 -0
  695. package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.d.ts +8 -0
  696. package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.js +13 -0
  697. package/VoxelModels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +6 -0
  698. package/VoxelModels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +6 -0
  699. package/VoxelModels/State/Schema/ShapeStateRelationsNode.d.ts +10 -0
  700. package/VoxelModels/State/Schema/ShapeStateRelationsNode.js +26 -0
  701. package/VoxelModels/State/Schema/StateSchema.d.ts +10 -0
  702. package/VoxelModels/State/Schema/StateSchema.js +18 -0
  703. package/VoxelModels/State/SchemaRegister.d.ts +15 -0
  704. package/VoxelModels/State/SchemaRegister.js +50 -0
  705. package/VoxelModels/State/State.types.d.ts +32 -0
  706. package/VoxelModels/State/State.types.js +22 -0
  707. package/VoxelModels/State/StateTreeReader.d.ts +9 -0
  708. package/VoxelModels/State/StateTreeReader.js +35 -0
  709. package/VoxelModels/Tags/TagsOverrides.d.ts +5 -0
  710. package/VoxelModels/Tags/TagsOverrides.js +4 -0
  711. package/VoxelModels/VoxelModel.types.d.ts +135 -0
  712. package/VoxelModels/VoxelModel.types.js +1 -0
  713. package/VoxelModels/VoxelModelRules.types.d.ts +67 -0
  714. package/VoxelModels/VoxelModelRules.types.js +1 -0
  715. package/VoxelModels/World/InitVoxelModelsWorld.d.ts +2 -0
  716. package/VoxelModels/World/InitVoxelModelsWorld.js +11 -0
  717. package/WorldGeneration/WorldGenBrush.d.ts +75 -0
  718. package/WorldGeneration/WorldGenBrush.js +136 -0
  719. package/WorldGeneration/WorldGenRegister.d.ts +14 -0
  720. package/WorldGeneration/WorldGenRegister.js +94 -0
  721. package/WorldGeneration/WorldGeneration.d.ts +14 -0
  722. package/WorldGeneration/WorldGeneration.js +54 -0
  723. package/package.json +32 -0
@@ -0,0 +1,11 @@
1
+ import { ThreadManager } from "../../Interfaces/Classes/ThreadManager";
2
+ export declare class DVERenderThreads extends ThreadManager {
3
+ nexus: import("@amodx/threads").Thread;
4
+ richWorld: import("@amodx/threads").Thread;
5
+ dataLoader: import("@amodx/threads").Thread;
6
+ state: any;
7
+ construcotrs: import("@amodx/threads").ThreadPool;
8
+ parent: import("@amodx/threads").Thread;
9
+ world: import("@amodx/threads").Thread;
10
+ constructor();
11
+ }
@@ -0,0 +1,47 @@
1
+ import { Threads } from "@amodx/threads";
2
+ import { ThreadManager } from "../../Interfaces/Classes/ThreadManager";
3
+ export class DVERenderThreads extends ThreadManager {
4
+ nexus = Threads.createThread("nexus");
5
+ richWorld = Threads.createThread("rich-world");
6
+ dataLoader = Threads.createThread("data-loader");
7
+ state = {};
8
+ construcotrs = Threads.createThreadPool({
9
+ name: "constructor",
10
+ onPortSet(port, commName) { },
11
+ });
12
+ parent = Threads.parent;
13
+ world = Threads.createThread("world");
14
+ constructor() {
15
+ super();
16
+ this.addThread(this.construcotrs);
17
+ this.addThread(this.parent);
18
+ this.addThread(this.world);
19
+ this.pipelines.setPorts.regiser("render", (threads) => {
20
+ for (const comm of this.construcotrs.getThreads()) {
21
+ this.world.connectToThread(comm);
22
+ }
23
+ return threads;
24
+ });
25
+ this.nexus.onSetPort(() => {
26
+ this.addThread(this.nexus);
27
+ this.pipelines.setPorts.regiser("nexus", (data) => {
28
+ this.world.connectToThread(this.nexus);
29
+ return data;
30
+ });
31
+ });
32
+ this.dataLoader.onSetPort(() => {
33
+ this.addThread(this.dataLoader);
34
+ this.pipelines.setPorts.regiser("dataloader", (data) => {
35
+ this.world.connectToThread(this.dataLoader);
36
+ return data;
37
+ });
38
+ });
39
+ this.richWorld.onSetPort(() => {
40
+ this.addThread(this.richWorld);
41
+ this.pipelines.setPorts.regiser("richworld", (data) => {
42
+ this.world.connectToThread(this.richWorld);
43
+ return data;
44
+ });
45
+ });
46
+ }
47
+ }
@@ -0,0 +1,70 @@
1
+ import { EngineSettings } from "../../Data/Settings/EngineSettings.js";
2
+ import { Threads } from "@amodx/threads/";
3
+ import type { EngineSettingsData } from "../../Types/EngineSettings.types.js";
4
+ import type { RecursivePartial } from "../../Types/Util.types";
5
+ import { DVERenderer } from "../../Interfaces/Render/DVERenderer.js";
6
+ import { MeshManager } from "./Scene/MeshManager.js";
7
+ import { DVEFDataCore } from "../../Data/DVEFDataCore";
8
+ import { DVERenderThreads } from "./DVERenderThreads.js";
9
+ type PartialEngineSettings = RecursivePartial<EngineSettingsData>;
10
+ export interface DVERInitData extends PartialEngineSettings {
11
+ worldWorker: Worker;
12
+ constructorWorkers: Worker[];
13
+ renderer: DVERenderer;
14
+ nexusWorker?: Worker;
15
+ richWorldWorker?: Worker;
16
+ }
17
+ export declare class DivineVoxelEngineRender {
18
+ static instance: DivineVoxelEngineRender;
19
+ static initialized: boolean;
20
+ TC: typeof Threads;
21
+ settings: typeof EngineSettings;
22
+ meshManager: typeof MeshManager;
23
+ meshRegister: {
24
+ _dimensions: import("./Scene/MeshRegister.types.js").MeshRegisterDimensions;
25
+ $INIT(): void;
26
+ clearAll(): void;
27
+ dimensions: {
28
+ add(id: string): Map<any, any>;
29
+ get(id: string): Map<string, import("./Scene/MeshRegister.types.js").MushRegisterRegion> | undefined;
30
+ getAllMeshes(id: string): Generator<[location: import("../../Math/index.js").LocationData, substance: string, mesh: import("@amodx/uri/Meshes/URIMesh.js").URIMesh]>;
31
+ remove(id: string): boolean;
32
+ };
33
+ region: {
34
+ add(location: import("../../Math/index.js").LocationData): import("./Scene/MeshRegister.types.js").MushRegisterRegion;
35
+ remove(location: import("../../Math/index.js").LocationData): boolean;
36
+ _getRegionData(): import("./Scene/MeshRegister.types.js").MushRegisterRegion;
37
+ get(location: import("../../Math/index.js").LocationData): false | import("./Scene/MeshRegister.types.js").MushRegisterRegion;
38
+ };
39
+ column: {
40
+ add(location: import("../../Math/index.js").LocationData): import("./Scene/MeshRegister.types.js").MeshRegisterColumn;
41
+ remove(location: import("../../Math/index.js").LocationData): false | import("./Scene/MeshRegister.types.js").MeshRegisterColumn;
42
+ _getColumnData(location: import("../../Math/index.js").LocationData): import("./Scene/MeshRegister.types.js").MeshRegisterColumn;
43
+ get(location: import("../../Math/index.js").LocationData): false | import("./Scene/MeshRegister.types.js").MeshRegisterColumn | undefined;
44
+ };
45
+ chunk: {
46
+ add(location: import("../../Math/index.js").LocationData, mesh: import("@amodx/uri/Meshes/URIMesh.js").URIMesh, substance: string): Map<string, import("./Scene/MeshRegister.types.js").MeshRegisterChunk>;
47
+ _getChunkData(mesh: import("@amodx/uri/Meshes/URIMesh.js").URIMesh): import("./Scene/MeshRegister.types.js").MeshRegisterChunk;
48
+ remove(location: import("../../Math/index.js").LocationData, substance: string): false | import("@amodx/uri/Meshes/URIMesh.js").URIMesh<import("@amodx/uri/Scenes/URIScene.js").URIScene<unknown>, unknown>;
49
+ get(location: import("../../Math/index.js").LocationData, substance: string): false | import("./Scene/MeshRegister.types.js").MeshRegisterChunk;
50
+ };
51
+ };
52
+ renderer: DVERenderer;
53
+ tasks: {
54
+ setChunk: void;
55
+ removeChunk: void;
56
+ removeColumn: void;
57
+ clearAll: void;
58
+ removeColumnsOutsideRadius: void;
59
+ };
60
+ threads: DVERenderThreads;
61
+ data: DVEFDataCore;
62
+ constructor();
63
+ init(props: DVERInitData): Promise<void>;
64
+ /**# clearAll
65
+ *---
66
+ * Clear all world data and meshes.
67
+ */
68
+ clearAll(): Promise<void>;
69
+ }
70
+ export {};
@@ -0,0 +1,54 @@
1
+ //objects
2
+ import { EngineSettings } from "../../Data/Settings/EngineSettings.js";
3
+ import { RenderTasks } from "./Tasks/RenderTasks.js";
4
+ import { Threads } from "@amodx/threads/";
5
+ //functions
6
+ import InitThreads from "./InitThreads.js";
7
+ import { MeshManager } from "./Scene/MeshManager.js";
8
+ import { MeshRegister } from "./Scene/MeshRegister.js";
9
+ import { DVEFDataCore } from "../../Data/DVEFDataCore";
10
+ import { DVERenderThreads } from "./DVERenderThreads.js";
11
+ export class DivineVoxelEngineRender {
12
+ static instance;
13
+ static initialized = false;
14
+ TC = Threads;
15
+ settings = EngineSettings;
16
+ meshManager = MeshManager;
17
+ meshRegister = MeshRegister;
18
+ renderer;
19
+ tasks = RenderTasks;
20
+ threads = new DVERenderThreads();
21
+ data = new DVEFDataCore();
22
+ constructor() {
23
+ if (DivineVoxelEngineRender.instance)
24
+ return DivineVoxelEngineRender.instance;
25
+ DivineVoxelEngineRender.instance = this;
26
+ }
27
+ async init(props) {
28
+ if (DivineVoxelEngineRender.initialized)
29
+ return;
30
+ DivineVoxelEngineRender.initialized = true;
31
+ this.renderer = props.renderer;
32
+ if (props.nexusWorker) {
33
+ this.threads.nexus.setPort(props.nexusWorker);
34
+ this.threads.addThread(this.threads.nexus);
35
+ }
36
+ if (props.richWorldWorker) {
37
+ this.threads.richWorld.setPort(props.richWorldWorker);
38
+ this.threads.addThread(this.threads.richWorld);
39
+ }
40
+ await InitThreads(this, props);
41
+ await this.renderer.init(this);
42
+ }
43
+ /**# clearAll
44
+ *---
45
+ * Clear all world data and meshes.
46
+ */
47
+ async clearAll() {
48
+ this.meshRegister.clearAll();
49
+ await this.threads.world.runAsyncTasks("clear-all", "", []);
50
+ await Promise.all(this.threads.construcotrs
51
+ .getThreads()
52
+ .map((_) => _.runAsyncTasks("clear-all", "")));
53
+ }
54
+ }
@@ -0,0 +1,2 @@
1
+ import type { DivineVoxelEngineRender, DVERInitData } from "./DivineVoxelEngineRender.js";
2
+ export default function (DVER: DivineVoxelEngineRender, initData: DVERInitData): Promise<void>;
@@ -0,0 +1,53 @@
1
+ import { EngineSettings } from "../../Data/Settings/EngineSettings.js";
2
+ import { Thread, ThreadPool } from "@amodx/threads/";
3
+ export default async function (DVER, initData) {
4
+ DVER.settings.syncSettings(initData);
5
+ await DVER.TC.init("render", "global");
6
+ if (!(initData.worldWorker instanceof Worker)) {
7
+ throw Error("Supplied data for World Worker is not correct. Must be path to worker or a worker.");
8
+ }
9
+ DVER.threads.setThreadPort(DVER.threads.world.name, initData.worldWorker);
10
+ if (Array.isArray(initData.constructorWorkers) &&
11
+ initData.constructorWorkers[0] instanceof Worker) {
12
+ DVER.threads.setThreadPort(DVER.threads.construcotrs.name, initData.constructorWorkers);
13
+ }
14
+ else {
15
+ throw Error("Supplied data for the Constructor Workers is not correct. Must be path to worker or an array workers.");
16
+ }
17
+ for (const thread of DVER.threads.construcotrs.getThreads()) {
18
+ await thread.waitTillTasksExist("thread-ready");
19
+ }
20
+ await DVER.threads.pipelines.setPorts.pipe(DVER.threads);
21
+ for (const thread of DVER.threads.comms) {
22
+ if (thread instanceof ThreadPool) {
23
+ for (const com of thread.getThreads()) {
24
+ await com.waitTillTasksExist("sync-settings");
25
+ com.runTasks("sync-settings", EngineSettings.getSettingsCopy());
26
+ }
27
+ }
28
+ if (thread instanceof Thread) {
29
+ if (thread == DVER.threads.parent)
30
+ continue;
31
+ await thread.waitTillTasksExist("sync-settings");
32
+ thread.runTasks("sync-settings", EngineSettings.getSettingsCopy());
33
+ }
34
+ }
35
+ const proms = [];
36
+ for (const com of DVER.threads.construcotrs.getThreads()) {
37
+ proms.push(com.waitTillTasksExist("ready"));
38
+ }
39
+ await Promise.all(proms);
40
+ await DVER.threads.world.waitTillTasksExist("sync-all-data");
41
+ DVER.threads.world.runTasks("sync-all-data", true);
42
+ await DVER.threads.pipelines.init.pipe(DVER.threads);
43
+ window.addEventListener("beforeunload", () => {
44
+ for (const thread of DVER.threads.comms) {
45
+ if (thread instanceof ThreadPool) {
46
+ thread.destroyAll();
47
+ }
48
+ if (thread instanceof Thread) {
49
+ thread.destroy();
50
+ }
51
+ }
52
+ });
53
+ }
@@ -0,0 +1,15 @@
1
+ import { RemoveChunkMeshTasks, SetChunkMeshTask } from "../Tasks/RenderTasks.types.js";
2
+ import { LocationData } from "../../../Math/index.js";
3
+ import { DVENodeMeshAttributes } from "../../../Interfaces/Render/Nodes/DVERenderNode.types.js";
4
+ export declare class MeshManager {
5
+ static runningUpdate: boolean;
6
+ private static columnSquare;
7
+ private static renderCircle;
8
+ static removeColumnsOutsideRadius(origion: LocationData, radius: number): void;
9
+ static chunks: {
10
+ remove(data: RemoveChunkMeshTasks): false | undefined;
11
+ add(location: LocationData, substance: string, meshData: DVENodeMeshAttributes): void;
12
+ update(data: SetChunkMeshTask): void;
13
+ removeColumn(data: LocationData): false | undefined;
14
+ };
15
+ }
@@ -0,0 +1,105 @@
1
+ import { MeshRegister } from "./MeshRegister.js";
2
+ import { DivineVoxelEngineRender } from "../../Render/DivineVoxelEngineRender.js";
3
+ import { Square, Circle } from "@amodx/math/Shapes";
4
+ import { Vector2Like } from "@amodx/math";
5
+ import { WorldSpaces } from "../../../Data/World/WorldSpaces.js";
6
+ export class MeshManager {
7
+ static runningUpdate = false;
8
+ static columnSquare = new Square(Vector2Like.Create(1, 1), 16);
9
+ static renderCircle = new Circle(Vector2Like.Create(0.1, 1), 10);
10
+ static removeColumnsOutsideRadius(origion, radius) {
11
+ const [dimesnionId, x, y, z] = origion;
12
+ const dimension = MeshRegister.dimensions.get(dimesnionId);
13
+ if (!dimension)
14
+ return;
15
+ this.columnSquare.sideLength = WorldSpaces.column._bounds.x;
16
+ this.renderCircle.radius = radius;
17
+ this.renderCircle.center.x = origion[1];
18
+ this.renderCircle.center.y = origion[3];
19
+ dimension.forEach((region) => {
20
+ region.columns.forEach((column) => {
21
+ const location = column.location;
22
+ this.columnSquare.center.x = location[1];
23
+ this.columnSquare.center.y = location[3];
24
+ if (!Circle.IsSquareInsideOrTouchingCircle(this.columnSquare, this.renderCircle)) {
25
+ setTimeout(() => this.chunks.removeColumn(location), 100);
26
+ }
27
+ });
28
+ });
29
+ }
30
+ static chunks = {
31
+ remove(data) {
32
+ const [location, substance] = data;
33
+ const mesh = MeshRegister.chunk.remove(location, substance);
34
+ if (!mesh)
35
+ return false;
36
+ DivineVoxelEngineRender.instance.renderer.nodes.meshes
37
+ .get(substance)
38
+ .returnMesh(mesh);
39
+ },
40
+ add(location, substance, meshData) {
41
+ let chunk = MeshRegister.chunk.get(location, substance);
42
+ let mesh;
43
+ if (!chunk) {
44
+ mesh = DivineVoxelEngineRender.instance.renderer.nodes.meshes
45
+ .get(substance)
46
+ .createMesh([location[1], location[2], location[3]], meshData);
47
+ mesh.type = "chunk";
48
+ MeshRegister.chunk.add(location, mesh, substance);
49
+ mesh.setEnabled(true);
50
+ mesh.isVisible = true;
51
+ }
52
+ else {
53
+ mesh = chunk.mesh;
54
+ DivineVoxelEngineRender.instance.renderer.nodes.meshes
55
+ .get(substance)
56
+ .updateVertexData([location[1], location[2], location[3]], meshData, mesh);
57
+ }
58
+ },
59
+ update(data) {
60
+ const [location, chunks] = data;
61
+ let i = chunks.length;
62
+ while (i--) {
63
+ const chunkData = chunks[i];
64
+ const substance = chunkData[0];
65
+ const remove = !chunkData[1];
66
+ if (remove) {
67
+ const mesh = MeshRegister.chunk.remove(location, substance);
68
+ if (mesh) {
69
+ DivineVoxelEngineRender.instance.renderer.nodes.meshes
70
+ .get(substance)
71
+ .returnMesh(mesh);
72
+ }
73
+ continue;
74
+ }
75
+ let chunk = MeshRegister.chunk.get(location, substance);
76
+ let mesh;
77
+ if (!chunk) {
78
+ mesh = DivineVoxelEngineRender.instance.renderer.nodes.meshes
79
+ .get(substance)
80
+ .createMesh([location[1], location[2], location[3]], chunkData[1][1]);
81
+ mesh.type = "chunk";
82
+ MeshRegister.chunk.add(location, mesh, substance);
83
+ }
84
+ else {
85
+ mesh = chunk.mesh;
86
+ DivineVoxelEngineRender.instance.renderer.nodes.meshes
87
+ .get(substance)
88
+ .updateVertexData([location[1], location[2], location[3]], chunkData[1][1], mesh);
89
+ }
90
+ }
91
+ },
92
+ removeColumn(data) {
93
+ const column = MeshRegister.column.remove(data);
94
+ if (!column)
95
+ return false;
96
+ for (const [key, chunk] of column.chunks) {
97
+ for (const [substance, mesh] of chunk) {
98
+ DivineVoxelEngineRender.instance.renderer.nodes.meshes
99
+ .get(substance)
100
+ .returnMesh(mesh.mesh);
101
+ }
102
+ }
103
+ },
104
+ };
105
+ }
@@ -0,0 +1,32 @@
1
+ import type { MeshRegisterChunk, MeshRegisterDimensions, MushRegisterRegion, MeshRegisterColumn } from "../Scene/MeshRegister.types.js";
2
+ import { type LocationData } from "../../../Math/index.js";
3
+ import { URIMesh } from "@amodx/uri/Meshes/URIMesh.js";
4
+ export declare const MeshRegister: {
5
+ _dimensions: MeshRegisterDimensions;
6
+ $INIT(): void;
7
+ clearAll(): void;
8
+ dimensions: {
9
+ add(id: string): Map<any, any>;
10
+ get(id: string): Map<string, MushRegisterRegion> | undefined;
11
+ getAllMeshes(id: string): Generator<[location: LocationData, substance: string, mesh: URIMesh]>;
12
+ remove(id: string): boolean;
13
+ };
14
+ region: {
15
+ add(location: LocationData): MushRegisterRegion;
16
+ remove(location: LocationData): boolean;
17
+ _getRegionData(): MushRegisterRegion;
18
+ get(location: LocationData): false | MushRegisterRegion;
19
+ };
20
+ column: {
21
+ add(location: LocationData): MeshRegisterColumn;
22
+ remove(location: LocationData): false | MeshRegisterColumn;
23
+ _getColumnData(location: LocationData): MeshRegisterColumn;
24
+ get(location: LocationData): false | MeshRegisterColumn | undefined;
25
+ };
26
+ chunk: {
27
+ add(location: LocationData, mesh: URIMesh, substance: string): Map<string, MeshRegisterChunk>;
28
+ _getChunkData(mesh: URIMesh): MeshRegisterChunk;
29
+ remove(location: LocationData, substance: string): false | URIMesh<import("@amodx/uri/Scenes/URIScene.js").URIScene<unknown>, unknown>;
30
+ get(location: LocationData, substance: string): false | MeshRegisterChunk;
31
+ };
32
+ };
@@ -0,0 +1,195 @@
1
+ import { Vector3Like } from "@amodx/math";
2
+ import { WorldSpaces } from "../../../Data/World/WorldSpaces.js";
3
+ export const MeshRegister = {
4
+ _dimensions: new Map(),
5
+ $INIT() {
6
+ this._dimensions.set("main", new Map());
7
+ },
8
+ clearAll() {
9
+ for (const [dkey, dim] of this._dimensions) {
10
+ this.dimensions.remove(dkey);
11
+ }
12
+ this._dimensions.set("main", new Map());
13
+ },
14
+ dimensions: {
15
+ add(id) {
16
+ const dimesnion = new Map();
17
+ MeshRegister._dimensions.set(id, dimesnion);
18
+ return dimesnion;
19
+ },
20
+ get(id) {
21
+ return MeshRegister._dimensions.get(id);
22
+ },
23
+ *getAllMeshes(id) {
24
+ const dimension = MeshRegister._dimensions.get(id);
25
+ if (!dimension)
26
+ return false;
27
+ for (const [key, region] of dimension) {
28
+ for (const [columnKey, column] of region.columns) {
29
+ for (const [chunkKey, chunk] of column.chunks) {
30
+ for (const [substance, mesh] of chunk) {
31
+ yield [
32
+ [
33
+ column.location[0],
34
+ column.location[1],
35
+ column.location[2] + chunkKey * WorldSpaces.chunk._bounds.y,
36
+ column.location[3],
37
+ ],
38
+ substance,
39
+ mesh.mesh,
40
+ ];
41
+ }
42
+ }
43
+ }
44
+ }
45
+ },
46
+ remove(id) {
47
+ const dimension = MeshRegister._dimensions.get(id);
48
+ if (!dimension)
49
+ return false;
50
+ dimension.forEach((region) => {
51
+ region.columns.forEach((column) => {
52
+ column.chunks.forEach((chunk) => {
53
+ chunk.forEach((chunkMeshes) => {
54
+ chunkMeshes.mesh.dispose();
55
+ });
56
+ });
57
+ });
58
+ });
59
+ MeshRegister._dimensions.delete(id);
60
+ return true;
61
+ },
62
+ },
63
+ region: {
64
+ add(location) {
65
+ let dimension = MeshRegister.dimensions.get(location[0]);
66
+ if (!dimension) {
67
+ dimension = MeshRegister.dimensions.add(location[0]);
68
+ }
69
+ const region = this._getRegionData();
70
+ dimension.set(WorldSpaces.region.getKeyXYZ(location[1], location[2], location[3]), region);
71
+ return region;
72
+ },
73
+ remove(location) {
74
+ const region = MeshRegister.region.get(location);
75
+ if (!region)
76
+ return false;
77
+ const dimension = MeshRegister.dimensions.get(location[0]);
78
+ if (!dimension)
79
+ return false;
80
+ dimension.delete(WorldSpaces.region.getKeyXYZ(location[1], location[2], location[3]));
81
+ region.columns.forEach((column) => {
82
+ column.chunks.forEach((chunk) => {
83
+ chunk.forEach((chunkMeshes) => {
84
+ chunkMeshes.mesh.dispose();
85
+ });
86
+ });
87
+ });
88
+ return true;
89
+ },
90
+ _getRegionData() {
91
+ return {
92
+ columns: new Map(),
93
+ };
94
+ },
95
+ get(location) {
96
+ const dimension = MeshRegister.dimensions.get(location[0]);
97
+ if (!dimension)
98
+ return false;
99
+ const region = dimension.get(WorldSpaces.region.getKeyXYZ(location[1], location[2], location[3]));
100
+ if (!region)
101
+ return false;
102
+ return region;
103
+ },
104
+ },
105
+ column: {
106
+ add(location) {
107
+ let region = MeshRegister.region.get(location);
108
+ if (!region) {
109
+ region = MeshRegister.region.add(location);
110
+ }
111
+ const column = this._getColumnData(location);
112
+ region.columns.set(WorldSpaces.column.getIndexXYZ(location[1], location[2], location[3]), column);
113
+ return column;
114
+ },
115
+ remove(location) {
116
+ let region = MeshRegister.region.get(location);
117
+ if (!region)
118
+ return false;
119
+ const index = WorldSpaces.column.getIndexXYZ(location[1], location[2], location[3]);
120
+ const column = region.columns.get(index);
121
+ if (!column)
122
+ return false;
123
+ region.columns.delete(index);
124
+ if (region.columns.size == 0) {
125
+ MeshRegister.region.remove(location);
126
+ }
127
+ return column;
128
+ },
129
+ _getColumnData(location) {
130
+ return {
131
+ location: [
132
+ location[0],
133
+ ...Vector3Like.ToArray(WorldSpaces.column.getPositionXYZ(location[1], location[2], location[3])),
134
+ ],
135
+ chunks: new Map(),
136
+ };
137
+ },
138
+ get(location) {
139
+ const region = MeshRegister.region.get(location);
140
+ if (!region)
141
+ return false;
142
+ return region.columns.get(WorldSpaces.column.getIndexXYZ(location[1], location[2], location[3]));
143
+ },
144
+ },
145
+ chunk: {
146
+ add(location, mesh, substance) {
147
+ let column = MeshRegister.column.get(location);
148
+ if (!column) {
149
+ column = MeshRegister.column.add(location);
150
+ }
151
+ const index = WorldSpaces.chunk.getIndexXYZ(location[1], location[2], location[2]);
152
+ let chunk = column.chunks.get(index);
153
+ if (!chunk) {
154
+ chunk = new Map();
155
+ column.chunks.set(index, chunk);
156
+ }
157
+ chunk.set(substance, this._getChunkData(mesh));
158
+ return chunk;
159
+ },
160
+ _getChunkData(mesh) {
161
+ return {
162
+ mesh: mesh,
163
+ };
164
+ },
165
+ remove(location, substance) {
166
+ const column = MeshRegister.column.get(location);
167
+ if (!column)
168
+ return false;
169
+ const index = WorldSpaces.chunk.getIndexXYZ(location[1], location[2], location[3]);
170
+ const chunk = column.chunks.get(index);
171
+ if (!chunk)
172
+ return false;
173
+ const chunkMesh = chunk.get(substance);
174
+ if (!chunkMesh)
175
+ return false;
176
+ chunk.delete(substance);
177
+ if (chunk.size == 0) {
178
+ column.chunks.delete(index);
179
+ }
180
+ return chunkMesh.mesh;
181
+ },
182
+ get(location, substance) {
183
+ const column = MeshRegister.column.get(location);
184
+ if (!column)
185
+ return false;
186
+ const chunk = column.chunks.get(WorldSpaces.chunk.getIndexXYZ(location[1], location[2], location[3]));
187
+ if (!chunk)
188
+ return false;
189
+ const chunkMesh = chunk.get(substance);
190
+ if (!chunkMesh)
191
+ return false;
192
+ return chunkMesh;
193
+ },
194
+ },
195
+ };
@@ -0,0 +1,13 @@
1
+ import { URIMesh } from "@amodx/uri/Meshes/URIMesh";
2
+ import type { LocationData } from "Math/index.js";
3
+ export type MeshRegisterChunk = {
4
+ mesh: URIMesh;
5
+ };
6
+ export type MeshRegisterColumn = {
7
+ location: LocationData;
8
+ chunks: Map<number, Map<string, MeshRegisterChunk>>;
9
+ };
10
+ export type MushRegisterRegion = {
11
+ columns: Map<number, MeshRegisterColumn>;
12
+ };
13
+ export type MeshRegisterDimensions = Map<string, Map<string, MushRegisterRegion>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const RenderTasks: {
2
+ setChunk: void;
3
+ removeChunk: void;
4
+ removeColumn: void;
5
+ clearAll: void;
6
+ removeColumnsOutsideRadius: void;
7
+ };
@@ -0,0 +1,24 @@
1
+ import { Threads } from "@amodx/threads/";
2
+ import { MeshManager } from "../Scene/MeshManager.js";
3
+ import { MeshRegister } from "../Scene/MeshRegister.js";
4
+ export const RenderTasks = {
5
+ setChunk: Threads.registerTasks("set-chunk", (data) => {
6
+ MeshManager.chunks.update(data);
7
+ /* if (data[2] == 0) return MeshManager.chunks.update(data);
8
+ setTimeout(() => {
9
+ MeshManager.chunks.update(data);
10
+ }, 10); */
11
+ }),
12
+ removeChunk: Threads.registerTasks("remove-chunk", (data) => {
13
+ MeshManager.chunks.remove(data);
14
+ }),
15
+ removeColumn: Threads.registerTasks("remove-column", (data) => {
16
+ MeshManager.chunks.removeColumn(data);
17
+ }),
18
+ clearAll: Threads.registerTasks("clear-all", (data) => {
19
+ MeshRegister.clearAll();
20
+ }),
21
+ removeColumnsOutsideRadius: Threads.registerTasks("remove-column-outside-radius", (data) => {
22
+ MeshManager.removeColumnsOutsideRadius(data[0], data[1]);
23
+ }),
24
+ };
@@ -0,0 +1,27 @@
1
+ import { DVENodeMeshAttributes } from "../../../Interfaces/Render/Nodes/DVERenderNode.types";
2
+ import type { LocationData } from "../../../Math/index.js";
3
+ export type SetChunkMeshTask = [
4
+ location: LocationData,
5
+ meshes: (ChunkMeshData | RemoveChunkTasks)[],
6
+ priority: number
7
+ ];
8
+ export type ChunkMeshData = [
9
+ substanceType: string,
10
+ meshData: [
11
+ location: LocationData,
12
+ attributes: DVENodeMeshAttributes
13
+ ]
14
+ ];
15
+ type RemoveChunkTasks = [
16
+ substanceType: string,
17
+ removeFlag: false
18
+ ];
19
+ export type RemoveChunkMeshTasks = [
20
+ location: LocationData,
21
+ substanceType: string
22
+ ];
23
+ export type RemoveChunksOutsideDistance = [
24
+ location: LocationData,
25
+ distance: number
26
+ ];
27
+ export {};
@@ -0,0 +1 @@
1
+ export {};