@divinevoxel/vlox 0.0.7 → 0.0.72

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 (168) hide show
  1. package/Contexts/Base/Main/InitDataGenerator.js +0 -9
  2. package/Contexts/Base/Remote/DataSync.types.d.ts +0 -5
  3. package/Contexts/Base/Remote/InitDataSync.js +17 -31
  4. package/Init/StartConstructor.js +2 -4
  5. package/Init/StartWorld.js +0 -12
  6. package/Math/Indexing.d.ts +12 -3
  7. package/Math/Indexing.js +24 -15
  8. package/Mesher/Functions/CompactVoxelMesh.d.ts +1 -1
  9. package/Mesher/Functions/CompactVoxelMesh.js +3 -4
  10. package/Mesher/Functions/MeshSection.d.ts +1 -1
  11. package/Mesher/Functions/MeshSection.js +54 -60
  12. package/Mesher/Functions/MeshVoxel.js +20 -26
  13. package/Mesher/Geomtry/Buffers.d.ts +9 -8
  14. package/Mesher/Geomtry/Buffers.js +26 -58
  15. package/Mesher/Geomtry/Tools/MesherDataTools.d.ts +1 -1
  16. package/Mesher/Geomtry/Tools/MesherDataTools.js +1 -1
  17. package/Mesher/Geomtry/VoxelGeometryBuilder.js +107 -124
  18. package/Mesher/InitMesher.js +1 -10
  19. package/Mesher/InitTask.js +10 -4
  20. package/Mesher/Models/Common/BoundsFunctions.d.ts +1 -3
  21. package/Mesher/Models/Common/BoundsFunctions.js +0 -16
  22. package/Mesher/Models/Common/Calc/CalcConstants.js +14 -31
  23. package/Mesher/Models/Common/Calc/FaceDataCalc.d.ts +1 -7
  24. package/Mesher/Models/Common/Calc/FaceDataCalc.js +41 -50
  25. package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +1 -5
  26. package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +30 -26
  27. package/Mesher/Models/Nodes/GeometryNode.d.ts +2 -4
  28. package/Mesher/Models/Nodes/GeometryNode.js +1 -2
  29. package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +2 -6
  30. package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.js +37 -34
  31. package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +2 -6
  32. package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.js +52 -51
  33. package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +2 -6
  34. package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +18 -19
  35. package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +2 -6
  36. package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +37 -40
  37. package/Mesher/Models/VoxelConstructor.d.ts +3 -4
  38. package/Mesher/Models/VoxelConstructor.js +23 -12
  39. package/Mesher/Models/{VoxelGeometryLookUp.d.ts → VoxelGeometryBuilderCacheSpace.d.ts} +8 -14
  40. package/Mesher/Models/{VoxelGeometryLookUp.js → VoxelGeometryBuilderCacheSpace.js} +49 -44
  41. package/Mesher/Models/VoxelModelConstructorRegister.js +3 -3
  42. package/Mesher/Tools/VoxelMeshBVHBuilder.d.ts +2 -9
  43. package/Mesher/Tools/VoxelMeshBVHBuilder.js +4 -16
  44. package/Mesher/Tools/VoxelMeshVertexStructCursor.d.ts +10 -0
  45. package/Mesher/Tools/VoxelMeshVertexStructCursor.js +10 -0
  46. package/Mesher/Tools/VoxelMesherDataTool.d.ts +8 -5
  47. package/Mesher/Tools/VoxelMesherDataTool.js +34 -13
  48. package/Models/Indexing/VoxelAOResultsIndex.d.ts +4 -4
  49. package/Models/Indexing/VoxelAOResultsIndex.js +15 -9
  50. package/Models/Indexing/VoxelFaceCullResultsIndex.d.ts +3 -3
  51. package/Models/Indexing/VoxelFaceCullResultsIndex.js +14 -9
  52. package/Models/Indexing/VoxelFaceTransparentResultsIndex.d.ts +1 -1
  53. package/Models/Indexing/VoxelFaceTransparentResultsIndex.js +1 -1
  54. package/Models/Rules/Functions/BuildRules.js +2 -2
  55. package/Tasks/IWG/Internal/Classes/Generator.js +1 -1
  56. package/Tasks/IWG/Internal/Functions/getSectorState.js +4 -7
  57. package/Tasks/IWG/Internal/Functions/runWorldUpdate.js +5 -6
  58. package/Tasks/IWG/Internal/IWGTasks.js +12 -21
  59. package/Tasks/Propagation/Flow/FlowManager.d.ts +0 -2
  60. package/Tasks/Propagation/Flow/FlowManager.js +86 -87
  61. package/Tasks/Propagation/Flow/WorldFlow.js +2 -3
  62. package/Tasks/Propagation/Illumanation/WorldRGB.js +1 -2
  63. package/Tasks/Update/InitTasks.d.ts +2 -1
  64. package/Tasks/Update/InitTasks.js +6 -6
  65. package/Tasks/Update/VoxelUpdate.js +15 -7
  66. package/Tasks/WorldGeneration/WorldGenBrush.js +1 -0
  67. package/Templates/Cursor/TemplateCursor.d.ts +1 -1
  68. package/Templates/Cursor/TemplateCursor.js +1 -1
  69. package/Templates/Functions/CreateTemplate.js +1 -1
  70. package/Templates/VoxelTemplate.js +6 -8
  71. package/Tools/Brush/Brush.d.ts +0 -2
  72. package/Tools/Brush/Brush.js +5 -6
  73. package/{Data/Cursor → Tools}/DataCursor.interface.d.ts +1 -1
  74. package/Util/Binary/BitArray.d.ts +4 -0
  75. package/Util/Binary/BitArray.js +16 -0
  76. package/Util/StringPalette.d.ts +1 -0
  77. package/Util/StringPalette.js +8 -0
  78. package/Voxels/Cursor/VoxelCursor.d.ts +6 -6
  79. package/Voxels/Cursor/VoxelCursor.interface.d.ts +10 -15
  80. package/Voxels/Cursor/VoxelCursor.interface.js +30 -50
  81. package/Voxels/Cursor/VoxelCursor.js +13 -12
  82. package/Voxels/Cursor/VoxelLightData.d.ts +3 -4
  83. package/Voxels/Cursor/VoxelLightData.js +8 -7
  84. package/Voxels/Data/VoxelPalettesRegister.d.ts +13 -0
  85. package/Voxels/Data/VoxelPalettesRegister.js +17 -0
  86. package/Voxels/Data/VoxelTag.types.d.ts +56 -0
  87. package/Voxels/Data/VoxelTag.types.js +23 -0
  88. package/Voxels/{State → Data}/VoxelTagStates.d.ts +2 -2
  89. package/Voxels/{State → Data}/VoxelTagStates.js +5 -5
  90. package/Voxels/Data/VoxelTagsRegister.d.ts +9 -0
  91. package/Voxels/Data/VoxelTagsRegister.js +32 -0
  92. package/Voxels/Functions/BuildStateData.js +3 -3
  93. package/Voxels/Functions/BuildTagAndPaletteData.d.ts +13 -0
  94. package/Voxels/Functions/BuildTagAndPaletteData.js +57 -0
  95. package/Voxels/Indexes/VoxelIndex.js +3 -3
  96. package/Voxels/InitVoxelData.js +20 -61
  97. package/Voxels/State/Schema/StateSchema.d.ts +1 -1
  98. package/Voxels/Types/Voxel.types.d.ts +2 -42
  99. package/Voxels/Types/Voxel.types.js +0 -15
  100. package/Voxels/Types/VoxelModelCompiledData.types.d.ts +11 -13
  101. package/Voxels/Types/VoxelSubstances.types.d.ts +2 -15
  102. package/Voxels/Types/VoxelSubstances.types.js +1 -9
  103. package/World/Archive/Functions/ArchiveArea.js +2 -6
  104. package/World/Archive/Functions/ArchiveSector.js +14 -28
  105. package/World/Archive/Functions/ImportSector.js +27 -34
  106. package/World/Cursor/SectionCursor.d.ts +2 -1
  107. package/World/Cursor/SectionCursor.js +8 -2
  108. package/World/Cursor/SectorCursor.d.ts +2 -1
  109. package/World/Cursor/SectorCursor.js +5 -2
  110. package/World/Cursor/WorldCursor.d.ts +1 -1
  111. package/World/Cursor/WorldCursor.js +6 -2
  112. package/World/Cursor/WorldVoxelCursor.d.ts +7 -7
  113. package/World/Cursor/WorldVoxelCursor.js +20 -24
  114. package/World/Section/Section.d.ts +20 -8
  115. package/World/Section/Section.js +65 -9
  116. package/World/Sector/Sector.d.ts +13 -6
  117. package/World/Sector/Sector.js +30 -9
  118. package/World/Sector/SectorHeightMap.js +1 -3
  119. package/World/Sector/SectorState.d.ts +13 -0
  120. package/World/Sector/SectorState.js +15 -0
  121. package/World/WorldSpaces.d.ts +2 -0
  122. package/World/WorldSpaces.js +7 -1
  123. package/package.json +1 -1
  124. package/Data/Register/MappedDataRegister.d.ts +0 -5
  125. package/Data/Register/MappedDataRegister.js +0 -9
  126. package/Data/Register/MappedRegisterBase.d.ts +0 -14
  127. package/Data/Register/MappedRegisterBase.js +0 -50
  128. package/Data/Structs/StructBuilder.d.ts +0 -34
  129. package/Data/Structs/StructBuilder.js +0 -157
  130. package/Data/Structs/StructBuilder.types.d.ts +0 -30
  131. package/Data/Structs/StructBuilder.types.js +0 -1
  132. package/Tools/Data/SubstanceDataTool.d.ts +0 -13
  133. package/Tools/Data/SubstanceDataTool.js +0 -51
  134. package/Voxels/Palettes/MaterialPalette.d.ts +0 -9
  135. package/Voxels/Palettes/MaterialPalette.js +0 -11
  136. package/Voxels/Palettes/SubstancePalette.d.ts +0 -9
  137. package/Voxels/Palettes/SubstancePalette.js +0 -11
  138. package/Voxels/Palettes/VoxelPalette.d.ts +0 -11
  139. package/Voxels/Palettes/VoxelPalette.js +0 -15
  140. package/Voxels/Segments/MaterialDataGenerator.d.ts +0 -6
  141. package/Voxels/Segments/MaterialDataGenerator.js +0 -12
  142. package/Voxels/Segments/SubstanceDataGenerator.d.ts +0 -6
  143. package/Voxels/Segments/SubstanceDataGenerator.js +0 -35
  144. package/Voxels/Segments/VoxelDataGenerator.d.ts +0 -10
  145. package/Voxels/Segments/VoxelDataGenerator.js +0 -56
  146. package/Voxels/Structs/Builder/SubstanceStructBuilder.d.ts +0 -2
  147. package/Voxels/Structs/Builder/SubstanceStructBuilder.js +0 -42
  148. package/Voxels/Structs/Builder/VoxelStructBuilder.d.ts +0 -2
  149. package/Voxels/Structs/Builder/VoxelStructBuilder.js +0 -68
  150. package/Voxels/Structs/SubstanceStruct.d.ts +0 -17
  151. package/Voxels/Structs/SubstanceStruct.js +0 -17
  152. package/Voxels/Structs/VoxelStruct.d.ts +0 -27
  153. package/Voxels/Structs/VoxelStruct.js +0 -29
  154. package/World/Section/SectionHeightMap.d.ts +0 -10
  155. package/World/Section/SectionHeightMap.js +0 -39
  156. package/World/Section/SectionStruct.d.ts +0 -8
  157. package/World/Section/SectionStruct.js +0 -29
  158. package/World/Section/SectionStructProperties.d.ts +0 -10
  159. package/World/Section/SectionStructProperties.js +0 -11
  160. package/World/Sector/SectorStruct.d.ts +0 -1
  161. package/World/Sector/SectorStruct.js +0 -46
  162. package/World/Sector/SectorStructIds.d.ts +0 -13
  163. package/World/Sector/SectorStructIds.js +0 -14
  164. /package/{Data/Cursor → Tools}/DataCursor.interface.js +0 -0
  165. /package/{Data/Functions → Util/Binary}/Palettes.d.ts +0 -0
  166. /package/{Data/Functions → Util/Binary}/Palettes.js +0 -0
  167. /package/Voxels/{VoxelLevelReader.d.ts → Cursor/VoxelLevelReader.d.ts} +0 -0
  168. /package/Voxels/{VoxelLevelReader.js → Cursor/VoxelLevelReader.js} +0 -0
