@divinevoxel/vlox 0.0.72 → 0.0.74

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 (307) hide show
  1. package/Contexts/Base/Remote/InitDataSync.js +4 -0
  2. package/Contexts/Base/Remote/InitWorldDataSync.js +1 -1
  3. package/Contexts/Render/DivineVoxelEngineRender.d.ts +2 -1
  4. package/Contexts/World/DivineVoxelEngineWorld.d.ts +2 -1
  5. package/Init/StartConstructor.js +8 -4
  6. package/Init/StartWorld.d.ts +1 -1
  7. package/Math/index.d.ts +5 -1
  8. package/Mesher/Functions/CompactVoxelMesh.d.ts +2 -2
  9. package/Mesher/Functions/CompactVoxelMesh.js +1 -1
  10. package/Mesher/Functions/CompactVoxelSectionMesh.d.ts +4 -0
  11. package/Mesher/Functions/CompactVoxelSectionMesh.js +112 -0
  12. package/Mesher/Functions/MeshSection.d.ts +1 -1
  13. package/Mesher/Functions/MeshSection.js +27 -22
  14. package/Mesher/Functions/MeshTexture.d.ts +1 -1
  15. package/Mesher/Functions/MeshTexture.js +3 -4
  16. package/Mesher/Geomtry/CompactedSectionVoxelMesh.d.ts +23 -0
  17. package/Mesher/Geomtry/CompactedSectionVoxelMesh.js +144 -0
  18. package/Mesher/Geomtry/Primitives/QuadVertexData.d.ts +12 -10
  19. package/Mesher/Geomtry/Primitives/QuadVertexData.js +49 -56
  20. package/Mesher/Geomtry/VoxelGeometryBuilder.d.ts +2 -2
  21. package/Mesher/Geomtry/VoxelGeometryBuilder.js +120 -199
  22. package/Mesher/Geomtry/VoxelMesh.d.ts +1 -1
  23. package/Mesher/Geomtry/VoxelMesh.js +4 -4
  24. package/Mesher/Geomtry/VoxelMeshBVHBuilder.d.ts +16 -0
  25. package/Mesher/Geomtry/VoxelMeshBVHBuilder.js +51 -0
  26. package/Mesher/Geomtry/VoxelMeshBVHStructCursor.d.ts +22 -0
  27. package/Mesher/Geomtry/VoxelMeshBVHStructCursor.js +78 -0
  28. package/Mesher/Geomtry/{Buffers.js → VoxelMeshBuffers.js} +2 -2
  29. package/Mesher/Geomtry/index.d.ts +0 -1
  30. package/Mesher/Geomtry/index.js +0 -1
  31. package/Mesher/InitMesher.js +1 -1
  32. package/Mesher/InitTask.js +9 -23
  33. package/Mesher/Models/Common/BoxGeometryNode.js +7 -7
  34. package/Mesher/Models/Common/Calc/CalcConstants.d.ts +1 -1
  35. package/Mesher/Models/Common/Calc/CalcConstants.js +1 -1
  36. package/Mesher/Models/Common/Calc/FaceDataCalc.d.ts +2 -2
  37. package/Mesher/Models/Common/Calc/FaceDataCalc.js +37 -30
  38. package/Mesher/Models/Common/QuadGeometryNode.js +2 -2
  39. package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +2 -2
  40. package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.js +1 -1
  41. package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +18 -24
  42. package/Mesher/Models/Nodes/GeometryNode.d.ts +2 -2
  43. package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +1 -0
  44. package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.js +40 -31
  45. package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.js +2 -2
  46. package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +2 -2
  47. package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +2 -2
  48. package/Mesher/{Tools → Models/Protocols}/OutlinedVoxelTool.d.ts +1 -1
  49. package/Mesher/{Tools → Models/Protocols}/OutlinedVoxelTool.js +1 -1
  50. package/Mesher/Models/RenderedMaterials.d.ts +6 -0
  51. package/Mesher/{RenderedMaterials.js → Models/RenderedMaterials.js} +2 -2
  52. package/Mesher/Models/VoxelConstructor.d.ts +6 -6
  53. package/Mesher/Models/VoxelConstructor.js +8 -8
  54. package/Mesher/Models/VoxelGeometryBuilderCacheSpace.d.ts +3 -5
  55. package/Mesher/Models/VoxelGeometryBuilderCacheSpace.js +8 -32
  56. package/Mesher/{Tools/VoxelMesherDataTool.d.ts → Models/VoxelModelBuilder.d.ts} +4 -5
  57. package/Mesher/{Tools/VoxelMesherDataTool.js → Models/VoxelModelBuilder.js} +5 -8
  58. package/Mesher/Types/Mesher.types.d.ts +1 -0
  59. package/Models/Defaults/CubeVoxelGeometry.js +4 -0
  60. package/Models/Defaults/CubeVoxelModels.js +360 -383
  61. package/Models/Defaults/LiquidVoxelModel.js +5 -5
  62. package/Models/Defaults/PanelVoxelModels.js +442 -468
  63. package/Models/Defaults/StairVoxelModel.js +582 -597
  64. package/Models/Examples.js +490 -498
  65. package/Models/Rules/Classes/VoxelRulesModel.d.ts +1 -1
  66. package/Models/Rules/Classes/VoxelRulesModel.js +3 -3
  67. package/Models/Rules/Functions/BuildFinalInputs.d.ts +1 -1
  68. package/Models/Rules/Functions/BuildFinalInputs.js +21 -19
  69. package/Models/Rules/Functions/BuildGeomtryInputs.js +8 -5
  70. package/Models/Rules/Functions/BuildRules.js +2 -2
  71. package/Models/Rules/{VoxelModelManager.d.ts → VoxelModelRuleBuilderRegister.d.ts} +1 -1
  72. package/Models/Rules/VoxelModelRuleBuilderRegister.js +178 -0
  73. package/Models/VoxelModel.types.d.ts +17 -8
  74. package/Renderer/Classes/DVESectionMeshes.d.ts +2 -3
  75. package/Renderer/Classes/SectorMesh.d.ts +3 -4
  76. package/Renderer/Classes/SectorMesh.js +6 -11
  77. package/Renderer/InitTasks.js +1 -10
  78. package/Renderer/MeshManager.d.ts +1 -1
  79. package/Renderer/MeshManager.js +26 -25
  80. package/Renderer/MeshRegister.d.ts +5 -5
  81. package/Renderer/MeshRegister.js +4 -3
  82. package/Settings/EngineSettings.d.ts +2 -1
  83. package/Settings/EngineSettings.js +6 -5
  84. package/Settings/EngineSettings.types.d.ts +24 -39
  85. package/Settings/EngineSettings.types.js +22 -29
  86. package/Tasks/Logic/InitTasks.d.ts +1 -0
  87. package/Tasks/Logic/InitTasks.js +10 -0
  88. package/Tasks/Logic/VoxelLogicUpdate.d.ts +3 -0
  89. package/Tasks/Logic/VoxelLogicUpdate.js +71 -0
  90. package/Tasks/Propagation/Explosion/ExplosionManager.d.ts +2 -2
  91. package/Tasks/Propagation/Explosion/ExplosionManager.js +1 -2
  92. package/Tasks/Propagation/Flow/FlowManager.d.ts +4 -4
  93. package/Tasks/Propagation/Flow/FlowRemove.d.ts +2 -2
  94. package/Tasks/Propagation/Flow/FlowUpdate.d.ts +2 -2
  95. package/Tasks/Propagation/Flow/WorldFlow.d.ts +2 -2
  96. package/Tasks/Propagation/Illumanation/RGBUpdate.d.ts +3 -3
  97. package/Tasks/Propagation/Illumanation/SunUpdate.d.ts +3 -3
  98. package/Tasks/Propagation/Illumanation/WorldRGB.d.ts +2 -2
  99. package/Tasks/Propagation/Illumanation/WorldSun.d.ts +2 -2
  100. package/Tasks/Propagation/Illumanation/WorldSun.js +8 -15
  101. package/Tasks/Propagation/InitTasks.js +4 -4
  102. package/Tasks/Propagation/Power/PowerUpdate.d.ts +3 -0
  103. package/Tasks/Propagation/Power/PowerUpdate.js +80 -0
  104. package/Tasks/Tasks.types.d.ts +2 -2
  105. package/Tasks/TasksIds.d.ts +2 -1
  106. package/Tasks/TasksIds.js +1 -0
  107. package/Tasks/Update/Common.d.ts +3 -0
  108. package/Tasks/Update/Common.js +41 -0
  109. package/Tasks/Update/EreaseUpdate.d.ts +3 -0
  110. package/Tasks/Update/EreaseUpdate.js +66 -0
  111. package/Tasks/Update/InitTasks.d.ts +2 -2
  112. package/Tasks/Update/InitTasks.js +3 -1
  113. package/Tasks/Update/PaintUpdate.d.ts +3 -0
  114. package/Tasks/Update/PaintUpdate.js +89 -0
  115. package/Tasks/Update/VoxelUpdate.d.ts +2 -5
  116. package/Tasks/Update/VoxelUpdate.js +7 -143
  117. package/Tasks/{Update/UpdateTask.d.ts → VoxelUpdateTask.d.ts} +16 -6
  118. package/Tasks/{Update/UpdateTask.js → VoxelUpdateTask.js} +44 -5
  119. package/Tasks/WorldGeneration/WorldGenBrush.d.ts +3 -3
  120. package/Tasks/WorldGeneration/WorldGenBrush.js +3 -3
  121. package/Tasks/WorldGeneration/WorldGenRegister.d.ts +1 -1
  122. package/Templates/Cursor/TemplateCursor.d.ts +2 -2
  123. package/Templates/Cursor/TemplateCursor.js +1 -2
  124. package/Templates/Functions/CreateTemplate.d.ts +1 -1
  125. package/Templates/VoxelTemplates.types.d.ts +1 -1
  126. package/Textures/Classes/CompiledTexture.d.ts +18 -0
  127. package/Textures/Classes/CompiledTexture.js +50 -0
  128. package/Textures/Classes/CompiledTextureAnimation.d.ts +12 -0
  129. package/Textures/Classes/CompiledTextureAnimation.js +27 -0
  130. package/Textures/Classes/TextureAnimationTexture.d.ts +10 -0
  131. package/Textures/Classes/TextureAnimationTexture.js +32 -0
  132. package/Textures/Functions/BuildTextureData.d.ts +10 -0
  133. package/Textures/Functions/BuildTextureData.js +205 -0
  134. package/Textures/Texture.types.d.ts +50 -64
  135. package/Textures/TextureManager.d.ts +8 -19
  136. package/Textures/TextureManager.js +28 -166
  137. package/Tools/Brush/AdvancedBrushTool.js +1 -1
  138. package/Tools/Brush/Brush.d.ts +3 -3
  139. package/Tools/Brush/Brush.js +40 -8
  140. package/Tools/Tasks/TasksTool.d.ts +1 -0
  141. package/Tools/Tasks/TasksTool.js +2 -0
  142. package/Util/Binary/BinaryArrays.d.ts +6 -0
  143. package/Util/Binary/BinaryArrays.js +25 -0
  144. package/Util/Binary/BinaryBuffer.d.ts +35 -0
  145. package/Util/Binary/BinaryBuffer.js +136 -0
  146. package/Util/Binary/{BitArray.d.ts → BinaryFunctions.d.ts} +1 -2
  147. package/Util/Binary/BinaryFunctions.js +11 -0
  148. package/{Mesher/Tools/VoxelMeshBVHBuilder.d.ts → Util/Binary/BinaryTree.d.ts} +1 -33
  149. package/Util/Binary/BinaryTree.js +104 -0
  150. package/Voxels/Cursor/DataCursor.interface.d.ts +5 -0
  151. package/Voxels/Cursor/VoxelCursor.interface.d.ts +8 -3
  152. package/Voxels/Cursor/VoxelCursor.interface.js +54 -13
  153. package/Voxels/Cursor/VoxelLightData.js +1 -1
  154. package/Voxels/Data/VoxelPalettesRegister.d.ts +0 -5
  155. package/Voxels/Data/VoxelPalettesRegister.js +0 -9
  156. package/Voxels/Data/VoxelTag.types.d.ts +17 -2
  157. package/Voxels/Data/VoxelTag.types.js +6 -1
  158. package/Voxels/Data/VoxelTagsRegister.js +12 -7
  159. package/Voxels/Functions/BuildStateData.d.ts +6 -6
  160. package/Voxels/Functions/BuildStateData.js +37 -37
  161. package/Voxels/Functions/BuildTagAndPaletteData.js +6 -3
  162. package/Voxels/Indexes/VoxelIndex.d.ts +2 -2
  163. package/Voxels/Indexes/VoxelIndex.js +16 -18
  164. package/Voxels/InitVoxelData.js +24 -21
  165. package/Voxels/Logic/Classes/Default/Types/VoxelPoweredLogicType.d.ts +5 -0
  166. package/Voxels/Logic/Classes/Default/Types/VoxelPoweredLogicType.js +6 -0
  167. package/Voxels/Logic/Classes/VoxelLogic.d.ts +11 -0
  168. package/Voxels/Logic/Classes/VoxelLogic.js +49 -0
  169. package/Voxels/Logic/Classes/VoxelLogicType.d.ts +4 -0
  170. package/Voxels/Logic/Classes/VoxelLogicType.js +2 -0
  171. package/Voxels/Logic/VoxelLogic.types.d.ts +23 -0
  172. package/Voxels/Logic/VoxelLogic.types.js +1 -0
  173. package/Voxels/Logic/VoxelLogicRegister.d.ts +9 -0
  174. package/Voxels/Logic/VoxelLogicRegister.js +15 -0
  175. package/Voxels/State/Schema/StateSchema.d.ts +1 -1
  176. package/Voxels/State/SchemaRegister.js +10 -5
  177. package/Voxels/State/State.types.d.ts +1 -1
  178. package/Voxels/State/StateTreeReader.d.ts +1 -1
  179. package/Voxels/State/StateTreeReader.js +2 -3
  180. package/Voxels/Types/Voxel.types.d.ts +21 -0
  181. package/Voxels/Types/Voxel.types.js +6 -2
  182. package/Voxels/Types/VoxelModelCompiledData.types.d.ts +6 -4
  183. package/World/Archive/Archive.types.d.ts +65 -42
  184. package/World/Archive/Classes/ArchiveClasses.d.ts +66 -0
  185. package/World/Archive/Classes/ArchiveClasses.js +78 -0
  186. package/World/Archive/Classes/ImportedSection.d.ts +40 -0
  187. package/World/Archive/Classes/ImportedSection.js +307 -0
  188. package/World/Archive/Classes/ImportedSector.d.ts +23 -0
  189. package/World/Archive/Classes/ImportedSector.js +97 -0
  190. package/World/Archive/Functions/ArchiveArea.d.ts +1 -1
  191. package/World/Archive/Functions/ArchiveArea.js +49 -54
  192. package/World/Archive/Functions/ArchiveSector.js +373 -282
  193. package/World/Archive/Functions/CreateArchivedSection.d.ts +3 -0
  194. package/World/Archive/Functions/CreateArchivedSection.js +207 -0
  195. package/World/Archive/Functions/ImportSector.d.ts +2 -4
  196. package/World/Archive/Functions/ImportSector.js +50 -220
  197. package/World/Archive/Functions/RemoveDuplicates.d.ts +3 -0
  198. package/World/Archive/Functions/RemoveDuplicates.js +92 -0
  199. package/World/Archive/Functions/Shared.d.ts +6 -0
  200. package/World/Archive/Functions/Shared.js +50 -0
  201. package/World/Archive/InitTasks.js +37 -23
  202. package/World/Cursor/SectionCursor.d.ts +3 -3
  203. package/World/Cursor/SectionCursor.js +2 -3
  204. package/World/Cursor/SectorCursor.d.ts +3 -3
  205. package/World/Cursor/SectorCursor.js +1 -2
  206. package/World/Cursor/WorldCursor.d.ts +6 -5
  207. package/World/Cursor/WorldCursor.js +17 -15
  208. package/World/Cursor/WorldVoxelCursor.d.ts +0 -4
  209. package/World/Cursor/WorldVoxelCursor.js +24 -14
  210. package/World/Dimension/Dimension.d.ts +4 -1
  211. package/World/Dimension/Dimension.js +8 -1
  212. package/World/InitTasks.d.ts +1 -1
  213. package/World/Lock/WorldLock.d.ts +1 -1
  214. package/World/Section/Section.d.ts +27 -18
  215. package/World/Section/Section.js +125 -21
  216. package/World/Section/SectionState.d.ts +12 -0
  217. package/World/Section/SectionState.js +13 -0
  218. package/World/Sector/Sector.d.ts +20 -6
  219. package/World/Sector/Sector.js +100 -17
  220. package/World/Sector/SectorHeightMap.js +2 -2
  221. package/World/Sector/SectorState.d.ts +16 -7
  222. package/World/Sector/SectorState.js +29 -15
  223. package/World/Types/WorldData.types.d.ts +2 -7
  224. package/World/Types/WorldStorage.interface.js +1 -0
  225. package/World/WorldRegister.d.ts +13 -9
  226. package/World/WorldRegister.js +24 -9
  227. package/World/WorldSpaces.d.ts +4 -0
  228. package/World/WorldSpaces.js +25 -12
  229. package/{Tasks/IWG → WorldSimulation}/Internal/Classes/DimensionSegment.d.ts +2 -2
  230. package/{Tasks/IWG → WorldSimulation}/Internal/Classes/Generator.d.ts +10 -3
  231. package/{Tasks/IWG → WorldSimulation}/Internal/Classes/Generator.js +19 -3
  232. package/WorldSimulation/Internal/Classes/Queues/BuildQueue.d.ts +5 -0
  233. package/WorldSimulation/Internal/Classes/Queues/BuildQueue.js +6 -0
  234. package/WorldSimulation/Internal/Classes/Queues/LogiccQueue.d.ts +5 -0
  235. package/WorldSimulation/Internal/Classes/Queues/LogiccQueue.js +6 -0
  236. package/{Tasks/IWG → WorldSimulation}/Internal/Classes/SectorVisistedMap.js +1 -1
  237. package/WorldSimulation/Internal/Classes/TickQueue.d.ts +12 -0
  238. package/WorldSimulation/Internal/Classes/TickQueue.js +58 -0
  239. package/WorldSimulation/Internal/Classes/WorldSimulationTaskBase.d.ts +15 -0
  240. package/{Tasks/IWG/Internal/Classes/IWGTaskBase.js → WorldSimulation/Internal/Classes/WorldSimulationTaskBase.js} +8 -8
  241. package/{Tasks/IWG → WorldSimulation}/Internal/Functions/cullSectors.js +9 -9
  242. package/{Tasks/IWG → WorldSimulation}/Internal/Functions/getSectorState.d.ts +1 -1
  243. package/{Tasks/IWG → WorldSimulation}/Internal/Functions/getSectorState.js +4 -4
  244. package/WorldSimulation/Internal/Functions/runTickUpdate.d.ts +2 -0
  245. package/{Tasks/IWG/Internal/Functions/runBuildUpdate.js → WorldSimulation/Internal/Functions/runTickUpdate.js} +38 -9
  246. package/{Tasks/IWG → WorldSimulation}/Internal/Functions/runWorldUpdate.js +13 -13
  247. package/{Tasks/IWG → WorldSimulation}/Internal/TaskRegister.d.ts +2 -2
  248. package/{Tasks/IWG → WorldSimulation}/Internal/TaskRegister.js +1 -1
  249. package/WorldSimulation/Internal/WorldSimulationDimensions.d.ts +6 -0
  250. package/{Tasks/IWG/Internal/IWGDimensions.js → WorldSimulation/Internal/WorldSimulationDimensions.js} +1 -1
  251. package/WorldSimulation/Internal/WorldSimulationTasks.d.ts +30 -0
  252. package/{Tasks/IWG/Internal/IWGTasks.js → WorldSimulation/Internal/WorldSimulationTasks.js} +14 -24
  253. package/WorldSimulation/Internal/WorldSimulationTools.d.ts +8 -0
  254. package/{Tasks/IWG/Internal/IWGTools.js → WorldSimulation/Internal/WorldSimulationTools.js} +1 -1
  255. package/{Tasks/IWG → WorldSimulation}/Procedures/InitalLoad.d.ts +1 -1
  256. package/{Tasks/IWG → WorldSimulation}/Procedures/InitalLoad.js +11 -11
  257. package/{Tasks/IWG → WorldSimulation}/Procedures/SaveAllSectors.js +7 -5
  258. package/{Tasks/IWG/IWG.d.ts → WorldSimulation/WorldSimulation.d.ts} +6 -5
  259. package/{Tasks/IWG/IWG.js → WorldSimulation/WorldSimulation.js} +29 -23
  260. package/{Tasks/IWG → WorldSimulation}/index.d.ts +1 -1
  261. package/{Tasks/IWG → WorldSimulation}/index.js +1 -1
  262. package/package.json +1 -1
  263. package/Mesher/Functions/CompactMesh.d.ts +0 -2
  264. package/Mesher/Functions/CompactMesh.js +0 -42
  265. package/Mesher/Geomtry/GeometryNormals.d.ts +0 -10
  266. package/Mesher/Geomtry/GeometryNormals.js +0 -52
  267. package/Mesher/Geomtry/MeshData.types.d.ts +0 -13
  268. package/Mesher/Geomtry/MeshData.types.js +0 -6
  269. package/Mesher/Geomtry/Tools/MesherDataTools.d.ts +0 -7
  270. package/Mesher/Geomtry/Tools/MesherDataTools.js +0 -12
  271. package/Mesher/Geomtry/Tools/index.d.ts +0 -1
  272. package/Mesher/Geomtry/Tools/index.js +0 -1
  273. package/Mesher/RenderedMaterials.d.ts +0 -6
  274. package/Mesher/Tools/VoxelMeshBVHBuilder.js +0 -216
  275. package/Models/Rules/VoxelModelManager.js +0 -82
  276. package/Tasks/IWG/Internal/Classes/IWGTaskBase.d.ts +0 -15
  277. package/Tasks/IWG/Internal/Functions/runBuildUpdate.d.ts +0 -2
  278. package/Tasks/IWG/Internal/IWGDimensions.d.ts +0 -6
  279. package/Tasks/IWG/Internal/IWGTasks.d.ts +0 -34
  280. package/Tasks/IWG/Internal/IWGTools.d.ts +0 -8
  281. package/Textures/TextureAnimations.d.ts +0 -4
  282. package/Textures/TextureAnimations.js +0 -35
  283. package/Textures/TextureArray.d.ts +0 -47
  284. package/Textures/TextureArray.js +0 -202
  285. package/Textures/TextureBuilder.d.ts +0 -13
  286. package/Textures/TextureBuilder.js +0 -120
  287. package/Textures/TextureRegister.d.ts +0 -9
  288. package/Textures/TextureRegister.js +0 -28
  289. package/Tools/DataCursor.interface.d.ts +0 -5
  290. package/Tools/DataCursor.interface.js +0 -2
  291. package/Util/Binary/BitArray.js +0 -16
  292. package/World/Structs/WorldDataStructProperties.d.ts +0 -8
  293. package/World/Structs/WorldDataStructProperties.js +0 -9
  294. /package/Mesher/Geomtry/{Buffers.d.ts → VoxelMeshBuffers.d.ts} +0 -0
  295. /package/Mesher/{Tools → Geomtry}/VoxelMeshVertexStructCursor.d.ts +0 -0
  296. /package/Mesher/{Tools → Geomtry}/VoxelMeshVertexStructCursor.js +0 -0
  297. /package/Mesher/{VoxelShaderData.d.ts → Geomtry/VoxelShaderData.d.ts} +0 -0
  298. /package/Mesher/{VoxelShaderData.js → Geomtry/VoxelShaderData.js} +0 -0
  299. /package/{World/Storage/WorldStorage.interface.js → Voxels/Cursor/DataCursor.interface.js} +0 -0
  300. /package/World/{Storage → Types}/WorldStorage.interface.d.ts +0 -0
  301. /package/{Tasks/IWG → WorldSimulation}/Internal/Classes/DimensionSegment.js +0 -0
  302. /package/{Tasks/IWG → WorldSimulation}/Internal/Classes/SectorState.d.ts +0 -0
  303. /package/{Tasks/IWG → WorldSimulation}/Internal/Classes/SectorState.js +0 -0
  304. /package/{Tasks/IWG → WorldSimulation}/Internal/Classes/SectorVisistedMap.d.ts +0 -0
  305. /package/{Tasks/IWG → WorldSimulation}/Internal/Functions/cullSectors.d.ts +0 -0
  306. /package/{Tasks/IWG → WorldSimulation}/Internal/Functions/runWorldUpdate.d.ts +0 -0
  307. /package/{Tasks/IWG → WorldSimulation}/Procedures/SaveAllSectors.d.ts +0 -0
