@divinevoxel/vlox 0.0.74 → 0.0.76
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.
- package/Builder/RayProvider.d.ts +6 -0
- package/Builder/Tools/Box/BoxSelection.d.ts +12 -0
- package/Builder/Tools/Box/BoxSelection.js +27 -0
- package/Builder/Tools/Box/BoxTool.d.ts +31 -0
- package/Builder/Tools/Box/BoxTool.js +91 -0
- package/Builder/Tools/Box/BoxToolTemplate.d.ts +13 -0
- package/Builder/Tools/Box/BoxToolTemplate.js +23 -0
- package/Builder/Tools/Brush/BrushTool.d.ts +48 -0
- package/Builder/Tools/Brush/BrushTool.js +146 -0
- package/Builder/Tools/BuilderToolBase.d.ts +3 -0
- package/Builder/Tools/BuilderToolBase.js +3 -0
- package/Builder/Tools/Hand/HandTool.d.ts +22 -0
- package/Builder/Tools/Hand/HandTool.js +56 -0
- package/Builder/Tools/Path/PahtTool.d.ts +29 -0
- package/Builder/Tools/Path/PahtTool.js +117 -0
- package/Builder/Tools/Wand/WandTool.d.ts +28 -0
- package/Builder/Tools/Wand/WandTool.js +67 -0
- package/Builder/Tools/Wrench/WrenchTool.d.ts +47 -0
- package/Builder/Tools/Wrench/WrenchTool.js +175 -0
- package/Builder/VoxelBuildSpace.d.ts +61 -0
- package/Builder/VoxelBuildSpace.js +165 -0
- package/Builder/VoxelBuilder.types.d.ts +0 -0
- package/Builder/VoxelBuilder.types.js +1 -0
- package/Builder/World/InitTasks.d.ts +1 -0
- package/Builder/World/InitTasks.js +134 -0
- package/Builder/World/VoxelBuildSpaceWorld.d.ts +4 -0
- package/Builder/World/VoxelBuildSpaceWorld.js +10 -0
- package/Cache/Cache.types.d.ts +1 -1
- package/Contexts/Base/Remote/InitDataSync.js +3 -3
- package/Contexts/Base/Remote/InitWorldDataSync.d.ts +2 -1
- package/Contexts/Base/Remote/InitWorldDataSync.js +13 -2
- package/Contexts/Generator/DivineVoxelEngineGenerator.d.ts +9 -0
- package/Contexts/Generator/DivineVoxelEngineGenerator.js +14 -0
- package/Contexts/{Constructor/ConstrcutorTheads.d.ts → Generator/GeneratorThreads.d.ts} +2 -2
- package/Contexts/{Constructor/ConstrcutorTheads.js → Generator/GeneratorThreads.js} +2 -2
- package/Contexts/Generator/index.d.ts +1 -0
- package/Contexts/Generator/index.js +1 -0
- package/Contexts/Mesher/DivineVoxelEngineMesher.d.ts +9 -0
- package/Contexts/Mesher/DivineVoxelEngineMesher.js +14 -0
- package/Contexts/Mesher/MesherTheads.d.ts +7 -0
- package/Contexts/Mesher/MesherTheads.js +14 -0
- package/Contexts/Mesher/index.d.ts +1 -0
- package/Contexts/Mesher/index.js +1 -0
- package/Contexts/Nexus/NexusTheads.js +1 -1
- package/Contexts/Render/DVERenderThreads.d.ts +2 -1
- package/Contexts/Render/DVERenderThreads.js +4 -2
- package/Contexts/Render/DivineVoxelEngineRender.d.ts +14 -4
- package/Contexts/Render/DivineVoxelEngineRender.js +9 -4
- package/Contexts/World/DivineVoxelEngineWorld.d.ts +12 -3
- package/Contexts/World/WorldThreads.d.ts +2 -1
- package/Contexts/World/WorldThreads.js +4 -2
- package/Init/StartGenerator.d.ts +2 -0
- package/Init/StartGenerator.js +45 -0
- package/Init/StartMesher.d.ts +2 -0
- package/Init/StartMesher.js +41 -0
- package/Init/StartNexus.js +4 -2
- package/Init/StartRenderer.d.ts +4 -1
- package/Init/StartRenderer.js +59 -14
- package/Init/StartWorld.js +2 -1
- package/LICENSE.md +2 -1
- package/Math/CardinalNeighbors.d.ts +43 -3
- package/Math/CardinalNeighbors.js +54 -8
- package/Math/Indexing.d.ts +1 -0
- package/Math/Location.d.ts +10 -0
- package/Math/UtilFunctions.d.ts +4 -0
- package/Math/UtilFunctions.js +52 -0
- package/Math/index.d.ts +1 -10
- package/Math/index.js +1 -0
- package/Mesher/Functions/Base/MeshSectionBase.d.ts +5 -0
- package/Mesher/Functions/Base/MeshSectionBase.js +108 -0
- package/Mesher/Functions/CompactVoxelSectionMesh.js +4 -10
- package/Mesher/Functions/MeshSection.js +3 -107
- package/Mesher/Functions/MeshSectionSnapShot.d.ts +3 -0
- package/Mesher/Functions/MeshSectionSnapShot.js +14 -0
- package/Mesher/Functions/MeshTexture.js +8 -4
- package/Mesher/Functions/MeshVoxel.js +12 -4
- package/Mesher/Geomtry/CompactedSectionVoxelMesh.d.ts +5 -2
- package/Mesher/Geomtry/CompactedSectionVoxelMesh.js +12 -7
- package/Mesher/Geomtry/Functions/GetBounds.d.ts +2 -0
- package/Mesher/{Models/Common/BoundsFunctions.js → Geomtry/Functions/GetBounds.js} +13 -13
- package/Mesher/Geomtry/Geometry.types.d.ts +14 -0
- package/Mesher/Geomtry/Geometry.types.js +11 -0
- package/Mesher/Geomtry/Primitives/Quad.d.ts +7 -15
- package/Mesher/Geomtry/Primitives/Quad.js +36 -91
- package/Mesher/Geomtry/Primitives/QuadVertexData.d.ts +4 -14
- package/Mesher/Geomtry/Primitives/QuadVertexData.js +17 -57
- package/Mesher/Geomtry/Primitives/Triangle.d.ts +65 -0
- package/Mesher/Geomtry/Primitives/Triangle.js +148 -0
- package/Mesher/Geomtry/Primitives/TriangleVertexData.d.ts +58 -0
- package/Mesher/Geomtry/Primitives/TriangleVertexData.js +263 -0
- package/Mesher/Geomtry/Primitives/index.d.ts +2 -0
- package/Mesher/Geomtry/Primitives/index.js +2 -0
- package/Mesher/Geomtry/Shapes/Box.d.ts +20 -0
- package/Mesher/Geomtry/Shapes/Box.js +69 -0
- package/Mesher/Geomtry/Transform/TransformBox.d.ts +3 -0
- package/{Models/Shared/Transform.js → Mesher/Geomtry/Transform/TransformBox.js} +9 -124
- package/Mesher/Geomtry/Transform/TransformQuad.d.ts +3 -0
- package/Mesher/Geomtry/Transform/TransformQuad.js +113 -0
- package/Mesher/Geomtry/Transform/TransformTriangle.d.ts +3 -0
- package/Mesher/Geomtry/Transform/TransformTriangle.js +112 -0
- package/Mesher/Geomtry/VoxelGeometryBuilder.d.ts +3 -4
- package/Mesher/Geomtry/VoxelGeometryBuilder.js +128 -112
- package/Mesher/Geomtry/VoxelMeshBVHBuilder.d.ts +3 -3
- package/Mesher/Geomtry/VoxelMeshBVHBuilder.js +1 -1
- package/Mesher/Geomtry/VoxelMeshVertexStructCursor.d.ts +9 -3
- package/Mesher/Geomtry/VoxelMeshVertexStructCursor.js +26 -3
- package/Mesher/Geomtry/VoxelShaderData.d.ts +4 -1
- package/Mesher/Geomtry/VoxelShaderData.js +25 -10
- package/Mesher/InitMesher.d.ts +1 -1
- package/Mesher/InitMesher.js +6 -0
- package/Mesher/InitTask.js +17 -6
- package/Mesher/Models/Common/Calc/CalcConstants.d.ts +2 -6
- package/Mesher/Models/Common/Calc/CalcConstants.js +2 -76
- package/Mesher/Models/Common/Faces/CullRulledFace.d.ts +2 -0
- package/Mesher/Models/Common/Faces/CullRulledFace.js +60 -0
- package/Mesher/Models/Common/Faces/ShadeRulelessFace.d.ts +4 -0
- package/Mesher/Models/Common/Faces/ShadeRulelessFace.js +12 -0
- package/Mesher/Models/Common/Faces/ShadeRulledFace.d.ts +4 -0
- package/Mesher/Models/Common/Faces/ShadeRulledFace.js +58 -0
- package/Mesher/Models/Common/GetTexture.d.ts +6 -0
- package/Mesher/Models/Common/GetTexture.js +12 -0
- package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.js +1 -1
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +2 -3
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +124 -48
- package/Mesher/Models/Nodes/Default/QuadVoxelGeometryNode.d.ts +13 -0
- package/Mesher/Models/Nodes/Default/QuadVoxelGeometryNode.js +55 -0
- package/Mesher/Models/Nodes/Default/TriangleVoxelGeometryNode.d.ts +13 -0
- package/Mesher/Models/Nodes/Default/TriangleVoxelGeometryNode.js +52 -0
- package/Mesher/Models/Nodes/GeometryNode.d.ts +2 -8
- package/Mesher/Models/Nodes/GeometryNode.js +1 -7
- package/Mesher/Models/Nodes/Types/GeomtryNode.types.d.ts +7 -0
- package/Mesher/Models/Nodes/Types/GeomtryNode.types.js +1 -0
- package/Mesher/Models/Nodes/Types/QuadVoxelGometryNodeTypes.d.ts +29 -0
- package/{Models/Input/QuadVoxelGometryInputs.js → Mesher/Models/Nodes/Types/QuadVoxelGometryNodeTypes.js} +4 -8
- package/Mesher/Models/Nodes/Types/TriangleVoxelGometryNodeTypes.d.ts +28 -0
- package/Mesher/Models/Nodes/Types/TriangleVoxelGometryNodeTypes.js +24 -0
- package/Mesher/Models/Nodes/VoxelGeometryConstructor.d.ts +4 -8
- package/Mesher/Models/Nodes/VoxelGeometryConstructor.js +16 -52
- package/Mesher/Models/Procedures/Default/ConsistentRotationTextureProcedure.d.ts +25 -0
- package/Mesher/Models/Procedures/Default/ConsistentRotationTextureProcedure.js +44 -0
- package/Mesher/Models/Procedures/Default/OutlinedTextureProcedure.d.ts +28 -0
- package/Mesher/Models/Procedures/Default/OutlinedTextureProcedure.js +162 -0
- package/Mesher/Models/Procedures/TextureProcedure.d.ts +16 -0
- package/Mesher/Models/Procedures/TextureProcedure.js +2 -0
- package/Mesher/Models/Procedures/TextureProcedureRegister.d.ts +6 -0
- package/Mesher/Models/Procedures/TextureProcedureRegister.js +16 -0
- package/Mesher/Models/VoxelConstructor.d.ts +1 -5
- package/Mesher/Models/VoxelConstructor.js +1 -11
- package/Mesher/Models/VoxelGeometryBuilderCacheSpace.js +2 -2
- package/Mesher/Models/VoxelModelBuilder.d.ts +0 -1
- package/Mesher/Models/VoxelModelBuilder.js +1 -2
- package/Mesher/Models/VoxelModelConstructorRegister.d.ts +8 -2
- package/Mesher/Models/VoxelModelConstructorRegister.js +6 -8
- package/Renderer/Classes/SectionMesh.d.ts +2 -3
- package/Renderer/Classes/SectionMesh.js +13 -10
- package/Renderer/Classes/SectorMesh.d.ts +5 -5
- package/Renderer/Classes/SectorMesh.js +17 -6
- package/Renderer/InitTasks.d.ts +1 -2
- package/Renderer/InitTasks.js +4 -10
- package/Renderer/MeshManager.d.ts +6 -1
- package/Renderer/MeshManager.js +11 -14
- package/Renderer/MeshRegister.d.ts +6 -4
- package/Renderer/MeshRegister.js +34 -43
- package/Settings/EngineSettings.js +3 -0
- package/Settings/EngineSettings.types.d.ts +7 -1
- package/Settings/EngineSettings.types.js +5 -1
- package/Stats/EngineStats.d.ts +19 -0
- package/Stats/EngineStats.js +27 -0
- package/Tasks/Paint/Common.d.ts +7 -0
- package/Tasks/Paint/Common.js +200 -0
- package/Tasks/Paint/Erase/EraseVoxel.d.ts +3 -0
- package/Tasks/Paint/Erase/EraseVoxel.js +31 -0
- package/Tasks/Paint/Erase/EraseVoxelPath.d.ts +4 -0
- package/Tasks/Paint/Erase/EraseVoxelPath.js +80 -0
- package/Tasks/Paint/Erase/EraseVoxelTemplate.d.ts +4 -0
- package/Tasks/Paint/Erase/EraseVoxelTemplate.js +34 -0
- package/Tasks/Paint/InitTasks.js +16 -0
- package/Tasks/Paint/Paint/PaintVoxel.d.ts +4 -0
- package/Tasks/Paint/Paint/PaintVoxel.js +29 -0
- package/Tasks/Paint/Paint/PaintVoxelPath.d.ts +4 -0
- package/Tasks/Paint/Paint/PaintVoxelPath.js +78 -0
- package/Tasks/Paint/Paint/PaintVoxelTemplate.d.ts +4 -0
- package/Tasks/Paint/Paint/PaintVoxelTemplate.js +36 -0
- package/Tasks/Propagation/Flow/FlowUpdate.js +1 -1
- package/Tasks/Propagation/Flow/WorldFlow.js +2 -2
- package/Tasks/Propagation/Illumanation/CommonFunctions.d.ts +6 -6
- package/Tasks/Propagation/Illumanation/CommonFunctions.js +6 -7
- package/Tasks/Propagation/Illumanation/RGBUpdate.js +9 -9
- package/Tasks/Propagation/Illumanation/SunUpdate.js +8 -7
- package/Tasks/Propagation/Illumanation/WorldSun.js +11 -9
- package/Tasks/Propagation/InitTasks.js +16 -28
- package/Tasks/Propagation/Power/PowerUpdate.js +10 -10
- package/Tasks/Tasks.types.d.ts +25 -9
- package/Tasks/TasksIds.d.ts +13 -20
- package/Tasks/TasksIds.js +13 -20
- package/Tasks/VoxelUpdateTask.d.ts +6 -5
- package/Tasks/VoxelUpdateTask.js +53 -37
- package/Tasks/WorldGeneration/InitTasks.d.ts +4 -1
- package/Tasks/WorldGeneration/InitTasks.js +6 -3
- package/Tasks/WorldGeneration/WorldGen.types.d.ts +2 -3
- package/Tasks/WorldGeneration/WorldGenBrush.js +6 -7
- package/Tasks/WorldGeneration/WorldGenRegister.d.ts +3 -1
- package/Tasks/WorldGeneration/WorldGenRegister.js +13 -3
- package/Tasks/WorldGeneration/WorldGeneration.d.ts +2 -2
- package/Tasks/WorldGeneration/WorldGeneration.js +22 -3
- package/Templates/Archive/ArchivedVoxelTemplate.d.ts +38 -0
- package/Templates/Archive/ArchivedVoxelTemplate.js +128 -0
- package/Templates/Archive/ArchivedVoxelTemplate.types.d.ts +45 -0
- package/Templates/Archive/ArchivedVoxelTemplate.types.js +1 -0
- package/Templates/Archive/Functions/CreateArchivedTemplate.d.ts +11 -0
- package/Templates/Archive/Functions/CreateArchivedTemplate.js +186 -0
- package/Templates/Archive/Functions/ExportArchiedTemplateJSON.d.ts +2 -0
- package/Templates/Archive/Functions/ExportArchiedTemplateJSON.js +44 -0
- package/Templates/Archive/Functions/ImportArchivedTemplateJSON.d.ts +2 -0
- package/Templates/Archive/Functions/ImportArchivedTemplateJSON.js +37 -0
- package/Templates/Cursor/TemplateCursor.d.ts +5 -3
- package/Templates/Cursor/TemplateCursor.js +11 -5
- package/Templates/Cursor/TemplateProxy.d.ts +11 -0
- package/Templates/Cursor/TemplateProxy.js +36 -0
- package/Templates/Cursor/TemplateVoxelCursor.d.ts +5 -7
- package/Templates/Cursor/TemplateVoxelCursor.js +7 -13
- package/Templates/Full/FullVoxelTemplate.d.ts +28 -0
- package/Templates/Full/FullVoxelTemplate.js +112 -0
- package/Templates/Full/FullVoxelTemplate.types.d.ts +5 -0
- package/Templates/Full/FullVoxelTemplate.types.js +1 -0
- package/Templates/Full/Functions/CreateFullTemplate.d.ts +3 -0
- package/Templates/Full/Functions/CreateFullTemplate.js +27 -0
- package/Templates/Functions/FlipTemplate.d.ts +2 -2
- package/Templates/Functions/FlipTemplate.js +1 -9
- package/Templates/Functions/RotateTemplate.d.ts +2 -2
- package/Templates/Functions/RotateTemplate.js +2 -10
- package/Templates/Functions/index.d.ts +1 -1
- package/Templates/Functions/index.js +1 -1
- package/Templates/Path/VoxelPath.d.ts +38 -0
- package/Templates/Path/VoxelPath.js +144 -0
- package/Templates/Path/VoxelPath.types.d.ts +11 -0
- package/Templates/Path/VoxelPath.types.js +1 -0
- package/Templates/Selection/VoxelBFSSelection.d.ts +23 -0
- package/Templates/Selection/VoxelBFSSelection.js +141 -0
- package/Templates/Selection/VoxelBoxSelection.d.ts +17 -0
- package/Templates/Selection/VoxelBoxSelection.js +116 -0
- package/Templates/Selection/VoxelPointSelection.d.ts +17 -0
- package/Templates/Selection/VoxelPointSelection.js +48 -0
- package/Templates/Selection/VoxelSelecton.d.ts +9 -0
- package/Templates/Selection/VoxelSelecton.js +1 -0
- package/Templates/Selection/VoxelSurfaceSelection.d.ts +30 -0
- package/Templates/Selection/VoxelSurfaceSelection.js +224 -0
- package/Templates/Selection/VoxelTemplateSelection.d.ts +13 -0
- package/Templates/Selection/VoxelTemplateSelection.js +36 -0
- package/Templates/Shapes/BasicVoxelShapeTemplate.d.ts +36 -0
- package/Templates/Shapes/BasicVoxelShapeTemplate.js +126 -0
- package/Templates/Shapes/BoxVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/BoxVoxelTemplate.js +83 -0
- package/Templates/Shapes/ConeVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/ConeVoxelTemplate.js +73 -0
- package/Templates/Shapes/CylinderVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/CylinderVoxelTemplate.js +73 -0
- package/Templates/Shapes/EllipsoidVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/EllipsoidVoxelTemplate.js +89 -0
- package/Templates/Shapes/OctahedronVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/OctahedronVoxelTemplate.js +73 -0
- package/Templates/Shapes/PyramidVoxelTemplate.d.ts +31 -0
- package/Templates/Shapes/PyramidVoxelTemplate.js +148 -0
- package/Templates/Shapes/SphereVoxelTemplate.d.ts +15 -0
- package/Templates/Shapes/SphereVoxelTemplate.js +59 -0
- package/Templates/Shapes/TorusVoxelTemplate.d.ts +23 -0
- package/Templates/Shapes/TorusVoxelTemplate.js +73 -0
- package/Templates/Shapes/VoxelShapeTemplate.types.d.ts +27 -0
- package/Templates/Shapes/VoxelShapeTemplate.types.js +6 -0
- package/Templates/VoxelTempateRegister.d.ts +6 -0
- package/Templates/VoxelTempateRegister.js +30 -0
- package/Templates/VoxelTemplates.types.d.ts +24 -26
- package/Templates/index.d.ts +1 -1
- package/Templates/index.js +1 -1
- package/Textures/Classes/CompiledTexture.d.ts +3 -0
- package/Textures/Classes/CompiledTexture.js +3 -0
- package/Textures/Classes/CompiledTextureAnimation.d.ts +1 -1
- package/Textures/Classes/CompiledTextureAnimation.js +8 -2
- package/Textures/Classes/TextureAnimationTexture.d.ts +1 -1
- package/Textures/Functions/BuildTextureData.d.ts +2 -1
- package/Textures/Functions/BuildTextureData.js +86 -17
- package/Textures/Texture.types.d.ts +5 -1
- package/Textures/TextureManager.d.ts +2 -1
- package/Textures/TextureManager.js +5 -2
- package/Tools/Brush/AdvancedBrushTool.d.ts +1 -5
- package/Tools/Brush/AdvancedBrushTool.js +2 -30
- package/Tools/Brush/Brush.d.ts +8 -2
- package/Tools/Brush/Brush.js +61 -36
- package/Tools/Tasks/TasksTool.d.ts +49 -20
- package/Tools/Tasks/TasksTool.js +87 -23
- package/Util/Binary/BinaryArrays.d.ts +2 -0
- package/Util/Binary/BinaryArrays.js +15 -0
- package/Util/Binary/BinaryFunctions.d.ts +3 -0
- package/Util/Binary/BinaryFunctions.js +18 -0
- package/Util/BinaryBuffer/BinaryBuffer.d.ts +30 -0
- package/Util/BinaryBuffer/BinaryBuffer.js +78 -0
- package/Util/BinaryBuffer/BinaryBuffer.types.d.ts +37 -0
- package/Util/BinaryBuffer/BinaryBuffer.types.js +28 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferConvert.d.ts +5 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferConvert.js +60 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferJSON.d.ts +3 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferJSON.js +64 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferRead.d.ts +3 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferRead.js +26 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferToTypedArray.d.ts +2 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferToTypedArray.js +43 -0
- package/Util/BinaryBuffer/index.d.ts +2 -0
- package/Util/BinaryBuffer/index.js +2 -0
- package/Util/LocationData.d.ts +3 -0
- package/Util/LocationData.js +16 -0
- package/Util/PriorityQueue.d.ts +18 -0
- package/Util/PriorityQueue.js +62 -0
- package/Util/TickInterval.d.ts +16 -0
- package/Util/TickInterval.js +49 -0
- package/Util/TypedEventTarget.d.ts +1 -0
- package/Util/TypedEventTarget.js +3 -0
- package/Util/Util.types.d.ts +4 -0
- package/Util/WorkItemProgress.d.ts +23 -0
- package/Util/WorkItemProgress.js +52 -0
- package/Voxels/Archive/VoxelArchive.types.d.ts +43 -0
- package/Voxels/Archive/VoxelArchive.types.js +6 -0
- package/Voxels/Archive/VoxelPaletteArchiveReader.d.ts +11 -0
- package/Voxels/Archive/VoxelPaletteArchiveReader.js +73 -0
- package/Voxels/Archive/VoxelPaletteArechive.d.ts +15 -0
- package/Voxels/Archive/VoxelPaletteArechive.js +81 -0
- package/Voxels/Cursor/DataCursor.interface.d.ts +1 -0
- package/Voxels/Cursor/VoxelCursor.d.ts +6 -7
- package/Voxels/Cursor/VoxelCursor.interface.d.ts +25 -24
- package/Voxels/Cursor/VoxelCursor.interface.js +93 -96
- package/Voxels/Cursor/VoxelCursor.js +22 -12
- package/Voxels/Cursor/VoxelLightData.d.ts +2 -0
- package/Voxels/Cursor/VoxelLightData.js +2 -0
- package/Voxels/Data/VoxelPalettesRegister.d.ts +11 -1
- package/Voxels/Data/VoxelPalettesRegister.js +17 -1
- package/Voxels/Data/VoxelPropertiesRegister.d.ts +4 -0
- package/Voxels/Data/VoxelPropertiesRegister.js +3 -0
- package/Voxels/Data/VoxelTag.types.d.ts +7 -1
- package/Voxels/Data/VoxelTag.types.js +3 -0
- package/Voxels/Data/VoxelTagsRegister.js +4 -1
- package/Voxels/Functions/BuildPaletteData.d.ts +6 -0
- package/Voxels/Functions/BuildPaletteData.js +87 -0
- package/Voxels/Functions/BuildStateData.d.ts +4 -6
- package/Voxels/Functions/BuildStateData.js +26 -80
- package/Voxels/Functions/{BuildTagAndPaletteData.d.ts → BuildTagData.d.ts} +2 -2
- package/Voxels/Functions/{BuildTagAndPaletteData.js → BuildTagData.js} +23 -2
- package/Voxels/Indexes/VoxelIndex.d.ts +1 -1
- package/Voxels/Indexes/VoxelIndex.js +5 -4
- package/Voxels/InitVoxelData.d.ts +1 -1
- package/Voxels/InitVoxelData.js +39 -41
- package/Voxels/Interaction/Functions/PickVoxel.d.ts +9 -0
- package/Voxels/Interaction/Functions/PickVoxel.js +95 -0
- package/Voxels/Interaction/Functions/PickVoxelWorld.d.ts +8 -0
- package/Voxels/Interaction/Functions/PickVoxelWorld.js +38 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategy.d.ts +9 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategy.js +58 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategy.types.d.ts +15 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategy.types.js +1 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategyRegister.d.ts +7 -0
- package/Voxels/Interaction/Placing/VoxelPlacingStrategyRegister.js +13 -0
- package/Voxels/Interaction/VoxelPickResult.d.ts +51 -0
- package/Voxels/Interaction/VoxelPickResult.js +58 -0
- package/Voxels/Logic/Classes/Types/VoxelLogicPoweredType.d.ts +8 -0
- package/Voxels/Logic/Classes/Types/VoxelLogicPoweredType.js +13 -0
- package/Voxels/Logic/Classes/Types/VoxelLogicStateType.d.ts +9 -0
- package/Voxels/Logic/Classes/Types/VoxelLogicStateType.js +23 -0
- package/Voxels/Logic/Classes/VoxelLogic.d.ts +7 -4
- package/Voxels/Logic/Classes/VoxelLogic.js +25 -27
- package/Voxels/Logic/Classes/VoxelLogicType.d.ts +11 -1
- package/Voxels/Logic/Classes/VoxelLogicType.js +6 -0
- package/Voxels/Logic/VoxelLogic.types.d.ts +5 -3
- package/Voxels/Logic/VoxelLogicRegister.d.ts +4 -3
- package/Voxels/Logic/VoxelLogicRegister.js +12 -4
- package/Voxels/Models/CompiledVoxelModel.types.d.ts +46 -0
- package/Voxels/Models/CompiledVoxelModel.types.js +1 -0
- package/{Models → Voxels/Models}/Defaults/CubeVoxelGeometry.js +0 -30
- package/{Models → Voxels/Models}/Defaults/CubeVoxelModels.d.ts +2 -0
- package/{Models → Voxels/Models}/Defaults/CubeVoxelModels.js +187 -71
- package/{Models → Voxels/Models/Defaults}/Examples.d.ts +1 -1
- package/{Models → Voxels/Models/Defaults}/Examples.js +50 -147
- package/Voxels/Models/Defaults/FarmVoxelModels.d.ts +3 -0
- package/Voxels/Models/Defaults/FarmVoxelModels.js +349 -0
- package/{Models → Voxels/Models}/Defaults/LiquidVoxelModel.js +3 -1
- package/{Models → Voxels/Models}/Defaults/PanelVoxelGeometry.js +2 -92
- package/{Models → Voxels/Models}/Defaults/PanelVoxelModels.d.ts +1 -0
- package/{Models → Voxels/Models}/Defaults/PanelVoxelModels.js +52 -180
- package/{Models → Voxels/Models}/Defaults/StairVoxelModel.js +59 -149
- package/Voxels/Models/Indexing/AOOcclusionFaceIndex.d.ts +12 -0
- package/Voxels/Models/Indexing/AOOcclusionFaceIndex.js +28 -0
- package/Voxels/Models/Indexing/CulledOcclusionFaceIndex.d.ts +12 -0
- package/Voxels/Models/Indexing/CulledOcclusionFaceIndex.js +27 -0
- package/Voxels/Models/Rules/Classes/GeomtryInput.d.ts +13 -0
- package/Voxels/Models/Rules/Classes/GeomtryInput.js +64 -0
- package/Voxels/Models/Rules/Classes/OcclusionFace.d.ts +10 -0
- package/Voxels/Models/Rules/Classes/OcclusionFace.js +5 -0
- package/Voxels/Models/Rules/Classes/OcclusionFaceRegister.d.ts +18 -0
- package/Voxels/Models/Rules/Classes/OcclusionFaceRegister.js +33 -0
- package/Voxels/Models/Rules/Classes/OcclusionQuadFace.d.ts +14 -0
- package/Voxels/Models/Rules/Classes/OcclusionQuadFace.js +118 -0
- package/Voxels/Models/Rules/Classes/OcclusionTriangleFace.d.ts +14 -0
- package/Voxels/Models/Rules/Classes/OcclusionTriangleFace.js +114 -0
- package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.d.ts +22 -0
- package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.js +15 -0
- package/{Models → Voxels/Models}/Rules/Classes/VoxelRulesModel.d.ts +3 -2
- package/{Models → Voxels/Models}/Rules/Functions/BuildFinalInputs.d.ts +0 -2
- package/Voxels/Models/Rules/Functions/BuildFinalInputs.js +72 -0
- package/Voxels/Models/Rules/Functions/BuildRules.d.ts +7 -0
- package/Voxels/Models/Rules/Functions/BuildRules.js +217 -0
- package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.d.ts +4 -0
- package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.js +39 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CalcFunctions.d.ts +8 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CalcFunctions.js +106 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.d.ts +5 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.js +14 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.d.ts +6 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.js +92 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.d.ts +6 -0
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.js +115 -0
- package/{Models → Voxels/Models}/Rules/VoxelModelRuleBuilderRegister.d.ts +1 -1
- package/{Models → Voxels/Models}/Rules/VoxelModelRuleBuilderRegister.js +27 -3
- package/{Models → Voxels/Models}/VoxelModel.types.d.ts +56 -45
- package/Voxels/Models/VoxelModel.types.js +1 -0
- package/Voxels/State/Schema/BinarySchema.d.ts +5 -3
- package/Voxels/State/Schema/BinarySchema.js +23 -8
- package/Voxels/State/Schema/BinarySchemaNode.d.ts +4 -3
- package/Voxels/State/Schema/BinarySchemaNode.js +9 -6
- package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +2 -0
- package/Voxels/State/Schema/ShapeStateRelationsNode.d.ts +3 -3
- package/Voxels/State/Schema/ShapeStateRelationsNode.js +2 -2
- package/Voxels/State/Schema/StateSchema.d.ts +2 -2
- package/Voxels/State/Schema/StateSchema.js +5 -7
- package/Voxels/State/SchemaRegister.d.ts +8 -6
- package/Voxels/State/SchemaRegister.js +33 -21
- package/Voxels/State/State.types.d.ts +19 -23
- package/Voxels/Types/PaintVoxelData.d.ts +27 -0
- package/Voxels/Types/PaintVoxelData.js +159 -0
- package/Voxels/Types/Voxel.types.d.ts +12 -25
- package/Voxels/Types/Voxel.types.js +1 -23
- package/Voxels/Types/VoxelModelCompiledData.types.d.ts +6 -74
- package/Voxels/index.d.ts +1 -0
- package/Voxels/index.js +1 -0
- package/World/Archive/Classes/ArchiveClasses.d.ts +7 -30
- package/World/Archive/Classes/ArchiveClasses.js +8 -33
- package/World/Archive/Classes/ImportedSection.d.ts +4 -13
- package/World/Archive/Classes/ImportedSection.js +78 -216
- package/World/Archive/Classes/ImportedSector.d.ts +7 -9
- package/World/Archive/Classes/ImportedSector.js +18 -65
- package/World/Archive/Functions/Area/ArchiveArea.d.ts +8 -0
- package/World/Archive/Functions/Area/ArchiveArea.js +65 -0
- package/World/Archive/Functions/{ArchiveArea.d.ts → Area/ImportArea.d.ts} +1 -8
- package/World/Archive/Functions/Area/ImportArea.js +59 -0
- package/World/Archive/Functions/JSON/ExportArchivedAreaJSON.d.ts +2 -0
- package/World/Archive/Functions/JSON/ExportArchivedAreaJSON.js +100 -0
- package/World/Archive/Functions/JSON/ImportArchivedAreaJSON.d.ts +2 -0
- package/World/Archive/Functions/JSON/ImportArchivedAreaJSON.js +100 -0
- package/World/Archive/Functions/Sector/ArchiveSector.d.ts +7 -0
- package/World/Archive/Functions/Sector/ArchiveSector.js +209 -0
- package/World/Archive/Functions/Sector/CreateArchivedSection.d.ts +3 -0
- package/World/Archive/Functions/Sector/CreateArchivedSection.js +147 -0
- package/World/Archive/Functions/{ImportSector.d.ts → Sector/ImportSector.d.ts} +2 -2
- package/World/Archive/Functions/Sector/ImportSector.js +32 -0
- package/World/Archive/Functions/Sector/RemoveDuplicateSections.d.ts +2 -0
- package/World/Archive/Functions/Sector/RemoveDuplicateSections.js +137 -0
- package/World/Archive/Functions/Shared/BaseData.d.ts +2 -0
- package/World/Archive/Functions/Shared/BaseData.js +14 -0
- package/World/Archive/Functions/Shared/IntToString.d.ts +1 -0
- package/World/Archive/Functions/Shared/IntToString.js +13 -0
- package/World/Archive/Functions/{Shared.d.ts → Shared/LightSegments.d.ts} +2 -3
- package/World/Archive/Functions/{Shared.js → Shared/LightSegments.js} +2 -15
- package/World/Archive/Functions/Shared/index.d.ts +3 -0
- package/World/Archive/Functions/Shared/index.js +3 -0
- package/World/Archive/Functions/index.d.ts +3 -3
- package/World/Archive/Functions/index.js +3 -3
- package/World/Archive/InitTasks.js +21 -30
- package/World/Archive/Types/Archive.types.d.ts +45 -0
- package/World/Archive/Types/Archive.types.js +1 -0
- package/World/Archive/Types/ArchiveArea.types.d.ts +38 -0
- package/World/Archive/Types/ArchiveArea.types.js +1 -0
- package/World/Archive/Types/ArchiveJSON.types.d.ts +52 -0
- package/World/Archive/Types/ArchiveJSON.types.js +1 -0
- package/World/Archive/Types/ArchivedSector.types.d.ts +43 -0
- package/World/Archive/Types/ArchivedSector.types.js +1 -0
- package/World/Archive/Types/index.d.ts +4 -0
- package/World/Archive/Types/index.js +4 -0
- package/World/Archive/index.d.ts +1 -1
- package/World/Archive/index.js +1 -1
- package/World/Cursor/SectionCursor.d.ts +4 -3
- package/World/Cursor/SectionCursor.js +13 -11
- package/World/Cursor/SectorCursor.d.ts +4 -2
- package/World/Cursor/SectorCursor.js +11 -1
- package/World/Cursor/WorldCursor.d.ts +1 -0
- package/World/Cursor/WorldCursor.js +8 -5
- package/World/Cursor/WorldVoxelCursor.d.ts +1 -3
- package/World/Cursor/WorldVoxelCursor.js +6 -26
- package/World/InitTasks.js +52 -40
- package/World/Lock/Function/LockSectors.d.ts +2 -0
- package/World/Lock/Function/LockSectors.js +28 -0
- package/World/Lock/Function/UnLockSectors.d.ts +2 -0
- package/World/Lock/Function/UnLockSectors.js +28 -0
- package/World/Lock/WorldLock.d.ts +1 -2
- package/World/Lock/WorldLock.js +3 -1
- package/World/Section/Section.d.ts +16 -21
- package/World/Section/Section.js +67 -143
- package/World/Section/SectionState.d.ts +6 -2
- package/World/Section/SectionState.js +9 -4
- package/World/Sector/Sector.d.ts +22 -8
- package/World/Sector/Sector.js +86 -67
- package/World/Sector/SectorHeightMap.d.ts +1 -1
- package/World/Sector/SectorHeightMap.js +6 -6
- package/World/Sector/SectorState.d.ts +2 -1
- package/World/Sector/SectorState.js +1 -0
- package/World/SnapShot/SectionSnapShot.d.ts +19 -0
- package/World/SnapShot/SectionSnapShot.js +72 -0
- package/World/SnapShot/SectionSnapShotCursor.d.ts +23 -0
- package/World/SnapShot/SectionSnapShotCursor.js +107 -0
- package/World/SnapShot/SnapShots.d.ts +11 -0
- package/World/SnapShot/SnapShots.js +24 -0
- package/World/Types/WorldDataSyncIds.d.ts +2 -0
- package/World/Types/WorldDataSyncIds.js +2 -0
- package/World/WorldRegister.d.ts +19 -7
- package/World/WorldRegister.js +47 -23
- package/World/WorldSpaces.d.ts +20 -0
- package/World/WorldSpaces.js +33 -0
- package/WorldSimulation/Dimensions/DimensionSegment.d.ts +38 -0
- package/WorldSimulation/Dimensions/DimensionSegment.js +120 -0
- package/WorldSimulation/Dimensions/DimensionSimulation.d.ts +26 -0
- package/WorldSimulation/Dimensions/DimensionSimulation.js +95 -0
- package/WorldSimulation/{Internal/Classes → Dimensions}/Generator.d.ts +5 -9
- package/WorldSimulation/{Internal/Classes → Dimensions}/Generator.js +10 -21
- package/WorldSimulation/{Internal/Classes → Dimensions}/SectorState.d.ts +4 -0
- package/WorldSimulation/Dimensions/SectorState.js +56 -0
- package/WorldSimulation/Dimensions/SimulationSector.d.ts +30 -0
- package/WorldSimulation/Dimensions/SimulationSector.js +214 -0
- package/WorldSimulation/Internal/WorldSimulationDimensions.d.ts +1 -1
- package/WorldSimulation/Internal/WorldSimulationDimensions.js +4 -3
- package/WorldSimulation/Internal/WorldSimulationTasks.d.ts +14 -9
- package/WorldSimulation/Internal/WorldSimulationTasks.js +132 -61
- package/WorldSimulation/Internal/runActiveSectorUpdate.d.ts +1 -0
- package/WorldSimulation/Internal/runActiveSectorUpdate.js +106 -0
- package/WorldSimulation/Procedures/InitalLoad.d.ts +1 -1
- package/WorldSimulation/Procedures/InitalLoad.js +6 -4
- package/WorldSimulation/Tasks/SimulationTaskBase.d.ts +19 -0
- package/WorldSimulation/Tasks/SimulationTaskBase.js +50 -0
- package/WorldSimulation/Tasks/TaskRegister.d.ts +7 -0
- package/WorldSimulation/{Internal → Tasks}/TaskRegister.js +3 -3
- package/WorldSimulation/Tasks/TaskSegment.d.ts +20 -0
- package/WorldSimulation/Tasks/TaskSegment.js +83 -0
- package/WorldSimulation/Tick/TickQueue.d.ts +9 -0
- package/WorldSimulation/Tick/TickQueue.js +31 -0
- package/WorldSimulation/Tools/SimulationBrush.d.ts +25 -0
- package/WorldSimulation/Tools/SimulationBrush.js +203 -0
- package/WorldSimulation/Voxels/Behaviors/Types/CropVoxelBehavior.d.ts +1 -0
- package/WorldSimulation/Voxels/Behaviors/Types/CropVoxelBehavior.js +23 -0
- package/WorldSimulation/Voxels/Behaviors/Types/DefaultVoxelBehavior.d.ts +1 -0
- package/WorldSimulation/Voxels/Behaviors/Types/DefaultVoxelBehavior.js +10 -0
- package/WorldSimulation/Voxels/Behaviors/Types/FarmlandVoxelBehavior.d.ts +1 -0
- package/WorldSimulation/Voxels/Behaviors/Types/FarmlandVoxelBehavior.js +73 -0
- package/WorldSimulation/Voxels/Behaviors/Types/LiquidVoxelBehavior.d.ts +1 -0
- package/WorldSimulation/Voxels/Behaviors/Types/LiquidVoxelBehavior.js +21 -0
- package/WorldSimulation/Voxels/Behaviors/Types/index.d.ts +4 -0
- package/WorldSimulation/Voxels/Behaviors/Types/index.js +4 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviors.d.ts +18 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviors.js +30 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviorsRegister.d.ts +6 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviorsRegister.js +25 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelUpdate.d.ts +10 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelUpdate.js +1 -0
- package/WorldSimulation/Voxels/Behaviors/index.d.ts +4 -0
- package/WorldSimulation/Voxels/Behaviors/index.js +4 -0
- package/WorldSimulation/Voxels/Ticks/Types/LiquidVoxelUpdate.d.ts +1 -0
- package/WorldSimulation/Voxels/Ticks/Types/LiquidVoxelUpdate.js +163 -0
- package/WorldSimulation/Voxels/Ticks/Types/index.d.ts +1 -0
- package/WorldSimulation/Voxels/Ticks/Types/index.js +1 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdate.d.ts +8 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdate.js +14 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdateRegister.d.ts +6 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdateRegister.js +13 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdateType.d.ts +12 -0
- package/WorldSimulation/Voxels/Ticks/VoxelTickUpdateType.js +10 -0
- package/WorldSimulation/Voxels/Ticks/index.d.ts +4 -0
- package/WorldSimulation/Voxels/Ticks/index.js +4 -0
- package/WorldSimulation/WorldSimulation.d.ts +5 -4
- package/WorldSimulation/WorldSimulation.js +31 -35
- package/package.json +2 -2
- package/Contexts/Constructor/DivineVoxelEngineConstructor.d.ts +0 -10
- package/Contexts/Constructor/DivineVoxelEngineConstructor.js +0 -14
- package/Contexts/Constructor/index.d.ts +0 -1
- package/Contexts/Constructor/index.js +0 -1
- package/Init/StartConstructor.d.ts +0 -2
- package/Init/StartConstructor.js +0 -59
- package/Mesher/Models/Common/BoundsFunctions.d.ts +0 -2
- package/Mesher/Models/Common/BoxGeometryNode.d.ts +0 -10
- package/Mesher/Models/Common/BoxGeometryNode.js +0 -80
- package/Mesher/Models/Common/QuadGeometryNode.d.ts +0 -11
- package/Mesher/Models/Common/QuadGeometryNode.js +0 -51
- package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +0 -24
- package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.js +0 -173
- package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +0 -19
- package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.js +0 -157
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +0 -22
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +0 -75
- package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +0 -18
- package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +0 -77
- package/Mesher/Models/Protocols/OutlinedVoxelTool.d.ts +0 -6
- package/Mesher/Models/Protocols/OutlinedVoxelTool.js +0 -233
- package/Models/Indexing/VoxelAOResultsIndex.d.ts +0 -12
- package/Models/Indexing/VoxelAOResultsIndex.js +0 -26
- package/Models/Indexing/VoxelFaceCullResultsIndex.d.ts +0 -12
- package/Models/Indexing/VoxelFaceCullResultsIndex.js +0 -26
- package/Models/Indexing/VoxelFaceTransparentResultsIndex.d.ts +0 -11
- package/Models/Indexing/VoxelFaceTransparentResultsIndex.js +0 -15
- package/Models/Input/BoxVoxelGometryInputs.d.ts +0 -25
- package/Models/Input/BoxVoxelGometryInputs.js +0 -36
- package/Models/Input/QuadVoxelGometryInputs.d.ts +0 -24
- package/Models/Rules/Classes/OcclusionFace.d.ts +0 -65
- package/Models/Rules/Classes/OcclusionFace.js +0 -492
- package/Models/Rules/Classes/VoxelRulesGeometry.d.ts +0 -15
- package/Models/Rules/Classes/VoxelRulesGeometry.js +0 -29
- package/Models/Rules/Functions/BuildFinalInputs.js +0 -93
- package/Models/Rules/Functions/BuildGeomtryInputs.d.ts +0 -6
- package/Models/Rules/Functions/BuildGeomtryInputs.js +0 -251
- package/Models/Rules/Functions/BuildRules.d.ts +0 -8
- package/Models/Rules/Functions/BuildRules.js +0 -187
- package/Models/Rules/Functions/GetOcclusionFaces.d.ts +0 -4
- package/Models/Rules/Functions/GetOcclusionFaces.js +0 -112
- package/Models/Shared/Transform.d.ts +0 -4
- package/Tasks/Logic/InitTasks.js +0 -10
- package/Tasks/Logic/VoxelLogicUpdate.d.ts +0 -3
- package/Tasks/Logic/VoxelLogicUpdate.js +0 -71
- package/Tasks/Propagation/Explosion/ExplosionManager.d.ts +0 -4
- package/Tasks/Propagation/Explosion/ExplosionManager.js +0 -116
- package/Tasks/Update/Common.d.ts +0 -3
- package/Tasks/Update/Common.js +0 -41
- package/Tasks/Update/EreaseUpdate.d.ts +0 -3
- package/Tasks/Update/EreaseUpdate.js +0 -66
- package/Tasks/Update/InitTasks.d.ts +0 -5
- package/Tasks/Update/InitTasks.js +0 -25
- package/Tasks/Update/PaintUpdate.d.ts +0 -3
- package/Tasks/Update/PaintUpdate.js +0 -89
- package/Tasks/Update/VoxelUpdate.d.ts +0 -3
- package/Tasks/Update/VoxelUpdate.js +0 -35
- package/Templates/FullVoxelTemplate.d.ts +0 -14
- package/Templates/FullVoxelTemplate.js +0 -61
- package/Templates/Functions/CreateTemplate.d.ts +0 -3
- package/Templates/Functions/CreateTemplate.js +0 -134
- package/Templates/VoxelTemplate.d.ts +0 -34
- package/Templates/VoxelTemplate.js +0 -135
- package/Util/Binary/BinaryBuffer.d.ts +0 -35
- package/Util/Binary/BinaryBuffer.js +0 -136
- package/Util/Binary/Palettes.d.ts +0 -5
- package/Util/Binary/Palettes.js +0 -46
- package/Util/LocationVisitedMap.d.ts +0 -9
- package/Util/LocationVisitedMap.js +0 -18
- package/Util/VisistedMap.d.ts +0 -10
- package/Util/VisistedMap.js +0 -29
- package/Voxels/Data/VoxelTagStates.d.ts +0 -22
- package/Voxels/Data/VoxelTagStates.js +0 -47
- package/Voxels/Logic/Classes/Default/Types/VoxelPoweredLogicType.d.ts +0 -5
- package/Voxels/Logic/Classes/Default/Types/VoxelPoweredLogicType.js +0 -6
- package/World/Archive/Archive.types.d.ts +0 -182
- package/World/Archive/Functions/ArchiveArea.js +0 -341
- package/World/Archive/Functions/ArchiveSector.d.ts +0 -7
- package/World/Archive/Functions/ArchiveSector.js +0 -431
- package/World/Archive/Functions/CreateArchivedSection.d.ts +0 -3
- package/World/Archive/Functions/CreateArchivedSection.js +0 -207
- package/World/Archive/Functions/ImportSector.js +0 -57
- package/World/Archive/Functions/RemoveDuplicates.d.ts +0 -3
- package/World/Archive/Functions/RemoveDuplicates.js +0 -92
- package/WorldSimulation/Internal/Classes/DimensionSegment.d.ts +0 -37
- package/WorldSimulation/Internal/Classes/DimensionSegment.js +0 -67
- package/WorldSimulation/Internal/Classes/Queues/BuildQueue.d.ts +0 -5
- package/WorldSimulation/Internal/Classes/Queues/BuildQueue.js +0 -6
- package/WorldSimulation/Internal/Classes/Queues/LogiccQueue.d.ts +0 -5
- package/WorldSimulation/Internal/Classes/Queues/LogiccQueue.js +0 -6
- package/WorldSimulation/Internal/Classes/SectorState.js +0 -20
- package/WorldSimulation/Internal/Classes/SectorVisistedMap.d.ts +0 -9
- package/WorldSimulation/Internal/Classes/SectorVisistedMap.js +0 -24
- package/WorldSimulation/Internal/Classes/TickQueue.d.ts +0 -12
- package/WorldSimulation/Internal/Classes/TickQueue.js +0 -58
- package/WorldSimulation/Internal/Classes/WorldSimulationTaskBase.d.ts +0 -15
- package/WorldSimulation/Internal/Classes/WorldSimulationTaskBase.js +0 -62
- package/WorldSimulation/Internal/Functions/cullSectors.d.ts +0 -2
- package/WorldSimulation/Internal/Functions/cullSectors.js +0 -111
- package/WorldSimulation/Internal/Functions/getSectorState.d.ts +0 -4
- package/WorldSimulation/Internal/Functions/getSectorState.js +0 -39
- package/WorldSimulation/Internal/Functions/runTickUpdate.d.ts +0 -2
- package/WorldSimulation/Internal/Functions/runTickUpdate.js +0 -80
- package/WorldSimulation/Internal/Functions/runWorldUpdate.d.ts +0 -2
- package/WorldSimulation/Internal/Functions/runWorldUpdate.js +0 -69
- package/WorldSimulation/Internal/TaskRegister.d.ts +0 -7
- /package/{Models/VoxelModel.types.js → Builder/RayProvider.js} +0 -0
- /package/{World/Archive/Archive.types.js → Math/Location.js} +0 -0
- /package/Tasks/{Logic → Paint}/InitTasks.d.ts +0 -0
- /package/Util/{Binary/BinaryTree.d.ts → FlatBinaryTreeIndex.d.ts} +0 -0
- /package/Util/{Binary/BinaryTree.js → FlatBinaryTreeIndex.js} +0 -0
- /package/{Models → Voxels/Models}/Defaults/CubeVoxelGeometry.d.ts +0 -0
- /package/{Models → Voxels/Models}/Defaults/LiquidVoxelModel.d.ts +0 -0
- /package/{Models → Voxels/Models}/Defaults/PanelVoxelGeometry.d.ts +0 -0
- /package/{Models → Voxels/Models}/Defaults/StairVoxelModel.d.ts +0 -0
- /package/{Models → Voxels/Models}/Indexing/VoxelRelativeCubeIndex.d.ts +0 -0
- /package/{Models → Voxels/Models}/Indexing/VoxelRelativeCubeIndex.js +0 -0
- /package/{Models → Voxels/Models}/Rules/Classes/VoxelRulesModel.js +0 -0
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import { StateCompareOperationsMap, StateLogicOperationsMap, } from "../State/State.types";
|
|
2
2
|
import { StringPalette } from "../../Util/StringPalette";
|
|
3
|
-
import { VoxelModelRuleBuilderRegister } from "
|
|
4
|
-
import { VoxelTagStates } from "../Data/VoxelTagStates";
|
|
5
|
-
import { VoxelPalettesRegister } from "../Data/VoxelPalettesRegister";
|
|
6
|
-
import { StateSchema } from "../State/Schema/StateSchema";
|
|
7
|
-
function bitsNeeded(n) {
|
|
8
|
-
if (n < 0)
|
|
9
|
-
throw new Error("Input must be a non-negative integer.");
|
|
10
|
-
let bits = 0;
|
|
11
|
-
while (n > 0) {
|
|
12
|
-
bits++;
|
|
13
|
-
n >>= 1;
|
|
14
|
-
}
|
|
15
|
-
return bits;
|
|
16
|
-
}
|
|
3
|
+
import { VoxelModelRuleBuilderRegister } from "../Models/Rules/VoxelModelRuleBuilderRegister";
|
|
17
4
|
class StateTreeNode {
|
|
18
5
|
id;
|
|
19
6
|
children = new Map();
|
|
@@ -116,51 +103,23 @@ function reMapTree(schemaIdPalette, schemaValuePalette, baseObj, newObj, modelOr
|
|
|
116
103
|
return newObj;
|
|
117
104
|
}
|
|
118
105
|
function buildSchemas(binaryNodes, relationNodes) {
|
|
119
|
-
const baseSchema =
|
|
106
|
+
const baseSchema = {
|
|
107
|
+
binary: [],
|
|
108
|
+
relational: [],
|
|
109
|
+
};
|
|
120
110
|
const schemaIdPalette = new StringPalette();
|
|
121
111
|
const schemaValuePalette = new Map();
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const maxBits = bitsNeeded(schemaNode.type == "string"
|
|
127
|
-
? Object.keys(schemaNode.values)
|
|
128
|
-
.map((_) => Number(_))
|
|
129
|
-
.sort((a, b) => a - b)
|
|
130
|
-
.pop()
|
|
131
|
-
: schemaNode.maxValue);
|
|
132
|
-
const nodeData = {
|
|
133
|
-
id: schemaNode.name,
|
|
134
|
-
type: "binary",
|
|
135
|
-
index: bitIndex,
|
|
136
|
-
mask: (1 << maxBits) - 1,
|
|
137
|
-
};
|
|
138
|
-
bitIndex += maxBits;
|
|
139
|
-
if (schemaNode.type == "string") {
|
|
140
|
-
const valuePalette = new StringPalette();
|
|
141
|
-
for (const vIndex in schemaNode.values) {
|
|
142
|
-
const vValue = schemaNode.values[vIndex];
|
|
143
|
-
valuePalette.register(vValue);
|
|
144
|
-
}
|
|
145
|
-
schemaValuePalette.set(schemaNode.name, valuePalette);
|
|
146
|
-
nodeData.valuePalette = valuePalette._palette;
|
|
147
|
-
}
|
|
148
|
-
baseSchema.push(nodeData);
|
|
112
|
+
for (const schemaNode of binaryNodes) {
|
|
113
|
+
schemaIdPalette.register(schemaNode.name);
|
|
114
|
+
if (schemaNode.values) {
|
|
115
|
+
schemaValuePalette.set(schemaNode.name, new StringPalette(schemaNode.values));
|
|
149
116
|
}
|
|
117
|
+
baseSchema.binary.push(schemaNode);
|
|
150
118
|
}
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
id: schemaNode.name,
|
|
156
|
-
type: "relation",
|
|
157
|
-
conditions: schemaNode.conditions,
|
|
158
|
-
});
|
|
159
|
-
const valuePalette = new StringPalette();
|
|
160
|
-
valuePalette.register("false");
|
|
161
|
-
valuePalette.register("true");
|
|
162
|
-
schemaValuePalette.set(schemaNode.name, valuePalette);
|
|
163
|
-
}
|
|
119
|
+
for (const schemaNode of relationNodes) {
|
|
120
|
+
schemaIdPalette.register(schemaNode.name);
|
|
121
|
+
baseSchema.relational.push(schemaNode);
|
|
122
|
+
schemaValuePalette.set(schemaNode.name, new StringPalette(["false", "true"]));
|
|
164
123
|
}
|
|
165
124
|
return {
|
|
166
125
|
baseSchema,
|
|
@@ -171,28 +130,24 @@ function buildSchemas(binaryNodes, relationNodes) {
|
|
|
171
130
|
export function BuildStateData(model, geoPalette) {
|
|
172
131
|
const data = model.data;
|
|
173
132
|
const { baseSchema, schemaIdPalette, schemaValuePalette } = buildSchemas(data.stateSchema, data.relationsSchema);
|
|
174
|
-
const geometryLinkPalette = new StringPalette();
|
|
175
133
|
//maps geo link ids to geomtry ids
|
|
176
|
-
const geometryLinkStateMap =
|
|
177
|
-
const log = model.data.id == "dve_simple_stair";
|
|
134
|
+
const geometryLinkStateMap = {};
|
|
178
135
|
//add geomtry from main shape states
|
|
179
136
|
for (const key in data.stateNodes) {
|
|
180
137
|
const nodeData = data.stateNodes[key];
|
|
181
|
-
for (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
geometryLinkStateMap[linkId] = geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node));
|
|
138
|
+
for (let i = 0; i < nodeData.length; i++) {
|
|
139
|
+
geometryLinkStateMap[key] ??= {};
|
|
140
|
+
const node = nodeData[i];
|
|
141
|
+
geometryLinkStateMap[key][i] ??= geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node));
|
|
186
142
|
}
|
|
187
143
|
}
|
|
188
144
|
//add geomtry from condiotnal shape states
|
|
189
145
|
for (const key in data.conditonalNodes) {
|
|
190
146
|
const nodeData = data.conditonalNodes[key];
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
geometryLinkStateMap[linkId] = geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node));
|
|
147
|
+
for (let i = 0; i < nodeData.length; i++) {
|
|
148
|
+
geometryLinkStateMap[key] ??= {};
|
|
149
|
+
const node = nodeData[i];
|
|
150
|
+
geometryLinkStateMap[key][i] ??= geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node));
|
|
196
151
|
}
|
|
197
152
|
}
|
|
198
153
|
const stateRelativeGeometryMap = [];
|
|
@@ -205,7 +160,7 @@ export function BuildStateData(model, geoPalette) {
|
|
|
205
160
|
let relativeByteCount = 0;
|
|
206
161
|
const stateRecord = {};
|
|
207
162
|
for (const key in data.stateNodes) {
|
|
208
|
-
stateGeoLinkPalette.push(data.stateNodes[key].map((_) =>
|
|
163
|
+
stateGeoLinkPalette.push(data.stateNodes[key].map((_, index) => geometryLinkStateMap[key][index]));
|
|
209
164
|
stateGeometryPalette.push(data.stateNodes[key].map((_) => geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(_))));
|
|
210
165
|
stateRecord[key] = stateGeometryPalette.length - 1;
|
|
211
166
|
stateRelativeGeometryMap[stateRecord[key]] ??= [];
|
|
@@ -214,7 +169,6 @@ export function BuildStateData(model, geoPalette) {
|
|
|
214
169
|
stateRelativeGeometryMap[stateRecord[key]][geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node))] = relativeGeoId;
|
|
215
170
|
relativeGeometryByteIndexMap[relativeGeoId] = relativeByteCount;
|
|
216
171
|
relativeGeoId++;
|
|
217
|
-
relativeByteCount += Math.ceil(VoxelModelRuleBuilderRegister.getGeomtryFromLink(node).faceCount / 8);
|
|
218
172
|
}
|
|
219
173
|
addPathToTree(stateTree, key
|
|
220
174
|
.split(",")
|
|
@@ -228,18 +182,16 @@ export function BuildStateData(model, geoPalette) {
|
|
|
228
182
|
const condiotnalStatements = [];
|
|
229
183
|
const compareOperations = Object.keys(StateCompareOperationsMap);
|
|
230
184
|
for (const key in data.conditonalNodes) {
|
|
231
|
-
condiotnalShapeStateNodePalette.push(data.conditonalNodes[key].map((_) =>
|
|
185
|
+
condiotnalShapeStateNodePalette.push(data.conditonalNodes[key].map((_, index) => geometryLinkStateMap[key][index]));
|
|
232
186
|
condiotnalShapeStateGeometryPalette.push(data.conditonalNodes[key].map((_) => geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(_))));
|
|
233
187
|
condiotnalShapeStateNodeRecord[key] =
|
|
234
188
|
condiotnalShapeStateGeometryPalette.length - 1;
|
|
235
189
|
condiotnalShapeStateRelativeGeometryMap[condiotnalShapeStateNodeRecord[key]] ??= [];
|
|
236
190
|
const nodeData = data.conditonalNodes[key];
|
|
237
191
|
for (const node of nodeData) {
|
|
238
|
-
condiotnalShapeStateRelativeGeometryMap[condiotnalShapeStateNodeRecord[key]][geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node))] =
|
|
239
|
-
relativeGeoId;
|
|
192
|
+
condiotnalShapeStateRelativeGeometryMap[condiotnalShapeStateNodeRecord[key]][geoPalette.getNumberId(VoxelModelRuleBuilderRegister.getGeometryLinkId(node))] = relativeGeoId;
|
|
240
193
|
relativeGeometryByteIndexMap[relativeGeoId] = relativeByteCount;
|
|
241
194
|
relativeGeoId++;
|
|
242
|
-
relativeByteCount += Math.ceil(VoxelModelRuleBuilderRegister.getGeomtryFromLink(node).faceCount / 8);
|
|
243
195
|
}
|
|
244
196
|
const statement = [];
|
|
245
197
|
const nodes = key.split(" ");
|
|
@@ -328,14 +280,10 @@ export function BuildStateData(model, geoPalette) {
|
|
|
328
280
|
}
|
|
329
281
|
}
|
|
330
282
|
}
|
|
331
|
-
const schema = new StateSchema(baseSchema);
|
|
332
283
|
for (const [voxelId, voxelData] of model.voxels) {
|
|
333
284
|
const modeStateTree = new StateTreeNode("root");
|
|
334
285
|
const modStatePalette = [];
|
|
335
286
|
const modStateRecord = {};
|
|
336
|
-
for (const tag of tagEffects) {
|
|
337
|
-
VoxelTagStates.register(VoxelPalettesRegister.voxels.getNumberId(voxelId), tag.tagId, schema, tag.tree, tag.treePalette);
|
|
338
|
-
}
|
|
339
287
|
const { baseSchema, schemaIdPalette, schemaValuePalette } = buildSchemas(voxelData.modSchema || [], voxelData.modRelationSchema || []);
|
|
340
288
|
for (const key in voxelData.inputs) {
|
|
341
289
|
modStatePalette.push(voxelData.inputs[key]);
|
|
@@ -361,9 +309,7 @@ export function BuildStateData(model, geoPalette) {
|
|
|
361
309
|
stateGeometryPalette: stateGeometryPalette,
|
|
362
310
|
condiotnalShapeStateGeometryPalette,
|
|
363
311
|
stateTree: newShapeStateTree,
|
|
364
|
-
geometryLinkPalette: geometryLinkPalette._map,
|
|
365
312
|
geometryLinkStateMap,
|
|
366
|
-
relativeByteCount,
|
|
367
313
|
statePalette: stateGeoLinkPalette,
|
|
368
314
|
stateRecord: stateRecord,
|
|
369
315
|
condiotnalNodeStateTree,
|
|
@@ -2,7 +2,7 @@ import { VoxelData } from "../Types/Voxel.types";
|
|
|
2
2
|
import { VoxelMaterialData } from "../Types/VoxelMaterial.types";
|
|
3
3
|
import { VoxelSubstanceData } from "../Types/VoxelSubstances.types";
|
|
4
4
|
import { CompiledVoxelTagAndPaletteData } from "../Types/VoxelModelCompiledData.types";
|
|
5
|
-
export type
|
|
5
|
+
export type BuildTagDataProps = {
|
|
6
6
|
voxels: VoxelData[];
|
|
7
7
|
voxelsOverrides?: Record<string, (value: any) => any>;
|
|
8
8
|
substances: VoxelSubstanceData[];
|
|
@@ -10,4 +10,4 @@ export type BuildTagAndPaletteDataProps = {
|
|
|
10
10
|
materials: VoxelMaterialData[];
|
|
11
11
|
materialsOverrides?: Record<string, (value: any) => any>;
|
|
12
12
|
};
|
|
13
|
-
export declare function BuildTagAndPaletteData(props:
|
|
13
|
+
export declare function BuildTagAndPaletteData(props: BuildTagDataProps): CompiledVoxelTagAndPaletteData;
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import { VoxelTagsRegister } from "../Data/VoxelTagsRegister";
|
|
2
2
|
import { VoxelPalettesRegister } from "../Data/VoxelPalettesRegister";
|
|
3
|
+
import { VoxelModelRuleBuilderRegister } from "../Models/Rules/VoxelModelRuleBuilderRegister";
|
|
4
|
+
import { VoxelPropertiesRegister } from "../Data/VoxelPropertiesRegister";
|
|
5
|
+
import { VoxelPlacingStrategyRegister } from "../../Voxels/Interaction/Placing/VoxelPlacingStrategyRegister";
|
|
3
6
|
export function BuildTagAndPaletteData(props) {
|
|
4
7
|
const logic = {};
|
|
5
8
|
for (const voxel of props.voxels) {
|
|
6
9
|
const tags = {};
|
|
7
|
-
|
|
10
|
+
if (VoxelPalettesRegister.voxelIds._map[voxel.id] !== undefined) {
|
|
11
|
+
throw new Error(`Voxel with id [${voxel.id}] is already registered.`);
|
|
12
|
+
}
|
|
13
|
+
const voxelId = VoxelPalettesRegister.voxelIds.register(voxel.id);
|
|
14
|
+
VoxelPropertiesRegister.VoxelProperties[voxelId] = voxel.properties;
|
|
15
|
+
if (voxel.properties["dve_model_data"]) {
|
|
16
|
+
tags["dve_model_id"] = voxel.properties["dve_model_data"].id;
|
|
17
|
+
const model = VoxelModelRuleBuilderRegister.models.get(voxel.properties["dve_model_data"].id);
|
|
18
|
+
if (model?.data.properties) {
|
|
19
|
+
for (const tagId in model.data.properties) {
|
|
20
|
+
voxel.properties[tagId] = model.data.properties[tagId];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (voxel.properties["dve_placing_strategy"]) {
|
|
25
|
+
VoxelPlacingStrategyRegister.register(voxel.id, voxel.properties["dve_placing_strategy"]);
|
|
26
|
+
}
|
|
8
27
|
VoxelPalettesRegister.voxelIdToNameMap.set(voxel.id, voxel.name || "");
|
|
9
28
|
VoxelPalettesRegister.voxelNametoIdMap.set(voxel.name || voxel.id, voxel.id);
|
|
10
29
|
if (voxel.properties["dve_logic_data"]) {
|
|
@@ -46,7 +65,9 @@ export function BuildTagAndPaletteData(props) {
|
|
|
46
65
|
return {
|
|
47
66
|
data: {
|
|
48
67
|
logic,
|
|
49
|
-
palette:
|
|
68
|
+
palette: [],
|
|
69
|
+
record: [],
|
|
70
|
+
idPalette: VoxelPalettesRegister.voxelIds._palette,
|
|
50
71
|
tags: VoxelTagsRegister.VoxelTags,
|
|
51
72
|
idToNameMap: [...VoxelPalettesRegister.voxelIdToNameMap.entries()],
|
|
52
73
|
nameToIdMap: [...VoxelPalettesRegister.voxelNametoIdMap.entries()],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaintVoxelData } from "../Types/
|
|
1
|
+
import { PaintVoxelData } from "../Types/PaintVoxelData";
|
|
2
2
|
import { SchemaRegister } from "../State/SchemaRegister";
|
|
3
3
|
import { VoxelPalettesRegister } from "../../Voxels/Data/VoxelPalettesRegister";
|
|
4
4
|
export class VoxelNamedState {
|
|
@@ -17,7 +17,7 @@ export class VoxelNamedState {
|
|
|
17
17
|
for (const key in data.properties) {
|
|
18
18
|
this.tags.set(key, data.properties[key]);
|
|
19
19
|
}
|
|
20
|
-
if (SchemaRegister.
|
|
20
|
+
if (SchemaRegister.modSchemaData.has(this.voxelId)) {
|
|
21
21
|
const schema = SchemaRegister.getVoxelSchemas(this.voxelId);
|
|
22
22
|
if (this.data.state == "*") {
|
|
23
23
|
this.compiled.stateAny = true;
|
|
@@ -117,8 +117,9 @@ export class VoxelIndex {
|
|
|
117
117
|
return false;
|
|
118
118
|
}
|
|
119
119
|
getStateFromRawData(data) {
|
|
120
|
-
const [id, light,
|
|
121
|
-
const
|
|
120
|
+
const [id, light, secondary] = data;
|
|
121
|
+
const [, mod, state] = VoxelPalettesRegister.voxels[id];
|
|
122
|
+
const conatiner = this.states.get(VoxelPalettesRegister.voxelIds.getStringId(id));
|
|
122
123
|
if (!conatiner)
|
|
123
124
|
return false;
|
|
124
125
|
for (const modelState of conatiner?.stateArray) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VoxelGeometryData, VoxelModelData } from "
|
|
1
|
+
import { VoxelGeometryData, VoxelModelData } from "./Models/VoxelModel.types";
|
|
2
2
|
import { VoxelData } from "./Types/Voxel.types";
|
|
3
3
|
import { CompiledVoxelData } from "./Types/VoxelModelCompiledData.types";
|
|
4
4
|
import { VoxelMaterialData } from "./Types/VoxelMaterial.types";
|
package/Voxels/InitVoxelData.js
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { candlesGeometry1, candlesGeometry2, candlesGeometry3, candlesGeometry4, candlesModel, carpetGeometry, carpetModel, chainGeometry, chainModel, fence, fenceEastWest, fenceNorthsouth, fencePost, leverGeometry, leverModel, } from "
|
|
2
|
-
import { cube, halfDownCube, eighthCube, quaterCubeSouthNorth, quaterCubeUpDown, quaterCubeWestEast, halfSouthCube, halfWestCube, } from "
|
|
3
|
-
import { orientedCube, pillarCube, simpleCube, simpleHalfCube, } from "
|
|
4
|
-
import { diagonalFlatPanelEastWest, diagonalFlatPanelWestEast, thinPanelDown, thinPanelSouth, thinPanelWest, } from "
|
|
5
|
-
import { stair } from "
|
|
6
|
-
import { liquidGeometry, liquidModel, } from "
|
|
7
|
-
import { VoxelModelRuleBuilderRegister } from "
|
|
8
|
-
import { BuildRules } from "../Models/Rules/Functions/BuildRules";
|
|
1
|
+
import { candlesGeometry1, candlesGeometry2, candlesGeometry3, candlesGeometry4, candlesModel, carpetGeometry, carpetModel, chainGeometry, chainModel, fence, fenceEastWest, fenceNorthsouth, fencePost, leverGeometry, leverModel, } from "./Models/Defaults/Examples";
|
|
2
|
+
import { cube, halfDownCube, eighthCube, quaterCubeSouthNorth, quaterCubeUpDown, quaterCubeWestEast, halfSouthCube, halfWestCube, } from "./Models/Defaults/CubeVoxelGeometry";
|
|
3
|
+
import { orientedCube, pillarCube, simpleCube, simpleNoCulledCube, simpleHalfCube, simpleTransparentCube, } from "./Models/Defaults/CubeVoxelModels";
|
|
4
|
+
import { diagonalFlatPanelEastWest, diagonalFlatPanelWestEast, thinPanelDown, thinPanelSouth, thinPanelWest, } from "./Models/Defaults/PanelVoxelGeometry";
|
|
5
|
+
import { stair } from "./Models/Defaults/StairVoxelModel";
|
|
6
|
+
import { liquidGeometry, liquidModel, } from "./Models/Defaults/LiquidVoxelModel";
|
|
7
|
+
import { VoxelModelRuleBuilderRegister } from "./Models/Rules/VoxelModelRuleBuilderRegister";
|
|
9
8
|
import { BuildStateData } from "./Functions/BuildStateData";
|
|
10
|
-
import { BuildFinalInputs } from "
|
|
9
|
+
import { BuildFinalInputs } from "./Models/Rules/Functions/BuildFinalInputs";
|
|
11
10
|
import { SchemaRegister } from "../Voxels/State/SchemaRegister";
|
|
12
|
-
import { simpleCrossedPannel, simpleThinPannel, } from "
|
|
13
|
-
import { VoxelTagStates } from "./Data/VoxelTagStates";
|
|
11
|
+
import { simpleCrossedPannel, simpleThinPannel, } from "./Models/Defaults/PanelVoxelModels";
|
|
14
12
|
import { VoxelIndex } from "../Voxels/Indexes/VoxelIndex";
|
|
15
13
|
import { CacheManager } from "../Cache/CacheManager";
|
|
16
14
|
import { VoxelLightData } from "./Cursor/VoxelLightData";
|
|
17
15
|
import { VoxelTagIds } from "./Data/VoxelTag.types";
|
|
18
|
-
import { BuildTagAndPaletteData } from "./Functions/
|
|
16
|
+
import { BuildTagAndPaletteData as BuildTagData } from "./Functions/BuildTagData";
|
|
17
|
+
import { VoxelPalettesRegister } from "./Data/VoxelPalettesRegister";
|
|
19
18
|
import { VoxelLogicRegister } from "./Logic/VoxelLogicRegister";
|
|
19
|
+
import { BuildPaletteData } from "./Functions/BuildPaletteData";
|
|
20
|
+
import { BuildRules } from "./Models/Rules/Functions/BuildRules";
|
|
21
|
+
import { VoxelTagsRegister } from "./Data/VoxelTagsRegister";
|
|
22
|
+
import { farmGeomtry, farmModels } from "./Models/Defaults/FarmVoxelModels";
|
|
23
|
+
function RegisterModels(data) {
|
|
24
|
+
VoxelModelRuleBuilderRegister.registerGeometry(cube, halfDownCube, halfSouthCube, halfWestCube, quaterCubeSouthNorth, quaterCubeUpDown, quaterCubeWestEast, eighthCube, thinPanelDown, thinPanelSouth, thinPanelWest, diagonalFlatPanelEastWest, diagonalFlatPanelWestEast, fencePost, fenceEastWest, fenceNorthsouth, chainGeometry, carpetGeometry, candlesGeometry1, candlesGeometry2, candlesGeometry3, candlesGeometry4, liquidGeometry, ...leverGeometry, ...farmGeomtry, ...(data.geometry || []));
|
|
25
|
+
VoxelModelRuleBuilderRegister.registerModels(simpleCube, simpleTransparentCube, simpleNoCulledCube, orientedCube, simpleHalfCube, pillarCube, simpleThinPannel, stair, simpleCrossedPannel, chainModel, carpetModel, candlesModel, leverModel, fence, liquidModel, ...farmModels, ...(data.models || []));
|
|
26
|
+
}
|
|
20
27
|
function GetModelData(data) {
|
|
21
28
|
if (CacheManager.cacheLoadEnabled && CacheManager.cachedData) {
|
|
22
29
|
const syncData = CacheManager.cachedData.models;
|
|
@@ -28,18 +35,8 @@ function GetModelData(data) {
|
|
|
28
35
|
const voxel = syncData.voxels[i];
|
|
29
36
|
SchemaRegister.registerVoxel(voxel.id, voxel.modelId, voxel.modSchema);
|
|
30
37
|
}
|
|
31
|
-
VoxelTagStates.load(syncData.tagState);
|
|
32
38
|
return syncData;
|
|
33
39
|
}
|
|
34
|
-
VoxelModelRuleBuilderRegister.registerGeometry(cube, halfDownCube, halfSouthCube, halfWestCube, quaterCubeSouthNorth, quaterCubeUpDown, quaterCubeWestEast, eighthCube, thinPanelDown, thinPanelSouth, thinPanelWest, diagonalFlatPanelEastWest, diagonalFlatPanelWestEast, fencePost, fenceEastWest, fenceNorthsouth, chainGeometry, carpetGeometry, candlesGeometry1, candlesGeometry2, candlesGeometry3, candlesGeometry4, liquidGeometry, ...leverGeometry, ...(data.geometry || []));
|
|
35
|
-
VoxelModelRuleBuilderRegister.registerModels(simpleCube, orientedCube, simpleHalfCube, pillarCube, simpleThinPannel, stair, simpleCrossedPannel, chainModel, carpetModel, candlesModel, leverModel, fence, liquidModel, ...(data.models || []));
|
|
36
|
-
const syncData = {
|
|
37
|
-
geometryPalette: VoxelModelRuleBuilderRegister.geometryPalette._palette,
|
|
38
|
-
geometry: [],
|
|
39
|
-
models: [],
|
|
40
|
-
voxels: [],
|
|
41
|
-
tagState: [],
|
|
42
|
-
};
|
|
43
40
|
for (const voxel of data.voxels) {
|
|
44
41
|
const voxelData = voxel.properties["dve_model_data"];
|
|
45
42
|
if (!voxelData)
|
|
@@ -50,20 +47,18 @@ function GetModelData(data) {
|
|
|
50
47
|
throw new Error(`Voxel model with id ${voxelData.id} does not exist.`);
|
|
51
48
|
model.voxels.set(voxel.id, voxelData);
|
|
52
49
|
}
|
|
50
|
+
const syncData = {
|
|
51
|
+
geometryPalette: VoxelModelRuleBuilderRegister.geometryPalette._palette,
|
|
52
|
+
...BuildRules(VoxelModelRuleBuilderRegister.geometryPalette),
|
|
53
|
+
geometry: [],
|
|
54
|
+
models: [],
|
|
55
|
+
voxels: [],
|
|
56
|
+
};
|
|
53
57
|
for (const [mainKey, mainGeo] of VoxelModelRuleBuilderRegister.geometry) {
|
|
54
|
-
if (mainGeo.data.ogData.doNotBuildRules) {
|
|
55
|
-
syncData.geometry.push({
|
|
56
|
-
id: mainKey,
|
|
57
|
-
nodes: mainGeo.data.nodes,
|
|
58
|
-
ruleless: true,
|
|
59
|
-
});
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
const output = BuildRules(mainGeo, VoxelModelRuleBuilderRegister.geometryPalette);
|
|
63
58
|
syncData.geometry.push({
|
|
64
59
|
id: mainKey,
|
|
65
|
-
nodes: mainGeo.
|
|
66
|
-
|
|
60
|
+
nodes: mainGeo.compiled,
|
|
61
|
+
cullingProcedure: mainGeo.data.cullingProcedure,
|
|
67
62
|
});
|
|
68
63
|
}
|
|
69
64
|
for (const [mainKey, model] of VoxelModelRuleBuilderRegister.models) {
|
|
@@ -74,7 +69,7 @@ function GetModelData(data) {
|
|
|
74
69
|
id: mainKey,
|
|
75
70
|
effects: stateData.effects,
|
|
76
71
|
schema: stateData.schema,
|
|
77
|
-
geoLinkMap: stateData.geometryLinkStateMap,
|
|
72
|
+
// geoLinkMap: stateData.geometryLinkStateMap,
|
|
78
73
|
stateMap: stateData.statePalette,
|
|
79
74
|
stateGeometryMap: stateData.stateGeometryPalette,
|
|
80
75
|
stateTree: stateData.stateTree,
|
|
@@ -82,7 +77,7 @@ function GetModelData(data) {
|
|
|
82
77
|
condiotnalStatements: stateData.condiotnalStatements,
|
|
83
78
|
condiotnalStateMap: stateData.condiotnalStatePalette,
|
|
84
79
|
condiotnalShapeStateMap: stateData.condiotanlStatePalette,
|
|
85
|
-
|
|
80
|
+
condiotanlGeometryStatePalette: stateData.condiotanlGeometryStatePalette,
|
|
86
81
|
stateRelativeGeometryMap: stateData.stateRelativeGeometryMap,
|
|
87
82
|
relativeGeometryByteIndexMap: stateData.relativeGeometryByteIndexMap,
|
|
88
83
|
condiotnalShapeStateRelativeGeometryMap: stateData.condiotnalShapeStateRelativeGeometryMap,
|
|
@@ -92,15 +87,14 @@ function GetModelData(data) {
|
|
|
92
87
|
BuildGeomtryInputs(geometry);
|
|
93
88
|
} */
|
|
94
89
|
for (const [mainKey, model] of VoxelModelRuleBuilderRegister.models) {
|
|
95
|
-
const { stateVoxelInputs, conditionalShapeStateVoxelInputs
|
|
90
|
+
const { stateVoxelInputs, conditionalShapeStateVoxelInputs } = BuildFinalInputs(model);
|
|
96
91
|
for (const v in stateVoxelInputs) {
|
|
97
92
|
const stateData = model.voxelModData.get(v);
|
|
98
93
|
SchemaRegister.registerVoxel(v, mainKey, stateData.modSchema);
|
|
99
94
|
syncData.voxels.push({
|
|
100
95
|
id: v,
|
|
101
|
-
materialId:
|
|
96
|
+
materialId: VoxelTagsRegister.VoxelTags[VoxelPalettesRegister.voxelIds.getNumberId(v)]["dve_rendered_material"] || "dve_solid",
|
|
102
97
|
modelId: mainKey,
|
|
103
|
-
transparentFaceIndex: transparentVoxelFaceIndexes[v].data,
|
|
104
98
|
modSchema: stateData.modSchema,
|
|
105
99
|
modStateTree: stateData.modStateTree,
|
|
106
100
|
baseGeometryInputMap: stateVoxelInputs[v],
|
|
@@ -108,7 +102,6 @@ function GetModelData(data) {
|
|
|
108
102
|
});
|
|
109
103
|
}
|
|
110
104
|
}
|
|
111
|
-
syncData.tagState = VoxelTagStates.toJSON();
|
|
112
105
|
if (CacheManager.cacheStoreEnabled) {
|
|
113
106
|
CacheManager.cachedModelData = syncData;
|
|
114
107
|
}
|
|
@@ -116,10 +109,10 @@ function GetModelData(data) {
|
|
|
116
109
|
}
|
|
117
110
|
export function InitVoxelData(data) {
|
|
118
111
|
const lightData = new VoxelLightData();
|
|
119
|
-
new VoxelIndex(data.voxels);
|
|
120
112
|
const materials = [
|
|
121
113
|
{ id: "dve_solid", properties: {} },
|
|
122
114
|
{ id: "dve_flora", properties: {} },
|
|
115
|
+
{ id: "dve_flora_transparent", properties: {} },
|
|
123
116
|
{
|
|
124
117
|
id: "dve_transparent",
|
|
125
118
|
properties: {
|
|
@@ -228,7 +221,8 @@ export function InitVoxelData(data) {
|
|
|
228
221
|
},
|
|
229
222
|
...data.voxels,
|
|
230
223
|
];
|
|
231
|
-
|
|
224
|
+
RegisterModels(data);
|
|
225
|
+
const voxelData = BuildTagData({
|
|
232
226
|
voxels,
|
|
233
227
|
voxelsOverrides: {
|
|
234
228
|
[VoxelTagIds.lightValue]: (value) => {
|
|
@@ -244,9 +238,13 @@ export function InitVoxelData(data) {
|
|
|
244
238
|
materials,
|
|
245
239
|
});
|
|
246
240
|
let models = GetModelData(data);
|
|
241
|
+
BuildPaletteData({ models });
|
|
242
|
+
voxelData.data.palette = VoxelPalettesRegister.voxels;
|
|
243
|
+
voxelData.data.record = VoxelPalettesRegister.voxelRecord;
|
|
247
244
|
for (const id in voxelData.data.logic) {
|
|
248
245
|
VoxelLogicRegister.register(id, voxelData.data.logic[id]);
|
|
249
246
|
}
|
|
247
|
+
new VoxelIndex(data.voxels);
|
|
250
248
|
return {
|
|
251
249
|
models,
|
|
252
250
|
...voxelData,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { DataCursorInterface } from "../../Cursor/DataCursor.interface";
|
|
3
|
+
import { VoxelPickResult } from "../VoxelPickResult";
|
|
4
|
+
/**
|
|
5
|
+
* # PickVoxel
|
|
6
|
+
* Used to a pick a voxel from any data cursor interface.
|
|
7
|
+
* The function assumes the data that is loaded into the cursor is available
|
|
8
|
+
*/
|
|
9
|
+
export default function PickVoxel(cursor: DataCursorInterface, rayStart: Vec3Array, rayDirection: Vec3Array, rayLength: number): VoxelPickResult | null;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Vec3ArrayLike, Vector3Like } from "@amodx/math";
|
|
2
|
+
import { VoxelPickResult } from "../VoxelPickResult";
|
|
3
|
+
import { closestUnitNormal, closestVoxelFace, } from "../../../Math/UtilFunctions";
|
|
4
|
+
const step = (val) => (val > 0 ? 1 : val < 0 ? -1 : 0);
|
|
5
|
+
const calculateNormal = (intersectPoint, voxelMin, voxelMax) => {
|
|
6
|
+
const epsilon = 1e-4;
|
|
7
|
+
let normal = [0, 0, 0];
|
|
8
|
+
if (Math.abs(intersectPoint[0] - voxelMin[0]) < epsilon)
|
|
9
|
+
normal = [1, 0, 0];
|
|
10
|
+
else if (Math.abs(intersectPoint[0] - voxelMax[0]) < epsilon)
|
|
11
|
+
normal = [-1, 0, 0];
|
|
12
|
+
else if (Math.abs(intersectPoint[1] - voxelMin[1]) < epsilon)
|
|
13
|
+
normal = [0, 1, 0];
|
|
14
|
+
else if (Math.abs(intersectPoint[1] - voxelMax[1]) < epsilon)
|
|
15
|
+
normal = [0, -1, 0];
|
|
16
|
+
else if (Math.abs(intersectPoint[2] - voxelMin[2]) < epsilon)
|
|
17
|
+
normal = [0, 0, 1];
|
|
18
|
+
else if (Math.abs(intersectPoint[2] - voxelMax[2]) < epsilon)
|
|
19
|
+
normal = [0, 0, -1];
|
|
20
|
+
return normal;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* # PickVoxel
|
|
24
|
+
* Used to a pick a voxel from any data cursor interface.
|
|
25
|
+
* The function assumes the data that is loaded into the cursor is available
|
|
26
|
+
*/
|
|
27
|
+
export default function PickVoxel(cursor, rayStart, rayDirection, rayLength) {
|
|
28
|
+
const invDir = [
|
|
29
|
+
1 / rayDirection[0],
|
|
30
|
+
1 / rayDirection[1],
|
|
31
|
+
1 / rayDirection[2],
|
|
32
|
+
];
|
|
33
|
+
const voxelSize = 1.0;
|
|
34
|
+
const tDelta = [
|
|
35
|
+
Math.abs(invDir[0]) * voxelSize,
|
|
36
|
+
Math.abs(invDir[1]) * voxelSize,
|
|
37
|
+
Math.abs(invDir[2]) * voxelSize,
|
|
38
|
+
];
|
|
39
|
+
const tMax = [
|
|
40
|
+
(Math.floor(rayStart[0]) - rayStart[0] + (rayDirection[0] > 0 ? 1 : 0)) *
|
|
41
|
+
invDir[0],
|
|
42
|
+
(Math.floor(rayStart[1]) - rayStart[1] + (rayDirection[1] > 0 ? 1 : 0)) *
|
|
43
|
+
invDir[1],
|
|
44
|
+
(Math.floor(rayStart[2]) - rayStart[2] + (rayDirection[2] > 0 ? 1 : 0)) *
|
|
45
|
+
invDir[2],
|
|
46
|
+
];
|
|
47
|
+
const pos = [
|
|
48
|
+
Math.floor(rayStart[0]),
|
|
49
|
+
Math.floor(rayStart[1]),
|
|
50
|
+
Math.floor(rayStart[2]),
|
|
51
|
+
];
|
|
52
|
+
const stepDir = [
|
|
53
|
+
step(rayDirection[0]),
|
|
54
|
+
step(rayDirection[1]),
|
|
55
|
+
step(rayDirection[2]),
|
|
56
|
+
];
|
|
57
|
+
for (let i = 0; i < rayLength; i++) {
|
|
58
|
+
const [tx, ty, tz] = tMax;
|
|
59
|
+
let axis = 0;
|
|
60
|
+
if (tx < ty) {
|
|
61
|
+
if (tx < tz)
|
|
62
|
+
axis = 0;
|
|
63
|
+
else
|
|
64
|
+
axis = 2;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
if (ty < tz)
|
|
68
|
+
axis = 1;
|
|
69
|
+
else
|
|
70
|
+
axis = 2;
|
|
71
|
+
}
|
|
72
|
+
pos[axis] += stepDir[axis];
|
|
73
|
+
tMax[axis] += tDelta[axis];
|
|
74
|
+
if (!cursor.inBounds(...pos))
|
|
75
|
+
continue;
|
|
76
|
+
const voxel = cursor.getVoxel(...pos);
|
|
77
|
+
if (voxel && voxel.isRenderable()) {
|
|
78
|
+
const normal = calculateNormal([
|
|
79
|
+
rayStart[0] + rayDirection[0] * tMax[axis],
|
|
80
|
+
rayStart[1] + rayDirection[1] * tMax[axis],
|
|
81
|
+
rayStart[2] + rayDirection[2] * tMax[axis],
|
|
82
|
+
], [pos[0] * voxelSize, pos[1] * voxelSize, pos[2] * voxelSize], [
|
|
83
|
+
pos[0] * voxelSize + voxelSize,
|
|
84
|
+
pos[1] * voxelSize + voxelSize,
|
|
85
|
+
pos[2] * voxelSize + voxelSize,
|
|
86
|
+
]);
|
|
87
|
+
const rd = Vector3Like.Create(...rayDirection);
|
|
88
|
+
const urd = Vector3Like.FromArray(closestUnitNormal(rd));
|
|
89
|
+
const n = Vector3Like.Create(...normal);
|
|
90
|
+
const un = Vector3Like.FromArray(closestUnitNormal(n));
|
|
91
|
+
return new VoxelPickResult(Vector3Like.Create(...rayStart), rd, rayLength, voxel.getRaw(), Vector3Like.Create(...pos), n, tMax[axis], Vector3Like.Create(...Vec3ArrayLike.Add(pos, normal)), Vector3Like.FromArray(closestUnitNormal(rd)), closestVoxelFace(urd), Vector3Like.FromArray(closestUnitNormal(n)), closestVoxelFace(un), 0);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { WorldCursor } from "../../../World";
|
|
3
|
+
/**# PickVoxelWorld
|
|
4
|
+
* Will pick the voxel world and make sure each sector is available before picking it.
|
|
5
|
+
*
|
|
6
|
+
* Useful if the engine is not using shared memory.
|
|
7
|
+
*/
|
|
8
|
+
export default function PickVoxelWorld(cursor: WorldCursor, rayStart: Vec3Array, rayDirection: Vec3Array, rayLength: number): Promise<import("../VoxelPickResult").VoxelPickResult | null>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Vector3Like } from "@amodx/math";
|
|
2
|
+
import PickVoxel from "./PickVoxel";
|
|
3
|
+
import { WorldSpaces } from "../../../World/WorldSpaces";
|
|
4
|
+
import { WorldRegister } from "../../../World/WorldRegister";
|
|
5
|
+
import { SectorCursor } from "../../../World/Cursor/SectorCursor";
|
|
6
|
+
/**# PickVoxelWorld
|
|
7
|
+
* Will pick the voxel world and make sure each sector is available before picking it.
|
|
8
|
+
*
|
|
9
|
+
* Useful if the engine is not using shared memory.
|
|
10
|
+
*/
|
|
11
|
+
export default async function PickVoxelWorld(cursor, rayStart, rayDirection, rayLength) {
|
|
12
|
+
let t = 0;
|
|
13
|
+
const d = 8;
|
|
14
|
+
const rayPosition = Vector3Like.Create();
|
|
15
|
+
const visited = new Set();
|
|
16
|
+
const sectorCursor = new SectorCursor();
|
|
17
|
+
while (t < rayLength) {
|
|
18
|
+
rayPosition.x = rayStart[0] + t * rayDirection[0];
|
|
19
|
+
rayPosition.y = rayStart[1] + t * rayDirection[1];
|
|
20
|
+
rayPosition.z = rayStart[2] + t * rayDirection[2];
|
|
21
|
+
t += d;
|
|
22
|
+
const { x, y, z } = WorldSpaces.sector.transformPosition(rayPosition);
|
|
23
|
+
if (!WorldSpaces.world.inBounds(x, y, z))
|
|
24
|
+
continue;
|
|
25
|
+
const sector = WorldRegister.sectors.get(cursor.dimension, x, y, z);
|
|
26
|
+
if (!sector)
|
|
27
|
+
continue;
|
|
28
|
+
if (visited.has(sector))
|
|
29
|
+
continue;
|
|
30
|
+
visited.add(sector);
|
|
31
|
+
await sector.waitTillCheckedIn();
|
|
32
|
+
sectorCursor.loadSector(cursor.dimension, x, y, z);
|
|
33
|
+
const result = PickVoxel(sectorCursor, rayStart, rayDirection, rayLength);
|
|
34
|
+
if (result !== null)
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VoxelFaceNames } from "../../../Math";
|
|
2
|
+
import { VoxelPlacingStrategyData } from "./VoxelPlacingStrategy.types";
|
|
3
|
+
import { VoxelPickResult } from "../VoxelPickResult";
|
|
4
|
+
export declare class VoxelModelPlacingStrategy {
|
|
5
|
+
_faceMap: Map<VoxelFaceNames, VoxelPlacingStrategyData[]>;
|
|
6
|
+
_defaultState: string;
|
|
7
|
+
constructor(data: VoxelPlacingStrategyData[] | string);
|
|
8
|
+
getState(picked: VoxelPickResult, alt?: number | null): string | null;
|
|
9
|
+
}
|