@@ -5,7 +5,7 @@ export class MesherDataTool {
5
5
  startNewMesh(mesh) {
6
6
  this.mesh = mesh ? mesh : new VoxelMesh();
7
7
  }
8
- resetAll() {
8
+ clear() {
9
9
  this.mesh?.clear();
10
10
  return this;
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { VoxelShaderData } from "../VoxelShaderData";
2
2
  import { QuadVerticies } from "./Geometry.types";
3
- import { VoxelMeshVertexStructCursor } from "../../Mesher/Tools/VoxelMeshVertexStructCursor";
3
+ import { VoxelMeshVertexConstants, VoxelMeshVertexStructCursor, } from "../../Mesher/Tools/VoxelMeshVertexStructCursor";
4
4
  const empty = [];
5
5
  const structCursor = new VoxelMeshVertexStructCursor();
6
6
  export class VoxelGeometryBuilder {
@@ -82,7 +82,6 @@ export class VoxelGeometryBuilder {
82
82
  static addQuad(tool, origin, quad) {
83
83
  if (!tool.mesh)
84
84
  return;
85
- structCursor.data = tool.mesh.buffer;
86
85
  const worldLight = tool.vars.light;
87
86
  const worldAO = tool.vars.ao;
88
87
  const animData = tool.vars.animation;
@@ -96,6 +95,10 @@ export class VoxelGeometryBuilder {
96
95
  const topLeftNor = quad.normals.vertices[1];
97
96
  const bottomLeftNor = quad.normals.vertices[2];
98
97
  const bottomRightNor = quad.normals.vertices[3];
98
+ const topRightVoxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopRight], worldAO.vertices[QuadVerticies.TopRight], animData.vertices[QuadVerticies.TopRight]);
99
+ const topLeftVoxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopLeft], worldAO.vertices[QuadVerticies.TopLeft], animData.vertices[QuadVerticies.TopLeft]);
100
+ const bottomLeftVoxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomLeft], worldAO.vertices[QuadVerticies.BottomLeft], animData.vertices[QuadVerticies.BottomLeft]);
101
+ const bottomRightVoxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomRight], worldAO.vertices[QuadVerticies.BottomRight], animData.vertices[QuadVerticies.BottomRight]);
99
102
  const indices = tool.mesh.indices;