@@ -0,0 +1,78 @@
1
+ export class VoxelMeshBVHStructCursor {
2
+ data;
3
+ get minX() {
4
+ return this.data[this.trueIndex];
5
+ }
6
+ get minY() {
7
+ return this.data[this.trueIndex + 1];
8
+ }
9
+ get minZ() {
10
+ return this.data[this.trueIndex + 2];
11
+ }
12
+ get maxX() {
13
+ return this.data[this.trueIndex + 4];
14
+ }
15
+ get maxY() {
16
+ return this.data[this.trueIndex + 5];
17
+ }
18
+ get maxZ() {
19
+ return this.data[this.trueIndex + 6];
20
+ }
21
+ get voxelIndex() {
22
+ return this.data[this.trueIndex + 3];
23
+ }
24
+ get active() {
25
+ return this.data[this.trueIndex + 3];
26
+ }
27
+ get nodeType() {
28
+ return this.data[this.trueIndex + 7];
29
+ }
30
+ trueIndex = 0;
31
+ index = 0;
32
+ setIndex(index) {
33
+ this.trueIndex = index * 8;
34
+ }
35
+ constructor(data) {
36
+ this.data = data;
37
+ }
38
+ setActive() {
39
+ this.data[this.trueIndex + 3] = 1;
40
+ }
41
+ setVoxelIndex(value) {
42
+ this.data[this.trueIndex + 3] = value;
43
+ }
44
+ setInnerNode() {
45
+ this.data[this.trueIndex + 7] = 1;
46
+ }
47
+ setGeomtryNode() {
48
+ this.data[this.trueIndex + 7] = 2;
49
+ }
50
+ updateMin(x, y, z) {
51
+ const ix = this.trueIndex;
52
+ const iy = this.trueIndex + 1;
53
+ const iz = this.trueIndex + 2;
54
+ if (x < this.data[ix] || this.data[ix] == -Infinity) {
55
+ this.data[ix] = x;
56
+ }
57
+ if (y < this.data[iy] || this.data[iy] == -Infinity) {
58
+ this.data[iy] = y;
59
+ }
60
+ if (z < this.data[iz] || this.data[iz] == -Infinity) {
61
+ this.data[iz] = z;
62
+ }
63
+ }
64
+ updateMax(x, y, z) {
65
+ const ix = this.trueIndex + 4;
66
+ const iy = this.trueIndex + 5;
67
+ const iz = this.trueIndex + 6;
68
+ if (x > this.data[ix] || this.data[ix] == -Infinity) {
69
+ this.data[ix] = x;
70
+ }
71
+ if (y > this.data[iy] || this.data[iy] == -Infinity) {
72
+ this.data[iy] = y;
73
+ }
74
+ if (z > this.data[iz] || this.data[iz] == -Infinity) {
75
+ this.data[iz] = z;
76
+ }
77
+ }
78
+ }
@@ -3,7 +3,7 @@ export class VoxelVertexBuffer {
3
3
  sectorVertexSize;
4
4
  _buffers = [];
5
5
  sectorSize = 0;
6
- constructor(vertexFloatSize, sectorVertexSize, startingSectorSize = 4) {
6
+ constructor(vertexFloatSize, sectorVertexSize, startingSectorSize = 8) {
7
7
  this.vertexFloatSize = vertexFloatSize;
8
8
  this.sectorVertexSize = sectorVertexSize;
9
9
  this.sectorSize = vertexFloatSize * sectorVertexSize;
@@ -28,7 +28,7 @@ export class VoxelVertexBuffer {
28
28
  export class VoxelIndiceBuffer {
29
29
  sectorSize;
30
30
  _buffers = [];
31
- constructor(sectorSize, startingSectorSize = 4) {
31
+ constructor(sectorSize, startingSectorSize = 8) {
32
32
  this.sectorSize = sectorSize;
33
33
  for (let i = 0; i < startingSectorSize; i++) {
34
34
  this._buffers.push(new Uint32Array(sectorSize));
@@ -1,2 +1 @@
1
1
  export * from "./Primitives/index";
2
- export * from "./Tools/index.js";
@@ -1,2 +1 @@
1
1
  export * from "./Primitives/index";
2
- export * from "./Tools/index.js";
@@ -1,4 +1,4 @@
1
- import { RenderedMaterials } from "./RenderedMaterials";
1
+ import { RenderedMaterials } from "./Models/RenderedMaterials";
2
2
  import { VoxelModelConstructorRegister } from "./Models/VoxelModelConstructorRegister.js";
3
3
  import { LiquidGeometryNode } from "./Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js";
4
4
  import { VoxelConstructor } from "./Models/VoxelConstructor.js";
@@ -1,6 +1,5 @@
1
1
  import { Threads } from "@amodx/threads";
2
2
  import { WorldRegister } from "../World/WorldRegister";
3
- import { WorldSpaces } from "../World/WorldSpaces";
4
3
  import { MeshSection } from "./Functions/MeshSection";
5
4
  import { TasksIds } from "../Tasks/TasksIds";
6
5
  export default function (rendererThread) {
@@ -11,39 +10,26 @@ export default function (rendererThread) {
11
10
  return;
12
11
  rendererThread.runTask("set-section", section, transfers);
13
12
  });
14
- Threads.registerTask(TasksIds.BuildSector, (location) => {
15
- const sectorPosition = WorldSpaces.sector.getPosition(location[1], location[2], location[3]);
16
- const sector = WorldRegister.sectors.get(location[0], sectorPosition.x, sectorPosition.y, sectorPosition.z);
13
+ Threads.registerTask(TasksIds.BuildSector, (location, origin) => {
14
+ const sector = WorldRegister.sectors.getAt(location);
17
15
  if (!sector) {
18
- console.warn("Tried building a sector that does not exists.", [
19
- sectorPosition.x,
20
- sectorPosition.y,
21
- sectorPosition.z,
22
- ]);
16
+ console.warn("Tried building a sector that does not exists.", location);
23
17
  return;
24
18
  }
25
- if (sector.sections.length == 0) {
26
- console.warn("Tried building a sector with no sections.", sector.position);
27
- return;
28
- }
29
- const transfers = [];
30
19
  for (let i = 0; i < sector.sections.length; i++) {
31
20
  const section = sector.sections[i];
32
- if (!section)
33
- continue;
34
21
  let [minY, maxY] = section.getMinMax();
35
22
  if (Math.abs(minY) == Infinity && Math.abs(maxY) == Infinity)
36
23
  continue;
37
- transfers.length = 0;
38
- const sectionMesh = MeshSection([
39
- location[0],
40
- sector.position[0],
41
- sector.position[1] + i * WorldSpaces.section.bounds.y,
42
- sector.position[2],
43
- ], transfers);
24
+ const t = performance.now();
25
+ const transfers = [];
26
+ const sectionMesh = MeshSection([location[0], ...section.getPosition()], transfers);
44
27
  if (!sectionMesh)
45
28
  continue;
46
29
  rendererThread.runTask("set-section", sectionMesh, transfers);
30
+ const buildTime = performance.now() - t;
31
+ origin.runTask("add-build-time", buildTime);
32
+ console.log("BUILD TIME", buildTime);
47
33
  }
48
34
  });
49
35
  }
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { VoxelFaces } from "../../../Math";
3
3
  import { Quad } from "../../Geomtry/Primitives/Quad";
4
- import { addQuadWeights } from "./Calc/CalcConstants";
4
+ import { getQuadWeights } from "./Calc/CalcConstants";
5
5
  import { TransformBox } from "../../../Models/Shared/Transform";
6
6
  import { GetBounds } from "./BoundsFunctions";
7
7
  export function GetBoxGeometryNodeData(points, transform) {
@@ -66,12 +66,12 @@ export function GetBoxGeometryNodeData(points, transform) {
66
66
  }
67
67
  quadBounds[i] = GetBounds(positions);
68
68
  }
69
- vertexWeights[VoxelFaces.Up] = addQuadWeights(quads[VoxelFaces.Up], VoxelFaces.Up);
70
- vertexWeights[VoxelFaces.Down] = addQuadWeights(quads[VoxelFaces.Down], VoxelFaces.Down);
71
- vertexWeights[VoxelFaces.North] = addQuadWeights(quads[VoxelFaces.North], VoxelFaces.North);
72
- vertexWeights[VoxelFaces.South] = addQuadWeights(quads[VoxelFaces.South], VoxelFaces.South);
73
- vertexWeights[VoxelFaces.East] = addQuadWeights(quads[VoxelFaces.East], VoxelFaces.East);
74
- vertexWeights[VoxelFaces.West] = addQuadWeights(quads[VoxelFaces.West], VoxelFaces.West);
69
+ vertexWeights[VoxelFaces.Up] = getQuadWeights(quads[VoxelFaces.Up], VoxelFaces.Up);
70
+ vertexWeights[VoxelFaces.Down] = getQuadWeights(quads[VoxelFaces.Down], VoxelFaces.Down);
71
+ vertexWeights[VoxelFaces.North] = getQuadWeights(quads[VoxelFaces.North], VoxelFaces.North);
72
+ vertexWeights[VoxelFaces.South] = getQuadWeights(quads[VoxelFaces.South], VoxelFaces.South);
73
+ vertexWeights[VoxelFaces.East] = getQuadWeights(quads[VoxelFaces.East], VoxelFaces.East);
74
+ vertexWeights[VoxelFaces.West] = getQuadWeights(quads[VoxelFaces.West], VoxelFaces.West);
75
75
  return {
76
76
  quads,
77
77
  vertexWeights,
@@ -11,5 +11,5 @@ export declare function shouldCauseFlip(topRight: number, topLeft: number, botto
11
11
  export declare function getVertexWeights(face: VoxelFaces, x: number, y: number, z: number): Vec4Array;
12
12
  export declare function getInterpolationValue(value: Vec4Array, weights: Vec4Array): number;
13
13
  export type QuadVertexWeights = [Vec4Array, Vec4Array, Vec4Array, Vec4Array];
14
- export declare const addQuadWeights: (quad: Quad, direction: VoxelFaces) => QuadVertexWeights;
14
+ export declare const getQuadWeights: (quad: Quad, direction: VoxelFaces) => QuadVertexWeights;
15
15
  export declare function closestUnitNormal(v: Vec3Array): Vec3Array;
@@ -326,7 +326,7 @@ export function getInterpolationValue(value, weights) {
326
326
  lightData.getB(value[2]) * weights[2] +
327
327
  lightData.getB(value[3]) * weights[3]);
328
328
  }
329
- export const addQuadWeights = (quad, direction) => {
329
+ export const getQuadWeights = (quad, direction) => {
330
330
  const returnArray = [];
331
331
  for (const vertex of QuadVerticiesArray) {
332
332
  const { x, y, z } = quad.positions.vertices[vertex];
@@ -1,3 +1,3 @@
1
- import type { VoxelMesherDataTool } from "../../../../Mesher/Tools/VoxelMesherDataTool.js";
1
+ import type { VoxelModelBuilder } from "../../VoxelModelBuilder.js";
2
2
  import { VoxelFaces } from "../../../../Math/index.js";
3
- export default function calculateFaceData(face: VoxelFaces, builder: VoxelMesherDataTool): void;
3
+ export default function calculateFaceData(face: VoxelFaces, builder: VoxelModelBuilder): void;
@@ -2,47 +2,54 @@ import { VoxelFaceDirections } from "../../../../Math/index.js";
2
2
  import { GradientCheckSets } from "./CalcConstants.js";
3
3
  import { VoxelLightData } from "../../../../Voxels/Cursor/VoxelLightData.js";
4
4
  const lightData = new VoxelLightData();
5
- const currentLightValues = new Uint16Array([0, 0, 0, 0]);
6
- const loadedLightValues = new Uint16Array([0, 0, 0, 0]);
7
5
  export default function calculateFaceData(face, builder) {
8
- let light = builder.voxel.getLight();
9
- const faceNormal = VoxelFaceDirections[face];
10
6
  const x = builder.position.x;
11
7
  const y = builder.position.y;
12
8
  const z = builder.position.z;
13
9
  const vertexData = builder.lightData[face];
14
10
  const nVoxel = builder.nVoxel;
15
11
  const checkSet = GradientCheckSets[face];
16
- const otherLight = builder.space.getLight(builder.nVoxel, x + faceNormal[0], y + faceNormal[1], z + faceNormal[2]) || 0;
17
- light = otherLight >= 0 ? otherLight : light >= 0 ? light : 0;
12
+ let startLight = 0;
13
+ if (builder.voxel.isLightSource()) {
14
+ startLight = builder.voxel.getLightSourceValue();
15
+ }
16
+ else {
17
+ startLight =
18
+ nVoxel
19
+ .getVoxel(x + VoxelFaceDirections[face][0], y + VoxelFaceDirections[face][1], z + VoxelFaceDirections[face][2])
20
+ ?.getLight() || 0;
21
+ }
22
+ if (startLight < 0)
23
+ startLight = 0;
24
+ const startS = lightData.getS(startLight);
25
+ const startR = lightData.getR(startLight);
26
+ const startG = lightData.getG(startLight);
27
+ const startB = lightData.getB(startLight);
18
28
  for (let vertex = 0; vertex < 4; vertex++) {
19
- vertexData[vertex] = light;
20
- lightData.getLightValuesArrayToRef(light, currentLightValues);
29
+ vertexData[vertex] = startLight;
30
+ let s = startS;
31
+ let r = startR;
32
+ let g = startG;
33
+ let b = startB;
21
34
  for (let i = 0; i < 9; i += 3) {
22
- const nl = builder.space.getLight(nVoxel, checkSet[vertex][i] + x, checkSet[vertex][i + 1] + y, checkSet[vertex][i + 2] + z);
35
+ const nl = nVoxel
36
+ .getVoxel(checkSet[vertex][i] + x, checkSet[vertex][i + 1] + y, checkSet[vertex][i + 2] + z)
37
+ ?.getLight() || -1;
23
38
  if (nl <= 0)
24
39
  continue;
25
- /*
26
- Do Light
27
- */
28
- lightData.getLightValuesArrayToRef(nl, loadedLightValues);
29
- currentLightValues[0] =
30
- currentLightValues[0] < loadedLightValues[0]
31
- ? loadedLightValues[0]
32
- : currentLightValues[0];
33
- currentLightValues[1] =
34
- currentLightValues[1] < loadedLightValues[1]
35
- ? loadedLightValues[1]
36
- : currentLightValues[1];
37
- currentLightValues[2] =
38
- currentLightValues[2] < loadedLightValues[2]
39
- ? loadedLightValues[2]
40
- : currentLightValues[2];
41
- currentLightValues[3] =
42
- currentLightValues[3] < loadedLightValues[3]
43
- ? loadedLightValues[3]
44
- : currentLightValues[3];
40
+ let ns = lightData.getS(nl);
41
+ let nr = lightData.getR(nl);
42
+ let ng = lightData.getG(nl);
43
+ let nb = lightData.getB(nl);
44
+ if (s < ns)
45
+ s = ns;
46
+ if (r < nr)
47
+ r = nr;
48
+ if (g < ng)
49
+ g = ng;
50
+ if (b < nb)
51
+ b = nb;
45
52
  }
46
- vertexData[vertex] = lightData.setLightValues(currentLightValues);
53
+ vertexData[vertex] = lightData.createLightValue(s, r, g, b);
47
54
  }
48
55
  }
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { VoxelFaces } from "../../../Math";
3
3
  import { Quad } from "../../Geomtry/Primitives/Quad";
4
- import { addQuadWeights, closestUnitNormal, } from "./Calc/CalcConstants";
4
+ import { getQuadWeights, closestUnitNormal, } from "./Calc/CalcConstants";
5
5
  import { TransformQuad } from "../../../Models/Shared/Transform";
6
6
  import { GetBounds } from "./BoundsFunctions";
7
7
  export function GetQuadGeometryData(data, transform) {
@@ -40,7 +40,7 @@ export function GetQuadGeometryData(data, transform) {
40
40
  closestFace = VoxelFaces.North;
41
41
  if (unitNormal[2] == -1)
42
42
  closestFace = VoxelFaces.South;
43
- const vertexWeights = addQuadWeights(quad, closestFace);
43
+ const vertexWeights = getQuadWeights(quad, closestFace);
44
44
  closestFace = closestFace;
45
45
  return {
46
46
  quad,
@@ -1,4 +1,4 @@
1
- import type { VoxelMesherDataTool } from "../../../../../Mesher/Tools/VoxelMesherDataTool";
1
+ import type { VoxelModelBuilder } from "../../../VoxelModelBuilder";
2
2
  import { QuadScalarVertexData } from "../../../../Geomtry/Primitives/QuadVertexData";
3
3
  import { CompassAngles } from "@amodx/math";
4
4
  export declare enum FlowVerticies {
@@ -8,4 +8,4 @@ export declare enum FlowVerticies {
8
8
  SouthEsat = 3
9
9
  }
10
10
  export declare function getFlowAngle(vertexLevel: QuadScalarVertexData): [angle: CompassAngles, flow: number];
11
- export declare function getFlowGradient(tool: VoxelMesherDataTool, flowStates: QuadScalarVertexData): QuadScalarVertexData;
11
+ export declare function getFlowGradient(tool: VoxelModelBuilder, flowStates: QuadScalarVertexData): QuadScalarVertexData;
@@ -66,7 +66,7 @@ const returnData = [
66
66
  export function getFlowAngle(vertexLevel) {
67
67
  if (vertexLevel.isAllEqualTo(7)) {
68
68
  returnData[0] = 0;
69
- returnData[1] = FlowStates.None;
69
+ returnData[1] = FlowStates.Up;
70
70
  return returnData;
71
71
  }
72
72
  const upRight = vertexLevel.vertices[QuadVerticies.TopRight];
@@ -8,7 +8,7 @@ import { shouldCauseFlip } from "../../../Common/Calc/CalcConstants";
8
8
  import { getFlowAngle, getFlowGradient, FlowVerticies } from "./FlowGradient";
9
9
  import { GetBoxGeometryNodeData } from "../../../Common/BoxGeometryNode";
10
10
  import { VoxelLightData } from "../../../../../Voxels/Cursor/VoxelLightData";
11
- import { VoxelGeometryBuilder } from "../../../../Geomtry/VoxelGeometryBuilder";
11
+ import { addVoxelQuad } from "../../../../Geomtry/VoxelGeometryBuilder";
12
12
  const vertexValue = new QuadScalarVertexData();
13
13
  const vertexLevel = new QuadScalarVertexData();
14
14
  const lightData = new VoxelLightData();
@@ -49,12 +49,13 @@ export class LiquidGeometryNode extends GeoemtryNode {
49
49
  return false;
50
50
  }
51
51
  determineShading(face) {
52
- const tool = this.builder;
53
- const lightData = tool.lightData[face];
52
+ this.builder.calculateFaceData(face);
53
+ const lightData = this.builder.lightData[face];
54
54
  const worldLight = this.builder.vars.light;
55
- for (let v = 0; v < 4; v++) {
56
- worldLight.vertices[v] = lightData[v];
57
- }
55
+ worldLight.vertices[0] = lightData[0];
56
+ worldLight.vertices[1] = lightData[1];
57
+ worldLight.vertices[2] = lightData[2];
58
+ worldLight.vertices[3] = lightData[3];
58
59
  }
59
60
  shouldFlip() {
60
61
  const worldLight = this.builder.vars.light;
@@ -72,7 +73,6 @@ export class LiquidGeometryNode extends GeoemtryNode {
72
73
  added = true;
73
74
  getFlowGradient(tool, vertexLevel);
74
75
  const quad = Quads[VoxelFaces.Up];
75
- tool.calculateFaceData(VoxelFaces.Up);
76
76
  this.determineShading(VoxelFaces.Up);
77
77
  quad.flip = this.shouldFlip();
78
78
  tool.vars.textureIndex = args.stillTexture;
@@ -92,26 +92,23 @@ export class LiquidGeometryNode extends GeoemtryNode {
92
92
  quad.positions.vertices[1].y = vertexValue.vertices[1] * waterHeight;
93
93
  quad.positions.vertices[2].y = vertexValue.vertices[2] * waterHeight;
94
94
  quad.positions.vertices[3].y = vertexValue.vertices[3] * waterHeight;
95
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
95
+ addVoxelQuad(tool, tool.origin, quad);
96
96
  tool.updateBounds(quadBounds[VoxelFaces.Up]);
97
97
  }
98
98
  if (this.isExposed(VoxelFaces.Down)) {
99
99
  added = true;
100
100
  tool.vars.textureIndex = args.stillTexture;
101
101
  const quad = Quads[VoxelFaces.Down];
102
- tool.calculateFaceData(VoxelFaces.Down);
103
102
  this.determineShading(VoxelFaces.Down);
104
103
  quad.flip = this.shouldFlip();
105
- tool.vars.textureIndex = args.stillTexture;
106
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
104
+ addVoxelQuad(tool, tool.origin, quad);
107
105
  tool.updateBounds(quadBounds[VoxelFaces.Down]);
108
106
  }
109
107
  if (this.isExposed(VoxelFaces.North)) {
110
108
  added = true;
111
- tool.vars.textureIndex = args.stillTexture;
109
+ tool.vars.textureIndex = args.flowTexture;
112
110
  const quad = Quads[VoxelFaces.North];
113
111
  tool.vars.animation.setAll(1);
114
- tool.calculateFaceData(VoxelFaces.North);
115
112
  this.determineShading(VoxelFaces.North);
116
113
  quad.flip = this.shouldFlip();
117
114
  if (upFaceExposed) {
@@ -129,15 +126,14 @@ export class LiquidGeometryNode extends GeoemtryNode {
129
126
  quad.positions.vertices[QuadVerticies.TopLeft].y = 1;
130
127
  quad.setUVs(uvs);
131
128
  }
132
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
129
+ addVoxelQuad(tool, tool.origin, quad);
133
130
  tool.updateBounds(quadBounds[VoxelFaces.North]);
134
131
  }
135
132
  if (this.isExposed(VoxelFaces.South)) {
136
133
  added = true;
137
- tool.vars.textureIndex = args.stillTexture;
134
+ tool.vars.textureIndex = args.flowTexture;
138
135
  const quad = Quads[VoxelFaces.South];
139
136
  tool.vars.animation.setAll(1);
140
- tool.calculateFaceData(VoxelFaces.South);
141
137
  this.determineShading(VoxelFaces.South);
142
138
  quad.flip = this.shouldFlip();
143
139
  if (upFaceExposed) {
@@ -155,17 +151,16 @@ export class LiquidGeometryNode extends GeoemtryNode {
155
151
  quad.positions.vertices[QuadVerticies.TopRight].y = 1;
156
152
  quad.setUVs(uvs);
157
153
  }
158
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
154
+ addVoxelQuad(tool, tool.origin, quad);
159
155
  tool.updateBounds(quadBounds[VoxelFaces.South]);
160
156
  }
161
157
  if (this.isExposed(VoxelFaces.East)) {
162
158
  added = true;
163
- tool.vars.textureIndex = args.stillTexture;
159
+ tool.vars.textureIndex = args.flowTexture;
164
160
  const quad = Quads[VoxelFaces.East];
165
161
  tool.vars.animation.setAll(1);
166
- tool.calculateFaceData(VoxelFaces.East);
167
162
  this.determineShading(VoxelFaces.East);
168
- // quad.flip = this.shouldFlip();
163
+ quad.flip = this.shouldFlip();
169
164
  if (upFaceExposed) {
170
165
  quad.positions.vertices[QuadVerticies.TopRight].y =
171
166
  vertexValue.vertices[FlowVerticies.NorthEast] * waterHeight;
@@ -181,15 +176,14 @@ export class LiquidGeometryNode extends GeoemtryNode {
181
176
  quad.positions.vertices[QuadVerticies.TopRight].y = 1;
182
177
  quad.setUVs(uvs);
183
178
  }
184
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
179
+ addVoxelQuad(tool, tool.origin, quad);
185
180
  tool.updateBounds(quadBounds[VoxelFaces.East]);
186
181
  }
187
182
  if (this.isExposed(VoxelFaces.West)) {
188
183
  added = true;
189
- tool.vars.textureIndex = args.stillTexture;
184
+ tool.vars.textureIndex = args.flowTexture;
190
185
  const quad = Quads[VoxelFaces.West];
191
186
  tool.vars.animation.setAll(1);
192
- tool.calculateFaceData(VoxelFaces.West);
193
187
  this.determineShading(VoxelFaces.West);
194
188
  quad.flip = this.shouldFlip();
195
189
  if (upFaceExposed) {
@@ -207,7 +201,7 @@ export class LiquidGeometryNode extends GeoemtryNode {
207
201
  quad.positions.vertices[QuadVerticies.TopRight].y = 1;
208
202
  quad.setUVs(uvs);
209
203
  }
210
- VoxelGeometryBuilder.addQuad(tool, tool.origin, quad);
204
+ addVoxelQuad(tool, tool.origin, quad);
211
205
  tool.updateBounds(quadBounds[VoxelFaces.West]);
212
206
  }
213
207
  this.builder.vars.light.setAll(0);
@@ -1,4 +1,4 @@
1
- import { VoxelMesherDataTool } from "../../../Mesher/Tools/VoxelMesherDataTool";
1
+ import { VoxelModelBuilder } from "../VoxelModelBuilder";
2
2
  import { VoxelGeometryConstructor } from "./VoxelGeometryConstructor";
3
3
  import { VoxelGeometryTransform } from "../../../Voxels/Types/VoxelModelCompiledData.types";
4
4
  export interface GeoemtryNodeConstructor<Data = any, Args = any> {
@@ -13,7 +13,7 @@ export declare abstract class GeoemtryNode<Data = any, Args = any> {
13
13
  vertexIndex: number;
14
14
  faceCount: number;
15
15
  vertexCount: number;
16
- builder: VoxelMesherDataTool;
16
+ builder: VoxelModelBuilder;
17
17
  constructor(geometryPaletteId: number, geomtry: VoxelGeometryConstructor, data: Data, transform: VoxelGeometryTransform);
18
18
  abstract init(): void;
19
19
  abstract add(args: Args): boolean;
@@ -14,6 +14,7 @@ export declare class BoxVoxelGometryNode extends GeoemtryNode<VoxelBoxGeometryNo
14
14
  Vec4Array,
15
15
  Vec4Array
16
16
  ]>;
17
+ _wasAOShaded: boolean;
17
18
  lightData: VoxelLightData;
18
19
  init(): void;
19
20
  isExposed(face: VoxelFaces): boolean;