@divinevoxel/vlox 0.0.78 → 0.0.79

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 (315) hide show
  1. package/Builder/Tools/Wrench/WrenchTool.js +26 -21
  2. package/Builder/VoxelBuildSpace.d.ts +2 -2
  3. package/Builder/VoxelBuildSpace.js +4 -4
  4. package/Builder/World/InitTasks.js +1 -1
  5. package/Cache/Cache.types.d.ts +0 -4
  6. package/Cache/CacheManager.d.ts +1 -2
  7. package/Cache/CacheManager.js +0 -2
  8. package/Contexts/Base/Main/InitDataGenerator.js +10 -2
  9. package/Contexts/Base/Remote/DataSync.types.d.ts +10 -4
  10. package/Contexts/Base/Remote/InitDataSync.js +10 -20
  11. package/Init/StartMesher.js +2 -1
  12. package/Init/StartRenderer.js +2 -1
  13. package/Mesher/{Geomtry → Geometry}/Geometry.types.d.ts +1 -0
  14. package/Mesher/InitMesher.d.ts +1 -2
  15. package/Mesher/InitMesher.js +7 -14
  16. package/Mesher/Items/{Geomtry → Geometry}/ItemGeometryBuilder.d.ts +2 -2
  17. package/Mesher/Items/{Geomtry → Geometry}/ItemGeometryBuilder.js +1 -1
  18. package/Mesher/Items/MeshTexture.d.ts +2 -1
  19. package/Mesher/Items/MeshTexture.js +7 -6
  20. package/Mesher/Items/MeshTextureO.js +1 -1
  21. package/Mesher/Items/Models/ItemModelBuilder.d.ts +1 -1
  22. package/Mesher/Items/Models/ItemModelBuilder.js +2 -2
  23. package/Mesher/Voxels/Base/CompactTemplateMesh.js +1 -1
  24. package/Mesher/Voxels/Base/CompactVoxelSectionMesh.js +2 -2
  25. package/Mesher/Voxels/Base/MeshSectionBase.js +1 -3
  26. package/Mesher/Voxels/{Geomtry → Geometry}/CompactedSectionVoxelMesh.js +3 -3
  27. package/Mesher/Voxels/{Geomtry → Geometry}/VoxelGeometryBuilder.d.ts +2 -2
  28. package/Mesher/Voxels/{Geomtry → Geometry}/VoxelGeometryBuilder.js +1 -1
  29. package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHBuilder.js +1 -1
  30. package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHStructCursor.d.ts +1 -1
  31. package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHStructCursor.js +1 -1
  32. package/Mesher/Voxels/MeshTemplate.js +0 -3
  33. package/Mesher/Voxels/MeshVoxel.js +0 -2
  34. package/Mesher/Voxels/Models/Common/Calc/CalcConstants.d.ts +1 -1
  35. package/Mesher/Voxels/Models/Common/Calc/CalcConstants.js +2 -2
  36. package/Mesher/Voxels/Models/Common/Calc/FaceDataCalc.js +4 -1
  37. package/Mesher/Voxels/Models/Common/Faces/CullRulledFace.js +29 -18
  38. package/Mesher/Voxels/Models/Common/Faces/ShadeRulelessFace.d.ts +1 -1
  39. package/Mesher/Voxels/Models/Common/Faces/ShadeRulledFace.d.ts +1 -1
  40. package/Mesher/Voxels/Models/Common/Faces/ShadeRulledFace.js +31 -21
  41. package/Mesher/Voxels/Models/Common/GetTexture.d.ts +4 -4
  42. package/Mesher/Voxels/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +1 -1
  43. package/Mesher/Voxels/Models/Nodes/Custom/Liquid/FlowGradient.js +1 -1
  44. package/Mesher/Voxels/Models/Nodes/Custom/Liquid/{LiquidGeomtryNode.d.ts → LiquidGeometryNode.d.ts} +2 -2
  45. package/Mesher/Voxels/Models/Nodes/Custom/Liquid/{LiquidGeomtryNode.js → LiquidGeometryNode.js} +5 -5
  46. package/Mesher/Voxels/Models/Nodes/Default/QuadVoxelGeometryNode.d.ts +3 -3
  47. package/Mesher/Voxels/Models/Nodes/Default/QuadVoxelGeometryNode.js +2 -2
  48. package/Mesher/Voxels/Models/Nodes/Default/TriangleVoxelGeometryNode.d.ts +3 -3
  49. package/Mesher/Voxels/Models/Nodes/Default/TriangleVoxelGeometryNode.js +2 -2
  50. package/Mesher/Voxels/Models/Nodes/GeometryNode.d.ts +3 -3
  51. package/Mesher/Voxels/Models/Nodes/GeometryNode.js +3 -3
  52. package/Mesher/Voxels/Models/Nodes/Types/GeometryNode.types.d.ts +7 -0
  53. package/Mesher/Voxels/Models/Nodes/Types/QuadVoxelGometryNodeTypes.d.ts +3 -3
  54. package/Mesher/Voxels/Models/Nodes/Types/TriangleVoxelGometryNodeTypes.d.ts +2 -2
  55. package/Mesher/Voxels/Models/Nodes/VoxelGeometryConstructor.d.ts +2 -3
  56. package/Mesher/Voxels/Models/Nodes/VoxelGeometryConstructor.js +6 -5
  57. package/Mesher/Voxels/Models/Procedures/Default/ConsistentRotationTextureProcedure.d.ts +4 -4
  58. package/Mesher/Voxels/Models/Procedures/Default/OutlinedTextureProcedure.d.ts +4 -4
  59. package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.d.ts +4 -4
  60. package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.js +20 -6
  61. package/Mesher/Voxels/Models/Procedures/TextureProcedure.d.ts +2 -2
  62. package/Mesher/Voxels/Models/VoxelConstructor.d.ts +1 -16
  63. package/Mesher/Voxels/Models/VoxelConstructor.js +50 -56
  64. package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.d.ts +3 -6
  65. package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.js +40 -44
  66. package/Mesher/Voxels/Models/VoxelModelBuilder.d.ts +4 -4
  67. package/Mesher/Voxels/Models/VoxelModelBuilder.js +4 -4
  68. package/Mesher/Voxels/Models/VoxelModelConstructorRegister.d.ts +1 -14
  69. package/Mesher/Voxels/Models/VoxelModelConstructorRegister.js +7 -21
  70. package/Mesher/Voxels/Models/VoxelModelEffect.d.ts +1 -7
  71. package/Mesher/Voxels/Models/VoxelModelEffect.js +23 -26
  72. package/Renderer/Classes/DVESectionMeshes.d.ts +1 -1
  73. package/Renderer/MeshManager.js +1 -1
  74. package/Settings/EngineSettings.types.d.ts +2 -1
  75. package/Settings/EngineSettings.types.js +1 -0
  76. package/Stats/EngineStats.d.ts +5 -3
  77. package/Stats/EngineStats.js +8 -6
  78. package/Templates/Archive/ArchivedVoxelTemplate.d.ts +1 -1
  79. package/Templates/Archive/ArchivedVoxelTemplate.js +5 -5
  80. package/Templates/Archive/Functions/CreateArchivedTemplate.d.ts +1 -1
  81. package/Templates/Archive/Functions/CreateArchivedTemplate.js +2 -2
  82. package/Templates/Cursor/TemplateCursor.d.ts +1 -1
  83. package/Templates/Cursor/TemplateCursor.js +1 -1
  84. package/Templates/Full/FullVoxelTemplate.d.ts +1 -1
  85. package/Templates/Full/FullVoxelTemplate.js +1 -1
  86. package/Templates/Full/Functions/CreateFullTemplate.d.ts +1 -1
  87. package/Templates/Selection/VoxelBFSSelection.d.ts +1 -1
  88. package/Templates/Selection/VoxelBFSSelection.js +1 -1
  89. package/Templates/Selection/VoxelBoundsSelection.d.ts +1 -1
  90. package/Templates/Selection/VoxelBoundsSelection.js +1 -1
  91. package/Templates/Selection/VoxelPointSelection.d.ts +1 -1
  92. package/Templates/Selection/VoxelPointSelection.js +1 -1
  93. package/Templates/Selection/VoxelSelection.d.ts +1 -1
  94. package/Templates/Selection/VoxelSurfaceSelection.d.ts +1 -1
  95. package/Templates/Selection/VoxelSurfaceSelection.js +1 -1
  96. package/Templates/Selection/VoxelTemplateSelection.d.ts +1 -1
  97. package/Templates/Selection/VoxelTemplateSelection.js +1 -1
  98. package/Templates/Shapes/Selections/BoxVoxelShapeSelection.d.ts +1 -1
  99. package/Templates/Shapes/Selections/BoxVoxelShapeSelection.js +1 -1
  100. package/Templates/Shapes/Selections/ConeVoxelShapeSelection.d.ts +1 -1
  101. package/Templates/Shapes/Selections/ConeVoxelShapeSelection.js +1 -1
  102. package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.d.ts +1 -1
  103. package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.js +1 -1
  104. package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.d.ts +1 -1
  105. package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.js +1 -1
  106. package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.d.ts +1 -1
  107. package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.js +1 -1
  108. package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.d.ts +1 -1
  109. package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.js +1 -1
  110. package/Templates/Shapes/Selections/SphereVoxelShapeSelection.d.ts +1 -1
  111. package/Templates/Shapes/Selections/SphereVoxelShapeSelection.js +1 -1
  112. package/Templates/Shapes/Selections/TorusVoxelShapeSelection.d.ts +1 -1
  113. package/Templates/Shapes/Selections/TorusVoxelShapeSelection.js +1 -1
  114. package/Templates/Shapes/VoxelShapeTemplate.d.ts +1 -1
  115. package/Templates/Shapes/VoxelShapeTemplate.js +1 -1
  116. package/Templates/VoxelTemplates.types.d.ts +1 -1
  117. package/Textures/Functions/BuildTextureData.js +4 -52
  118. package/Tools/Brush/Brush.js +5 -5
  119. package/Util/StringPalette.js +2 -0
  120. package/Voxels/Archive/VoxelPaletteArchiveReader.js +7 -6
  121. package/Voxels/Archive/VoxelPaletteArechive.js +8 -8
  122. package/Voxels/Cursor/DataCursor.interface.d.ts +1 -1
  123. package/Voxels/Cursor/VoxelCursor.interface.d.ts +0 -2
  124. package/Voxels/Cursor/VoxelCursor.interface.js +14 -16
  125. package/Voxels/Cursor/VoxelCursor.js +5 -5
  126. package/Voxels/Data/GeometryLUT.d.ts +32 -0
  127. package/Voxels/Data/GeometryLUT.js +50 -0
  128. package/Voxels/Data/VoxelLUT.d.ts +83 -0
  129. package/Voxels/Data/VoxelLUT.js +119 -0
  130. package/Voxels/Data/VoxelTagsRegister.d.ts +2 -2
  131. package/Voxels/Data/VoxelTagsRegister.js +2 -2
  132. package/Voxels/Functions/BuildLUTs.d.ts +6 -0
  133. package/Voxels/Functions/BuildLUTs.js +361 -0
  134. package/Voxels/Functions/BuildTagData.d.ts +4 -2
  135. package/Voxels/Functions/BuildTagData.js +15 -32
  136. package/Voxels/Functions/Geometry/BuildGeometryLUT.d.ts +11 -0
  137. package/Voxels/Functions/Geometry/BuildGeometryLUT.js +395 -0
  138. package/Voxels/{Models/Rules/Functions/Compile/Nodes → Functions/Geometry}/CalcFunctions.d.ts +3 -3
  139. package/Voxels/{Models/Rules/Functions/Compile/Nodes → Functions/Geometry}/CalcFunctions.js +2 -2
  140. package/Voxels/Functions/Geometry/Compile/BuildCompiled.d.ts +4 -0
  141. package/Voxels/Functions/Geometry/Compile/BuildCompiled.js +25 -0
  142. package/Voxels/Functions/Geometry/Compile/BuildCompiledBox.d.ts +4 -0
  143. package/Voxels/Functions/Geometry/Compile/BuildCompiledBox.js +13 -0
  144. package/Voxels/Functions/Geometry/Compile/BuildCompiledQuad.d.ts +4 -0
  145. package/Voxels/Functions/Geometry/Compile/BuildCompiledQuad.js +41 -0
  146. package/Voxels/Functions/Geometry/Compile/BuildCompiledTri.d.ts +4 -0
  147. package/Voxels/Functions/Geometry/Compile/BuildCompiledTri.js +44 -0
  148. package/Voxels/Functions/Geometry/GeometryLUT.types.d.ts +7 -0
  149. package/Voxels/Functions/Geometry/Inputs/BaseFunctions.d.ts +4 -0
  150. package/Voxels/Functions/Geometry/Inputs/BaseFunctions.js +28 -0
  151. package/Voxels/Functions/Geometry/Inputs/BuildBoxInputs.d.ts +5 -0
  152. package/Voxels/Functions/Geometry/Inputs/BuildBoxInputs.js +8 -0
  153. package/Voxels/Functions/Geometry/Inputs/BuildCustomInputs.d.ts +5 -0
  154. package/Voxels/Functions/Geometry/Inputs/BuildCustomInputs.js +41 -0
  155. package/Voxels/Functions/Geometry/Inputs/BuildQuadInputs.d.ts +5 -0
  156. package/Voxels/Functions/Geometry/Inputs/BuildQuadInputs.js +103 -0
  157. package/Voxels/Functions/Geometry/Inputs/BuildTriangleInputs.d.ts +5 -0
  158. package/Voxels/Functions/Geometry/Inputs/BuildTriangleInputs.js +101 -0
  159. package/Voxels/Functions/Geometry/Inputs/BuldInputs.d.ts +4 -0
  160. package/Voxels/Functions/Geometry/Inputs/BuldInputs.js +22 -0
  161. package/Voxels/Functions/Geometry/Rules/BuildRules.d.ts +1 -0
  162. package/Voxels/{Models/Rules/Functions → Functions/Geometry/Rules}/BuildRules.js +23 -23
  163. package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFaceRegister.d.ts +2 -2
  164. package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionQuadFace.js +1 -1
  165. package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionTriangleFace.js +1 -1
  166. package/Voxels/{Models/Indexing → Geometry}/AOOcclusionFaceIndex.d.ts +2 -2
  167. package/Voxels/Geometry/AOOcclusionFaceIndex.js +28 -0
  168. package/Voxels/{Models/Indexing → Geometry}/CulledOcclusionFaceIndex.d.ts +2 -2
  169. package/Voxels/Geometry/CulledOcclusionFaceIndex.js +27 -0
  170. package/Voxels/Geometry/VoxelGeometry.types.d.ts +105 -0
  171. package/Voxels/Geometry/VoxelGeometry.types.js +1 -0
  172. package/Voxels/Indexes/VoxelIndex.js +15 -21
  173. package/Voxels/InitVoxelData.d.ts +4 -3
  174. package/Voxels/InitVoxelData.js +53 -110
  175. package/Voxels/Interaction/Functions/PickVoxel.js +1 -1
  176. package/Voxels/Logic/Classes/Types/VoxelLogicStateType.js +2 -2
  177. package/Voxels/Logic/Classes/VoxelLogic.d.ts +2 -2
  178. package/Voxels/Logic/Classes/VoxelLogic.js +2 -2
  179. package/Voxels/Logic/VoxelLogicRegister.js +2 -2
  180. package/Voxels/Models/Defaults/CubeVoxelGeometry.d.ts +1 -1
  181. package/Voxels/Models/Defaults/CubeVoxelModels.d.ts +1 -0
  182. package/Voxels/Models/Defaults/CubeVoxelModels.js +45 -0
  183. package/Voxels/Models/Defaults/Examples.d.ts +2 -1
  184. package/Voxels/Models/Defaults/Examples.js +28 -28
  185. package/Voxels/Models/Defaults/FarmVoxelModels.d.ts +3 -2
  186. package/Voxels/Models/Defaults/FarmVoxelModels.js +3 -3
  187. package/Voxels/Models/Defaults/LiquidVoxelModel.d.ts +2 -1
  188. package/Voxels/Models/Defaults/PanelVoxelGeometry.d.ts +1 -1
  189. package/Voxels/Models/VoxelModel.types.d.ts +2 -109
  190. package/Voxels/State/{Schema → Reltional}/Conditions/SameVoxelConditions.d.ts +2 -2
  191. package/Voxels/State/Reltional/Conditions/SameVoxelConditions.js +19 -0
  192. package/Voxels/State/Reltional/Conditions/ShapeStateSchemaRelationsCondition.d.ts +6 -0
  193. package/Voxels/State/Reltional/Conditions/ShapeStateSchemaRelationsCondition.js +6 -0
  194. package/Voxels/State/Reltional/ReltionalStateBuilder.d.ts +18 -0
  195. package/Voxels/State/Reltional/ReltionalStateBuilder.js +42 -0
  196. package/Voxels/State/Schema/BinarySchema.d.ts +1 -0
  197. package/Voxels/State/Schema/BinarySchema.js +3 -0
  198. package/Voxels/State/State.types.d.ts +0 -25
  199. package/Voxels/State/State.types.js +1 -22
  200. package/Voxels/State/VoxelSchemas.d.ts +22 -0
  201. package/Voxels/State/VoxelSchemas.js +60 -0
  202. package/Voxels/Types/PaintVoxelData.js +55 -45
  203. package/Voxels/Types/VoxelModelCompiledData.types.d.ts +4 -22
  204. package/World/Archive/Classes/ImportedSection.js +8 -8
  205. package/World/Archive/Functions/Sector/ArchiveSector.js +3 -3
  206. package/World/Cursor/SectionCursor.d.ts +1 -1
  207. package/World/Cursor/SectionCursor.js +1 -1
  208. package/World/Cursor/SectorCursor.d.ts +1 -1
  209. package/World/Cursor/SectorCursor.js +1 -1
  210. package/World/Cursor/WorldCursor.d.ts +1 -1
  211. package/World/Cursor/WorldCursor.js +1 -1
  212. package/World/Lock/Function/LockSectors.d.ts +1 -1
  213. package/World/Lock/Function/UnLockSectors.d.ts +1 -1
  214. package/World/SnapShot/SectionSnapShotCursor.d.ts +1 -1
  215. package/World/SnapShot/SectionSnapShotCursor.js +1 -1
  216. package/World/SnapShot/SnapShots.d.ts +1 -1
  217. package/World/SnapShot/SnapShots.js +1 -1
  218. package/WorldSimulation/Dimensions/SimulationSector.d.ts +1 -1
  219. package/WorldSimulation/Dimensions/SimulationSector.js +2 -2
  220. package/WorldSimulation/Tools/SimulationBrush.js +9 -9
  221. package/WorldSimulation/Voxels/Behaviors/Types/CropVoxelBehavior.js +4 -2
  222. package/WorldSimulation/Voxels/Behaviors/Types/FarmlandVoxelBehavior.js +5 -2
  223. package/WorldSimulation/WorldSimulation.d.ts +1 -0
  224. package/WorldSimulation/WorldSimulation.js +2 -1
  225. package/package.json +1 -1
  226. package/Mesher/Voxels/Models/Nodes/Types/GeomtryNode.types.d.ts +0 -7
  227. package/Voxels/Data/VoxelPalettesRegister.d.ts +0 -18
  228. package/Voxels/Data/VoxelPalettesRegister.js +0 -24
  229. package/Voxels/Functions/BuildPaletteData.d.ts +0 -6
  230. package/Voxels/Functions/BuildPaletteData.js +0 -87
  231. package/Voxels/Functions/BuildStateData.d.ts +0 -23
  232. package/Voxels/Functions/BuildStateData.js +0 -327
  233. package/Voxels/Models/CompiledVoxelModel.types.d.ts +0 -46
  234. package/Voxels/Models/Indexing/AOOcclusionFaceIndex.js +0 -28
  235. package/Voxels/Models/Indexing/CulledOcclusionFaceIndex.js +0 -27
  236. package/Voxels/Models/Rules/Classes/GeomtryInput.d.ts +0 -16
  237. package/Voxels/Models/Rules/Classes/GeomtryInput.js +0 -85
  238. package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.d.ts +0 -22
  239. package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.js +0 -15
  240. package/Voxels/Models/Rules/Classes/VoxelRulesModel.d.ts +0 -19
  241. package/Voxels/Models/Rules/Classes/VoxelRulesModel.js +0 -29
  242. package/Voxels/Models/Rules/Functions/BuildFinalInputs.d.ts +0 -5
  243. package/Voxels/Models/Rules/Functions/BuildFinalInputs.js +0 -87
  244. package/Voxels/Models/Rules/Functions/BuildRules.d.ts +0 -7
  245. package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.d.ts +0 -4
  246. package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.js +0 -39
  247. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.d.ts +0 -5
  248. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.js +0 -14
  249. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.d.ts +0 -6
  250. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.js +0 -92
  251. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.d.ts +0 -6
  252. package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.js +0 -115
  253. package/Voxels/Models/Rules/VoxelModelRuleBuilderRegister.d.ts +0 -18
  254. package/Voxels/Models/Rules/VoxelModelRuleBuilderRegister.js +0 -202
  255. package/Voxels/State/CondiotnalTreeReader.d.ts +0 -10
  256. package/Voxels/State/CondiotnalTreeReader.js +0 -23
  257. package/Voxels/State/LogicStatementReader.d.ts +0 -9
  258. package/Voxels/State/LogicStatementReader.js +0 -50
  259. package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +0 -19
  260. package/Voxels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +0 -6
  261. package/Voxels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +0 -6
  262. package/Voxels/State/Schema/ShapeStateRelationsNode.d.ts +0 -10
  263. package/Voxels/State/Schema/ShapeStateRelationsNode.js +0 -26
  264. package/Voxels/State/Schema/StateSchema.d.ts +0 -13
  265. package/Voxels/State/Schema/StateSchema.js +0 -17
  266. package/Voxels/State/Schema/VoxelSchema.d.ts +0 -7
  267. package/Voxels/State/Schema/VoxelSchema.js +0 -10
  268. package/Voxels/State/SchemaRegister.d.ts +0 -18
  269. package/Voxels/State/SchemaRegister.js +0 -76
  270. package/Voxels/State/StateTreeReader.d.ts +0 -9
  271. package/Voxels/State/StateTreeReader.js +0 -37
  272. /package/Mesher/{Geomtry → Geometry}/Functions/GetBounds.d.ts +0 -0
  273. /package/Mesher/{Geomtry → Geometry}/Functions/GetBounds.js +0 -0
  274. /package/Mesher/{Geomtry → Geometry}/Geometry.types.js +0 -0
  275. /package/Mesher/{Geomtry → Geometry}/Primitives/Quad.d.ts +0 -0
  276. /package/Mesher/{Geomtry → Geometry}/Primitives/Quad.js +0 -0
  277. /package/Mesher/{Geomtry → Geometry}/Primitives/QuadVertexData.d.ts +0 -0
  278. /package/Mesher/{Geomtry → Geometry}/Primitives/QuadVertexData.js +0 -0
  279. /package/Mesher/{Geomtry → Geometry}/Primitives/Triangle.d.ts +0 -0
  280. /package/Mesher/{Geomtry → Geometry}/Primitives/Triangle.js +0 -0
  281. /package/Mesher/{Geomtry → Geometry}/Primitives/TriangleVertexData.d.ts +0 -0
  282. /package/Mesher/{Geomtry → Geometry}/Primitives/TriangleVertexData.js +0 -0
  283. /package/Mesher/{Geomtry → Geometry}/Primitives/index.d.ts +0 -0
  284. /package/Mesher/{Geomtry → Geometry}/Primitives/index.js +0 -0
  285. /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMesh.d.ts +0 -0
  286. /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMesh.js +0 -0
  287. /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMeshBuffer.d.ts +0 -0
  288. /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMeshBuffer.js +0 -0
  289. /package/Mesher/{Geomtry → Geometry}/Shapes/Box.d.ts +0 -0
  290. /package/Mesher/{Geomtry → Geometry}/Shapes/Box.js +0 -0
  291. /package/Mesher/{Geomtry → Geometry}/Transform/TransformBox.d.ts +0 -0
  292. /package/Mesher/{Geomtry → Geometry}/Transform/TransformBox.js +0 -0
  293. /package/Mesher/{Geomtry → Geometry}/Transform/TransformQuad.d.ts +0 -0
  294. /package/Mesher/{Geomtry → Geometry}/Transform/TransformQuad.js +0 -0
  295. /package/Mesher/{Geomtry → Geometry}/Transform/TransformTriangle.d.ts +0 -0
  296. /package/Mesher/{Geomtry → Geometry}/Transform/TransformTriangle.js +0 -0
  297. /package/Mesher/{Geomtry → Geometry}/index.d.ts +0 -0
  298. /package/Mesher/{Geomtry → Geometry}/index.js +0 -0
  299. /package/Mesher/Items/{Geomtry → Geometry}/ItemMeshVertexStructCursor.d.ts +0 -0
  300. /package/Mesher/Items/{Geomtry → Geometry}/ItemMeshVertexStructCursor.js +0 -0
  301. /package/Mesher/Voxels/{Geomtry → Geometry}/CompactedSectionVoxelMesh.d.ts +0 -0
  302. /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHBuilder.d.ts +0 -0
  303. /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshVertexStructCursor.d.ts +0 -0
  304. /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshVertexStructCursor.js +0 -0
  305. /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelShaderData.d.ts +0 -0
  306. /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelShaderData.js +0 -0
  307. /package/Mesher/Voxels/Models/Nodes/Types/{GeomtryNode.types.js → GeometryNode.types.js} +0 -0
  308. /package/Voxels/{Models/CompiledVoxelModel.types.js → Functions/Geometry/GeometryLUT.types.js} +0 -0
  309. /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFace.d.ts +0 -0
  310. /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFace.js +0 -0
  311. /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFaceRegister.js +0 -0
  312. /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionQuadFace.d.ts +0 -0
  313. /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionTriangleFace.d.ts +0 -0
  314. /package/Voxels/{Models/Indexing → Geometry}/VoxelRelativeCubeIndex.d.ts +0 -0
  315. /package/Voxels/{Models/Indexing → Geometry}/VoxelRelativeCubeIndex.js +0 -0