100
103
  let indIndex = tool.mesh.indicieCount;
101
104
  let sides = quad.doubleSided ? 2 : 1;
@@ -104,139 +107,119 @@ export class VoxelGeometryBuilder {
104
107
  while (sides--) {
105
108
  const baseIndex = tool.mesh.vertexCount;
106
109
  if (!flip) {
107
- //1
108
- structCursor.index = baseIndex;
109
- structCursor.positionX = topRightPos.x + origin.x;
110
- structCursor.positionY = topRightPos.y + origin.y;
111
- structCursor.positionZ = topRightPos.z + origin.z;
112
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopRight], worldAO.vertices[QuadVerticies.TopRight], animData.vertices[QuadVerticies.TopRight]);
113
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.TopRight].x;
114
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.TopRight].y;
115
- //2
116
- structCursor.index = baseIndex + 1;
117
- structCursor.positionX = topLeftPos.x + origin.x;
118
- structCursor.positionY = topLeftPos.y + origin.y;
119
- structCursor.positionZ = topLeftPos.z + origin.z;
120
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopLeft], worldAO.vertices[QuadVerticies.TopLeft], animData.vertices[QuadVerticies.TopLeft]);
121
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.TopLeft].x;
122
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.TopLeft].y;
123
- //3
124
- structCursor.index = baseIndex + 2;
125
- structCursor.positionX = bottomLeftPos.x + origin.x;
126
- structCursor.positionY = bottomLeftPos.y + origin.y;
127
- structCursor.positionZ = bottomLeftPos.z + origin.z;
128
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomLeft], worldAO.vertices[QuadVerticies.BottomLeft], animData.vertices[QuadVerticies.BottomLeft]);
129
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.BottomLeft].x;
130
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.BottomLeft].y;
131
- //4
132
- structCursor.index = baseIndex + 3;
133
- structCursor.positionX = bottomRightPos.x + origin.x;
134
- structCursor.positionY = bottomRightPos.y + origin.y;
135
- structCursor.positionZ = bottomRightPos.z + origin.z;
136
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomRight], worldAO.vertices[QuadVerticies.BottomRight], animData.vertices[QuadVerticies.BottomRight]);
137
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.BottomRight].x;
138
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.BottomRight].y;
110
+ tool.mesh.buffer.setIndex(baseIndex);
111
+ structCursor.data = tool.mesh.buffer.currentArray;
112
+ structCursor.index = tool.mesh.buffer.curentIndex;
113
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, topRightPos, topRightNor, quad.uvs.vertices[QuadVerticies.TopRight], topRightVoxelData, texture, overlayTextures);
114
+ tool.mesh.buffer.setIndex(baseIndex + 1);
115
+ structCursor.data = tool.mesh.buffer.currentArray;
116
+ structCursor.index = tool.mesh.buffer.curentIndex;
117
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, topLeftPos, topLeftNor, quad.uvs.vertices[QuadVerticies.TopLeft], topLeftVoxelData, texture, overlayTextures);
118
+ tool.mesh.buffer.setIndex(baseIndex + 2);
119
+ structCursor.data = tool.mesh.buffer.currentArray;
120
+ structCursor.index = tool.mesh.buffer.curentIndex;
121
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, bottomLeftPos, bottomLeftNor, quad.uvs.vertices[QuadVerticies.BottomLeft], bottomLeftVoxelData, texture, overlayTextures);
122
+ tool.mesh.buffer.setIndex(baseIndex + 3);
123
+ structCursor.data = tool.mesh.buffer.currentArray;
124
+ structCursor.index = tool.mesh.buffer.curentIndex;
125
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, bottomRightPos, bottomRightNor, quad.uvs.vertices[QuadVerticies.BottomRight], bottomRightVoxelData, texture, overlayTextures);
139
126
  }
