@divinevoxel/vlox 0.0.77 → 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
@@ -4,7 +4,7 @@ import { NumberPalette } from "../../../Util/NumberPalette";
4
4
  import { BinaryBuffer, BinaryBufferFormat, } from "../../../Util/BinaryBuffer/index";
5
5
  import { VoxelArchivePalette } from "../../../Voxels/Archive/VoxelPaletteArechive";
6
6
  import { VoxelTagsRegister } from "../../../Voxels/Data/VoxelTagsRegister";
7
- import { VoxelPalettesRegister } from "../../../Voxels/Data/VoxelPalettesRegister";
7
+ import { VoxelLUT } from "../../../Voxels/Data/VoxelLUT";
8
8
  import { EngineSettings } from "../../../Settings/EngineSettings";
9
9
  /**
10
10
  * Creates an archived template using the passed in the data cursor.
@@ -44,7 +44,7 @@ export default function CreateArchivedTemplate(dataCursor, bounds) {
44
44
  ? levelPalette.register(level)
45
45
  : levelPalette.getId(level);
46
46
  let voxelSecondary = 0;
47
- if (VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxels[rawData[0]][0]]["dve_can_have_secondary"]) {
47
+ if (VoxelTagsRegister.VoxelTags[VoxelLUT.voxels[rawData[0]][0]]["dve_can_have_secondary"]) {
48
48
  voxelSecondary = voxelPalette.register(rawData[3]);
49
49
  if (!secondaryPalette.isRegistered(voxelSecondary))
50
50
  secondaryPalette.register(voxelSecondary);
@@ -2,7 +2,7 @@ import { TemplateVoxelCursor } from "./TemplateVoxelCursor";
2
2
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
3
3
  import { IVoxelTemplate } from "../../Templates/VoxelTemplates.types";
4
4
  import { TemplateProxy } from "./TemplateProxy";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  export declare class TemplateCursor implements DataCursorInterface {
7
7
  _voxelIndex: number;
8
8
  _proxy: TemplateProxy | null;
@@ -1,7 +1,7 @@
1
1
  import { TemplateVoxelCursor } from "./TemplateVoxelCursor";
2
2
  import { TemplateProxy } from "./TemplateProxy";
3
3
  import { VoxelCursor } from "../../Voxels/Cursor/VoxelCursor";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  const raw = [0, 0, 0, 0];
6
6
  export class TemplateCursor {
7
7
  _voxelIndex = 0;
@@ -2,7 +2,7 @@ import { Flat3DIndex, Vec3Array } from "@amodx/math";
2
2
  import { IVoxelTemplate } from "../VoxelTemplates.types";
3
3
  import { FullVoxelTemplateData } from "./FullVoxelTemplate.types";
4
4
  import { RawVoxelData } from "../../Voxels/Types/Voxel.types";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  export declare class FullVoxelTemplate implements IVoxelTemplate<"full"> {
7
7
  static CreateNew(bounds: Vec3Array, baseLightValue?: number): FullVoxelTemplateData;
8
8
  index: Flat3DIndex;
@@ -1,7 +1,7 @@
1
1
  import { Flat3DIndex, Vector3Like } from "@amodx/math";
2
2
  import { getBitArrayIndex } from "../../Util/Binary/BinaryArrays";
3
3
  import { EngineSettings } from "../../Settings/EngineSettings";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  const point = Vector3Like.Create();
6
6
  export class FullVoxelTemplate {
7
7
  static CreateNew(bounds, baseLightValue = 0) {
@@ -1,3 +1,3 @@
1
- import { BoundsMinMaxData } from "@amodx/math/Geomtry/Bounds/BoundsInterface";
1
+ import { BoundsMinMaxData } from "@amodx/math/Geometry/Bounds/BoundsInterface";
2
2
  import { DataCursorInterface } from "../../../Voxels/Cursor/DataCursor.interface";
3
3
  export default function CreateFullTemplate(dataCursor: DataCursorInterface, bounds: BoundsMinMaxData, storeLight?: boolean): import("../FullVoxelTemplate.types").FullVoxelTemplateData;
@@ -2,7 +2,7 @@ import { Flat3DIndex, Vector3Like } from "@amodx/math";
2
2
  import { IVoxelSelection, IVoxelSelectionData } from "./VoxelSelection";
3
3
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
4
4
  import { FullVoxelTemplate } from "../Full/FullVoxelTemplate";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  export interface VoxelBFSSelectionData extends IVoxelSelectionData<"bfs"> {
7
7
  bitIndex: Uint8Array;
8
8
  }
@@ -2,7 +2,7 @@ import { Flat3DIndex, Vector3Like } from "@amodx/math";
2
2
  import { CardinalNeighbors3D } from "../../Math/CardinalNeighbors";
3
3
  import { getBitArrayIndex, setBitArrayIndex, } from "../../Util/Binary/BinaryArrays";
4
4
  import { FullVoxelTemplate } from "../Full/FullVoxelTemplate";
5
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
5
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
6
6
  export class VoxelBFSSelection {
7
7
  origin = Vector3Like.Create();
8
8
  bitIndex;
@@ -3,7 +3,7 @@ import { IVoxelSelection, IVoxelSelectionData } from "./VoxelSelection";
3
3
  import { VoxelShapeTemplate } from "../Shapes/VoxelShapeTemplate";
4
4
  import { IVoxelshapeTemplateBaseData } from "../Shapes/VoxelShapeTemplate.types";
5
5
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  export interface VoxelBoundsSelectionData extends IVoxelSelectionData<"bounds"> {
8
8
  }
9
9
  export declare class VoxelBoundsSelection implements IVoxelSelection<"bounds", VoxelBoundsSelectionData> {
@@ -1,7 +1,7 @@
1
1
  import { Vec3ArrayLike, Vector3Like } from "@amodx/math";
2
2
  import { VoxelShapeTemplate } from "../Shapes/VoxelShapeTemplate";
3
3
  import { BoxVoxelShapeSelection } from "../Shapes/Selections/BoxVoxelShapeSelection";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  const getMinMax = (...points) => {
6
6
  if (points.length === 0) {
7
7
  throw new Error("At least one point is required to calculate min/max.");
@@ -3,7 +3,7 @@ import { IVoxelSelection, IVoxelSelectionData } from "./VoxelSelection";
3
3
  import { VoxelShapeTemplate } from "../Shapes/VoxelShapeTemplate";
4
4
  import { IVoxelshapeTemplateBaseData } from "../Shapes/VoxelShapeTemplate.types";
5
5
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  export interface VoxelPointSelectionData extends IVoxelSelectionData<"point"> {
8
8
  }
9
9
  export declare class VoxelPointSelection implements IVoxelSelection<"point", VoxelPointSelectionData> {
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { VoxelShapeTemplate } from "../Shapes/VoxelShapeTemplate";
3
3
  import { BoxVoxelShapeSelection } from "../Shapes/Selections/BoxVoxelShapeSelection";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  export class VoxelPointSelection {
6
6
  origin = Vector3Like.Create();
7
7
  bounds = new BoundingBox();
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export interface IVoxelSelection<Type extends string = "", Data extends IVoxelSelectionData<Type> = any> {
4
4
  origin: Vector3Like;
5
5
  bounds: BoundingBox;
@@ -3,7 +3,7 @@ import { IVoxelSelection, IVoxelSelectionData } from "./VoxelSelection";
3
3
  import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
4
4
  import { PaintVoxelData } from "../../Voxels/Types/PaintVoxelData";
5
5
  import { FullVoxelTemplate } from "../Full/FullVoxelTemplate";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  export interface VoxelSurfaceSelectionData extends IVoxelSelectionData<"surface"> {
8
8
  normal: Vector3Like;
9
9
  bitIndex: Uint8Array;
@@ -3,7 +3,7 @@ import { CardinalNeighbors2D } from "../../Math/CardinalNeighbors";
3
3
  import { getBitArrayIndex, setBitArrayIndex, } from "../../Util/Binary/BinaryArrays";
4
4
  import { PaintVoxelData } from "../../Voxels/Types/PaintVoxelData";
5
5
  import { FullVoxelTemplate } from "../Full/FullVoxelTemplate";
6
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
6
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
7
7
  export class VoxelSurfaceSelection {
8
8
  origin = Vector3Like.Create();
9
9
  normal = Vector3Like.Create();
@@ -1,7 +1,7 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
2
  import { IVoxelSelection, IVoxelSelectionData } from "./VoxelSelection";
3
3
  import { IVoxelTemplate, IVoxelTemplateData } from "../VoxelTemplates.types";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  import type { VoxelTemplateRegister } from "../VoxelTemplateRegister";
6
6
  export interface VoxelTemplateSelectionData extends IVoxelSelectionData<"template"> {
7
7
  template: IVoxelTemplateData<any>;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class VoxelTemplateSelection {
4
4
  static Register;
5
5
  origin = Vector3Like.Create();
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface BoxVoxelShapeSelectionData extends IVoxelShapeSelectionData<"box-shape"> {
5
5
  width: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class BoxVoxelShapeSelection {
4
4
  static Type = "box-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface ConeVoxelShapeSelectionData extends IVoxelShapeSelectionData<"cone-shape"> {
5
5
  width: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class ConeVoxelShapeSelection {
4
4
  static Type = "cone-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface CylinderVoxelShapeSelectionData extends IVoxelShapeSelectionData<"cylinder-shape"> {
5
5
  width: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class CylinderVoxelShapeSelection {
4
4
  static Type = "cylinder-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface EllipsoidVoxelShapeSelectionData extends IVoxelShapeSelectionData<"ellipsoid-shape"> {
5
5
  radiusX: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class EllipsoidVoxelShapeSelection {
4
4
  static Type = "ellipsoid-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface OctahedronVoxelShapeSelectionData extends IVoxelShapeSelectionData<"octahedron-shape"> {
5
5
  width: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class OctahedronVoxelShapeSelection {
4
4
  static Type = "octahedron-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { VoxelShapeShapeDirections } from "../VoxelShape.types";
4
4
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
5
5
  export interface PyramidVoxelShapeSelectionData extends IVoxelShapeSelectionData<"pyramid-shape"> {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class PyramidVoxelShapeSelection {
4
4
  static Type = "pyramid-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface SphereVoxelShapeSelectionData extends IVoxelShapeSelectionData<"sphere-shape"> {
5
5
  radius: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class SphereVoxelShapeSelection {
4
4
  static Type = "sphere-shape";
5
5
  static CreateNew(data) {
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./VoxelShapeSelection";
4
4
  export interface TorusVoxelShapeSelectionData extends IVoxelShapeSelectionData<"torus-shape"> {
5
5
  width: number;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  export class TorusVoxelShapeSelection {
4
4
  static Type = "torus-shape";
5
5
  static CreateNew(data) {
@@ -1,7 +1,7 @@
1
1
  import { Flat3DIndex } from "@amodx/math";
2
2
  import { PaintVoxelData, RawVoxelData } from "../../Voxels";
3
3
  import { VoxelShapeTemplateData, VoxelShapeTemplateFillModes } from "./VoxelShapeTemplate.types";
4
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
4
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
5
5
  import { IVoxelTemplate } from "../VoxelTemplates.types";
6
6
  import { IVoxelShapeSelection, IVoxelShapeSelectionData } from "./Selections/VoxelShapeSelection";
7
7
  import type { VoxelTemplateRegister } from "../VoxelTemplateRegister";
@@ -1,6 +1,6 @@
1
1
  import { Flat3DIndex } from "@amodx/math";
2
2
  import { PaintVoxelData } from "../../Voxels";
3
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
3
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
4
4
  import { BoxVoxelShapeSelection } from "./Selections/BoxVoxelShapeSelection";
5
5
  export class VoxelShapeTemplate {
6
6
  static Register;
@@ -1,5 +1,5 @@
1
1
  import { Flat3DIndex, Vector3Like } from "@amodx/math";
2
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
2
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
3
3
  import { RawVoxelData } from "../Voxels/Types/Voxel.types";
4
4
  export interface IVoxelTemplate<Type extends string = "", Data extends IVoxelTemplateData<Type> = any> {
5
5
  bounds: BoundingBox;
@@ -6,50 +6,6 @@ let context;
6
6
  let atlasCanvas;
7
7
  let atlasContext;
8
8
  const finalSize = [256, 256];
9
- function getNearestColor(x, y, data) {
10
- const searchRadius = 5; // Radius to search for a valid pixel
11
- for (let r = 1; r <= searchRadius; r++) {
12
- for (let dx = -r; dx <= r; dx++) {
13
- for (let dy = -r; dy <= r; dy++) {
14
- const nx = x + dx;
15
- const ny = y + dy;
16
- if (nx >= 0 && nx < canvas.width && ny >= 0 && ny < canvas.height) {
17
- const index = (ny * canvas.width + nx) * 4;
18
- if (data[index + 3] > 0) {
19
- // If pixel is not fully transparent
20
- return [data[index], data[index + 1], data[index + 2]];
21
- }
22
- }
23
- }
24
- }
25
- }
26
- return [0, 0, 0]; // Default to black if no nearby pixel is found
27
- }
28
- function applyAlphaBleeding(image) {
29
- const canvas = document.createElement("canvas");
30
- const ctx = canvas.getContext("2d", { willReadFrequently: true });
31
- if (!ctx)
32
- throw new Error("Could not get 2D context");
33
- canvas.width = image.width;
34
- canvas.height = image.height;
35
- ctx.drawImage(image, 0, 0);
36
- const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
37
- const data = imageData.data;
38
- for (let y = 0; y < canvas.height; y++) {
39
- for (let x = 0; x < canvas.width; x++) {
40
- const index = (y * canvas.width + x) * 4;
41
- const alpha = data[index + 3];
42
- if (alpha === 0) {
43
- const [r, g, b] = getNearestColor(x, y, data);
44
- data[index] = r;
45
- data[index + 1] = g;
46
- data[index + 2] = b;
47
- }
48
- }
49
- }
50
- ctx.putImageData(imageData, 0, 0);
51
- return canvas;
52
- }
53
9
  async function getImageBase64(url) {
54
10
  const response = await fetch(url);
55
11
  const blob = await response.blob();
@@ -70,17 +26,15 @@ function loadImage(src) {
70
26
  }
71
27
  async function sliceImageIntoTiles(src, tilesX, tilesY) {
72
28
  const image = await loadImage(src);
73
- // Apply alpha bleeding before slicing into tiles
74
- const processedCanvas = applyAlphaBleeding(image);
75
- const tileWidth = processedCanvas.width / tilesX;
76
- const tileHeight = processedCanvas.height / tilesY;
29
+ const tileWidth = image.width / tilesX;
30
+ const tileHeight = image.height / tilesY;
77
31
  atlasCanvas.width = tileWidth;
78
32
  atlasCanvas.height = tileHeight;
79
33
  const tiles = [];
80
34
  for (let x = 0; x < tilesX; x++) {
81
35
  for (let y = 0; y < tilesY; y++) {
82
36
  atlasContext.clearRect(0, 0, tileWidth, tileHeight);
83
- atlasContext.drawImage(processedCanvas, x * tileWidth, y * tileHeight, tileWidth, tileHeight, 0, 0, tileWidth, tileHeight);
37
+ atlasContext.drawImage(image, x * tileWidth, y * tileHeight, tileWidth, tileHeight, 0, 0, tileWidth, tileHeight);
84
38
  tiles[CompiledTexture.GetAtlasIndex(x, y, tilesX)] =
85
39
  atlasCanvas.toDataURL("image/png");
86
40
  }
@@ -98,14 +52,12 @@ async function loadImageForShader(imgSrcData) {
98
52
  if (typeof imgSrcData === "string")
99
53
  image.src = imgSrcData;
100
54
  image.onload = () => {
101
- // Apply alpha bleeding before drawing
102
- const processedCanvas = applyAlphaBleeding(image);
103
55
  context.clearRect(0, 0, canvas.width, canvas.height);
104
56
  context.imageSmoothingEnabled = false;
105
57
  context.save();
106
58
  context.translate(0, canvas.height);
107
59
  context.scale(1, -1);
108
- context.drawImage(processedCanvas, 0, 0, canvas.width, canvas.height);
60
+ context.drawImage(image, 0, 0, canvas.width, canvas.height);
109
61
  context.restore();
110
62
  const dataUrl = canvas.toDataURL("image/png");
111
63
  const returnImage = new Image(canvas.width, canvas.height);
@@ -1,7 +1,7 @@
1
1
  import { WorldCursor } from "../../World/Cursor/WorldCursor.js";
2
2
  import { VoxelCursor } from "../../Voxels/Cursor/VoxelCursor.js";
3
3
  import { WorldRegister } from "../../World/WorldRegister.js";
4
- import { VoxelPalettesRegister } from "../../Voxels/Data/VoxelPalettesRegister.js";
4
+ import { VoxelLUT } from "../../Voxels/Data/VoxelLUT.js";
5
5
  import { PaintVoxelData } from "../../Voxels/Types/PaintVoxelData.js";
6
6
  const air = [0, 0, 0, 0];
7
7
  const temp = [0, 0, 0, 0];
@@ -67,18 +67,18 @@ export class BrushTool {
67
67
  }
68
68
  setId(id) {
69
69
  this.data.id = id;
70
- this.data.name = VoxelPalettesRegister.voxelIdToNameMap.get(id);
70
+ this.data.name = VoxelLUT.voxelIdToNameMap.get(id);
71
71
  return this;
72
72
  }
73
73
  setName(name) {
74
- this.data.id = VoxelPalettesRegister.voxelNametoIdMap.get(name);
74
+ this.data.id = VoxelLUT.voxelNametoIdMap.get(name);
75
75
  this.data.name = name;
76
76
  return this;
77
77
  }
78
78
  setSecondaryId(id) {
79
79
  this.data.secondaryVoxelId = id;
80
80
  if (id) {
81
- this.data.secondaryName = VoxelPalettesRegister.voxelIdToNameMap.get(id);
81
+ this.data.secondaryName = VoxelLUT.voxelIdToNameMap.get(id);
82
82
  }
83
83
  else {
84
84
  this.data.secondaryName = "";
@@ -88,7 +88,7 @@ export class BrushTool {
88
88
  setSecondaryName(name) {
89
89
  if (name) {
90
90
  this.data.secondaryVoxelId =
91
- VoxelPalettesRegister.voxelNametoIdMap.get(name);
91
+ VoxelLUT.voxelNametoIdMap.get(name);
92
92
  }
93
93
  else {
94
94
  this.data.secondaryVoxelId = "";
@@ -22,6 +22,8 @@ export class StringPalette {
22
22
  }
23
23
  }
24
24
  register(string) {
25
+ if (this._map[string] !== undefined)
26
+ return this._map[string];
25
27
  const id = this._count;
26
28
  this._count++;
27
29
  this._palette[id] = string;
@@ -1,4 +1,4 @@
1
- import { SchemaRegister } from "../State/SchemaRegister";
1
+ import { VoxelSchemas } from "../State/VoxelSchemas";
2
2
  import { BinarySchema } from "../State/Schema/BinarySchema";
3
3
  import { BinaryBuffer } from "../../Util/BinaryBuffer/BinaryBuffer";
4
4
  const temp = ["", 0, 0];
@@ -35,7 +35,7 @@ export class VoxelPaletteArchiveReader {
35
35
  temp[2] = 0;
36
36
  return temp;
37
37
  }
38
- const voxelSchema = SchemaRegister.getVoxelSchemas(voxelId);
38
+ const currentStateSchema = VoxelSchemas.getStateSchema(voxelId);
39
39
  let finalStateValue = 0;
40
40
  if (this._voxelStateSchema.has(voxelId)) {
41
41
  const stateSchema = this._voxelStateSchema.get(voxelId);
@@ -43,26 +43,27 @@ export class VoxelPaletteArchiveReader {
43
43
  stateSchema.startEncoding(stateValue);
44
44
  for (const node of stateSchema.nodes) {
45
45
  if (node.valuePalette) {
46
- voxelSchema.state.setValue(node.name, stateSchema.getValue(node.name));
46
+ currentStateSchema.setValue(node.name, stateSchema.getValue(node.name));
47
47
  }
48
48
  else {
49
- voxelSchema.state.setNumber(node.name, stateSchema.getNumber(node.name));
49
+ currentStateSchema.setNumber(node.name, stateSchema.getNumber(node.name));
50
50
  }
51
51
  }
52
52
  finalStateValue = stateSchema.getEncoded();
53
53
  }
54
54
  temp[1] = finalStateValue;
55
55
  let finalModValue = 0;
56
+ const currentModSchema = VoxelSchemas.mod.get(voxelId);
56
57
  if (this._modSchema.has(voxelId)) {
57
58
  const modSchema = this._modSchema.get(voxelId);
58
59
  const modValue = this.voxelPalette[index + 2];
59
60
  modSchema.startEncoding(modValue);
60
61
  for (const node of modSchema.nodes) {
61
62
  if (node.valuePalette) {
62
- voxelSchema.mod.setValue(node.name, modSchema.getValue(node.name));
63
+ currentModSchema.setValue(node.name, modSchema.getValue(node.name));
63
64
  }
64
65
  else {
65
- voxelSchema.mod.setNumber(node.name, modSchema.getNumber(node.name));
66
+ currentModSchema.setNumber(node.name, modSchema.getNumber(node.name));
66
67
  }
67
68
  }
68
69
  finalModValue = modSchema.getEncoded();
@@ -1,8 +1,8 @@
1
1
  import { BinaryBufferFormat } from "../../Util/BinaryBuffer";
2
2
  import { BinaryBuffer } from "../../Util/BinaryBuffer/BinaryBuffer";
3
3
  import { StringPalette } from "../../Util/StringPalette";
4
- import { VoxelPalettesRegister } from "../Data/VoxelPalettesRegister";
5
- import { SchemaRegister } from "../State/SchemaRegister";
4
+ import { VoxelLUT } from "../Data/VoxelLUT";
5
+ import { VoxelSchemas } from "../State/VoxelSchemas";
6
6
  import { VoxelPaletteCompents, } from "./VoxelArchive.types";
7
7
  export class VoxelArchivePalette {
8
8
  static GetVoxelPaletteDataKey() {
@@ -36,13 +36,13 @@ export class VoxelArchivePalette {
36
36
  register(id) {
37
37
  if (this._voxelsRegistered.has(id))
38
38
  return this._voxelsRegistered.get(id);
39
- const stringId = VoxelPalettesRegister.voxelIds.getStringId(VoxelPalettesRegister.voxels[id][0]);
39
+ const stringId = VoxelLUT.voxelIds.getStringId(VoxelLUT.voxels[id][0]);
40
40
  let voxelId = 0;
41
41
  if (!this._ids.isRegistered(stringId)) {
42
42
  voxelId = this._ids.register(stringId);
43
- const modelId = SchemaRegister.voxelModelMap.get(stringId);
44
- const stateData = SchemaRegister.stateSchemaData.get(modelId);
45
- const modData = SchemaRegister.modSchemaData.get(stringId);
43
+ const modelId = VoxelLUT.models.getStringId(VoxelLUT.modelsIndex[VoxelLUT.voxelIds.getNumberId(stringId)]);
44
+ const stateData = VoxelSchemas.getStateSchema(stringId).getSchema();
45
+ const modData = VoxelSchemas.mod.get(stringId).getSchema();
46
46
  if (stateData && stateData?.length) {
47
47
  this._stateShemas[modelId] = stateData;
48
48
  }
@@ -51,7 +51,7 @@ export class VoxelArchivePalette {
51
51
  ...(modData && modData.length ? { modSchema: modData } : {}),
52
52
  ...(this._stateShemas[modelId] ? { stateSchemaId: modelId } : {}),
53
53
  };
54
- const name = VoxelPalettesRegister.voxelNametoIdMap.get(stringId);
54
+ const name = VoxelLUT.voxelNametoIdMap.get(stringId);
55
55
  if (name !== undefined && name !== stringId) {
56
56
  voxelData.name = name;
57
57
  }
@@ -60,7 +60,7 @@ export class VoxelArchivePalette {
60
60
  else {
61
61
  voxelId = this._ids.getNumberId(stringId);
62
62
  }
63
- const [, state, mod] = VoxelPalettesRegister.voxels[id];
63
+ const [, state, mod] = VoxelLUT.voxels[id];
64
64
  this._voxelPalette.push(voxelId, state, mod);
65
65
  const paletteId = this._voxelCount;
66
66
  this._voxelsRegistered.set(id, paletteId);
@@ -1,4 +1,4 @@
1
- import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
1
+ import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
2
2
  import { VoxelCursorInterface } from "./VoxelCursor.interface";
3
3
  import { Vector3Like } from "@amodx/math";
4
4
  export interface DataCursorInterface {
@@ -1,13 +1,11 @@
1
1
  import { VoxelLightData } from "./VoxelLightData";
2
2
  import { RawVoxelData } from "../Types/Voxel.types";
3
3
  import { VoxelSubstanceTags, VoxelTags } from "../../Voxels/Data/VoxelTag.types";
4
- import { VoxelSchema } from "../../Voxels/State/Schema/VoxelSchema";
5
4
  import { NumberArray } from "../../Util/Util.types";
6
5
  export declare abstract class VoxelCursorInterface {
7
6
  _voxelId: number;
8
7
  id: number;
9
8
  secondaryId: number;
10
- schema: VoxelSchema;
11
9
  tags: VoxelTags;
12
10
  substanceTags: VoxelSubstanceTags;
13
11
  __readingSecondaryVoxel: boolean;