@@ -6,7 +6,7 @@ import { getBaseData, lightSegments, lightSemgnetGet } from "../Shared/index";
6
6
  import { ProcessedSection, SectorPalette } from "../../Classes/ArchiveClasses";
7
7
  import { CreateArchivedSection } from "./CreateArchivedSection";
8
8
  import { RemoveDuplicateSections } from "./RemoveDuplicateSections";
9
- import { VoxelPalettesRegister } from "../../../../Voxels/Data/VoxelPalettesRegister";
9
+ import { VoxelLUT } from "../../../../Voxels/Data/VoxelLUT";
10
10
  const lightData = new VoxelLightData();
11
11
  export default function ArchiveSector(archiveData) {
12
12
  const sector = WorldRegister.sectors.get(archiveData.location[0], archiveData.location[1], archiveData.location[2], archiveData.location[3]);
@@ -34,7 +34,7 @@ export default function ArchiveSector(archiveData) {
34
34
  if (!processedSection.palettes.voxels.isRegistered(voxelId))
35
35
  processedSection.palettes.voxels.register(voxelId);
36
36
  let voxelSecondary = 0;
37
- if (VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxels[section.ids[i]][0]]["dve_can_have_secondary"]) {
37
+ if (VoxelTagsRegister.VoxelTags[VoxelLUT.voxels[section.ids[i]][0]]["dve_can_have_secondary"]) {
38
38
  voxelSecondary = sectorPalettes.voxels.register(section.secondary[i]);
39
39
  if (!processedSection.palettes.secondaryVoxels.isRegistered(voxelSecondary))
40
40
  processedSection.palettes.secondaryVoxels.register(voxelSecondary);
@@ -140,7 +140,7 @@ export default function ArchiveSector(archiveData) {
140
140
  const length = archivedSection.original.ids.length;
141
141
  for (let i = 0; i < length; i++) {
142
142
  let secondary = false;
143
- if (VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxels[archivedSection.original.ids[i]][0]]["dve_can_have_secondary"] &&
143
+ if (VoxelTagsRegister.VoxelTags[VoxelLUT.voxels[archivedSection.original.ids[i]][0]]["dve_can_have_secondary"] &&
144
144
  archivedSection.original.secondary[i] !== 0) {
145
145
  secondary = true;
146
146
  }
@@ -3,7 +3,7 @@ import { Vector3Like } from "@amodx/math";
3
3
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
4
4
  import { WorldSectionCursorInterface } from "./WorldSectionCursor.interface";
5
5
  import type { Section } from "../Section/index";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  export declare class SectionCursor implements WorldSectionCursorInterface, DataCursorInterface {
8
8
  _section: Section | null;
9
9
  private voxel;
@@ -2,7 +2,7 @@ import { WorldRegister } from "../WorldRegister";
2
2
  import { WorldVoxelCursor } from "./WorldVoxelCursor";
3
3
  import { WorldSpaces } from "../WorldSpaces";
4
4
  import { Vector3Like } from "@amodx/math";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  const point = Vector3Like.Create();
7
7
  export class SectionCursor {
8
8
  _section;
@@ -4,7 +4,7 @@ import { WorldVoxelCursor } from "./WorldVoxelCursor";
4
4
  import { Vector3Like } from "@amodx/math";
5
5
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
6
6
  import { WorldSectionCursorInterface } from "./WorldSectionCursor.interface";
7
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
7
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
8
8
  export declare class SectorCursor implements DataCursorInterface, WorldSectionCursorInterface {
9
9
  _current: Sector | null;
10
10
  _section: Section | null;
@@ -2,7 +2,7 @@ import { WorldRegister } from "../WorldRegister";
2
2
  import { WorldVoxelCursor } from "./WorldVoxelCursor";
3
3
  import { WorldSpaces } from "../WorldSpaces";
4
4
  import { Vector3Like } from "@amodx/math";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  const point = Vector3Like.Create();
7
7
  export class SectorCursor {
8
8
  _current = null;
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { SectorCursor } from "./SectorCursor";
3
3
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  export declare class WorldCursor implements DataCursorInterface {
6
6
  volumeBounds: BoundingBox;
7
7
  sectorCursors: Record<number, Record<number, SectorCursor | null>>;
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { SectorCursor } from "./SectorCursor";
3
3
  import { WorldSpaces } from "../WorldSpaces";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  let cursorCache = [];
6
6
  const tempPosition = Vector3Like.Create();
7
7
  export class WorldCursor {
@@ -1,2 +1,2 @@
1
- import { BoundsInterface } from "@amodx/math/Geomtry/Bounds/BoundsInterface";
1
+ import { BoundsInterface } from "@amodx/math/Geometry/Bounds/BoundsInterface";
2
2
  export default function LockSectors(dimension: number, bounds: BoundsInterface): Promise<void>;
@@ -1,2 +1,2 @@
1
- import { BoundsInterface } from "@amodx/math/Geomtry/Bounds/BoundsInterface";
1
+ import { BoundsInterface } from "@amodx/math/Geometry/Bounds/BoundsInterface";
2
2
  export default function UnLockSectors(dimension: number, bounds: BoundsInterface): Promise<void>;
@@ -4,7 +4,7 @@ import { SectionSnapShot } from "./SectionSnapShot";
4
4
  import { Sector } from "../Sector";
5
5
  import { SectorCursor } from "../Cursor/SectorCursor";
6
6
  import { SectionCursor } from "../Cursor/SectionCursor";
7
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
7
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
8
8
  export declare class SectionSnapshotCursor implements DataCursorInterface {
9
9
  origin: Vector3Like;
10
10
  sectorOrigin: Vector3Like;
@@ -3,7 +3,7 @@ import { WorldSpaces } from "../WorldSpaces";
3
3
  import { Sector } from "../Sector";
4
4
  import { SectorCursor } from "../Cursor/SectorCursor";
5
5
  import { SectionCursor } from "../Cursor/SectionCursor";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  const tempPosition = Vector3Like.Create();
8
8
  export class SectionSnapshotCursor {
9
9
  origin = Vector3Like.Create();
@@ -1,6 +1,6 @@
1
1
  import { LocationData } from "../../Math";
2
2
  import { SectionSnapShot } from "./SectionSnapShot";
3
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
3
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
4
4
  export declare class SnapShots {
5
5
  static _readyCache: SectionSnapShot[];
6
6
  static _pendingCache: SectionSnapShot[];
@@ -1,5 +1,5 @@
1
1
  import { SectionSnapShot } from "./SectionSnapShot";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { WorldSpaces } from "../WorldSpaces";
4
4
  import { Vector3Like } from "@amodx/math";
5
5
  export class SnapShots {
@@ -28,6 +28,6 @@ export declare class SimulationSector {
28
28
  canCheckOut(): boolean;
29
29
  checkOut(thread: Thread): void;
30
30
  checkIn(thread: Thread): void;
31
- tickUpdate(): boolean;
31
+ tickUpdate(doTickUpdate?: boolean): boolean;
32
32
  generateUpdate(): boolean | undefined;
33
33
  }
@@ -94,7 +94,7 @@ export class SimulationSector {
94
94
  ...this.position,
95
95
  ]);
96
96
  }
97
- tickUpdate() {
97
+ tickUpdate(doTickUpdate = true) {
98
98
  if (!this.fullNeighbors)
99
99
  return false;
100
100
  if (this.sector?.isCheckedOut()) {
@@ -118,7 +118,7 @@ export class SimulationSector {
118
118
  }
119
119
  this._rendered = true;
120
120
  }
121
- if (this.ticking) {
121
+ if (this.ticking && doTickUpdate) {
122
122
  this.dimension.simulation.setOrigin(...this.position);
123
123
  this.dimension.simulation.bounds.start(this.dimension.id);
124
124
  this.tickQueue.run();
@@ -2,7 +2,7 @@ import { BrushTool } from "../../Tools/Brush/Brush";
2
2
  import { WorldSimulationTools } from "../Internal/WorldSimulationTools";
3
3
  import { VoxelBehaviorsRegister } from "../Voxels/Behaviors";
4
4
  import { VoxelTagsRegister } from "../../Voxels/Data/VoxelTagsRegister";
5
- import { VoxelPalettesRegister } from "../../Voxels/Data/VoxelPalettesRegister";
5
+ import { VoxelLUT } from "../../Voxels/Data/VoxelLUT";
6
6
  import { PaintVoxel } from "../../Tasks/Paint/Paint/PaintVoxel";
7
7
  import PaintVoxelTemplate from "../../Tasks/Paint/Paint/PaintVoxelTemplate";
8
8
  import PaintVoxelPath from "../../Tasks/Paint/Paint/PaintVoxelPath";
@@ -30,7 +30,7 @@ export class SimulationBrush extends BrushTool {
30
30
  const x = this.x;
31
31
  const y = this.y;
32
32
  const z = this.z;
33
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
33
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
34
34
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
35
35
  PaintVoxel(this._location, this.getRaw(), updateData);
36
36
  behavior.onPaint(this._dimension.simulation, x, y, z);
@@ -41,7 +41,7 @@ export class SimulationBrush extends BrushTool {
41
41
  const x = this.x;
42
42
  const y = this.y;
43
43
  const z = this.z;
44
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
44
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
45
45
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
46
46
  await this.taskTool.voxel.paint.runAsync([
47
47
  this._location,
@@ -65,7 +65,7 @@ export class SimulationBrush extends BrushTool {
65
65
  continue;
66
66
  if (!voxel)
67
67
  continue;
68
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
68
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
69
69
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
70
70
  behavior.onPaint(this._dimension.simulation, tx, ty, tz);
71
71
  }
@@ -93,7 +93,7 @@ export class SimulationBrush extends BrushTool {
93
93
  continue;
94
94
  if (!voxel)
95
95
  continue;
96
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
96
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
97
97
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
98
98
  behavior.onPaint(this._dimension.simulation, tx, ty, tz);
99
99
  }
@@ -151,7 +151,7 @@ export class SimulationBrush extends BrushTool {
151
151
  const voxel = this.dataCursor.getVoxel(tx, ty, tz);
152
152
  if (!voxel)
153
153
  continue;
154
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
154
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
155
155
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
156
156
  behavior.onErase(this._dimension.simulation, tx, ty, tz);
157
157
  }
@@ -174,7 +174,7 @@ export class SimulationBrush extends BrushTool {
174
174
  const voxel = this.dataCursor.getVoxel(tx, ty, tz);
175
175
  if (!voxel)
176
176
  continue;
177
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
177
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
178
178
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
179
179
  behavior.onErase(this._dimension.simulation, tx, ty, tz);
180
180
  }
@@ -202,7 +202,7 @@ export class SimulationBrush extends BrushTool {
202
202
  const voxel = this.dataCursor.getVoxel(tx, ty, tz);
203
203
  if (!voxel)
204
204
  continue;
205
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
205
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
206
206
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
207
207
  behavior.onErase(this._dimension.simulation, tx, ty, tz);
208
208
  }
@@ -225,7 +225,7 @@ export class SimulationBrush extends BrushTool {
225
225
  const voxel = this.dataCursor.getVoxel(tx, ty, tz);
226
226
  if (!voxel)
227
227
  continue;
228
- const tags = VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(this.data.id)];
228
+ const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
229
229
  const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
230
230
  behavior.onErase(this._dimension.simulation, tx, ty, tz);
231
231
  }
@@ -1,4 +1,5 @@
1
1
  import { VoxelBehaviorsRegister } from "../VoxelBehaviorsRegister";
2
+ import { VoxelSchemas } from "../../../../Voxels/State/VoxelSchemas";
2
3
  VoxelBehaviorsRegister.register({
3
4
  type: "dve_crop",
4
5
  onTick(simulation, voxel, x, y, z) {
@@ -8,12 +9,13 @@ VoxelBehaviorsRegister.register({
8
9
  const waterLevel = downVoxel.getLevel();
9
10
  if (waterLevel <= 0)
10
11
  return;
11
- const plantLevel = voxel.schema.state
12
+ const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
13
+ const plantLevel = schema
12
14
  .startEncoding(voxel.getState())
13
15
  .getNumber("level");
14
16
  if (plantLevel >= 7)
15
17
  return;
16
- voxel.setState(voxel.schema.state
18
+ voxel.setState(schema
17
19
  .startEncoding()
18
20
  .setNumber("level", plantLevel + 1)
19
21
  .getEncoded());
@@ -1,4 +1,5 @@
1
1
  import { VoxelBehaviorsRegister } from "../VoxelBehaviorsRegister";
2
+ import { VoxelSchemas } from "../../../../Voxels/State/VoxelSchemas";
2
3
  const levelChecks = [
3
4
  [1, 0, 0],
4
5
  [-1, 0, 0],
@@ -46,7 +47,8 @@ VoxelBehaviorsRegister.register({
46
47
  }
47
48
  const newLevel = currentLevel - 1;
48
49
  if (newLevel == 0) {
49
- voxel.setState(voxel.schema.state
50
+ const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
51
+ voxel.setState(schema
50
52
  .startEncoding(voxel.getState())
51
53
  .setValue("moist", "false")
52
54
  .getEncoded());
@@ -59,7 +61,8 @@ VoxelBehaviorsRegister.register({
59
61
  if (currentLevel < maxLevel) {
60
62
  const newLevel = currentLevel + 1;
61
63
  if (currentLevel == 0) {
62
- voxel.setState(voxel.schema.state
64
+ const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
65
+ voxel.setState(schema
63
66
  .startEncoding(voxel.getState())
64
67
  .setValue("moist", "true")
65
68
  .getEncoded());
@@ -35,6 +35,7 @@ export declare class WorldSimulation {
35
35
  static addGenerator(generator: Generator): void;
36
36
  static getDimension(id: number): import("./Dimensions/DimensionSegment").DimensionSegment;
37
37
  static removeGenerator(generator: Generator): boolean;
38
+ static doTickUpdates: boolean;
38
39
  static tick(generationOnly?: boolean): void;
39
40
  }
40
41
  export {};
@@ -88,13 +88,14 @@ export class WorldSimulation {
88
88
  }
89
89
  return false;
90
90
  }
91
+ static doTickUpdates = true;
91
92
  static tick(generationOnly = false) {
92
93
  let total = 0;
93
94
  for (const [, dimension] of WorldSimulationDimensions._dimensions) {
94
95
  dimension.incrementTick();
95
96
  for (let i = 0; i < dimension.activeSectors._sectors.length; i++) {
96
97
  total += dimension.activeSectors._sectors[i].tickQueue.getTotalTicks();
97
- dimension.activeSectors._sectors[i].tickUpdate();
98
+ dimension.activeSectors._sectors[i].tickUpdate(this.doTickUpdates);
98
99
  dimension.activeSectors._sectors[i].generateUpdate();
99
100
  }
100
101
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@divinevoxel/vlox","version":"0.0.78","description":"Vlox a block style voxel engine.","main":"index.js","types":"index.d.ts","type":"module","devDependencies":{},"scripts":{"clean:dist-ts":"test -d dist && find dist -type f \\( -name \"*.js\" -o -name \"*.d.ts\" \\) -delete || true","build":"mkdir -p dist && npm run clean:dist-ts && cp package.json dist/package.json && cd ./src && npx tsc","prepare-publish":"mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cp README.md ./dist/README.md && cp ./LICENSE.md ./dist/LICENSE.md && cd ./src && npx tsc","compile":"cd src && npx tsc --watch","compile:fresh":"npm run clean:dist-ts && cd src && npx tsc --watch"},"keywords":[],"author":"Divine Star Software","license":"MIT","repository":{"url":"git+https://github.com/Divine-Star-Software/DivineVoxelEngine.git"},"bugs":{"url":"https://github.com/Divine-Star-Software/DivineVoxelEngine/issues"},"dependencies":{"@amodx/math":"latest","@amodx/binary":"latest","@amodx/threads":"latest"},"publishConfig":{"access":"public"}}
1
+ {"name":"@divinevoxel/vlox","version":"0.0.79","description":"Vlox a block style voxel engine.","main":"index.js","types":"index.d.ts","type":"module","devDependencies":{},"scripts":{"clean:dist-ts":"test -d dist && find dist -type f \\( -name \"*.js\" -o -name \"*.d.ts\" \\) -delete || true","build":"mkdir -p dist && npm run clean:dist-ts && cp package.json dist/package.json && cd ./src && npx tsc","prepare-publish":"mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cp README.md ./dist/README.md && cp ./LICENSE.md ./dist/LICENSE.md && cd ./src && npx tsc","compile":"cd src && npx tsc --watch","compile:fresh":"npm run clean:dist-ts && cd src && npx tsc --watch"},"keywords":[],"author":"Divine Star Software","license":"MIT","repository":{"url":"git+https://github.com/Divine-Star-Software/DivineVoxelEngine.git"},"bugs":{"url":"https://github.com/Divine-Star-Software/DivineVoxelEngine/issues"},"dependencies":{"@amodx/math":"latest","@amodx/binary":"latest","@amodx/threads":"latest"},"publishConfig":{"access":"public"}}
@@ -1,7 +0,0 @@
1
- import { CompiledQuadVoxelGeomtryNode } from "./QuadVoxelGometryNodeTypes";
2
- import { CompiledTriangleVoxelGeomtryNode } from "./TriangleVoxelGometryNodeTypes";
3
- export type CompiledCustomGeomtryNode = {
4
- type: "custom";
5
- id: string;
6
- };
7
- export type CompiledGeomtryNodes = CompiledQuadVoxelGeomtryNode | CompiledTriangleVoxelGeomtryNode | CompiledCustomGeomtryNode;
@@ -1,18 +0,0 @@
1
- import { NumberPalette } from "../../Util/NumberPalette";
2
- import { StringPalette } from "../../Util/StringPalette";
3
- export declare class VoxelPalettesRegister {
4
- static material: StringPalette;
5
- static substance: StringPalette;
6
- static voxelIds: StringPalette;
7
- static voxelNametoIdMap: Map<string, string>;
8
- static voxelIdToNameMap: Map<string, string>;
9
- static state: NumberPalette;
10
- static mod: NumberPalette;
11
- static getVoxelId(id: number, state?: number, mod?: number): number;
12
- static getVoxelIdFromString(id: string, state?: number, mod?: number): number;
13
- static getVoxelIdFromName(name: string, state?: number, mod?: number): number;
14
- /**Palette of voxel ids to their tree id, state, and mod value */
15
- static voxels: [voxelId: number, state: number, mod: number][];
16
- /**Palette of true voxel ids to state then their mod then the final palette voxel id */
17
- static voxelRecord: number[][][];
18
- }
@@ -1,24 +0,0 @@
1
- import { NumberPalette } from "../../Util/NumberPalette";
2
- import { StringPalette } from "../../Util/StringPalette";
3
- export class VoxelPalettesRegister {
4
- static material = new StringPalette();
5
- static substance = new StringPalette();
6
- static voxelIds = new StringPalette();
7
- static voxelNametoIdMap = new Map();
8
- static voxelIdToNameMap = new Map();
9
- static state = new NumberPalette();
10
- static mod = new NumberPalette();
11
- static getVoxelId(id, state = 0, mod = 0) {
12
- return this.voxelRecord[id][mod][state];
13
- }
14
- static getVoxelIdFromString(id, state = 0, mod = 0) {
15
- return this.voxelRecord[this.voxelIds.getNumberId(id)][mod][state];
16
- }
17
- static getVoxelIdFromName(name, state = 0, mod = 0) {
18
- return this.voxelRecord[this.voxelIds.getNumberId(this.voxelNametoIdMap.get(name))][mod][state];
19
- }
20
- /**Palette of voxel ids to their tree id, state, and mod value */
21
- static voxels = [];
22
- /**Palette of true voxel ids to state then their mod then the final palette voxel id */
23
- static voxelRecord = [];
24
- }
@@ -1,6 +0,0 @@
1
- import { FinalCompiledVoxelModelData } from "../Models/CompiledVoxelModel.types";
2
- type BuildPaletteDataProps = {
3
- models: FinalCompiledVoxelModelData;
4
- };
5
- export declare function BuildPaletteData(props: BuildPaletteDataProps): void;
6
- export {};
@@ -1,87 +0,0 @@
1
- import { SchemaRegister } from "../State/SchemaRegister";
2
- import { VoxelPalettesRegister } from "../../Voxels/Data/VoxelPalettesRegister";
3
- import { EngineStats } from "../../Stats/EngineStats";
4
- function recurse(index, current, result, valuePairs) {
5
- if (index === valuePairs.length) {
6
- result.push(current.join(","));
7
- return;
8
- }
9
- const [key, values] = valuePairs[index];
10
- for (const value of values) {
11
- current.push(`${key}=${value}`);
12
- recurse(index + 1, current, result, valuePairs);
13
- current.pop();
14
- }
15
- }
16
- function getAllCombinations(valuePairs) {
17
- const result = [];
18
- recurse(0, [], result, valuePairs);
19
- return result;
20
- }
21
- export function BuildPaletteData(props) {
22
- const models = new Map(props.models.models.map((_) => [_.id, _]));
23
- const modelStateArray = new Map();
24
- for (const [, model] of models) {
25
- const schema = SchemaRegister.getModelSchema(model.id);
26
- const valuePairs = [];
27
- for (const node of schema.nodes) {
28
- valuePairs.push([
29
- node.name,
30
- node.valuePalette
31
- ? node.valuePalette._palette
32
- : new Array(node.bitMask + 1).fill(0).map((_, i) => `${i}`),
33
- ]);
34
- }
35
- const stateStrings = getAllCombinations(valuePairs);
36
- const statePalette = [];
37
- for (const state of stateStrings) {
38
- const value = schema.readString(!state ? "*" : state);
39
- statePalette.push(value);
40
- }
41
- modelStateArray.set(model.id, statePalette);
42
- }
43
- const finalPalette = [[0, 0, 0]];
44
- const finalPaletteRecord = [[[0]]];
45
- let paletteCount = 1;
46
- for (const voxel of props.models.voxels) {
47
- const schema = SchemaRegister.getVoxelModSchema(voxel.id);
48
- const valuePairs = [];
49
- for (const node of schema.nodes) {
50
- valuePairs.push([
51
- node.name,
52
- node.valuePalette
53
- ? node.valuePalette._palette
54
- : new Array(node.bitMask + 1).fill(0).map((_, i) => `${i}`),
55
- ]);
56
- }
57
- const stateStrings = getAllCombinations(valuePairs);
58
- const modPalette = [];
59
- if (valuePairs.length) {
60
- for (const state of stateStrings) {
61
- const value = schema.readString(!state ? "*" : state);
62
- modPalette.push(value);
63
- }
64
- }
65
- else {
66
- modPalette.push(0);
67
- }
68
- const voxelId = VoxelPalettesRegister.voxelIds.getNumberId(voxel.id);
69
- const statePalette = modelStateArray.get(voxel.modelId);
70
- finalPaletteRecord[voxelId] = new Array(modPalette.length).fill(-1);
71
- for (let modIndex = 0; modIndex < modPalette.length; modIndex++) {
72
- finalPaletteRecord[voxelId][modPalette[modIndex]] = new Array(statePalette.length).fill(-1);
73
- for (let stateIndex = 0; stateIndex < statePalette.length; stateIndex++) {
74
- finalPalette[paletteCount] = [
75
- voxelId,
76
- statePalette[stateIndex],
77
- modPalette[modIndex],
78
- ];
79
- finalPaletteRecord[voxelId][modPalette[modIndex]][statePalette[stateIndex]] = paletteCount;
80
- paletteCount++;
81
- }
82
- }
83
- }
84
- EngineStats.palette.paletteSize = finalPalette.length;
85
- VoxelPalettesRegister.voxels = finalPalette;
86
- VoxelPalettesRegister.voxelRecord = finalPaletteRecord;
87
- }
@@ -1,23 +0,0 @@
1
- import { StateLogicStatement, VoxelStateSchemaData } from "../State/State.types";
2
- import { VoxelRulesModoel } from "../Models/Rules/Classes/VoxelRulesModel";
3
- import { StringPalette } from "../../Util/StringPalette";
4
- import { VoxelEffectSyncData } from "../Effects/VoxelEffects.types";
5
- export declare function BuildStateData(model: VoxelRulesModoel, geoPalette: StringPalette): {
6
- schema: VoxelStateSchemaData;
7
- effects: VoxelEffectSyncData[];
8
- stateGeometryPalette: number[][];
9
- condiotnalShapeStateGeometryPalette: number[][];
10
- stateTree: any[];
11
- geometryLinkStateMap: Record<string, Record<number, number>>;
12
- statePalette: number[][];
13
- stateRecord: Record<string, number>;
14
- condiotnalNodeStateTree: any;
15
- condiotnalStatements: StateLogicStatement[];
16
- condiotnalStatePalette: number[][];
17
- condiotnalShapeStateRecord: Record<string, number>;
18
- condiotanlStatePalette: number[][][];
19
- condiotanlGeometryStatePalette: number[][][];
20
- stateRelativeGeometryMap: number[][];
21
- relativeGeometryByteIndexMap: number[];
22
- condiotnalShapeStateRelativeGeometryMap: number[][];
23
- };