140
- else {
141
- //1
142
- structCursor.index = baseIndex;
143
- structCursor.positionX = topLeftPos.x + origin.x;
144
- structCursor.positionY = topLeftPos.y + origin.y;
145
- structCursor.positionZ = topLeftPos.z + origin.z;
146
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopLeft], worldAO.vertices[QuadVerticies.TopLeft], animData.vertices[QuadVerticies.TopLeft]);
147
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.TopLeft].x;
148
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.TopLeft].y;
149
- //2
150
- structCursor.index = baseIndex + 1;
151
- structCursor.positionX = topRightPos.x + origin.x;
152
- structCursor.positionY = topRightPos.y + origin.y;
153
- structCursor.positionZ = topRightPos.z + origin.z;
154
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.TopRight], worldAO.vertices[QuadVerticies.TopRight], animData.vertices[QuadVerticies.TopRight]);
155
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.TopRight].x;
156
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.TopRight].y;
157
- //3
158
- structCursor.index = baseIndex + 2;
159
- structCursor.positionX = bottomRightPos.x + origin.x;
160
- structCursor.positionY = bottomRightPos.y + origin.y;
161
- structCursor.positionZ = bottomRightPos.z + origin.z;
162
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomRight], worldAO.vertices[QuadVerticies.BottomRight], animData.vertices[QuadVerticies.BottomRight]);
163
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.BottomRight].x;
164
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.BottomRight].y;
165
- //4
166
- structCursor.index = baseIndex + 3;
167
- structCursor.positionX = bottomLeftPos.x + origin.x;
168
- structCursor.positionY = bottomLeftPos.y + origin.y;
169
- structCursor.positionZ = bottomLeftPos.z + origin.z;
170
- structCursor.voxelData = VoxelShaderData.createAttribute(worldLight.vertices[QuadVerticies.BottomLeft], worldAO.vertices[QuadVerticies.BottomLeft], animData.vertices[QuadVerticies.BottomLeft]);
171
- structCursor.uvX = quad.uvs.vertices[QuadVerticies.BottomLeft].x;
172
- structCursor.uvY = quad.uvs.vertices[QuadVerticies.BottomLeft].y;
127
+ if (flip) {
128
+ tool.mesh.buffer.setIndex(baseIndex);
129
+ structCursor.data = tool.mesh.buffer.currentArray;
130
+ structCursor.index = tool.mesh.buffer.curentIndex;
131
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, topLeftPos, topLeftNor, quad.uvs.vertices[QuadVerticies.TopLeft], topLeftVoxelData, texture, overlayTextures);
132
+ tool.mesh.buffer.setIndex(baseIndex + 1);
133
+ structCursor.data = tool.mesh.buffer.currentArray;
134
+ structCursor.index = tool.mesh.buffer.curentIndex;
135
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, topRightPos, topRightNor, quad.uvs.vertices[QuadVerticies.TopRight], topRightVoxelData, texture, overlayTextures);
136
+ tool.mesh.buffer.setIndex(baseIndex + 2);
137
+ structCursor.data = tool.mesh.buffer.currentArray;
138
+ structCursor.index = tool.mesh.buffer.curentIndex;
139
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, bottomRightPos, bottomRightNor, quad.uvs.vertices[QuadVerticies.BottomRight], bottomRightVoxelData, texture, overlayTextures);
140
+ tool.mesh.buffer.setIndex(baseIndex + 3);
141
+ structCursor.data = tool.mesh.buffer.currentArray;
142
+ structCursor.index = tool.mesh.buffer.curentIndex;
143
+ addVertex(tool.mesh.buffer.curentIndex, tool.mesh.buffer.currentArray, origin, bottomLeftPos, bottomLeftNor, quad.uvs.vertices[QuadVerticies.BottomLeft], bottomLeftVoxelData, texture, overlayTextures);
173
144
  }
