@divinevoxel/vlox 0.0.77 → 0.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Builder/Tools/Wrench/WrenchTool.js +26 -21
- package/Builder/VoxelBuildSpace.d.ts +2 -2
- package/Builder/VoxelBuildSpace.js +4 -4
- package/Builder/World/InitTasks.js +1 -1
- package/Cache/Cache.types.d.ts +0 -4
- package/Cache/CacheManager.d.ts +1 -2
- package/Cache/CacheManager.js +0 -2
- package/Contexts/Base/Main/InitDataGenerator.js +10 -2
- package/Contexts/Base/Remote/DataSync.types.d.ts +10 -4
- package/Contexts/Base/Remote/InitDataSync.js +10 -20
- package/Init/StartMesher.js +2 -1
- package/Init/StartRenderer.js +2 -1
- package/Mesher/{Geomtry → Geometry}/Geometry.types.d.ts +1 -0
- package/Mesher/InitMesher.d.ts +1 -2
- package/Mesher/InitMesher.js +7 -14
- package/Mesher/Items/{Geomtry → Geometry}/ItemGeometryBuilder.d.ts +2 -2
- package/Mesher/Items/{Geomtry → Geometry}/ItemGeometryBuilder.js +1 -1
- package/Mesher/Items/MeshTexture.d.ts +2 -1
- package/Mesher/Items/MeshTexture.js +7 -6
- package/Mesher/Items/MeshTextureO.js +1 -1
- package/Mesher/Items/Models/ItemModelBuilder.d.ts +1 -1
- package/Mesher/Items/Models/ItemModelBuilder.js +2 -2
- package/Mesher/Voxels/Base/CompactTemplateMesh.js +1 -1
- package/Mesher/Voxels/Base/CompactVoxelSectionMesh.js +2 -2
- package/Mesher/Voxels/Base/MeshSectionBase.js +1 -3
- package/Mesher/Voxels/{Geomtry → Geometry}/CompactedSectionVoxelMesh.js +3 -3
- package/Mesher/Voxels/{Geomtry → Geometry}/VoxelGeometryBuilder.d.ts +2 -2
- package/Mesher/Voxels/{Geomtry → Geometry}/VoxelGeometryBuilder.js +1 -1
- package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHBuilder.js +1 -1
- package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHStructCursor.d.ts +1 -1
- package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHStructCursor.js +1 -1
- package/Mesher/Voxels/MeshTemplate.js +0 -3
- package/Mesher/Voxels/MeshVoxel.js +0 -2
- package/Mesher/Voxels/Models/Common/Calc/CalcConstants.d.ts +1 -1
- package/Mesher/Voxels/Models/Common/Calc/CalcConstants.js +2 -2
- package/Mesher/Voxels/Models/Common/Calc/FaceDataCalc.js +4 -1
- package/Mesher/Voxels/Models/Common/Faces/CullRulledFace.js +29 -18
- package/Mesher/Voxels/Models/Common/Faces/ShadeRulelessFace.d.ts +1 -1
- package/Mesher/Voxels/Models/Common/Faces/ShadeRulledFace.d.ts +1 -1
- package/Mesher/Voxels/Models/Common/Faces/ShadeRulledFace.js +31 -21
- package/Mesher/Voxels/Models/Common/GetTexture.d.ts +4 -4
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +1 -1
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/FlowGradient.js +1 -1
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/{LiquidGeomtryNode.d.ts → LiquidGeometryNode.d.ts} +2 -2
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/{LiquidGeomtryNode.js → LiquidGeometryNode.js} +5 -5
- package/Mesher/Voxels/Models/Nodes/Default/QuadVoxelGeometryNode.d.ts +3 -3
- package/Mesher/Voxels/Models/Nodes/Default/QuadVoxelGeometryNode.js +2 -2
- package/Mesher/Voxels/Models/Nodes/Default/TriangleVoxelGeometryNode.d.ts +3 -3
- package/Mesher/Voxels/Models/Nodes/Default/TriangleVoxelGeometryNode.js +2 -2
- package/Mesher/Voxels/Models/Nodes/GeometryNode.d.ts +3 -3
- package/Mesher/Voxels/Models/Nodes/GeometryNode.js +3 -3
- package/Mesher/Voxels/Models/Nodes/Types/GeometryNode.types.d.ts +7 -0
- package/Mesher/Voxels/Models/Nodes/Types/QuadVoxelGometryNodeTypes.d.ts +3 -3
- package/Mesher/Voxels/Models/Nodes/Types/TriangleVoxelGometryNodeTypes.d.ts +2 -2
- package/Mesher/Voxels/Models/Nodes/VoxelGeometryConstructor.d.ts +2 -3
- package/Mesher/Voxels/Models/Nodes/VoxelGeometryConstructor.js +6 -5
- package/Mesher/Voxels/Models/Procedures/Default/ConsistentRotationTextureProcedure.d.ts +4 -4
- package/Mesher/Voxels/Models/Procedures/Default/OutlinedTextureProcedure.d.ts +4 -4
- package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.d.ts +4 -4
- package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.js +20 -6
- package/Mesher/Voxels/Models/Procedures/TextureProcedure.d.ts +2 -2
- package/Mesher/Voxels/Models/VoxelConstructor.d.ts +1 -16
- package/Mesher/Voxels/Models/VoxelConstructor.js +50 -56
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.d.ts +3 -6
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.js +40 -44
- package/Mesher/Voxels/Models/VoxelModelBuilder.d.ts +4 -4
- package/Mesher/Voxels/Models/VoxelModelBuilder.js +4 -4
- package/Mesher/Voxels/Models/VoxelModelConstructorRegister.d.ts +1 -14
- package/Mesher/Voxels/Models/VoxelModelConstructorRegister.js +7 -21
- package/Mesher/Voxels/Models/VoxelModelEffect.d.ts +1 -7
- package/Mesher/Voxels/Models/VoxelModelEffect.js +23 -26
- package/Renderer/Classes/DVESectionMeshes.d.ts +1 -1
- package/Renderer/MeshManager.js +1 -1
- package/Settings/EngineSettings.types.d.ts +2 -1
- package/Settings/EngineSettings.types.js +1 -0
- package/Stats/EngineStats.d.ts +5 -3
- package/Stats/EngineStats.js +8 -6
- package/Templates/Archive/ArchivedVoxelTemplate.d.ts +1 -1
- package/Templates/Archive/ArchivedVoxelTemplate.js +5 -5
- package/Templates/Archive/Functions/CreateArchivedTemplate.d.ts +1 -1
- package/Templates/Archive/Functions/CreateArchivedTemplate.js +2 -2
- package/Templates/Cursor/TemplateCursor.d.ts +1 -1
- package/Templates/Cursor/TemplateCursor.js +1 -1
- package/Templates/Full/FullVoxelTemplate.d.ts +1 -1
- package/Templates/Full/FullVoxelTemplate.js +1 -1
- package/Templates/Full/Functions/CreateFullTemplate.d.ts +1 -1
- package/Templates/Selection/VoxelBFSSelection.d.ts +1 -1
- package/Templates/Selection/VoxelBFSSelection.js +1 -1
- package/Templates/Selection/VoxelBoundsSelection.d.ts +1 -1
- package/Templates/Selection/VoxelBoundsSelection.js +1 -1
- package/Templates/Selection/VoxelPointSelection.d.ts +1 -1
- package/Templates/Selection/VoxelPointSelection.js +1 -1
- package/Templates/Selection/VoxelSelection.d.ts +1 -1
- package/Templates/Selection/VoxelSurfaceSelection.d.ts +1 -1
- package/Templates/Selection/VoxelSurfaceSelection.js +1 -1
- package/Templates/Selection/VoxelTemplateSelection.d.ts +1 -1
- package/Templates/Selection/VoxelTemplateSelection.js +1 -1
- package/Templates/Shapes/Selections/BoxVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/BoxVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/ConeVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/ConeVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/SphereVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/SphereVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/Selections/TorusVoxelShapeSelection.d.ts +1 -1
- package/Templates/Shapes/Selections/TorusVoxelShapeSelection.js +1 -1
- package/Templates/Shapes/VoxelShapeTemplate.d.ts +1 -1
- package/Templates/Shapes/VoxelShapeTemplate.js +1 -1
- package/Templates/VoxelTemplates.types.d.ts +1 -1
- package/Textures/Functions/BuildTextureData.js +4 -52
- package/Tools/Brush/Brush.js +5 -5
- package/Util/StringPalette.js +2 -0
- package/Voxels/Archive/VoxelPaletteArchiveReader.js +7 -6
- package/Voxels/Archive/VoxelPaletteArechive.js +8 -8
- package/Voxels/Cursor/DataCursor.interface.d.ts +1 -1
- package/Voxels/Cursor/VoxelCursor.interface.d.ts +0 -2
- package/Voxels/Cursor/VoxelCursor.interface.js +14 -16
- package/Voxels/Cursor/VoxelCursor.js +5 -5
- package/Voxels/Data/GeometryLUT.d.ts +32 -0
- package/Voxels/Data/GeometryLUT.js +50 -0
- package/Voxels/Data/VoxelLUT.d.ts +83 -0
- package/Voxels/Data/VoxelLUT.js +119 -0
- package/Voxels/Data/VoxelTagsRegister.d.ts +2 -2
- package/Voxels/Data/VoxelTagsRegister.js +2 -2
- package/Voxels/Functions/BuildLUTs.d.ts +6 -0
- package/Voxels/Functions/BuildLUTs.js +361 -0
- package/Voxels/Functions/BuildTagData.d.ts +4 -2
- package/Voxels/Functions/BuildTagData.js +15 -32
- package/Voxels/Functions/Geometry/BuildGeometryLUT.d.ts +11 -0
- package/Voxels/Functions/Geometry/BuildGeometryLUT.js +395 -0
- package/Voxels/{Models/Rules/Functions/Compile/Nodes → Functions/Geometry}/CalcFunctions.d.ts +3 -3
- package/Voxels/{Models/Rules/Functions/Compile/Nodes → Functions/Geometry}/CalcFunctions.js +2 -2
- package/Voxels/Functions/Geometry/Compile/BuildCompiled.d.ts +4 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiled.js +25 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledBox.d.ts +4 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledBox.js +13 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledQuad.d.ts +4 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledQuad.js +41 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledTri.d.ts +4 -0
- package/Voxels/Functions/Geometry/Compile/BuildCompiledTri.js +44 -0
- package/Voxels/Functions/Geometry/GeometryLUT.types.d.ts +7 -0
- package/Voxels/Functions/Geometry/Inputs/BaseFunctions.d.ts +4 -0
- package/Voxels/Functions/Geometry/Inputs/BaseFunctions.js +28 -0
- package/Voxels/Functions/Geometry/Inputs/BuildBoxInputs.d.ts +5 -0
- package/Voxels/Functions/Geometry/Inputs/BuildBoxInputs.js +8 -0
- package/Voxels/Functions/Geometry/Inputs/BuildCustomInputs.d.ts +5 -0
- package/Voxels/Functions/Geometry/Inputs/BuildCustomInputs.js +41 -0
- package/Voxels/Functions/Geometry/Inputs/BuildQuadInputs.d.ts +5 -0
- package/Voxels/Functions/Geometry/Inputs/BuildQuadInputs.js +103 -0
- package/Voxels/Functions/Geometry/Inputs/BuildTriangleInputs.d.ts +5 -0
- package/Voxels/Functions/Geometry/Inputs/BuildTriangleInputs.js +101 -0
- package/Voxels/Functions/Geometry/Inputs/BuldInputs.d.ts +4 -0
- package/Voxels/Functions/Geometry/Inputs/BuldInputs.js +22 -0
- package/Voxels/Functions/Geometry/Rules/BuildRules.d.ts +1 -0
- package/Voxels/{Models/Rules/Functions → Functions/Geometry/Rules}/BuildRules.js +23 -23
- package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFaceRegister.d.ts +2 -2
- package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionQuadFace.js +1 -1
- package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionTriangleFace.js +1 -1
- package/Voxels/{Models/Indexing → Geometry}/AOOcclusionFaceIndex.d.ts +2 -2
- package/Voxels/Geometry/AOOcclusionFaceIndex.js +28 -0
- package/Voxels/{Models/Indexing → Geometry}/CulledOcclusionFaceIndex.d.ts +2 -2
- package/Voxels/Geometry/CulledOcclusionFaceIndex.js +27 -0
- package/Voxels/Geometry/VoxelGeometry.types.d.ts +105 -0
- package/Voxels/Geometry/VoxelGeometry.types.js +1 -0
- package/Voxels/Indexes/VoxelIndex.js +15 -21
- package/Voxels/InitVoxelData.d.ts +4 -3
- package/Voxels/InitVoxelData.js +53 -110
- package/Voxels/Interaction/Functions/PickVoxel.js +1 -1
- package/Voxels/Logic/Classes/Types/VoxelLogicStateType.js +2 -2
- package/Voxels/Logic/Classes/VoxelLogic.d.ts +2 -2
- package/Voxels/Logic/Classes/VoxelLogic.js +2 -2
- package/Voxels/Logic/VoxelLogicRegister.js +2 -2
- package/Voxels/Models/Defaults/CubeVoxelGeometry.d.ts +1 -1
- package/Voxels/Models/Defaults/CubeVoxelModels.d.ts +1 -0
- package/Voxels/Models/Defaults/CubeVoxelModels.js +45 -0
- package/Voxels/Models/Defaults/Examples.d.ts +2 -1
- package/Voxels/Models/Defaults/Examples.js +28 -28
- package/Voxels/Models/Defaults/FarmVoxelModels.d.ts +3 -2
- package/Voxels/Models/Defaults/FarmVoxelModels.js +3 -3
- package/Voxels/Models/Defaults/LiquidVoxelModel.d.ts +2 -1
- package/Voxels/Models/Defaults/PanelVoxelGeometry.d.ts +1 -1
- package/Voxels/Models/VoxelModel.types.d.ts +2 -109
- package/Voxels/State/{Schema → Reltional}/Conditions/SameVoxelConditions.d.ts +2 -2
- package/Voxels/State/Reltional/Conditions/SameVoxelConditions.js +19 -0
- package/Voxels/State/Reltional/Conditions/ShapeStateSchemaRelationsCondition.d.ts +6 -0
- package/Voxels/State/Reltional/Conditions/ShapeStateSchemaRelationsCondition.js +6 -0
- package/Voxels/State/Reltional/ReltionalStateBuilder.d.ts +18 -0
- package/Voxels/State/Reltional/ReltionalStateBuilder.js +42 -0
- package/Voxels/State/Schema/BinarySchema.d.ts +1 -0
- package/Voxels/State/Schema/BinarySchema.js +3 -0
- package/Voxels/State/State.types.d.ts +0 -25
- package/Voxels/State/State.types.js +1 -22
- package/Voxels/State/VoxelSchemas.d.ts +22 -0
- package/Voxels/State/VoxelSchemas.js +60 -0
- package/Voxels/Types/PaintVoxelData.js +55 -45
- package/Voxels/Types/VoxelModelCompiledData.types.d.ts +4 -22
- package/World/Archive/Classes/ImportedSection.js +8 -8
- package/World/Archive/Functions/Sector/ArchiveSector.js +3 -3
- package/World/Cursor/SectionCursor.d.ts +1 -1
- package/World/Cursor/SectionCursor.js +1 -1
- package/World/Cursor/SectorCursor.d.ts +1 -1
- package/World/Cursor/SectorCursor.js +1 -1
- package/World/Cursor/WorldCursor.d.ts +1 -1
- package/World/Cursor/WorldCursor.js +1 -1
- package/World/Lock/Function/LockSectors.d.ts +1 -1
- package/World/Lock/Function/UnLockSectors.d.ts +1 -1
- package/World/SnapShot/SectionSnapShotCursor.d.ts +1 -1
- package/World/SnapShot/SectionSnapShotCursor.js +1 -1
- package/World/SnapShot/SnapShots.d.ts +1 -1
- package/World/SnapShot/SnapShots.js +1 -1
- package/WorldSimulation/Dimensions/SimulationSector.d.ts +1 -1
- package/WorldSimulation/Dimensions/SimulationSector.js +2 -2
- package/WorldSimulation/Tools/SimulationBrush.js +9 -9
- package/WorldSimulation/Voxels/Behaviors/Types/CropVoxelBehavior.js +4 -2
- package/WorldSimulation/Voxels/Behaviors/Types/FarmlandVoxelBehavior.js +5 -2
- package/WorldSimulation/WorldSimulation.d.ts +1 -0
- package/WorldSimulation/WorldSimulation.js +2 -1
- package/package.json +1 -1
- package/Mesher/Voxels/Models/Nodes/Types/GeomtryNode.types.d.ts +0 -7
- package/Voxels/Data/VoxelPalettesRegister.d.ts +0 -18
- package/Voxels/Data/VoxelPalettesRegister.js +0 -24
- package/Voxels/Functions/BuildPaletteData.d.ts +0 -6
- package/Voxels/Functions/BuildPaletteData.js +0 -87
- package/Voxels/Functions/BuildStateData.d.ts +0 -23
- package/Voxels/Functions/BuildStateData.js +0 -327
- package/Voxels/Models/CompiledVoxelModel.types.d.ts +0 -46
- package/Voxels/Models/Indexing/AOOcclusionFaceIndex.js +0 -28
- package/Voxels/Models/Indexing/CulledOcclusionFaceIndex.js +0 -27
- package/Voxels/Models/Rules/Classes/GeomtryInput.d.ts +0 -16
- package/Voxels/Models/Rules/Classes/GeomtryInput.js +0 -85
- package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.d.ts +0 -22
- package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.js +0 -15
- package/Voxels/Models/Rules/Classes/VoxelRulesModel.d.ts +0 -19
- package/Voxels/Models/Rules/Classes/VoxelRulesModel.js +0 -29
- package/Voxels/Models/Rules/Functions/BuildFinalInputs.d.ts +0 -5
- package/Voxels/Models/Rules/Functions/BuildFinalInputs.js +0 -87
- package/Voxels/Models/Rules/Functions/BuildRules.d.ts +0 -7
- package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.d.ts +0 -4
- package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.js +0 -39
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.d.ts +0 -5
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.js +0 -14
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.d.ts +0 -6
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.js +0 -92
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.d.ts +0 -6
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.js +0 -115
- package/Voxels/Models/Rules/VoxelModelRuleBuilderRegister.d.ts +0 -18
- package/Voxels/Models/Rules/VoxelModelRuleBuilderRegister.js +0 -202
- package/Voxels/State/CondiotnalTreeReader.d.ts +0 -10
- package/Voxels/State/CondiotnalTreeReader.js +0 -23
- package/Voxels/State/LogicStatementReader.d.ts +0 -9
- package/Voxels/State/LogicStatementReader.js +0 -50
- package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +0 -19
- package/Voxels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +0 -6
- package/Voxels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +0 -6
- package/Voxels/State/Schema/ShapeStateRelationsNode.d.ts +0 -10
- package/Voxels/State/Schema/ShapeStateRelationsNode.js +0 -26
- package/Voxels/State/Schema/StateSchema.d.ts +0 -13
- package/Voxels/State/Schema/StateSchema.js +0 -17
- package/Voxels/State/Schema/VoxelSchema.d.ts +0 -7
- package/Voxels/State/Schema/VoxelSchema.js +0 -10
- package/Voxels/State/SchemaRegister.d.ts +0 -18
- package/Voxels/State/SchemaRegister.js +0 -76
- package/Voxels/State/StateTreeReader.d.ts +0 -9
- package/Voxels/State/StateTreeReader.js +0 -37
- /package/Mesher/{Geomtry → Geometry}/Functions/GetBounds.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Functions/GetBounds.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Geometry.types.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/Quad.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/Quad.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/QuadVertexData.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/QuadVertexData.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/Triangle.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/Triangle.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/TriangleVertexData.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/TriangleVertexData.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/index.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Primitives/index.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMesh.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMesh.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMeshBuffer.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Proto/ProtoMeshBuffer.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Shapes/Box.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Shapes/Box.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformBox.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformBox.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformQuad.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformQuad.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformTriangle.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/Transform/TransformTriangle.js +0 -0
- /package/Mesher/{Geomtry → Geometry}/index.d.ts +0 -0
- /package/Mesher/{Geomtry → Geometry}/index.js +0 -0
- /package/Mesher/Items/{Geomtry → Geometry}/ItemMeshVertexStructCursor.d.ts +0 -0
- /package/Mesher/Items/{Geomtry → Geometry}/ItemMeshVertexStructCursor.js +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/CompactedSectionVoxelMesh.d.ts +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshBVHBuilder.d.ts +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshVertexStructCursor.d.ts +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelMeshVertexStructCursor.js +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelShaderData.d.ts +0 -0
- /package/Mesher/Voxels/{Geomtry → Geometry}/VoxelShaderData.js +0 -0
- /package/Mesher/Voxels/Models/Nodes/Types/{GeomtryNode.types.js → GeometryNode.types.js} +0 -0
- /package/Voxels/{Models/CompiledVoxelModel.types.js → Functions/Geometry/GeometryLUT.types.js} +0 -0
- /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFace.d.ts +0 -0
- /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFace.js +0 -0
- /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionFaceRegister.js +0 -0
- /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionQuadFace.d.ts +0 -0
- /package/Voxels/{Models/Rules/Classes → Functions/Geometry/Rules}/OcclusionTriangleFace.d.ts +0 -0
- /package/Voxels/{Models/Indexing → Geometry}/VoxelRelativeCubeIndex.d.ts +0 -0
- /package/Voxels/{Models/Indexing → Geometry}/VoxelRelativeCubeIndex.js +0 -0
|
@@ -6,7 +6,7 @@ import { getBaseData, lightSegments, lightSemgnetGet } from "../Shared/index";
|
|
|
6
6
|
import { ProcessedSection, SectorPalette } from "../../Classes/ArchiveClasses";
|
|
7
7
|
import { CreateArchivedSection } from "./CreateArchivedSection";
|
|
8
8
|
import { RemoveDuplicateSections } from "./RemoveDuplicateSections";
|
|
9
|
-
import {
|
|
9
|
+
import { VoxelLUT } from "../../../../Voxels/Data/VoxelLUT";
|
|
10
10
|
const lightData = new VoxelLightData();
|
|
11
11
|
export default function ArchiveSector(archiveData) {
|
|
12
12
|
const sector = WorldRegister.sectors.get(archiveData.location[0], archiveData.location[1], archiveData.location[2], archiveData.location[3]);
|
|
@@ -34,7 +34,7 @@ export default function ArchiveSector(archiveData) {
|
|
|
34
34
|
if (!processedSection.palettes.voxels.isRegistered(voxelId))
|
|
35
35
|
processedSection.palettes.voxels.register(voxelId);
|
|
36
36
|
let voxelSecondary = 0;
|
|
37
|
-
if (VoxelTagsRegister.VoxelTags[
|
|
37
|
+
if (VoxelTagsRegister.VoxelTags[VoxelLUT.voxels[section.ids[i]][0]]["dve_can_have_secondary"]) {
|
|
38
38
|
voxelSecondary = sectorPalettes.voxels.register(section.secondary[i]);
|
|
39
39
|
if (!processedSection.palettes.secondaryVoxels.isRegistered(voxelSecondary))
|
|
40
40
|
processedSection.palettes.secondaryVoxels.register(voxelSecondary);
|
|
@@ -140,7 +140,7 @@ export default function ArchiveSector(archiveData) {
|
|
|
140
140
|
const length = archivedSection.original.ids.length;
|
|
141
141
|
for (let i = 0; i < length; i++) {
|
|
142
142
|
let secondary = false;
|
|
143
|
-
if (VoxelTagsRegister.VoxelTags[
|
|
143
|
+
if (VoxelTagsRegister.VoxelTags[VoxelLUT.voxels[archivedSection.original.ids[i]][0]]["dve_can_have_secondary"] &&
|
|
144
144
|
archivedSection.original.secondary[i] !== 0) {
|
|
145
145
|
secondary = true;
|
|
146
146
|
}
|
|
@@ -3,7 +3,7 @@ import { Vector3Like } from "@amodx/math";
|
|
|
3
3
|
import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
|
|
4
4
|
import { WorldSectionCursorInterface } from "./WorldSectionCursor.interface";
|
|
5
5
|
import type { Section } from "../Section/index";
|
|
6
|
-
import { BoundingBox } from "@amodx/math/
|
|
6
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
7
7
|
export declare class SectionCursor implements WorldSectionCursorInterface, DataCursorInterface {
|
|
8
8
|
_section: Section | null;
|
|
9
9
|
private voxel;
|
|
@@ -2,7 +2,7 @@ import { WorldRegister } from "../WorldRegister";
|
|
|
2
2
|
import { WorldVoxelCursor } from "./WorldVoxelCursor";
|
|
3
3
|
import { WorldSpaces } from "../WorldSpaces";
|
|
4
4
|
import { Vector3Like } from "@amodx/math";
|
|
5
|
-
import { BoundingBox } from "@amodx/math/
|
|
5
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
6
6
|
const point = Vector3Like.Create();
|
|
7
7
|
export class SectionCursor {
|
|
8
8
|
_section;
|
|
@@ -4,7 +4,7 @@ import { WorldVoxelCursor } from "./WorldVoxelCursor";
|
|
|
4
4
|
import { Vector3Like } from "@amodx/math";
|
|
5
5
|
import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
|
|
6
6
|
import { WorldSectionCursorInterface } from "./WorldSectionCursor.interface";
|
|
7
|
-
import { BoundingBox } from "@amodx/math/
|
|
7
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
8
8
|
export declare class SectorCursor implements DataCursorInterface, WorldSectionCursorInterface {
|
|
9
9
|
_current: Sector | null;
|
|
10
10
|
_section: Section | null;
|
|
@@ -2,7 +2,7 @@ import { WorldRegister } from "../WorldRegister";
|
|
|
2
2
|
import { WorldVoxelCursor } from "./WorldVoxelCursor";
|
|
3
3
|
import { WorldSpaces } from "../WorldSpaces";
|
|
4
4
|
import { Vector3Like } from "@amodx/math";
|
|
5
|
-
import { BoundingBox } from "@amodx/math/
|
|
5
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
6
6
|
const point = Vector3Like.Create();
|
|
7
7
|
export class SectorCursor {
|
|
8
8
|
_current = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector3Like } from "@amodx/math";
|
|
2
2
|
import { SectorCursor } from "./SectorCursor";
|
|
3
3
|
import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
|
|
4
|
-
import { BoundingBox } from "@amodx/math/
|
|
4
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
5
5
|
export declare class WorldCursor implements DataCursorInterface {
|
|
6
6
|
volumeBounds: BoundingBox;
|
|
7
7
|
sectorCursors: Record<number, Record<number, SectorCursor | null>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector3Like } from "@amodx/math";
|
|
2
2
|
import { SectorCursor } from "./SectorCursor";
|
|
3
3
|
import { WorldSpaces } from "../WorldSpaces";
|
|
4
|
-
import { BoundingBox } from "@amodx/math/
|
|
4
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
5
5
|
let cursorCache = [];
|
|
6
6
|
const tempPosition = Vector3Like.Create();
|
|
7
7
|
export class WorldCursor {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BoundsInterface } from "@amodx/math/
|
|
1
|
+
import { BoundsInterface } from "@amodx/math/Geometry/Bounds/BoundsInterface";
|
|
2
2
|
export default function LockSectors(dimension: number, bounds: BoundsInterface): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BoundsInterface } from "@amodx/math/
|
|
1
|
+
import { BoundsInterface } from "@amodx/math/Geometry/Bounds/BoundsInterface";
|
|
2
2
|
export default function UnLockSectors(dimension: number, bounds: BoundsInterface): Promise<void>;
|
|
@@ -4,7 +4,7 @@ import { SectionSnapShot } from "./SectionSnapShot";
|
|
|
4
4
|
import { Sector } from "../Sector";
|
|
5
5
|
import { SectorCursor } from "../Cursor/SectorCursor";
|
|
6
6
|
import { SectionCursor } from "../Cursor/SectionCursor";
|
|
7
|
-
import { BoundingBox } from "@amodx/math/
|
|
7
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
8
8
|
export declare class SectionSnapshotCursor implements DataCursorInterface {
|
|
9
9
|
origin: Vector3Like;
|
|
10
10
|
sectorOrigin: Vector3Like;
|
|
@@ -3,7 +3,7 @@ import { WorldSpaces } from "../WorldSpaces";
|
|
|
3
3
|
import { Sector } from "../Sector";
|
|
4
4
|
import { SectorCursor } from "../Cursor/SectorCursor";
|
|
5
5
|
import { SectionCursor } from "../Cursor/SectionCursor";
|
|
6
|
-
import { BoundingBox } from "@amodx/math/
|
|
6
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
7
7
|
const tempPosition = Vector3Like.Create();
|
|
8
8
|
export class SectionSnapshotCursor {
|
|
9
9
|
origin = Vector3Like.Create();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocationData } from "../../Math";
|
|
2
2
|
import { SectionSnapShot } from "./SectionSnapShot";
|
|
3
|
-
import { BoundingBox } from "@amodx/math/
|
|
3
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
4
4
|
export declare class SnapShots {
|
|
5
5
|
static _readyCache: SectionSnapShot[];
|
|
6
6
|
static _pendingCache: SectionSnapShot[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SectionSnapShot } from "./SectionSnapShot";
|
|
2
|
-
import { BoundingBox } from "@amodx/math/
|
|
2
|
+
import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox";
|
|
3
3
|
import { WorldSpaces } from "../WorldSpaces";
|
|
4
4
|
import { Vector3Like } from "@amodx/math";
|
|
5
5
|
export class SnapShots {
|
|
@@ -94,7 +94,7 @@ export class SimulationSector {
|
|
|
94
94
|
...this.position,
|
|
95
95
|
]);
|
|
96
96
|
}
|
|
97
|
-
tickUpdate() {
|
|
97
|
+
tickUpdate(doTickUpdate = true) {
|
|
98
98
|
if (!this.fullNeighbors)
|
|
99
99
|
return false;
|
|
100
100
|
if (this.sector?.isCheckedOut()) {
|
|
@@ -118,7 +118,7 @@ export class SimulationSector {
|
|
|
118
118
|
}
|
|
119
119
|
this._rendered = true;
|
|
120
120
|
}
|
|
121
|
-
if (this.ticking) {
|
|
121
|
+
if (this.ticking && doTickUpdate) {
|
|
122
122
|
this.dimension.simulation.setOrigin(...this.position);
|
|
123
123
|
this.dimension.simulation.bounds.start(this.dimension.id);
|
|
124
124
|
this.tickQueue.run();
|
|
@@ -2,7 +2,7 @@ import { BrushTool } from "../../Tools/Brush/Brush";
|
|
|
2
2
|
import { WorldSimulationTools } from "../Internal/WorldSimulationTools";
|
|
3
3
|
import { VoxelBehaviorsRegister } from "../Voxels/Behaviors";
|
|
4
4
|
import { VoxelTagsRegister } from "../../Voxels/Data/VoxelTagsRegister";
|
|
5
|
-
import {
|
|
5
|
+
import { VoxelLUT } from "../../Voxels/Data/VoxelLUT";
|
|
6
6
|
import { PaintVoxel } from "../../Tasks/Paint/Paint/PaintVoxel";
|
|
7
7
|
import PaintVoxelTemplate from "../../Tasks/Paint/Paint/PaintVoxelTemplate";
|
|
8
8
|
import PaintVoxelPath from "../../Tasks/Paint/Paint/PaintVoxelPath";
|
|
@@ -30,7 +30,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
30
30
|
const x = this.x;
|
|
31
31
|
const y = this.y;
|
|
32
32
|
const z = this.z;
|
|
33
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
33
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
34
34
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
35
35
|
PaintVoxel(this._location, this.getRaw(), updateData);
|
|
36
36
|
behavior.onPaint(this._dimension.simulation, x, y, z);
|
|
@@ -41,7 +41,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
41
41
|
const x = this.x;
|
|
42
42
|
const y = this.y;
|
|
43
43
|
const z = this.z;
|
|
44
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
44
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
45
45
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
46
46
|
await this.taskTool.voxel.paint.runAsync([
|
|
47
47
|
this._location,
|
|
@@ -65,7 +65,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
65
65
|
continue;
|
|
66
66
|
if (!voxel)
|
|
67
67
|
continue;
|
|
68
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
68
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
69
69
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
70
70
|
behavior.onPaint(this._dimension.simulation, tx, ty, tz);
|
|
71
71
|
}
|
|
@@ -93,7 +93,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
93
93
|
continue;
|
|
94
94
|
if (!voxel)
|
|
95
95
|
continue;
|
|
96
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
96
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
97
97
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
98
98
|
behavior.onPaint(this._dimension.simulation, tx, ty, tz);
|
|
99
99
|
}
|
|
@@ -151,7 +151,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
151
151
|
const voxel = this.dataCursor.getVoxel(tx, ty, tz);
|
|
152
152
|
if (!voxel)
|
|
153
153
|
continue;
|
|
154
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
154
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
155
155
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
156
156
|
behavior.onErase(this._dimension.simulation, tx, ty, tz);
|
|
157
157
|
}
|
|
@@ -174,7 +174,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
174
174
|
const voxel = this.dataCursor.getVoxel(tx, ty, tz);
|
|
175
175
|
if (!voxel)
|
|
176
176
|
continue;
|
|
177
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
177
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
178
178
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
179
179
|
behavior.onErase(this._dimension.simulation, tx, ty, tz);
|
|
180
180
|
}
|
|
@@ -202,7 +202,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
202
202
|
const voxel = this.dataCursor.getVoxel(tx, ty, tz);
|
|
203
203
|
if (!voxel)
|
|
204
204
|
continue;
|
|
205
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
205
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
206
206
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
207
207
|
behavior.onErase(this._dimension.simulation, tx, ty, tz);
|
|
208
208
|
}
|
|
@@ -225,7 +225,7 @@ export class SimulationBrush extends BrushTool {
|
|
|
225
225
|
const voxel = this.dataCursor.getVoxel(tx, ty, tz);
|
|
226
226
|
if (!voxel)
|
|
227
227
|
continue;
|
|
228
|
-
const tags = VoxelTagsRegister.VoxelTags[
|
|
228
|
+
const tags = VoxelTagsRegister.VoxelTags[VoxelLUT.voxelIds.getNumberId(this.data.id)];
|
|
229
229
|
const behavior = VoxelBehaviorsRegister.get(tags["dve_simulation_behavior"] || "default");
|
|
230
230
|
behavior.onErase(this._dimension.simulation, tx, ty, tz);
|
|
231
231
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VoxelBehaviorsRegister } from "../VoxelBehaviorsRegister";
|
|
2
|
+
import { VoxelSchemas } from "../../../../Voxels/State/VoxelSchemas";
|
|
2
3
|
VoxelBehaviorsRegister.register({
|
|
3
4
|
type: "dve_crop",
|
|
4
5
|
onTick(simulation, voxel, x, y, z) {
|
|
@@ -8,12 +9,13 @@ VoxelBehaviorsRegister.register({
|
|
|
8
9
|
const waterLevel = downVoxel.getLevel();
|
|
9
10
|
if (waterLevel <= 0)
|
|
10
11
|
return;
|
|
11
|
-
const
|
|
12
|
+
const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
|
|
13
|
+
const plantLevel = schema
|
|
12
14
|
.startEncoding(voxel.getState())
|
|
13
15
|
.getNumber("level");
|
|
14
16
|
if (plantLevel >= 7)
|
|
15
17
|
return;
|
|
16
|
-
voxel.setState(
|
|
18
|
+
voxel.setState(schema
|
|
17
19
|
.startEncoding()
|
|
18
20
|
.setNumber("level", plantLevel + 1)
|
|
19
21
|
.getEncoded());
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VoxelBehaviorsRegister } from "../VoxelBehaviorsRegister";
|
|
2
|
+
import { VoxelSchemas } from "../../../../Voxels/State/VoxelSchemas";
|
|
2
3
|
const levelChecks = [
|
|
3
4
|
[1, 0, 0],
|
|
4
5
|
[-1, 0, 0],
|
|
@@ -46,7 +47,8 @@ VoxelBehaviorsRegister.register({
|
|
|
46
47
|
}
|
|
47
48
|
const newLevel = currentLevel - 1;
|
|
48
49
|
if (newLevel == 0) {
|
|
49
|
-
|
|
50
|
+
const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
|
|
51
|
+
voxel.setState(schema
|
|
50
52
|
.startEncoding(voxel.getState())
|
|
51
53
|
.setValue("moist", "false")
|
|
52
54
|
.getEncoded());
|
|
@@ -59,7 +61,8 @@ VoxelBehaviorsRegister.register({
|
|
|
59
61
|
if (currentLevel < maxLevel) {
|
|
60
62
|
const newLevel = currentLevel + 1;
|
|
61
63
|
if (currentLevel == 0) {
|
|
62
|
-
|
|
64
|
+
const schema = VoxelSchemas.getStateSchema(voxel.getStringId());
|
|
65
|
+
voxel.setState(schema
|
|
63
66
|
.startEncoding(voxel.getState())
|
|
64
67
|
.setValue("moist", "true")
|
|
65
68
|
.getEncoded());
|
|
@@ -35,6 +35,7 @@ export declare class WorldSimulation {
|
|
|
35
35
|
static addGenerator(generator: Generator): void;
|
|
36
36
|
static getDimension(id: number): import("./Dimensions/DimensionSegment").DimensionSegment;
|
|
37
37
|
static removeGenerator(generator: Generator): boolean;
|
|
38
|
+
static doTickUpdates: boolean;
|
|
38
39
|
static tick(generationOnly?: boolean): void;
|
|
39
40
|
}
|
|
40
41
|
export {};
|
|
@@ -88,13 +88,14 @@ export class WorldSimulation {
|
|
|
88
88
|
}
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
91
|
+
static doTickUpdates = true;
|
|
91
92
|
static tick(generationOnly = false) {
|
|
92
93
|
let total = 0;
|
|
93
94
|
for (const [, dimension] of WorldSimulationDimensions._dimensions) {
|
|
94
95
|
dimension.incrementTick();
|
|
95
96
|
for (let i = 0; i < dimension.activeSectors._sectors.length; i++) {
|
|
96
97
|
total += dimension.activeSectors._sectors[i].tickQueue.getTotalTicks();
|
|
97
|
-
dimension.activeSectors._sectors[i].tickUpdate();
|
|
98
|
+
dimension.activeSectors._sectors[i].tickUpdate(this.doTickUpdates);
|
|
98
99
|
dimension.activeSectors._sectors[i].generateUpdate();
|
|
99
100
|
}
|
|
100
101
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@divinevoxel/vlox","version":"0.0.
|
|
1
|
+
{"name":"@divinevoxel/vlox","version":"0.0.79","description":"Vlox a block style voxel engine.","main":"index.js","types":"index.d.ts","type":"module","devDependencies":{},"scripts":{"clean:dist-ts":"test -d dist && find dist -type f \\( -name \"*.js\" -o -name \"*.d.ts\" \\) -delete || true","build":"mkdir -p dist && npm run clean:dist-ts && cp package.json dist/package.json && cd ./src && npx tsc","prepare-publish":"mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cp README.md ./dist/README.md && cp ./LICENSE.md ./dist/LICENSE.md && cd ./src && npx tsc","compile":"cd src && npx tsc --watch","compile:fresh":"npm run clean:dist-ts && cd src && npx tsc --watch"},"keywords":[],"author":"Divine Star Software","license":"MIT","repository":{"url":"git+https://github.com/Divine-Star-Software/DivineVoxelEngine.git"},"bugs":{"url":"https://github.com/Divine-Star-Software/DivineVoxelEngine/issues"},"dependencies":{"@amodx/math":"latest","@amodx/binary":"latest","@amodx/threads":"latest"},"publishConfig":{"access":"public"}}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CompiledQuadVoxelGeomtryNode } from "./QuadVoxelGometryNodeTypes";
|
|
2
|
-
import { CompiledTriangleVoxelGeomtryNode } from "./TriangleVoxelGometryNodeTypes";
|
|
3
|
-
export type CompiledCustomGeomtryNode = {
|
|
4
|
-
type: "custom";
|
|
5
|
-
id: string;
|
|
6
|
-
};
|
|
7
|
-
export type CompiledGeomtryNodes = CompiledQuadVoxelGeomtryNode | CompiledTriangleVoxelGeomtryNode | CompiledCustomGeomtryNode;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NumberPalette } from "../../Util/NumberPalette";
|
|
2
|
-
import { StringPalette } from "../../Util/StringPalette";
|
|
3
|
-
export declare class VoxelPalettesRegister {
|
|
4
|
-
static material: StringPalette;
|
|
5
|
-
static substance: StringPalette;
|
|
6
|
-
static voxelIds: StringPalette;
|
|
7
|
-
static voxelNametoIdMap: Map<string, string>;
|
|
8
|
-
static voxelIdToNameMap: Map<string, string>;
|
|
9
|
-
static state: NumberPalette;
|
|
10
|
-
static mod: NumberPalette;
|
|
11
|
-
static getVoxelId(id: number, state?: number, mod?: number): number;
|
|
12
|
-
static getVoxelIdFromString(id: string, state?: number, mod?: number): number;
|
|
13
|
-
static getVoxelIdFromName(name: string, state?: number, mod?: number): number;
|
|
14
|
-
/**Palette of voxel ids to their tree id, state, and mod value */
|
|
15
|
-
static voxels: [voxelId: number, state: number, mod: number][];
|
|
16
|
-
/**Palette of true voxel ids to state then their mod then the final palette voxel id */
|
|
17
|
-
static voxelRecord: number[][][];
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { NumberPalette } from "../../Util/NumberPalette";
|
|
2
|
-
import { StringPalette } from "../../Util/StringPalette";
|
|
3
|
-
export class VoxelPalettesRegister {
|
|
4
|
-
static material = new StringPalette();
|
|
5
|
-
static substance = new StringPalette();
|
|
6
|
-
static voxelIds = new StringPalette();
|
|
7
|
-
static voxelNametoIdMap = new Map();
|
|
8
|
-
static voxelIdToNameMap = new Map();
|
|
9
|
-
static state = new NumberPalette();
|
|
10
|
-
static mod = new NumberPalette();
|
|
11
|
-
static getVoxelId(id, state = 0, mod = 0) {
|
|
12
|
-
return this.voxelRecord[id][mod][state];
|
|
13
|
-
}
|
|
14
|
-
static getVoxelIdFromString(id, state = 0, mod = 0) {
|
|
15
|
-
return this.voxelRecord[this.voxelIds.getNumberId(id)][mod][state];
|
|
16
|
-
}
|
|
17
|
-
static getVoxelIdFromName(name, state = 0, mod = 0) {
|
|
18
|
-
return this.voxelRecord[this.voxelIds.getNumberId(this.voxelNametoIdMap.get(name))][mod][state];
|
|
19
|
-
}
|
|
20
|
-
/**Palette of voxel ids to their tree id, state, and mod value */
|
|
21
|
-
static voxels = [];
|
|
22
|
-
/**Palette of true voxel ids to state then their mod then the final palette voxel id */
|
|
23
|
-
static voxelRecord = [];
|
|
24
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { SchemaRegister } from "../State/SchemaRegister";
|
|
2
|
-
import { VoxelPalettesRegister } from "../../Voxels/Data/VoxelPalettesRegister";
|
|
3
|
-
import { EngineStats } from "../../Stats/EngineStats";
|
|
4
|
-
function recurse(index, current, result, valuePairs) {
|
|
5
|
-
if (index === valuePairs.length) {
|
|
6
|
-
result.push(current.join(","));
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const [key, values] = valuePairs[index];
|
|
10
|
-
for (const value of values) {
|
|
11
|
-
current.push(`${key}=${value}`);
|
|
12
|
-
recurse(index + 1, current, result, valuePairs);
|
|
13
|
-
current.pop();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function getAllCombinations(valuePairs) {
|
|
17
|
-
const result = [];
|
|
18
|
-
recurse(0, [], result, valuePairs);
|
|
19
|
-
return result;
|
|
20
|
-
}
|
|
21
|
-
export function BuildPaletteData(props) {
|
|
22
|
-
const models = new Map(props.models.models.map((_) => [_.id, _]));
|
|
23
|
-
const modelStateArray = new Map();
|
|
24
|
-
for (const [, model] of models) {
|
|
25
|
-
const schema = SchemaRegister.getModelSchema(model.id);
|
|
26
|
-
const valuePairs = [];
|
|
27
|
-
for (const node of schema.nodes) {
|
|
28
|
-
valuePairs.push([
|
|
29
|
-
node.name,
|
|
30
|
-
node.valuePalette
|
|
31
|
-
? node.valuePalette._palette
|
|
32
|
-
: new Array(node.bitMask + 1).fill(0).map((_, i) => `${i}`),
|
|
33
|
-
]);
|
|
34
|
-
}
|
|
35
|
-
const stateStrings = getAllCombinations(valuePairs);
|
|
36
|
-
const statePalette = [];
|
|
37
|
-
for (const state of stateStrings) {
|
|
38
|
-
const value = schema.readString(!state ? "*" : state);
|
|
39
|
-
statePalette.push(value);
|
|
40
|
-
}
|
|
41
|
-
modelStateArray.set(model.id, statePalette);
|
|
42
|
-
}
|
|
43
|
-
const finalPalette = [[0, 0, 0]];
|
|
44
|
-
const finalPaletteRecord = [[[0]]];
|
|
45
|
-
let paletteCount = 1;
|
|
46
|
-
for (const voxel of props.models.voxels) {
|
|
47
|
-
const schema = SchemaRegister.getVoxelModSchema(voxel.id);
|
|
48
|
-
const valuePairs = [];
|
|
49
|
-
for (const node of schema.nodes) {
|
|
50
|
-
valuePairs.push([
|
|
51
|
-
node.name,
|
|
52
|
-
node.valuePalette
|
|
53
|
-
? node.valuePalette._palette
|
|
54
|
-
: new Array(node.bitMask + 1).fill(0).map((_, i) => `${i}`),
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
const stateStrings = getAllCombinations(valuePairs);
|
|
58
|
-
const modPalette = [];
|
|
59
|
-
if (valuePairs.length) {
|
|
60
|
-
for (const state of stateStrings) {
|
|
61
|
-
const value = schema.readString(!state ? "*" : state);
|
|
62
|
-
modPalette.push(value);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
modPalette.push(0);
|
|
67
|
-
}
|
|
68
|
-
const voxelId = VoxelPalettesRegister.voxelIds.getNumberId(voxel.id);
|
|
69
|
-
const statePalette = modelStateArray.get(voxel.modelId);
|
|
70
|
-
finalPaletteRecord[voxelId] = new Array(modPalette.length).fill(-1);
|
|
71
|
-
for (let modIndex = 0; modIndex < modPalette.length; modIndex++) {
|
|
72
|
-
finalPaletteRecord[voxelId][modPalette[modIndex]] = new Array(statePalette.length).fill(-1);
|
|
73
|
-
for (let stateIndex = 0; stateIndex < statePalette.length; stateIndex++) {
|
|
74
|
-
finalPalette[paletteCount] = [
|
|
75
|
-
voxelId,
|
|
76
|
-
statePalette[stateIndex],
|
|
77
|
-
modPalette[modIndex],
|
|
78
|
-
];
|
|
79
|
-
finalPaletteRecord[voxelId][modPalette[modIndex]][statePalette[stateIndex]] = paletteCount;
|
|
80
|
-
paletteCount++;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
EngineStats.palette.paletteSize = finalPalette.length;
|
|
85
|
-
VoxelPalettesRegister.voxels = finalPalette;
|
|
86
|
-
VoxelPalettesRegister.voxelRecord = finalPaletteRecord;
|
|
87
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { StateLogicStatement, VoxelStateSchemaData } from "../State/State.types";
|
|
2
|
-
import { VoxelRulesModoel } from "../Models/Rules/Classes/VoxelRulesModel";
|
|
3
|
-
import { StringPalette } from "../../Util/StringPalette";
|
|
4
|
-
import { VoxelEffectSyncData } from "../Effects/VoxelEffects.types";
|
|
5
|
-
export declare function BuildStateData(model: VoxelRulesModoel, geoPalette: StringPalette): {
|
|
6
|
-
schema: VoxelStateSchemaData;
|
|
7
|
-
effects: VoxelEffectSyncData[];
|
|
8
|
-
stateGeometryPalette: number[][];
|
|
9
|
-
condiotnalShapeStateGeometryPalette: number[][];
|
|
10
|
-
stateTree: any[];
|
|
11
|
-
geometryLinkStateMap: Record<string, Record<number, number>>;
|
|
12
|
-
statePalette: number[][];
|
|
13
|
-
stateRecord: Record<string, number>;
|
|
14
|
-
condiotnalNodeStateTree: any;
|
|
15
|
-
condiotnalStatements: StateLogicStatement[];
|
|
16
|
-
condiotnalStatePalette: number[][];
|
|
17
|
-
condiotnalShapeStateRecord: Record<string, number>;
|
|
18
|
-
condiotanlStatePalette: number[][][];
|
|
19
|
-
condiotanlGeometryStatePalette: number[][][];
|
|
20
|
-
stateRelativeGeometryMap: number[][];
|
|
21
|
-
relativeGeometryByteIndexMap: number[];
|
|
22
|
-
condiotnalShapeStateRelativeGeometryMap: number[][];
|
|
23
|
-
};
|