174
- //1
175
- structCursor.index = baseIndex;
176
- structCursor.textureIndexX = VoxelShaderData.createTextureIndex(texture, overlayTextures.vertices[QuadVerticies.TopRight]);
177
- structCursor.textureIndexY = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.TopLeft], overlayTextures.vertices[QuadVerticies.BottomLeft]);
178
- structCursor.textureIndexZ = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.BottomRight], 0);
179
- structCursor.normalX = topRightNor.x;
180
- structCursor.normalY = topRightNor.y;
181
- structCursor.normalZ = topRightNor.z;
182
- //2
183
- structCursor.index = baseIndex + 1;
184
- structCursor.textureIndexX = VoxelShaderData.createTextureIndex(texture, overlayTextures.vertices[QuadVerticies.TopRight]);
185
- structCursor.textureIndexY = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.TopLeft], overlayTextures.vertices[QuadVerticies.BottomLeft]);
186
- structCursor.textureIndexZ = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.BottomRight], 0);
187
- structCursor.normalX = topLeftNor.x;
188
- structCursor.normalY = topLeftNor.y;
189
- structCursor.normalZ = topLeftNor.z;
190
- //3
191
- structCursor.index = baseIndex + 2;
192
- structCursor.textureIndexX = VoxelShaderData.createTextureIndex(texture, overlayTextures.vertices[QuadVerticies.TopRight]);
193
- structCursor.textureIndexY = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.TopLeft], overlayTextures.vertices[QuadVerticies.BottomLeft]);
194
- structCursor.textureIndexZ = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.BottomRight], 0);
195
- structCursor.normalX = bottomLeftNor.x;
196
- structCursor.normalY = bottomLeftNor.y;
197
- structCursor.normalZ = bottomLeftNor.z;
198
- //4
199
- structCursor.index = baseIndex + 3;
200
- structCursor.textureIndexX = VoxelShaderData.createTextureIndex(texture, overlayTextures.vertices[QuadVerticies.TopRight]);
201
- structCursor.textureIndexY = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.TopLeft], overlayTextures.vertices[QuadVerticies.BottomLeft]);
202
- structCursor.textureIndexZ = VoxelShaderData.createTextureIndex(overlayTextures.vertices[QuadVerticies.BottomRight], 0);
203
- structCursor.normalX = bottomRightNor.x;
204
- structCursor.normalY = bottomRightNor.y;
205
- structCursor.normalZ = bottomRightNor.z;
206
145
  if (!orientation && !flip) {
207
- indices[indIndex++] = baseIndex;
208
- indices[indIndex++] = baseIndex + 1;
209
- indices[indIndex++] = baseIndex + 2;
210
- indices[indIndex++] = baseIndex + 2;
211
- indices[indIndex++] = baseIndex + 3;
212
- indices[indIndex++] = baseIndex;
146
+ indices.setIndex(indIndex).currentArray[indices.curentIndex] =
147
+ baseIndex;
148
+ indices.setIndex(indIndex + 1).currentArray[indices.curentIndex] =
149
+ baseIndex + 1;
150
+ indices.setIndex(indIndex + 2).currentArray[indices.curentIndex] =
151
+ baseIndex + 2;
152
+ indices.setIndex(indIndex + 3).currentArray[indices.curentIndex] =
153
+ baseIndex + 2;
154
+ indices.setIndex(indIndex + 4).currentArray[indices.curentIndex] =
155
+ baseIndex + 3;
156
+ indices.setIndex(indIndex + 5).currentArray[indices.curentIndex] =
157
+ baseIndex;
213
158
  }
214
159
  else if (!orientation && flip) {
215
- indices[indIndex++] = baseIndex;
216
- indices[indIndex++] = baseIndex + 3;
217
- indices[indIndex++] = baseIndex + 2;
218
- indices[indIndex++] = baseIndex + 2;
219
- indices[indIndex++] = baseIndex + 1;
220
- indices[indIndex++] = baseIndex;
160
+ indices.setIndex(indIndex).currentArray[indices.curentIndex] =
161
+ baseIndex;
162
+ indices.setIndex(indIndex + 1).currentArray[indices.curentIndex] =
163
+ baseIndex + 3;
164
+ indices.setIndex(indIndex + 2).currentArray[indices.curentIndex] =
165
+ baseIndex + 2;
166
+ indices.setIndex(indIndex + 3).currentArray[indices.curentIndex] =
167
+ baseIndex + 2;
168
+ indices.setIndex(indIndex + 4).currentArray[indices.curentIndex] =
169
+ baseIndex + 1;
170
+ indices.setIndex(indIndex + 5).currentArray[indices.curentIndex] =
171
+ baseIndex;
221
172
  }
222
173
  if (orientation && !flip) {
223
- indices[indIndex++] = baseIndex;
224
- indices[indIndex++] = baseIndex + 3;
225
- indices[indIndex++] = baseIndex + 2;
226
- indices[indIndex++] = baseIndex + 2;
227
- indices[indIndex++] = baseIndex + 1;
228
- indices[indIndex++] = baseIndex;
174
+ indices.setIndex(indIndex).currentArray[indices.curentIndex] =
175
+ baseIndex;
176
+ indices.setIndex(indIndex + 1).currentArray[indices.curentIndex] =
177
+ baseIndex + 3;
178
+ indices.setIndex(indIndex + 2).currentArray[indices.curentIndex] =
179
+ baseIndex + 2;
180
+ indices.setIndex(indIndex + 3).currentArray[indices.curentIndex] =
181
+ baseIndex + 2;
182
+ indices.setIndex(indIndex + 4).currentArray[indices.curentIndex] =
183
+ baseIndex + 1;
184
+ indices.setIndex(indIndex + 5).currentArray[indices.curentIndex] =
185
+ baseIndex;
229
186
  }
230
187
  else if (orientation && flip) {
231
- indices[indIndex++] = baseIndex;
232
- indices[indIndex++] = baseIndex + 1;
233
- indices[indIndex++] = baseIndex + 2;
234
- indices[indIndex++] = baseIndex + 2;
235
- indices[indIndex++] = baseIndex + 3;
236
- indices[indIndex++] = baseIndex;
188
+ indices.setIndex(indIndex).currentArray[indices.curentIndex] =
189
+ baseIndex;
190
+ indices.setIndex(indIndex + 1).currentArray[indices.curentIndex] =
191
+ baseIndex + 1;
192
+ indices.setIndex(indIndex + 2).currentArray[indices.curentIndex] =
193
+ baseIndex + 2;
194
+ indices.setIndex(indIndex + 3).currentArray[indices.curentIndex] =
195
+ baseIndex + 2;
196
+ indices.setIndex(indIndex + 4).currentArray[indices.curentIndex] =
197
+ baseIndex + 3;
198
+ indices.setIndex(indIndex + 5).currentArray[indices.curentIndex] =
199
+ baseIndex;
237
200
  }
238
201
  tool.mesh.addVerticies(4, 6);
239
202
  }
240
- structCursor.data = empty;
241
203
  }
242
204
  }
205
+ const addVertex = (index, array, origin, position, normal, uvs, voxelData, texture, overlayTextures) => {
206
+ index *= VoxelMeshVertexConstants.VertexFloatSize;
207
+ array[VoxelMeshVertexConstants.PositionOffset + index] =
208
+ position.x + origin.x;
209
+ array[VoxelMeshVertexConstants.PositionOffset + index + 1] =
210
+ position.y + origin.y;
211
+ array[VoxelMeshVertexConstants.PositionOffset + index + 2] =
212
+ position.z + origin.z;
213
+ array[VoxelMeshVertexConstants.UVOffset + index] = uvs.x;
214
+ array[VoxelMeshVertexConstants.UVOffset + index + 1] = uvs.y;
215
+ array[VoxelMeshVertexConstants.NormalOffset + index] = normal.x;
216
+ array[VoxelMeshVertexConstants.NormalOffset + index + 1] = normal.y;
217
+ array[VoxelMeshVertexConstants.NormalOffset + index + 2] = normal.z;
218
+ array[VoxelMeshVertexConstants.TextureIndexOffset + index] =
219
+ VoxelShaderData.createTextureIndex(texture, overlayTextures.x);
220
+ array[VoxelMeshVertexConstants.TextureIndexOffset + index + 1] =
221
+ VoxelShaderData.createTextureIndex(overlayTextures.y, overlayTextures.z);
222
+ array[VoxelMeshVertexConstants.TextureIndexOffset + index + 2] =
223
+ VoxelShaderData.createTextureIndex(overlayTextures.w, 0);
224
+ array[VoxelMeshVertexConstants.VoxelDataOFfset + index] = voxelData;
225
+ };
@@ -1,8 +1,6 @@
1
1
  import { RenderedMaterials } from "./RenderedMaterials";
2
2
  import { VoxelModelConstructorRegister } from "./Models/VoxelModelConstructorRegister.js";
3
3
  import { LiquidGeometryNode } from "./Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js";
4
- import { SchemaRegister } from "../Voxels/State/SchemaRegister.js";
5
- import { VoxelTagStates } from "../Voxels/State/VoxelTagStates.js";
6
4
  import { VoxelConstructor } from "./Models/VoxelConstructor.js";
7
5
  export default function (materials, modelData) {
8
6
  RenderedMaterials.register(materials);
@@ -10,14 +8,7 @@ export default function (materials, modelData) {
10
8
  VoxelModelConstructorRegister.setGeometryPalette(modelData.geometryPalette);
11
9
  VoxelModelConstructorRegister.registerGeometry(modelData.geometry);
12
10
  VoxelModelConstructorRegister.registerModels(modelData.models);
13
- for (const model of modelData.models) {
14
- SchemaRegister.registerModel(model.id, model.schema);
15
- }
16
- for (const voxel of modelData.voxels) {
17
- SchemaRegister.registerVoxel(voxel.id, voxel.modelId, voxel.modSchema);
18
- }
19
- VoxelTagStates.load(modelData.tagState);
20
11
  for (const voxel of modelData.voxels) {
21
- VoxelModelConstructorRegister.registerVoxel(new VoxelConstructor(voxel.id, VoxelModelConstructorRegister.modelData.get(voxel.modelId), voxel));
12
+ VoxelModelConstructorRegister.registerVoxel(new VoxelConstructor(voxel.id, RenderedMaterials.meshersMap.get(voxel.materialId), VoxelModelConstructorRegister.modelData.get(voxel.modelId), voxel));
22
13
  }
23
14
  }
@@ -5,10 +5,11 @@ import { MeshSection } from "./Functions/MeshSection";
5
5
  import { TasksIds } from "../Tasks/TasksIds";
6
6
  export default function (rendererThread) {
7
7
  Threads.registerTask(TasksIds.BuildSection, (location) => {
8
- const section = MeshSection(location);
8
+ const transfers = [];
9
+ const section = MeshSection(location, transfers);
9
10
  if (!section)
10
11
  return;
11
- rendererThread.runTask("set-section", section[0], section[1]);
12
+ rendererThread.runTask("set-section", section, transfers);
12
13
  });
13
14
  Threads.registerTask(TasksIds.BuildSector, (location) => {
14
15
  const sectorPosition = WorldSpaces.sector.getPosition(location[1], location[2], location[3]);
@@ -25,19 +26,24 @@ export default function (rendererThread) {
25
26
  console.warn("Tried building a sector with no sections.", sector.position);
26
27
  return;
27
28
  }
29
+ const transfers = [];
28
30
  for (let i = 0; i < sector.sections.length; i++) {
29
31
  const section = sector.sections[i];
30
32
  if (!section)
31
33
  continue;
34
+ let [minY, maxY] = section.getMinMax();
35
+ if (Math.abs(minY) == Infinity && Math.abs(maxY) == Infinity)
36
+ continue;
37
+ transfers.length = 0;
32
38
  const sectionMesh = MeshSection([
33
39
  location[0],
34
40
  sector.position[0],
35
41
  sector.position[1] + i * WorldSpaces.section.bounds.y,
36
42
  sector.position[2],
37
- ]);
43
+ ], transfers);
38
44
  if (!sectionMesh)
39
45
  continue;
40
- rendererThread.runTask("set-section", sectionMesh[0], sectionMesh[1]);
46
+ rendererThread.runTask("set-section", sectionMesh, transfers);
41
47
  }
42
48
  });
43
49
  }
@@ -1,4 +1,2 @@
1
- import { Vec3Array, Vector3Like } from "@amodx/math";
2
- import { VoxelMesherDataTool } from "../../../Mesher/Tools/VoxelMesherDataTool";
3
- export declare function UpdateBounds(tool: VoxelMesherDataTool, origin: Vector3Like, bounds: [Vec3Array, Vec3Array]): void;
1
+ import { Vec3Array } from "@amodx/math";
4
2
  export declare function GetBounds(vectors: Vec3Array[]): [Vec3Array, Vec3Array];
@@ -1,19 +1,3 @@
1
- export function UpdateBounds(tool, origin, bounds) {
2
- //min
3
- if (origin.x + bounds[0][0] < tool.bounds.min[0])
4
- tool.bounds.min[0] = origin.x + bounds[0][0];
5
- if (origin.y + bounds[0][1] < tool.bounds.min[1])
6
- tool.bounds.min[1] = origin.y + bounds[0][1];
7
- if (origin.z + bounds[0][2] < tool.bounds.min[2])
8
- tool.bounds.min[2] = origin.z + bounds[0][2];
9
- //max
10
- if (origin.x + bounds[1][0] > tool.bounds.max[0])
11
- tool.bounds.max[0] = origin.x + bounds[1][0];
12
- if (origin.y + bounds[1][1] > tool.bounds.max[1])
13
- tool.bounds.max[1] = origin.y + bounds[1][1];
14
- if (origin.z + bounds[1][2] > tool.bounds.max[2])
15
- tool.bounds.max[2] = origin.z + bounds[1][2];
16
- }
17
1
  export function GetBounds(vectors) {
18
2
  let minX = Infinity;
19
3
  let minY = Infinity;
@@ -2,7 +2,6 @@ import { QuadVerticies, QuadVerticiesArray, } from "../../../Geomtry/Geometry.ty
2
2
  import { VoxelFaces, VoxelFacesArray } from "../../../../Math";
3
3
  import { VoxelRelativeCubeIndex } from "../../../../Models/Indexing/VoxelRelativeCubeIndex";
4
4
  import { VoxelLightData } from "../../../../Voxels/Cursor/VoxelLightData";
5
- const lightData = new VoxelLightData();
6
5
  export const GradientCheckSets = [];
7
6
  GradientCheckSets[VoxelFaces.Up] = [];
8
7
  GradientCheckSets[VoxelFaces.Up][QuadVerticies.TopRight] = [
@@ -311,37 +310,21 @@ export function getVertexWeights(face, x, y, z) {
311
310
  }
312
311
  return getInterpolationWeights(u, v, flip);
313
312
  }
314
- const lightValues1 = [0, 0, 0, 0];
315
- const lightValues2 = [0, 0, 0, 0];
316
- const lightValues3 = [0, 0, 0, 0];
317
- const lightValues4 = [0, 0, 0, 0];
318
- const lightValues5 = [0, 0, 0, 0];
313
+ const lightData = new VoxelLightData();
319
314
  export function getInterpolationValue(value, weights) {
320
- lightData.getLightValuesToRef(value[0], lightValues1);
321
- lightData.getLightValuesToRef(value[1], lightValues2);
322
- lightData.getLightValuesToRef(value[2], lightValues3);
323
- lightData.getLightValuesToRef(value[3], lightValues4);
324
- lightValues5[0] =
325
- lightValues1[0] * weights[0] +
326
- lightValues2[0] * weights[1] +
327
- lightValues3[0] * weights[2] +
328
- lightValues4[0] * weights[3];
329
- lightValues5[1] =
330
- lightValues1[1] * weights[0] +
331
- lightValues2[1] * weights[1] +
332
- lightValues3[1] * weights[2] +
333
- lightValues4[1] * weights[3];
334
- lightValues5[2] =
335
- lightValues1[2] * weights[0] +
336
- lightValues2[2] * weights[1] +
337
- lightValues3[2] * weights[2] +
338
- lightValues4[2] * weights[3];
339
- lightValues5[3] =
340
- lightValues1[3] * weights[0] +
341
- lightValues2[3] * weights[1] +
342
- lightValues3[3] * weights[2] +
343
- lightValues4[3] * weights[3];
344
- return lightData.setLightValues(lightValues5);
315
+ return lightData.createLightValue(lightData.getS(value[0]) * weights[0] +
316
+ lightData.getS(value[1]) * weights[1] +
317
+ lightData.getS(value[2]) * weights[2] +
318
+ lightData.getS(value[3]) * weights[3], lightData.getR(value[0]) * weights[0] +
319
+ lightData.getR(value[1]) * weights[1] +
320
+ lightData.getR(value[2]) * weights[2] +
321
+ lightData.getR(value[3]) * weights[3], lightData.getG(value[0]) * weights[0] +
322
+ lightData.getG(value[1]) * weights[1] +
323
+ lightData.getG(value[2]) * weights[2] +
324
+ lightData.getG(value[3]) * weights[3], lightData.getB(value[0]) * weights[0] +
325
+ lightData.getB(value[1]) * weights[1] +
326
+ lightData.getB(value[2]) * weights[2] +
327
+ lightData.getB(value[3]) * weights[3]);
345
328
  }
346
329
  export const addQuadWeights = (quad, direction) => {
347
330
  const returnArray = [];
@@ -1,9 +1,3 @@
1
1
  import type { VoxelMesherDataTool } from "../../../../Mesher/Tools/VoxelMesherDataTool.js";
2
2
  import { VoxelFaces } from "../../../../Math/index.js";
3
- export declare const FaceDataCalc: {
4
- settings: {
5
- doAO: boolean;
6
- doLight: boolean;
7
- };
8
- calculate(face: VoxelFaces, tool: VoxelMesherDataTool): void;
9
- };
3
+ export default function calculateFaceData(face: VoxelFaces, builder: VoxelMesherDataTool): void;
@@ -4,54 +4,45 @@ import { VoxelLightData } from "../../../../Voxels/Cursor/VoxelLightData.js";
4
4
  const lightData = new VoxelLightData();
5
5
  const currentLightValues = new Uint16Array([0, 0, 0, 0]);
6
6
  const loadedLightValues = new Uint16Array([0, 0, 0, 0]);
7
- const faceLength = 9 * 4;
8
- const settings = {
9
- doAO: true,
10
- doLight: true,
11
- };
12
- export const FaceDataCalc = {
13
- settings,
14
- calculate(face, tool) {
15
- let light = tool.voxel.getLight();
16
- const faceNormal = VoxelFaceDirections[face];
17
- const nVoxel = tool.nVoxel.getVoxel(tool.position.x + faceNormal[0], tool.position.y + faceNormal[1], tool.position.z + faceNormal[2]);
18
- const otherLight = nVoxel?.getLight() || 0;
19
- light = otherLight >= 0 ? otherLight : light >= 0 ? light : 0;
20
- for (let vertex = 0; vertex < 4; vertex++) {
21
- if (settings.doLight) {
22
- tool.lightData[face][vertex] = light;
23
- lightData.getLightValuesToRef(light, currentLightValues);
24
- }
25
- for (let i = 0; i < 9; i += 3) {
26
- const loadedVoxel = tool.nVoxel.getVoxel(GradientCheckSets[face][vertex][i] + tool.position.x, GradientCheckSets[face][vertex][i + 1] + tool.position.y, GradientCheckSets[face][vertex][i + 2] + tool.position.z);
27
- if (!settings.doLight || !loadedVoxel)
28
- continue;
29
- const nl = loadedVoxel.getLight();
30
- if (nl <= 0)
31
- continue;
32
- /*
33
- Do Light
34
- */
35
- lightData.getLightValuesToRef(nl, loadedLightValues);
36
- currentLightValues[0] =
37
- currentLightValues[0] < loadedLightValues[0]
38
- ? loadedLightValues[0]
39
- : currentLightValues[0];
40
- currentLightValues[1] =
41
- currentLightValues[1] < loadedLightValues[1]
42
- ? loadedLightValues[1]
43
- : currentLightValues[1];
44
- currentLightValues[2] =
45
- currentLightValues[2] < loadedLightValues[2]
46
- ? loadedLightValues[2]
47
- : currentLightValues[2];
48
- currentLightValues[3] =
49
- currentLightValues[3] < loadedLightValues[3]
50
- ? loadedLightValues[3]
51
- : currentLightValues[3];
52
- }
53
- tool.lightData[face][vertex] =
54
- lightData.setLightValues(currentLightValues);
7
+ export default function calculateFaceData(face, builder) {
8
+ let light = builder.voxel.getLight();
9
+ const faceNormal = VoxelFaceDirections[face];
10
+ const x = builder.position.x;
11
+ const y = builder.position.y;
12
+ const z = builder.position.z;
13
+ const vertexData = builder.lightData[face];
14
+ const nVoxel = builder.nVoxel;
15
+ const checkSet = GradientCheckSets[face];
16
+ const otherLight = builder.space.getLight(builder.nVoxel, x + faceNormal[0], y + faceNormal[1], z + faceNormal[2]) || 0;
17
+ light = otherLight >= 0 ? otherLight : light >= 0 ? light : 0;
18
+ for (let vertex = 0; vertex < 4; vertex++) {
19
+ vertexData[vertex] = light;
20
+ lightData.getLightValuesArrayToRef(light, currentLightValues);
21
+ for (let i = 0; i < 9; i += 3) {
22
+ const nl = builder.space.getLight(nVoxel, checkSet[vertex][i] + x, checkSet[vertex][i + 1] + y, checkSet[vertex][i + 2] + z);
23
+ if (nl <= 0)
24
+ continue;
25
+ /*
26
+ Do Light
27
+ */
28
+ lightData.getLightValuesArrayToRef(nl, loadedLightValues);
29
+ currentLightValues[0] =
30
+ currentLightValues[0] < loadedLightValues[0]
31
+ ? loadedLightValues[0]
32
+ : currentLightValues[0];
33
+ currentLightValues[1] =
34
+ currentLightValues[1] < loadedLightValues[1]
35
+ ? loadedLightValues[1]
36
+ : currentLightValues[1];
37
+ currentLightValues[2] =
38
+ currentLightValues[2] < loadedLightValues[2]
39
+ ? loadedLightValues[2]
40
+ : currentLightValues[2];
41
+ currentLightValues[3] =
42
+ currentLightValues[3] < loadedLightValues[3]
43
+ ? loadedLightValues[3]
44
+ : currentLightValues[3];
55
45
  }
56
- },
57
- };
46
+ vertexData[vertex] = lightData.setLightValues(currentLightValues);
47
+ }
48
+ }
@@ -1,15 +1,11 @@
1
- import { Vector3Like } from "@amodx/math";
2
- import { VoxelMesherDataTool } from "Mesher/Tools/VoxelMesherDataTool";
3
1
  import { GeoemtryNode } from "../../GeometryNode";
4
2
  import { VoxelCustomGeomtryNode } from "../../../../../Models/VoxelModel.types";
5
- import { QuadScalarVertexData } from "../../../../Geomtry/Primitives/QuadVertexData";
6
3
  import { VoxelFaces } from "../../../../../Math";
7
4
  import type { LiquidVoxelModelArgs } from "../../../../../Models/Defaults/LiquidVoxelModel";
8
5
  export declare class LiquidGeometryNode extends GeoemtryNode<VoxelCustomGeomtryNode, LiquidVoxelModelArgs> {
9
- worldLight: QuadScalarVertexData;
10
6
  init(): void;
11
7
  isExposed(face: VoxelFaces): boolean;
12
8
  determineShading(face: VoxelFaces): void;
13
9
  shouldFlip(): boolean;
14
- add(tool: VoxelMesherDataTool, originHash: number, origin: Vector3Like, args: LiquidVoxelModelArgs): void;
10
+ add(args: LiquidVoxelModelArgs): boolean;
15
11
  }