@divinevoxel/vlox 0.0.1 → 0.0.3
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/Archive/Functions/ArchiveColumn.js +17 -17
- package/Archive/Functions/ImportColumn.js +14 -14
- package/Archive/Functions/Palettes.d.ts +1 -1
- package/Cache/Cache.types.d.ts +17 -0
- package/Cache/CacheManager.d.ts +11 -0
- package/Cache/CacheManager.js +17 -0
- package/{Data → Contexts/Base}/DataHooks.d.ts +8 -8
- package/{Data → Contexts/Base}/DataHooks.js +4 -4
- package/Contexts/Base/Main/Generator/DataGenerator.types.d.ts +12 -0
- package/Contexts/Base/Main/Generator/InitDataGenerator.d.ts +3 -0
- package/Contexts/Base/Main/Generator/InitDataGenerator.js +201 -0
- package/Contexts/Base/Main/Generator/Segments/MaterialDataGenerator.d.ts +6 -0
- package/Contexts/Base/Main/Generator/Segments/MaterialDataGenerator.js +12 -0
- package/Contexts/Base/Main/Generator/Segments/SubstanceDataGenerator.d.ts +6 -0
- package/Contexts/Base/Main/Generator/Segments/SubstanceDataGenerator.js +35 -0
- package/Contexts/{World/Data/Generators → Base/Main/Generator/Segments}/VoxelDataGenerator.d.ts +3 -2
- package/Contexts/{World/Data/Generators → Base/Main/Generator/Segments}/VoxelDataGenerator.js +16 -23
- package/Contexts/Base/Remote/Sync/DataSync.types.d.ts +34 -0
- package/Contexts/Base/Remote/Sync/InitDataSync.d.ts +4 -0
- package/Contexts/Base/Remote/Sync/InitDataSync.js +43 -0
- package/Contexts/Base/Remote/Sync/InitWorldDataSync.js +37 -0
- package/{Interfaces/Classes → Contexts/Base}/ThreadManager.d.ts +3 -5
- package/{Interfaces/Classes → Contexts/Base}/ThreadManager.js +3 -3
- package/Contexts/Constructor/ConstrcutorTheads.d.ts +1 -3
- package/Contexts/Constructor/ConstrcutorTheads.js +1 -9
- package/Contexts/Constructor/DivineVoxelEngineConstructor.d.ts +3 -8
- package/Contexts/Constructor/DivineVoxelEngineConstructor.js +3 -17
- package/Contexts/Constructor/{DVEConstructorTasksQueues.js → Tasks/DVEConstructorTasksQueues.js} +2 -3
- package/Contexts/Nexus/DivineVoxelEngineNexus.d.ts +3 -11
- package/Contexts/Nexus/DivineVoxelEngineNexus.js +2 -12
- package/Contexts/Nexus/{Threads/NexusTheads.d.ts → NexusTheads.d.ts} +1 -3
- package/Contexts/Nexus/NexusTheads.js +15 -0
- package/Contexts/Render/DVERenderThreads.d.ts +1 -1
- package/Contexts/Render/DVERenderThreads.js +1 -28
- package/Contexts/Render/DivineVoxelEngineRender.d.ts +7 -38
- package/Contexts/Render/DivineVoxelEngineRender.js +3 -23
- package/Contexts/Render/Scene/MeshRegister.d.ts +38 -31
- package/Contexts/Render/Scene/MeshRegister.js +207 -184
- package/Contexts/Render/Tasks/RenderTasks.js +5 -9
- package/Contexts/Render/Tasks/RenderTasks.types.d.ts +5 -11
- package/Contexts/World/Data/DataSync.d.ts +3 -25
- package/Contexts/World/Data/DataSync.js +4 -109
- package/Contexts/World/DivineVoxelEngineWorld.d.ts +3 -14
- package/Contexts/World/DivineVoxelEngineWorld.js +11 -28
- package/Contexts/World/Lock/WorldLock.d.ts +2 -2
- package/Contexts/World/Tasks/WorldTasks.js +11 -5
- package/Contexts/World/WorldThreads.d.ts +2 -8
- package/Contexts/World/WorldThreads.js +2 -21
- package/Data/Cursor/Interfaces/DataCursor.interface.d.ts +5 -0
- package/Data/Cursor/Interfaces/DataCursor.interface.js +2 -0
- package/Data/Cursor/Interfaces/VoxelCursor.interface.d.ts +63 -0
- package/Data/Cursor/Interfaces/VoxelCursor.interface.js +233 -0
- package/Data/Cursor/Template/TemplateCursor.d.ts +11 -0
- package/Data/Cursor/Template/TemplateCursor.js +20 -0
- package/Data/Cursor/Template/TemplateVoxelCursor.d.ts +13 -0
- package/Data/Cursor/Template/TemplateVoxelCursor.js +31 -0
- package/Data/Cursor/VoxelCursor.d.ts +12 -0
- package/Data/Cursor/VoxelCursor.js +25 -0
- package/Data/Cursor/World/ChunkCursor.d.ts +16 -0
- package/Data/Cursor/World/ChunkCursor.js +59 -0
- package/Data/Cursor/World/ColumnCursor.d.ts +16 -0
- package/Data/Cursor/World/ColumnCursor.js +57 -0
- package/Data/Cursor/World/WorldCursor.d.ts +12 -0
- package/Data/Cursor/World/WorldCursor.js +50 -0
- package/Data/Cursor/World/WorldSectionCursor.interface.d.ts +7 -0
- package/Data/Cursor/World/WorldVoxelCursor.d.ts +22 -0
- package/Data/Cursor/World/WorldVoxelCursor.js +55 -0
- package/Data/Palettes/MaterialPalette.d.ts +9 -0
- package/Data/Palettes/MaterialPalette.js +11 -0
- package/Data/Palettes/SubstancePalette.d.ts +9 -0
- package/Data/Palettes/SubstancePalette.js +11 -0
- package/Data/Palettes/VoxelPalette.d.ts +11 -0
- package/Data/Palettes/VoxelPalette.js +15 -0
- package/Data/Register/MappedDataRegister.js +1 -0
- package/{Contexts/World/Data/Classes → Data/Structs/Builder}/StructBuilder.d.ts +3 -2
- package/{Contexts/World/Data/Classes → Data/Structs/Builder}/StructBuilder.js +11 -27
- package/Data/Structs/Builder/SubstanceStructBuilder.d.ts +2 -0
- package/Data/Structs/Builder/SubstanceStructBuilder.js +42 -0
- package/Data/Structs/Builder/VoxelStructBuilder.d.ts +2 -0
- package/{Contexts/World/Data/StructBuilders → Data/Structs/Builder}/VoxelStructBuilder.js +22 -17
- package/Data/Structs/ChunkStruct.d.ts +1 -0
- package/{Contexts/World/Data → Data}/Structs/ChunkStruct.js +4 -4
- package/Data/Structs/ColumnStruct.d.ts +1 -0
- package/{Contexts/World/Data → Data}/Structs/ColumnStruct.js +13 -13
- package/Data/Structs/Constants/ChunkStructProperties.d.ts +10 -0
- package/Data/Structs/Constants/ChunkStructProperties.js +11 -0
- package/Data/Structs/Constants/SubstanceStructIds.d.ts +0 -0
- package/Data/Structs/Constants/SubstanceStructIds.js +1 -0
- package/Data/Structs/Constants/WorldDataStructProperties.d.ts +8 -0
- package/Data/Structs/Constants/WorldDataStructProperties.js +9 -0
- package/{Contexts/World/Data → Data}/Structs/RegionStruct.d.ts +0 -1
- package/{Contexts/World/Data → Data}/Structs/RegionStruct.js +9 -9
- package/Data/Structs/SubstanceStruct.d.ts +16 -0
- package/Data/{Substance → Structs}/SubstanceStruct.js +3 -3
- package/Data/Structs/VoxelStruct.d.ts +27 -0
- package/Data/{Voxel → Structs}/VoxelStruct.js +2 -2
- package/Data/Types/WorldData.types.d.ts +2 -2
- package/Data/Types/WorldData.types.js +2 -2
- package/Data/World/Classes/Chunk.d.ts +8 -3
- package/Data/World/Classes/Chunk.js +48 -19
- package/Data/World/Classes/Column.d.ts +5 -3
- package/Data/World/Classes/Column.js +10 -6
- package/Data/World/Classes/Region.js +1 -1
- package/Data/World/DimensionsRegister.js +1 -1
- package/Data/{RegionHeaderRegister.d.ts → World/RegionHeaderRegister.d.ts} +1 -1
- package/Data/{RegionHeaderRegister.js → World/RegionHeaderRegister.js} +2 -2
- package/Data/World/WorldBounds.d.ts +1 -0
- package/Data/World/WorldBounds.js +15 -0
- package/Data/World/WorldPainter.d.ts +6 -5
- package/Data/World/WorldPainter.js +30 -45
- package/Data/World/WorldRegister.js +21 -13
- package/Data/World/WorldRegisterCache.js +1 -1
- package/Data/World/WorldSpaces.d.ts +1 -1
- package/Init/StartConstructor.d.ts +2 -2
- package/Init/StartConstructor.js +51 -6
- package/Init/StartNexus.d.ts +2 -0
- package/Init/StartNexus.js +29 -0
- package/Init/StartRenderer.d.ts +15 -0
- package/Init/StartRenderer.js +84 -0
- package/Init/StartWorld.d.ts +3 -6
- package/Init/StartWorld.js +130 -6
- package/Math/Constants/Faces.d.ts +1 -1
- package/Mesher/Functions/CompactMesh.d.ts +3 -0
- package/Mesher/Functions/CompactMesh.js +37 -0
- package/Mesher/Functions/CompactVoxelMesh.d.ts +3 -0
- package/Mesher/Functions/CompactVoxelMesh.js +111 -0
- package/Mesher/Geometry/VoxelGeometry.d.ts +1 -1
- package/Mesher/Geometry/VoxelGeometry.js +13 -9
- package/Mesher/Mesher.d.ts +5 -69
- package/Mesher/Mesher.js +28 -46
- package/Mesher/Meshers/MesherInterface.d.ts +5 -0
- package/Mesher/Meshers/MesherManager.d.ts +3 -3
- package/Mesher/Meshers/MesherManager.js +2 -2
- package/Mesher/Meshers/{Meshers/TextureMesher.d.ts → TextureMesher.d.ts} +5 -3
- package/Mesher/Meshers/{Meshers/TextureMesher.js → TextureMesher.js} +18 -13
- package/Mesher/Meshers/VoxelMesher.d.ts +15 -0
- package/Mesher/Meshers/VoxelMesher.js +47 -0
- package/Mesher/Models/Common/BoundsFunctions.d.ts +4 -0
- package/Mesher/Models/Common/BoundsFunctions.js +56 -0
- package/Mesher/Models/Common/BoxGeometryNode.d.ts +10 -0
- package/Mesher/Models/Common/BoxGeometryNode.js +74 -0
- package/Mesher/{Calc → Models/Common/Calc}/CalcConstants.d.ts +3 -4
- package/Mesher/{Calc → Models/Common/Calc}/CalcConstants.js +3 -3
- package/Mesher/{Calc/Light → Models/Common/Calc}/FaceDataCalc.d.ts +2 -2
- package/Mesher/{Calc/Light → Models/Common/Calc}/FaceDataCalc.js +8 -10
- package/Mesher/Models/Common/QuadGeometryNode.d.ts +11 -0
- package/Mesher/Models/Common/QuadGeometryNode.js +51 -0
- package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +6 -0
- package/Mesher/{Calc/Flow → Models/Nodes/Custom/Liquid}/FlowGradient.js +12 -15
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +15 -0
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +269 -0
- package/Mesher/Models/Nodes/Custom/index.d.ts +0 -0
- package/Mesher/Models/Nodes/Custom/index.js +1 -0
- package/Mesher/Models/Nodes/GeometryNode.d.ts +22 -0
- package/{VoxelModels/Constructor → Mesher/Models}/Nodes/GeometryNode.js +5 -1
- package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +25 -0
- package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruled/BoxVoxelGeometryNode.js +20 -83
- package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +21 -0
- package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruled/QuadVoxelGeometryNode.js +21 -51
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +19 -0
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +75 -0
- package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +20 -0
- package/{VoxelModels/Constructor → Mesher/Models}/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +18 -48
- package/Mesher/Models/Nodes/VoxelGeometryConstructor.d.ts +13 -0
- package/Mesher/Models/Nodes/VoxelGeometryConstructor.js +68 -0
- package/Mesher/Models/VoxelConstructor.d.ts +30 -0
- package/{VoxelModels/Constructor/VoxelModelVoxelConstructor.js → Mesher/Models/VoxelConstructor.js} +34 -20
- package/{VoxelModels/Constructor → Mesher/Models}/VoxelGeometryLookUp.d.ts +6 -5
- package/{VoxelModels/Constructor → Mesher/Models}/VoxelGeometryLookUp.js +28 -25
- package/Mesher/Models/VoxelModelConstructorRegister.d.ts +21 -0
- package/Mesher/Models/VoxelModelConstructorRegister.js +53 -0
- package/Mesher/Models/VoxelModelEffect.d.ts +13 -0
- package/Mesher/Models/VoxelModelEffect.js +43 -0
- package/Mesher/Processors/ChunkProcessor.d.ts +6 -2
- package/Mesher/Processors/ChunkProcessor.js +68 -30
- package/Mesher/{Rules → Substances}/RenderedSubstances.d.ts +0 -1
- package/Mesher/Substances/RenderedSubstances.js +7 -0
- package/Mesher/Tasks/BuidlerTasks.types.d.ts +2 -2
- package/Mesher/Tools/OutlinedVoxelTool.js +46 -29
- package/Mesher/Tools/VoxelMeshBVHBuilder.d.ts +85 -0
- package/Mesher/Tools/VoxelMeshBVHBuilder.js +233 -0
- package/Mesher/Tools/VoxelMeshVertexStructCursor.d.ts +54 -0
- package/Mesher/Tools/VoxelMeshVertexStructCursor.js +145 -0
- package/Mesher/Tools/VoxelMesherDataTool.d.ts +22 -11
- package/Mesher/Tools/VoxelMesherDataTool.js +44 -62
- package/Mesher/Tools/VoxelTemplateDataTool.d.ts +2 -2
- package/Mesher/Tools/VoxelTemplateDataTool.js +1 -1
- package/Mesher/Types/Mesher.types.d.ts +21 -0
- package/Mesher/Types/VoxelMesh.types.d.ts +5 -0
- package/Mesher/Types/VoxelMesh.types.js +14 -0
- package/Mesher/Types/index.d.ts +2 -1
- package/Mesher/Types/index.js +2 -1
- package/Models/Defaults/LiquidVoxelModel.d.ts +7 -0
- package/Models/Defaults/LiquidVoxelModel.js +47 -0
- package/{VoxelModels → Models}/Examples.d.ts +4 -0
- package/{VoxelModels → Models}/Examples.js +369 -99
- package/{VoxelModels → Models}/Input/BoxVoxelGometryInputs.js +4 -1
- package/{VoxelModels → Models}/Rules/Classes/OcclusionFace.js +2 -2
- package/Models/Rules/Classes/VoxelRulesGeometry.d.ts +15 -0
- package/{VoxelModels → Models}/Rules/Classes/VoxelRulesGeometry.js +9 -12
- package/{VoxelModels → Models}/Rules/Classes/VoxelRulesModel.d.ts +1 -1
- package/{VoxelModels → Models}/Rules/Functions/BuildGeomtryInputs.js +20 -2
- package/{VoxelModels → Models}/Rules/Functions/BuildRules.d.ts +1 -1
- package/{VoxelModels → Models}/Rules/Functions/GetOcclusionFaces.d.ts +1 -1
- package/{VoxelModels → Models}/Rules/Functions/GetOcclusionFaces.js +1 -1
- package/{VoxelModels → Models}/Rules/VoxelModelManager.d.ts +1 -1
- package/{VoxelModels → Models}/Rules/VoxelModelManager.js +9 -7
- package/{VoxelModels → Models}/Shared/Transform.d.ts +2 -2
- package/{VoxelModels → Models}/Shared/Transform.js +1 -4
- package/{VoxelModels → Models}/VoxelModel.types.d.ts +13 -26
- package/README.md +3 -5
- package/Renderer/Classes/ChunkMesh.d.ts +10 -0
- package/Renderer/Classes/ChunkMesh.js +13 -0
- package/Renderer/Classes/MeshRegisterColumn.d.ts +7 -0
- package/Renderer/Classes/MeshRegisterColumn.js +7 -0
- package/Renderer/Classes/MushRegisterRegion.d.ts +4 -0
- package/Renderer/Classes/MushRegisterRegion.js +3 -0
- package/Renderer/DVEChunkMeshInterface.d.ts +3 -0
- package/Renderer/DVEChunkMeshes.d.ts +6 -0
- package/Renderer/DVEChunkMeshes.js +2 -0
- package/{Interfaces/Render/Nodes → Renderer}/DVERenderNode.types.d.ts +3 -3
- package/Renderer/DVERenderer.d.ts +6 -0
- package/Renderer/MeshManager.d.ts +11 -0
- package/Renderer/MeshManager.js +79 -0
- package/Renderer/MeshRegister.d.ts +39 -0
- package/Renderer/MeshRegister.js +218 -0
- package/{Data/Settings → Settings}/EngineSettings.d.ts +1 -1
- package/{Data/Settings → Settings}/EngineSettings.js +5 -5
- package/{Types → Settings}/EngineSettings.types.d.ts +5 -5
- package/{Types → Settings}/EngineSettings.types.js +3 -5
- package/Tasks/Analyzer/Analyzer.d.ts +19 -0
- package/Tasks/Analyzer/Analyzer.js +156 -0
- package/{Analyzer → Tasks/Analyzer}/AnalyzerUpdater.d.ts +2 -2
- package/Tasks/Analyzer/InitTasks.js +16 -0
- package/{DataLoader → Tasks/DataLoader}/Broswer/DataHandler.d.ts +2 -2
- package/{DataLoader → Tasks/DataLoader}/Broswer/DataHandler.js +1 -1
- package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataTool.d.ts +2 -2
- package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataTool.js +1 -1
- package/{DataLoader → Tasks/DataLoader}/Constructor/WorldDataSerializer.d.ts +5 -5
- package/{DataLoader → Tasks/DataLoader}/Constructor/WorldDataSerializer.js +3 -3
- package/{DataLoader → Tasks/DataLoader}/Node/DivineVoxelEngineData.d.ts +1 -1
- package/{DataLoader → Tasks/DataLoader}/Node/DivineVoxelEngineData.js +1 -1
- package/{DataLoader → Tasks/DataLoader}/Node/System/RegionSystem.d.ts +1 -1
- package/{DataLoader → Tasks/DataLoader}/Node/Tools/NodeRegionTool.d.ts +1 -1
- package/{DataLoader → Tasks/DataLoader}/Node/Util/DVED.util.js +3 -3
- package/{Interfaces/DataLoader → Tasks/DataLoader/Types}/DVEDataHandler.d.ts +1 -1
- package/{Interfaces/DataLoader → Tasks/DataLoader/Types}/DVEDataHandler.js +1 -1
- package/{DataLoader → Tasks/DataLoader}/World/DataHandlerWrapper.d.ts +3 -5
- package/{DataLoader → Tasks/DataLoader}/World/DataHandlerWrapper.js +5 -32
- package/{DataLoader → Tasks/DataLoader}/World/DataLoaderTasks.js +2 -2
- package/{DataLoader → Tasks/DataLoader}/World/DivineVoxelEngineDataLoaderWorld.d.ts +1 -1
- package/{DataLoader → Tasks/DataLoader}/World/Tools/DataLoaderTool.d.ts +2 -2
- package/{DataLoader → Tasks/DataLoader}/World/Tools/DataLoaderTool.js +7 -7
- package/{DataLoader → Tasks/DataLoader}/World/Tools/DataSerializerTool.d.ts +2 -2
- package/{DataLoader → Tasks/DataLoader}/World/Tools/DataSerializerTool.js +1 -1
- package/{DataLoader → Tasks/DataLoader}/World/Tools/LoaderRegister.d.ts +1 -1
- package/{DataLoader → Tasks/DataLoader}/World/Tools/LoaderRegister.js +1 -1
- package/Tasks/IWG/Constants/ColumnState.d.ts +6 -0
- package/Tasks/IWG/Constants/ColumnState.js +7 -0
- package/{IWG → Tasks/IWG}/World/Classes/DebouncedTasks.d.ts +1 -1
- package/{IWG → Tasks/IWG}/World/Classes/DebouncedTasks.js +1 -1
- package/{IWG → Tasks/IWG}/World/Classes/Generator.d.ts +5 -7
- package/{IWG → Tasks/IWG}/World/Classes/Generator.js +19 -22
- package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGBatchTask.d.ts +1 -1
- package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskBase.d.ts +1 -1
- package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskBase.js +1 -1
- package/{IWG → Tasks/IWG}/World/IWG.js +1 -1
- package/{IWG → Tasks/IWG}/World/Load/SafeExit.js +0 -1
- package/{IWG → Tasks/IWG}/World/Load/Teleport.d.ts +1 -1
- package/{IWG → Tasks/IWG}/World/Tasks/Rendering/IWGBuildTasks.js +1 -1
- package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveAndUnloadTasks.js +1 -1
- package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveTasks.js +1 -1
- package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGDecorateTasks.js +3 -3
- package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGGenerateTasks.js +3 -3
- package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGLoadTasks.js +1 -1
- package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGPropagationTasks.js +3 -3
- package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGWorldSunTasks.js +3 -3
- package/Tasks/Mesher/InitTasks.d.ts +2 -0
- package/Tasks/Mesher/InitTasks.js +46 -0
- package/Tasks/Propagation/Explosion/ExplosionManager.d.ts +4 -0
- package/{Propagation → Tasks/Propagation}/Explosion/ExplosionManager.js +11 -14
- package/{Propagation → Tasks/Propagation}/Flow/FlowManager.d.ts +7 -7
- package/{Propagation → Tasks/Propagation}/Flow/FlowManager.js +10 -10
- package/Tasks/Propagation/Flow/Functions/FlowRemove.d.ts +2 -0
- package/{Propagation → Tasks/Propagation}/Flow/Functions/FlowRemove.js +20 -20
- package/Tasks/Propagation/Flow/Functions/FlowUpdate.d.ts +2 -0
- package/{Propagation → Tasks/Propagation}/Flow/Functions/FlowUpdate.js +10 -10
- package/Tasks/Propagation/Illumanation/Functions/RGBUpdate.d.ts +3 -0
- package/Tasks/Propagation/Illumanation/Functions/RGBUpdate.js +82 -0
- package/Tasks/Propagation/Illumanation/Functions/SunUpdate.d.ts +3 -0
- package/Tasks/Propagation/Illumanation/Functions/SunUpdate.js +116 -0
- package/Tasks/Propagation/Illumanation/Functions/WorldSun.d.ts +2 -0
- package/Tasks/Propagation/Illumanation/Functions/WorldSun.js +115 -0
- package/{Propagation → Tasks/Propagation}/Illumanation/IlluminationManager.d.ts +1 -1
- package/{Propagation → Tasks/Propagation}/Illumanation/IlluminationManager.js +2 -2
- package/Tasks/Propagation/InitTasks.d.ts +1 -0
- package/Tasks/Propagation/InitTasks.js +23 -0
- package/Tasks/Propagation/Propagation.d.ts +13 -0
- package/{Propagation → Tasks/Propagation}/Propagation.js +3 -2
- package/{Types → Tasks}/Tasks.types.d.ts +2 -1
- package/{Contexts/Constructor/ConstructorTasksIds.d.ts → Tasks/TasksIds.d.ts} +1 -1
- package/Tasks/TasksIds.js +22 -0
- package/Tasks/Update/InitTasks.d.ts +4 -0
- package/Tasks/Update/InitTasks.js +38 -0
- package/Tasks/Update/UpdateTask.d.ts +53 -0
- package/Tasks/Update/UpdateTask.js +136 -0
- package/{Contexts/Constructor/Tasks → Tasks/Update}/VoxelUpdate.d.ts +5 -4
- package/Tasks/Update/VoxelUpdate.js +164 -0
- package/Tasks/WorldGeneration/InitTasks.d.ts +1 -0
- package/Tasks/WorldGeneration/InitTasks.js +15 -0
- package/{Interfaces/WorldGen → Tasks/WorldGeneration}/WorldGen.types.d.ts +1 -1
- package/Tasks/WorldGeneration/WorldGenBrush.d.ts +16 -0
- package/Tasks/WorldGeneration/WorldGenBrush.js +115 -0
- package/{WorldGeneration → Tasks/WorldGeneration}/WorldGenRegister.d.ts +2 -2
- package/{WorldGeneration → Tasks/WorldGeneration}/WorldGenRegister.js +16 -17
- package/{WorldGeneration → Tasks/WorldGeneration}/WorldGeneration.d.ts +3 -3
- package/{WorldGeneration → Tasks/WorldGeneration}/WorldGeneration.js +1 -13
- package/Templates/FullVoxelTemplate.d.ts +13 -0
- package/Templates/FullVoxelTemplate.js +54 -0
- package/Templates/Functions/CreateTemplate.js +2 -2
- package/Templates/VoxelTemplate.d.ts +3 -3
- package/Templates/VoxelTemplate.js +6 -6
- package/Templates/VoxelTemplates.types.d.ts +8 -0
- package/Textures/Texture.types.d.ts +1 -5
- package/Textures/TextureAnimations.d.ts +2 -2
- package/Textures/TextureAnimations.js +26 -126
- package/Textures/TextureArray.d.ts +47 -0
- package/Textures/TextureArray.js +202 -0
- package/Textures/TextureBuilder.d.ts +3 -6
- package/Textures/TextureBuilder.js +53 -178
- package/Textures/TextureManager.d.ts +7 -7
- package/Textures/TextureManager.js +77 -58
- package/Textures/TextureRegister.d.ts +1 -1
- package/Textures/TextureRegister.js +3 -8
- package/Tools/Brush/AdvancedBrushTool.d.ts +3 -0
- package/Tools/Brush/AdvancedBrushTool.js +19 -8
- package/Tools/Brush/Brush.d.ts +22 -15
- package/Tools/Brush/Brush.js +94 -55
- package/Tools/Classes/DataToolBase.js +1 -1
- package/Tools/Data/DataTool.d.ts +9 -8
- package/Tools/Data/DataTool.js +37 -38
- package/Tools/Data/SubstanceDataTool.d.ts +3 -7
- package/Tools/Data/SubstanceDataTool.js +13 -25
- package/Tools/Data/WorldData/ChunkDataTool.d.ts +1 -1
- package/Tools/Data/WorldData/ColumnDataTool.js +15 -15
- package/Tools/Data/WorldData/HeightMapTool.js +1 -1
- package/Tools/Tasks/TasksTool.d.ts +2 -2
- package/Tools/Tasks/TasksTool.js +19 -19
- package/Voxels/Effects/VoxelEffect.d.ts +12 -0
- package/Voxels/Effects/VoxelEffect.js +6 -0
- package/Voxels/Effects/VoxelEffectRegister.d.ts +6 -0
- package/Voxels/Effects/VoxelEffectRegister.js +15 -0
- package/Voxels/Effects/VoxelEffects.types.d.ts +21 -0
- package/{VoxelModels/Rules → Voxels}/Functions/BuildStateData.d.ts +5 -3
- package/{VoxelModels/Rules → Voxels}/Functions/BuildStateData.js +49 -5
- package/Voxels/Indexes/VoxelIndex.d.ts +39 -0
- package/Voxels/Indexes/VoxelIndex.js +133 -0
- package/Voxels/Indexes/VoxelModelIndex.d.ts +18 -0
- package/Voxels/Indexes/VoxelModelIndex.js +59 -0
- package/Voxels/Indexes/VoxelTextureIndex.d.ts +8 -0
- package/Voxels/Indexes/VoxelTextureIndex.js +40 -0
- package/Voxels/InitVoxelData.d.ts +9 -0
- package/{VoxelModels/InitVoxelModels.js → Voxels/InitVoxelData.js} +53 -23
- package/{VoxelModels → Voxels}/State/CondiotnalTreeReader.d.ts +1 -1
- package/{VoxelModels → Voxels}/State/CondiotnalTreeReader.js +3 -2
- package/{VoxelModels → Voxels}/State/LogicStatementReader.d.ts +2 -1
- package/{VoxelModels → Voxels}/State/LogicStatementReader.js +2 -2
- package/{VoxelModels → Voxels}/State/Schema/BinarySchema.d.ts +3 -1
- package/Voxels/State/Schema/BinarySchema.js +103 -0
- package/{VoxelModels → Voxels}/State/Schema/BinarySchemaNode.d.ts +1 -1
- package/{VoxelModels → Voxels}/State/Schema/BinarySchemaNode.js +1 -1
- package/{VoxelModels → Voxels}/State/Schema/Conditions/SameVoxelConditions.d.ts +1 -1
- package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +17 -0
- package/{VoxelModels → Voxels}/State/Schema/StateSchema.d.ts +6 -3
- package/{VoxelModels → Voxels}/State/Schema/StateSchema.js +4 -3
- package/Voxels/State/Schema/VoxelSchema.d.ts +7 -0
- package/Voxels/State/Schema/VoxelSchema.js +10 -0
- package/{VoxelModels → Voxels}/State/SchemaRegister.d.ts +5 -5
- package/Voxels/State/SchemaRegister.js +56 -0
- package/{VoxelModels → Voxels}/State/State.types.d.ts +25 -2
- package/{VoxelModels → Voxels}/State/StateTreeReader.d.ts +1 -1
- package/{VoxelModels → Voxels}/State/StateTreeReader.js +3 -0
- package/Voxels/State/VoxelTagStates.d.ts +22 -0
- package/Voxels/State/VoxelTagStates.js +47 -0
- package/Voxels/Voxel.types.d.ts +94 -0
- package/Voxels/Voxel.types.js +16 -0
- package/Voxels/VoxelMaterial.types.d.ts +8 -0
- package/Voxels/VoxelSubstances.types.d.ts +21 -0
- package/Voxels/VoxelSubstances.types.js +9 -0
- package/{VoxelModels/VoxelModelRules.types.d.ts → Voxels/VoxelSyncData.d.ts} +15 -11
- package/Voxels/VoxelSyncData.js +1 -0
- package/Voxels/index.d.ts +3 -0
- package/Voxels/index.js +3 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +34 -28
- package/Analyzer/Analyzer.d.ts +0 -18
- package/Analyzer/Analyzer.js +0 -91
- package/Analyzer/AnalyzerProcessor.d.ts +0 -6
- package/Analyzer/AnalyzerProcessor.js +0 -39
- package/Contexts/Constructor/ConstructorTasks.d.ts +0 -2
- package/Contexts/Constructor/ConstructorTasks.js +0 -82
- package/Contexts/Constructor/ConstructorTasksIds.js +0 -22
- package/Contexts/Constructor/ConstructorThreadState.d.ts +0 -5
- package/Contexts/Constructor/ConstructorThreadState.js +0 -16
- package/Contexts/Constructor/InitWorker.d.ts +0 -2
- package/Contexts/Constructor/InitWorker.js +0 -20
- package/Contexts/Constructor/Tasks/TasksRequest.d.ts +0 -141
- package/Contexts/Constructor/Tasks/TasksRequest.js +0 -218
- package/Contexts/Constructor/Tasks/VoxelUpdate.js +0 -151
- package/Contexts/Nexus/InitWorker.d.ts +0 -2
- package/Contexts/Nexus/InitWorker.js +0 -15
- package/Contexts/Nexus/Threads/NexusTheads.js +0 -25
- package/Contexts/Nexus/Threads/NexusThreadState.d.ts +0 -7
- package/Contexts/Nexus/Threads/NexusThreadState.js +0 -10
- package/Contexts/Render/InitThreads.d.ts +0 -2
- package/Contexts/Render/InitThreads.js +0 -53
- package/Contexts/Render/Scene/MeshManager.d.ts +0 -15
- package/Contexts/Render/Scene/MeshManager.js +0 -105
- package/Contexts/Render/Scene/MeshRegister.types.d.ts +0 -13
- package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.d.ts +0 -21
- package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.js +0 -33
- package/Contexts/RichWorld/InitWorker.d.ts +0 -2
- package/Contexts/RichWorld/InitWorker.js +0 -15
- package/Contexts/RichWorld/RichDataRegister.d.ts +0 -24
- package/Contexts/RichWorld/RichDataRegister.js +0 -110
- package/Contexts/RichWorld/RichWorldTasks.d.ts +0 -2
- package/Contexts/RichWorld/RichWorldTasks.js +0 -58
- package/Contexts/RichWorld/Threads/RichWorldThreadState.d.ts +0 -7
- package/Contexts/RichWorld/Threads/RichWorldThreadState.js +0 -10
- package/Contexts/RichWorld/Threads/RichWorldThreads.d.ts +0 -10
- package/Contexts/RichWorld/Threads/RichWorldThreads.js +0 -22
- package/Contexts/RichWorld/Tools/RichColumnDataTool.d.ts +0 -7
- package/Contexts/RichWorld/Tools/RichColumnDataTool.js +0 -18
- package/Contexts/RichWorld/Tools/RichDataTool.d.ts +0 -14
- package/Contexts/RichWorld/Tools/RichDataTool.js +0 -71
- package/Contexts/RichWorld/index.d.ts +0 -1
- package/Contexts/RichWorld/index.js +0 -1
- package/Contexts/World/Data/Classes/RegisterDataManager.d.ts +0 -8
- package/Contexts/World/Data/Classes/RegisterDataManager.js +0 -22
- package/Contexts/World/Data/DVEFDataStructs.d.ts +0 -7
- package/Contexts/World/Data/DVEFDataStructs.js +0 -21
- package/Contexts/World/Data/DataRegister.d.ts +0 -8
- package/Contexts/World/Data/DataRegister.js +0 -9
- package/Contexts/World/Data/DataStructBuilders.d.ts +0 -12
- package/Contexts/World/Data/DataStructBuilders.js +0 -23
- package/Contexts/World/Data/Generators/SubstanceDataGenerator.d.ts +0 -5
- package/Contexts/World/Data/Generators/SubstanceDataGenerator.js +0 -36
- package/Contexts/World/Data/Generators/WorldDataGenerator.d.ts +0 -12
- package/Contexts/World/Data/Generators/WorldDataGenerator.js +0 -24
- package/Contexts/World/Data/Managers/DataManagers.d.ts +0 -5
- package/Contexts/World/Data/Managers/DataManagers.js +0 -126
- package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.d.ts +0 -2
- package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.js +0 -57
- package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.d.ts +0 -2
- package/Contexts/World/Data/Structs/ChunkStruct.d.ts +0 -3
- package/Contexts/World/Data/Structs/ColumnStruct.d.ts +0 -3
- package/Contexts/World/InitWorker.d.ts +0 -2
- package/Contexts/World/InitWorker.js +0 -35
- package/Contexts/World/WorldDataHooks.js +0 -96
- package/Contexts/World/WorldThreadState.d.ts +0 -4
- package/Contexts/World/WorldThreadState.js +0 -6
- package/Data/Constants/Structs/ChunkStructProperties.d.ts +0 -10
- package/Data/Constants/Structs/ChunkStructProperties.js +0 -10
- package/Data/Constants/Structs/SubstanceStructProperties.d.ts +0 -8
- package/Data/Constants/Structs/SubstanceStructProperties.js +0 -8
- package/Data/Constants/Structs/VoxelStructProperties.d.ts +0 -11
- package/Data/Constants/Structs/VoxelStructProperties.js +0 -11
- package/Data/Constants/Structs/WorldDataStructProperties.d.ts +0 -8
- package/Data/Constants/Structs/WorldDataStructProperties.js +0 -8
- package/Data/Constants/SubstanceTagIds.d.ts +0 -12
- package/Data/Constants/SubstanceTagIds.js +0 -13
- package/Data/Constants/VoxelTagIds.d.ts +0 -14
- package/Data/Constants/VoxelTagIds.js +0 -15
- package/Data/DVEFDataCore.d.ts +0 -7
- package/Data/DVEFDataCore.js +0 -7
- package/Data/DVEFDataManager.d.ts +0 -31
- package/Data/DVEFDataManager.js +0 -23
- package/Data/DVEFDataSyncNode.d.ts +0 -20
- package/Data/DVEFDataSyncNode.js +0 -53
- package/Data/Substance/SubstancePalette.d.ts +0 -9
- package/Data/Substance/SubstancePalette.js +0 -16
- package/Data/Substance/SubstanceStruct.d.ts +0 -20
- package/Data/Types/DataSync.types.d.ts +0 -3
- package/Data/Types/VoxelData.types.d.ts +0 -7
- package/Data/Voxel/VoxelPalette.d.ts +0 -12
- package/Data/Voxel/VoxelPalette.js +0 -22
- package/Data/Voxel/VoxelStruct.d.ts +0 -26
- package/IWG/Constants/ColumnState.d.ts +0 -6
- package/IWG/Constants/ColumnState.js +0 -7
- package/Interfaces/Anaylzer/DVEAnaylzer.d.ts +0 -5
- package/Interfaces/Anaylzer/DVEAnaylzer.js +0 -2
- package/Interfaces/Classes/ThreadState.d.ts +0 -7
- package/Interfaces/Classes/ThreadState.js +0 -7
- package/Interfaces/Data/DVEDataCore.d.ts +0 -6
- package/Interfaces/Data/DVEDataCore.js +0 -2
- package/Interfaces/Data/DataManager.d.ts +0 -13
- package/Interfaces/Data/DataManager.js +0 -14
- package/Interfaces/Data/RemoteDataSyncNode.d.ts +0 -16
- package/Interfaces/Data/RemoteDataSyncNode.js +0 -36
- package/Interfaces/Render/DVEFOManager.d.ts +0 -7
- package/Interfaces/Render/DVEFOManager.js +0 -6
- package/Interfaces/Render/DVEMeshCuller.d.ts +0 -7
- package/Interfaces/Render/DVEMeshCuller.js +0 -8
- package/Interfaces/Render/DVERenderer.d.ts +0 -14
- package/Interfaces/Render/Nodes/DVENodeManager.d.ts +0 -6
- package/Interfaces/Render/Nodes/DVENodeManager.js +0 -2
- package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.d.ts +0 -5
- package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.js +0 -2
- package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.d.ts +0 -13
- package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.js +0 -6
- package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.d.ts +0 -5
- package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.js +0 -2
- package/Mesher/Calc/Flow/FlowGradient.d.ts +0 -5
- package/Mesher/Calc/Light/LightGradient.d.ts +0 -13
- package/Mesher/Calc/Light/LightGradient.js +0 -255
- package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.d.ts +0 -13
- package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.js +0 -77
- package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.d.ts +0 -27
- package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.js +0 -75
- package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.d.ts +0 -13
- package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.js +0 -56
- package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.d.ts +0 -13
- package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.js +0 -80
- package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.d.ts +0 -16
- package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.js +0 -58
- package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.d.ts +0 -12
- package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.js +0 -46
- package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.d.ts +0 -12
- package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.js +0 -23
- package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.d.ts +0 -12
- package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.js +0 -23
- package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.d.ts +0 -12
- package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.js +0 -50
- package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.d.ts +0 -12
- package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.js +0 -45
- package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.d.ts +0 -7
- package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.js +0 -3
- package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.d.ts +0 -44
- package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.js +0 -75
- package/Mesher/Meshers/Classes/Mesher.d.ts +0 -6
- package/Mesher/Meshers/Classes/Mesher.js +0 -6
- package/Mesher/Meshers/Meshers/VoxelMesher.d.ts +0 -11
- package/Mesher/Meshers/Meshers/VoxelMesher.js +0 -47
- package/Mesher/Processors/TemplateProcessor.d.ts +0 -16
- package/Mesher/Processors/TemplateProcessor.js +0 -71
- package/Mesher/Rules/Overrides/OverrideBase.d.ts +0 -8
- package/Mesher/Rules/Overrides/OverrideBase.js +0 -20
- package/Mesher/Rules/Overrides/OverridesManager.d.ts +0 -10
- package/Mesher/Rules/Overrides/OverridesManager.js +0 -10
- package/Mesher/Rules/RenderedSubstances.js +0 -13
- package/Mesher/Rules/SubstanceRules.d.ts +0 -7
- package/Mesher/Rules/SubstanceRules.js +0 -60
- package/Mesher/Shapes/ShapeTool.d.ts +0 -8
- package/Mesher/Shapes/ShapeTool.js +0 -9
- package/Mesher/Shapes/VoxelShapeBase.d.ts +0 -5
- package/Mesher/Shapes/VoxelShapeBase.js +0 -3
- package/Mesher/Shapes/VoxelShapeManager.d.ts +0 -10
- package/Mesher/Shapes/VoxelShapeManager.js +0 -37
- package/Mesher/Shapes/default/Cube/Cube.voxel.shape.d.ts +0 -15
- package/Mesher/Shapes/default/Cube/Cube.voxel.shape.js +0 -234
- package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.d.ts +0 -24
- package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.js +0 -231
- package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.d.ts +0 -16
- package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.js +0 -250
- package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.d.ts +0 -8
- package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.js +0 -67
- package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.d.ts +0 -8
- package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.js +0 -68
- package/Mesher/Shapes/default/Panel/PanelStates.d.ts +0 -8
- package/Mesher/Shapes/default/Panel/PanelStates.js +0 -9
- package/Mesher/Shapes/default/RegisterDefaultShapes.js +0 -10
- package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.d.ts +0 -15
- package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.js +0 -31
- package/Mesher/Shapes/default/Stairs/StairOverrides.d.ts +0 -17
- package/Mesher/Shapes/default/Stairs/StairOverrides.js +0 -151
- package/Mesher/Shapes/default/Stairs/StairShapes.d.ts +0 -2
- package/Mesher/Shapes/default/Stairs/StairShapes.js +0 -546
- package/Mesher/Shapes/default/Stairs/StairStates.d.ts +0 -19
- package/Mesher/Shapes/default/Stairs/StairStates.js +0 -37
- package/Mesher/Shapes/default/index.d.ts +0 -6
- package/Mesher/Shapes/default/index.js +0 -6
- package/Mesher/Tools/BuilderDataTool.d.ts +0 -4
- package/Mesher/Tools/BuilderDataTool.js +0 -7
- package/Mesher/Types/Override.types.d.ts +0 -8
- package/Propagation/Explosion/ExplosionManager.d.ts +0 -4
- package/Propagation/Flow/Functions/FlowRemove.d.ts +0 -2
- package/Propagation/Flow/Functions/FlowUpdate.d.ts +0 -2
- package/Propagation/Illumanation/Functions/RGBUpdate.d.ts +0 -3
- package/Propagation/Illumanation/Functions/RGBUpdate.js +0 -169
- package/Propagation/Illumanation/Functions/SunUpdate.d.ts +0 -3
- package/Propagation/Illumanation/Functions/SunUpdate.js +0 -187
- package/Propagation/Illumanation/Functions/WorldSun.d.ts +0 -2
- package/Propagation/Illumanation/Functions/WorldSun.js +0 -190
- package/Propagation/Propagation.d.ts +0 -13
- package/Shaders/Code/Functions/FogShaders.d.ts +0 -2
- package/Shaders/Code/Functions/FogShaders.js +0 -59
- package/Shaders/Code/Functions/FragmentFunctions.d.ts +0 -2
- package/Shaders/Code/Functions/FragmentFunctions.js +0 -155
- package/Shaders/Code/Functions/UtilShaders.d.ts +0 -2
- package/Shaders/Code/Functions/UtilShaders.js +0 -209
- package/Shaders/Code/Functions/VertexFunctions.d.ts +0 -2
- package/Shaders/Code/Functions/VertexFunctions.js +0 -73
- package/Shaders/Code/Snippets/FragmentSnippets.d.ts +0 -2
- package/Shaders/Code/Snippets/FragmentSnippets.js +0 -93
- package/Shaders/Code/Snippets/VertexSnippets.d.ts +0 -2
- package/Shaders/Code/Snippets/VertexSnippets.js +0 -28
- package/Shaders/Code/Snippets/VoxelSnippets.d.ts +0 -2
- package/Shaders/Code/Snippets/VoxelSnippets.js +0 -137
- package/Shaders/DVEShaderRegister.d.ts +0 -42
- package/Shaders/DVEShaderRegister.js +0 -15
- package/Shaders/DVEShaders.d.ts +0 -55
- package/Shaders/DVEShaders.js +0 -369
- package/Shaders/Types/Shader.types.d.ts +0 -14
- package/Textures/TextureType.d.ts +0 -63
- package/Textures/TextureType.js +0 -287
- package/Tools/Data/RichDataTool.d.ts +0 -25
- package/Tools/Data/RichDataTool.js +0 -121
- package/Types/DataSync.types.d.ts +0 -25
- package/Types/Substances.types.d.ts +0 -4
- package/Types/Voxel.types.d.ts +0 -12
- package/Types/index.d.ts +0 -2
- package/Types/index.js +0 -2
- package/VoxelModels/Constructor/InitVoxelModelsConstructor.d.ts +0 -2
- package/VoxelModels/Constructor/InitVoxelModelsConstructor.js +0 -20
- package/VoxelModels/Constructor/Nodes/GeometryNode.d.ts +0 -15
- package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +0 -22
- package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +0 -23
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +0 -21
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +0 -138
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +0 -22
- package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.d.ts +0 -15
- package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.js +0 -14
- package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.d.ts +0 -13
- package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.js +0 -33
- package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.d.ts +0 -9
- package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.js +0 -27
- package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.d.ts +0 -14
- package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.js +0 -31
- package/VoxelModels/Constructor/Register/VoxelModelsConstructor.d.ts +0 -13
- package/VoxelModels/Constructor/Register/VoxelModelsConstructor.js +0 -21
- package/VoxelModels/Constructor/VoxelModelVoxelConstructor.d.ts +0 -24
- package/VoxelModels/InitVoxelModels.d.ts +0 -10
- package/VoxelModels/Rules/Classes/VoxelRulesGeometry.d.ts +0 -19
- package/VoxelModels/State/Schema/BinarySchema.js +0 -52
- package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.js +0 -13
- package/VoxelModels/State/SchemaRegister.js +0 -50
- package/VoxelModels/Tags/TagsOverrides.d.ts +0 -5
- package/VoxelModels/Tags/TagsOverrides.js +0 -4
- package/VoxelModels/World/InitVoxelModelsWorld.d.ts +0 -2
- package/VoxelModels/World/InitVoxelModelsWorld.js +0 -11
- package/WorldGeneration/WorldGenBrush.d.ts +0 -75
- package/WorldGeneration/WorldGenBrush.js +0 -136
- /package/{Contexts/Render/Scene/MeshRegister.types.js → Cache/Cache.types.js} +0 -0
- /package/{Data/Types/DataSync.types.js → Contexts/Base/Main/Generator/DataGenerator.types.js} +0 -0
- /package/{Types → Contexts/Base/Remote/Sync}/DataSync.types.js +0 -0
- /package/{Interfaces/Common → Contexts/Base/Remote/Sync}/DataSyncIds.d.ts +0 -0
- /package/{Interfaces/Common → Contexts/Base/Remote/Sync}/DataSyncIds.js +0 -0
- /package/Contexts/{World/WorldDataHooks.d.ts → Base/Remote/Sync/InitWorldDataSync.d.ts} +0 -0
- /package/Contexts/Constructor/{ConstructorRemoteThreadTasks.d.ts → Tasks/ConstructorRemoteThreadTasks.d.ts} +0 -0
- /package/Contexts/Constructor/{ConstructorRemoteThreadTasks.js → Tasks/ConstructorRemoteThreadTasks.js} +0 -0
- /package/Contexts/Constructor/{DVEConstructorTasksQueues.d.ts → Tasks/DVEConstructorTasksQueues.d.ts} +0 -0
- /package/Data/{Types/VoxelData.types.js → Cursor/World/WorldSectionCursor.interface.js} +0 -0
- /package/{Types → Data/Types}/StructBuilder.types.d.ts +0 -0
- /package/{Types → Data/Types}/StructBuilder.types.js +0 -0
- /package/{DataLoader/Types/DVED.types.js → Mesher/Meshers/MesherInterface.js} +0 -0
- /package/{Interfaces/Render/Nodes/DVERenderNode.types.js → Mesher/Types/Mesher.types.js} +0 -0
- /package/{VoxelModels → Models}/Defaults/CubeVoxelGeometry.d.ts +0 -0
- /package/{VoxelModels → Models}/Defaults/CubeVoxelGeometry.js +0 -0
- /package/{VoxelModels → Models}/Defaults/CubeVoxelModels.d.ts +0 -0
- /package/{VoxelModels → Models}/Defaults/CubeVoxelModels.js +0 -0
- /package/{VoxelModels → Models}/Defaults/PanelVoxelGeometry.d.ts +0 -0
- /package/{VoxelModels → Models}/Defaults/PanelVoxelGeometry.js +0 -0
- /package/{VoxelModels → Models}/Defaults/PanelVoxelModels.d.ts +0 -0
- /package/{VoxelModels → Models}/Defaults/PanelVoxelModels.js +0 -0
- /package/{VoxelModels → Models}/Defaults/StairVoxelModel.d.ts +0 -0
- /package/{VoxelModels → Models}/Defaults/StairVoxelModel.js +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelAOResultsIndex.d.ts +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelAOResultsIndex.js +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelFaceCullResultsIndex.d.ts +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelFaceCullResultsIndex.js +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelFaceTransparentResultsIndex.d.ts +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelFaceTransparentResultsIndex.js +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelRelativeCubeIndex.d.ts +0 -0
- /package/{VoxelModels → Models}/Indexing/VoxelRelativeCubeIndex.js +0 -0
- /package/{VoxelModels → Models}/Input/BoxVoxelGometryInputs.d.ts +0 -0
- /package/{VoxelModels → Models}/Input/QuadVoxelGometryInputs.d.ts +0 -0
- /package/{VoxelModels → Models}/Input/QuadVoxelGometryInputs.js +0 -0
- /package/{VoxelModels → Models}/Rules/Classes/OcclusionFace.d.ts +0 -0
- /package/{VoxelModels → Models}/Rules/Classes/VoxelRulesModel.js +0 -0
- /package/{VoxelModels → Models}/Rules/Functions/BuildFinalInputs.d.ts +0 -0
- /package/{VoxelModels → Models}/Rules/Functions/BuildFinalInputs.js +0 -0
- /package/{VoxelModels → Models}/Rules/Functions/BuildGeomtryInputs.d.ts +0 -0
- /package/{VoxelModels → Models}/Rules/Functions/BuildRules.js +0 -0
- /package/{VoxelModels → Models}/VoxelModel.types.js +0 -0
- /package/{Interfaces/WorldGen/WorldGen.types.js → Renderer/DVEChunkMeshInterface.js} +0 -0
- /package/{Mesher/Types/Override.types.js → Renderer/DVERenderNode.types.js} +0 -0
- /package/{Interfaces/Render → Renderer}/DVERenderer.js +0 -0
- /package/{Analyzer → Tasks/Analyzer}/AnalyzerUpdater.js +0 -0
- /package/{Mesher/Shapes/default/RegisterDefaultShapes.d.ts → Tasks/Analyzer/InitTasks.d.ts} +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBase.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBase.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBaseManager.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/WorldDataBaseManager.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/index.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Broswer/index.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/DataLoaderTasks.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/DataLoaderTasks.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/DivineVoxelEngineDataLoaderConstructor.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/DivineVoxelEngineDataLoaderConstructor.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/index.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Constructor/index.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/System/RegionSystem.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/System/System.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/System/System.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/System/SystemPath.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/System/SystemPath.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/Tools/NodeRegionTool.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/Util/DVED.util.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/index.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Node/index.js +0 -0
- /package/{DataLoader → Tasks/DataLoader}/Types/DVED.types.d.ts +0 -0
- /package/{Shaders/Types/Shader.types.js → Tasks/DataLoader/Types/DVED.types.js} +0 -0
- /package/{DataLoader → Tasks/DataLoader}/World/DataLoaderTasks.d.ts +0 -0
- /package/{DataLoader → Tasks/DataLoader}/World/DivineVoxelEngineDataLoaderWorld.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGBatchTask.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGSingleTask.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGSingleTask.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskRegister.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Classes/Tasks/IWGTaskRegister.js +0 -0
- /package/{IWG → Tasks/IWG}/World/IWG.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/InitLoad.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/InitLoad.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/LoaderBase.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/LoaderBase.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/SafeExit.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Load/Teleport.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/RegisterDefaultTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/RegisterDefaultTasks.js +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/Rendering/IWGBuildTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveAndUnloadTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/Saving/IWGSaveTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGDecorateTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGGenerateTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGLoadTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGPropagationTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Tasks/WorldGen/IWGWorldSunTasks.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Types/IWG.types.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/Types/IWG.types.js +0 -0
- /package/{IWG → Tasks/IWG}/World/index.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/World/index.js +0 -0
- /package/{IWG → Tasks/IWG}/index.d.ts +0 -0
- /package/{IWG → Tasks/IWG}/index.js +0 -0
- /package/{Propagation → Tasks/Propagation}/index.d.ts +0 -0
- /package/{Propagation → Tasks/Propagation}/index.js +0 -0
- /package/{Types → Tasks}/Tasks.types.js +0 -0
- /package/{Types/Substances.types.js → Tasks/WorldGeneration/WorldGen.types.js} +0 -0
- /package/{Interfaces/Data → Tools/Classes}/LocationBoundToolBase.d.ts +0 -0
- /package/{Interfaces/Data → Tools/Classes}/LocationBoundToolBase.js +0 -0
- /package/{Interfaces/Data → Util}/NumberPalette.d.ts +0 -0
- /package/{Interfaces/Data → Util}/NumberPalette.js +0 -0
- /package/{Interfaces/Data → Util}/StringPalette.d.ts +0 -0
- /package/{Interfaces/Data → Util}/StringPalette.js +0 -0
- /package/{Types → Util}/Util.types.d.ts +0 -0
- /package/{Types → Util}/Util.types.js +0 -0
- /package/{Types/Voxel.types.js → Voxels/Effects/VoxelEffects.types.js} +0 -0
- /package/{Data → Voxels}/LightData.d.ts +0 -0
- /package/{Data → Voxels}/LightData.js +0 -0
- /package/{VoxelModels → Voxels}/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +0 -0
- /package/{VoxelModels → Voxels}/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +0 -0
- /package/{VoxelModels → Voxels}/State/Schema/ShapeStateRelationsNode.d.ts +0 -0
- /package/{VoxelModels → Voxels}/State/Schema/ShapeStateRelationsNode.js +0 -0
- /package/{VoxelModels → Voxels}/State/State.types.js +0 -0
- /package/{VoxelModels/VoxelModelRules.types.js → Voxels/VoxelMaterial.types.js} +0 -0
- /package/{Data → Voxels}/VoxelShaderData.d.ts +0 -0
- /package/{Data → Voxels}/VoxelShaderData.js +0 -0
- /package/{Data → Voxels}/VoxelStateReader.d.ts +0 -0
- /package/{Data → Voxels}/VoxelStateReader.js +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { WorldGenRegister } from "./WorldGenRegister.js";
|
|
2
|
+
import { BrushTool } from "../../Tools/Brush/Brush.js";
|
|
3
|
+
import { LightData } from "../../Voxels/LightData.js";
|
|
4
|
+
import { WorldGeneration } from "./WorldGeneration.js";
|
|
5
|
+
import { SafePromise } from "@amodx/core/Promises/SafePromise.js";
|
|
6
|
+
import { Propagation } from "../Propagation/Propagation.js";
|
|
7
|
+
import { DivineVoxelEngineConstructor } from "../../Contexts/Constructor/DivineVoxelEngineConstructor.js";
|
|
8
|
+
import { UpdateTask } from "../Update/UpdateTask.js";
|
|
9
|
+
export class WorldGenBrush extends BrushTool {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
WorldGeneration._brushes.push(this);
|
|
13
|
+
}
|
|
14
|
+
requestsId;
|
|
15
|
+
tasks = new UpdateTask();
|
|
16
|
+
start(dimension, x, y, z) {
|
|
17
|
+
this.dataCursor.setFocalPoint(dimension, x, y, z);
|
|
18
|
+
this.tasks.setOrigin([dimension, x, y, z]);
|
|
19
|
+
this.dimension = dimension;
|
|
20
|
+
this.x = x;
|
|
21
|
+
this.y = y;
|
|
22
|
+
this.z = z;
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
paint() {
|
|
26
|
+
let voxel = this.dataCursor.getVoxel(this.x, this.y, this.z);
|
|
27
|
+
if (!voxel) {
|
|
28
|
+
if (this.requestsId != "") {
|
|
29
|
+
WorldGenRegister.addToRequest(this.requestsId, [this.dimension, this.x, this.y, this.z], this.voxelCursor.getRaw());
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
throw new Error(`Tried painting in an unloaded location ${[
|
|
33
|
+
this.dimension,
|
|
34
|
+
this.x,
|
|
35
|
+
this.y,
|
|
36
|
+
this.z,
|
|
37
|
+
].toString()}`);
|
|
38
|
+
}
|
|
39
|
+
const sl = voxel.getLight();
|
|
40
|
+
if (sl > 0 || !voxel.isAir()) {
|
|
41
|
+
this._erase();
|
|
42
|
+
voxel.setLight(sl < 0 ? 0 : sl);
|
|
43
|
+
if (LightData.hasRGBLight(sl)) {
|
|
44
|
+
this.tasks.rgb.remove.push(this.x, this.y, this.z);
|
|
45
|
+
Propagation.instance.rgbRemove(this.tasks);
|
|
46
|
+
}
|
|
47
|
+
if (LightData.hasSunLight(sl)) {
|
|
48
|
+
this.tasks.sun.remove.push(this.x, this.y, this.z);
|
|
49
|
+
Propagation.instance.sunRemove(this.tasks);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
this._paint();
|
|
53
|
+
this.tasks.bounds.update(this.x, this.y, this.z);
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
getUpdatedChunks() {
|
|
57
|
+
const queue = this.tasks.bounds.getChunks();
|
|
58
|
+
this.tasks.bounds.reset();
|
|
59
|
+
return queue;
|
|
60
|
+
}
|
|
61
|
+
update() {
|
|
62
|
+
let voxel = this.dataCursor.getVoxel(this.x, this.y, this.z);
|
|
63
|
+
if (!voxel)
|
|
64
|
+
return false;
|
|
65
|
+
const sl = voxel.getLight();
|
|
66
|
+
if (LightData.hasRGBLight(sl)) {
|
|
67
|
+
this.tasks.rgb.update.push(this.x, this.y, this.z);
|
|
68
|
+
// Propagation.instance.rgbUpdate(this.tasks);
|
|
69
|
+
}
|
|
70
|
+
if (LightData.hasSunLight(sl)) {
|
|
71
|
+
this.tasks.sun.update.push(this.x, this.y, this.z);
|
|
72
|
+
// Propagation.instance.sunUpdate(this.tasks);
|
|
73
|
+
}
|
|
74
|
+
this.tasks.bounds.update(this.x, this.y, this.z);
|
|
75
|
+
}
|
|
76
|
+
erase() {
|
|
77
|
+
let voxel = this.dataCursor.getVoxel(this.x, this.y, this.z);
|
|
78
|
+
if (!voxel)
|
|
79
|
+
return this;
|
|
80
|
+
const sl = voxel.getLight();
|
|
81
|
+
this._erase();
|
|
82
|
+
voxel = this.dataCursor.getVoxel(this.x, this.y, this.z);
|
|
83
|
+
voxel.setLight(sl > 0 ? sl : 0);
|
|
84
|
+
if (LightData.hasRGBLight(sl)) {
|
|
85
|
+
this.tasks.rgb.remove.push(this.x, this.y, this.z);
|
|
86
|
+
Propagation.instance.rgbRemove(this.tasks);
|
|
87
|
+
}
|
|
88
|
+
if (LightData.hasSunLight(sl)) {
|
|
89
|
+
this.tasks.sun.remove.push(this.x, this.y, this.z);
|
|
90
|
+
Propagation.instance.sunRemove(this.tasks);
|
|
91
|
+
}
|
|
92
|
+
this.tasks.bounds.update(this.x, this.y, this.z);
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
runUpdates() {
|
|
96
|
+
Propagation.instance.rgbUpdate(this.tasks);
|
|
97
|
+
Propagation.instance.sunUpdate(this.tasks);
|
|
98
|
+
this.tasks.rgb.removeMap.clear();
|
|
99
|
+
this.tasks.sun.removeMap.clear();
|
|
100
|
+
}
|
|
101
|
+
worldAlloc(start, end) {
|
|
102
|
+
return new SafePromise("worldAlloc", (resolve) => {
|
|
103
|
+
DivineVoxelEngineConstructor.instance.threads.world.runPromiseTasks("world-alloc", [this.dimension, start, end], [], () => {
|
|
104
|
+
resolve(true);
|
|
105
|
+
});
|
|
106
|
+
}).run();
|
|
107
|
+
}
|
|
108
|
+
worldDealloc(start, end) {
|
|
109
|
+
return new SafePromise("worldDealloc", (resolve) => {
|
|
110
|
+
DivineVoxelEngineConstructor.instance.threads.world.runPromiseTasks("world-dealloc", [this.dimension, start, end], [], () => {
|
|
111
|
+
resolve(true);
|
|
112
|
+
});
|
|
113
|
+
}).run();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LocationData } from "
|
|
2
|
-
import { RawVoxelData } from "
|
|
1
|
+
import type { LocationData } from "../../Math";
|
|
2
|
+
import { RawVoxelData } from "../../Voxels/Voxel.types";
|
|
3
3
|
export declare class WorldGenRegister {
|
|
4
4
|
static MAX_ATTEMPTS: number;
|
|
5
5
|
static _requests: Map<string, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { WorldSpaces } from "
|
|
2
|
-
import { BrushTool } from "
|
|
3
|
-
import { ChunkDataTool } from "
|
|
4
|
-
import { WorldBounds } from "
|
|
5
|
-
import { DivineVoxelEngineConstructor } from "Contexts/Constructor";
|
|
1
|
+
import { WorldSpaces } from "../../Data/World/WorldSpaces.js";
|
|
2
|
+
import { BrushTool } from "../../Tools/Brush/Brush";
|
|
3
|
+
import { ChunkDataTool } from "../../Tools/Data/WorldData/ChunkDataTool";
|
|
4
|
+
import { WorldBounds } from "../../Data/World/WorldBounds";
|
|
5
|
+
import { DivineVoxelEngineConstructor } from "../../Contexts/Constructor";
|
|
6
6
|
const brush = new BrushTool();
|
|
7
|
-
const dataTool = brush.
|
|
7
|
+
const dataTool = brush.voxelCursor;
|
|
8
8
|
const chunkTool = new ChunkDataTool();
|
|
9
9
|
export class WorldGenRegister {
|
|
10
10
|
static MAX_ATTEMPTS = 100;
|
|
@@ -76,17 +76,16 @@ export class WorldGenRegister {
|
|
|
76
76
|
}
|
|
77
77
|
return false;
|
|
78
78
|
}
|
|
79
|
-
brush.setDimension(requests.dimension);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
79
|
+
/* brush.setDimension(requests.dimension);
|
|
80
|
+
dataTool.setDimension(requests.dimension);
|
|
81
|
+
const voxels = requests.voxels;
|
|
82
|
+
brush.start();
|
|
83
|
+
while (voxels.length) {
|
|
84
|
+
const data = voxels.shift();
|
|
85
|
+
if (!data) break;
|
|
86
|
+
dataTool.loadInAt(data[0], data[1], data[2]);
|
|
87
|
+
brush.setXYZ(data[0], data[1], data[2]).setRaw(data[3]).paint();
|
|
88
|
+
} */
|
|
90
89
|
brush.stop();
|
|
91
90
|
this._requests.delete(registerId);
|
|
92
91
|
return true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WorldBounds } from "
|
|
1
|
+
import { WorldBounds } from "../../Data/World/WorldBounds.js";
|
|
2
2
|
import { WorldGenRegister } from "./WorldGenRegister.js";
|
|
3
3
|
import { WorldGenBrush } from "./WorldGenBrush.js";
|
|
4
|
-
import { WorldGenInterface } from "
|
|
5
|
-
import { GenerateTasks } from "../
|
|
4
|
+
import { WorldGenInterface } from "./WorldGen.types.js";
|
|
5
|
+
import { GenerateTasks } from "../Tasks.types.js";
|
|
6
6
|
export declare class WorldGeneration {
|
|
7
7
|
static worldGen: WorldGenInterface | null;
|
|
8
8
|
static register: typeof WorldGenRegister;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
//types
|
|
2
2
|
//objects
|
|
3
|
-
import { WorldBounds } from "
|
|
3
|
+
import { WorldBounds } from "../../Data/World/WorldBounds.js";
|
|
4
4
|
import { WorldGenRegister } from "./WorldGenRegister.js";
|
|
5
5
|
//tools
|
|
6
6
|
import { WorldGenBrush } from "./WorldGenBrush.js";
|
|
7
7
|
import { SafeInterval } from "@amodx/core/Intervals/SafeInterval.js";
|
|
8
|
-
import { Threads } from "@amodx/threads";
|
|
9
|
-
import { ConstructorTasksIds } from "Contexts/Constructor/ConstructorTasksIds.js";
|
|
10
8
|
export class WorldGeneration {
|
|
11
9
|
static worldGen = null;
|
|
12
10
|
static register = WorldGenRegister;
|
|
@@ -42,13 +40,3 @@ export class WorldGeneration {
|
|
|
42
40
|
return brush;
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
|
-
Threads.registerTasks(ConstructorTasksIds.Generate, (data, onDone) => {
|
|
46
|
-
if (!onDone)
|
|
47
|
-
return;
|
|
48
|
-
WorldGeneration.generate(data, "generate", onDone);
|
|
49
|
-
}, "deferred");
|
|
50
|
-
Threads.registerTasks(ConstructorTasksIds.Decorate, (data, onDone) => {
|
|
51
|
-
if (!onDone)
|
|
52
|
-
return;
|
|
53
|
-
WorldGeneration.generate(data, "decorate", onDone);
|
|
54
|
-
}, "deferred");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Flat3DIndex, Vec3Array } from "@amodx/math";
|
|
2
|
+
import { FullVoxelTemplateData } from "./VoxelTemplates.types";
|
|
3
|
+
export declare class FullVoxelTemplate {
|
|
4
|
+
static CreateNew(size: Vec3Array, baseLightValue?: number): FullVoxelTemplateData;
|
|
5
|
+
index: Flat3DIndex;
|
|
6
|
+
size: Vec3Array;
|
|
7
|
+
ids: Uint16Array;
|
|
8
|
+
state: Uint16Array;
|
|
9
|
+
light: Uint16Array;
|
|
10
|
+
mod: Uint16Array;
|
|
11
|
+
secondary: Uint16Array;
|
|
12
|
+
constructor(data: FullVoxelTemplateData);
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Flat3DIndex } from "@amodx/math";
|
|
2
|
+
export class FullVoxelTemplate {
|
|
3
|
+
static CreateNew(size, baseLightValue = 0) {
|
|
4
|
+
const voxelSize = size[0] * size[1] * size[2];
|
|
5
|
+
const chunkBuffer = new SharedArrayBuffer(
|
|
6
|
+
//ids
|
|
7
|
+
voxelSize * 2 +
|
|
8
|
+
//light
|
|
9
|
+
voxelSize * 2 +
|
|
10
|
+
//state
|
|
11
|
+
voxelSize * 2 +
|
|
12
|
+
//mod
|
|
13
|
+
voxelSize * 2 +
|
|
14
|
+
//secondary
|
|
15
|
+
voxelSize * 2);
|
|
16
|
+
let bufferStart = 0;
|
|
17
|
+
const ids = new Uint16Array(chunkBuffer, bufferStart, voxelSize);
|
|
18
|
+
bufferStart += voxelSize * 2;
|
|
19
|
+
const light = new Uint16Array(chunkBuffer, bufferStart, voxelSize);
|
|
20
|
+
bufferStart += voxelSize * 2;
|
|
21
|
+
if (baseLightValue)
|
|
22
|
+
light.fill(baseLightValue);
|
|
23
|
+
const state = new Uint16Array(chunkBuffer, bufferStart, voxelSize);
|
|
24
|
+
bufferStart += voxelSize * 2;
|
|
25
|
+
const mod = new Uint16Array(chunkBuffer, bufferStart, voxelSize);
|
|
26
|
+
bufferStart += voxelSize * 2;
|
|
27
|
+
const secondary = new Uint16Array(chunkBuffer, bufferStart, voxelSize);
|
|
28
|
+
bufferStart += voxelSize * 2;
|
|
29
|
+
return {
|
|
30
|
+
size,
|
|
31
|
+
ids,
|
|
32
|
+
light,
|
|
33
|
+
state,
|
|
34
|
+
secondary,
|
|
35
|
+
mod,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
index = Flat3DIndex.GetXZYOrder();
|
|
39
|
+
size;
|
|
40
|
+
ids;
|
|
41
|
+
state;
|
|
42
|
+
light;
|
|
43
|
+
mod;
|
|
44
|
+
secondary;
|
|
45
|
+
constructor(data) {
|
|
46
|
+
this.size = [...data.size];
|
|
47
|
+
this.index.setBounds(...data.size);
|
|
48
|
+
this.ids = data.ids;
|
|
49
|
+
this.state = data.state;
|
|
50
|
+
this.light = data.light;
|
|
51
|
+
this.mod = data.mod;
|
|
52
|
+
this.secondary = data.secondary;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Flat3DIndex, Traverse } from "@amodx/math";
|
|
2
|
-
import { StringPalette } from "../../
|
|
2
|
+
import { StringPalette } from "../../Util/StringPalette";
|
|
3
3
|
import { VoxelTemplate } from "../VoxelTemplate";
|
|
4
|
-
import { NumberPalette } from "../../
|
|
4
|
+
import { NumberPalette } from "../../Util/NumberPalette";
|
|
5
5
|
import { DataTool } from "../../Tools/Data/DataTool";
|
|
6
6
|
import { convertToPaletteBuffer } from "../../Archive/Functions/Palettes";
|
|
7
7
|
export default function CreateTemplate(dimension, start, end) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Flat3DIndex, Vec3Array } from "@amodx/math";
|
|
2
2
|
import { VoxelTemplateData } from "./VoxelTemplates.types";
|
|
3
|
-
import type { RawVoxelData } from "../
|
|
4
|
-
import { StringPalette } from "../
|
|
5
|
-
import { NumberPalette } from "../
|
|
3
|
+
import type { RawVoxelData } from "../Voxels/Voxel.types";
|
|
4
|
+
import { StringPalette } from "../Util/StringPalette";
|
|
5
|
+
import { NumberPalette } from "../Util/NumberPalette";
|
|
6
6
|
type TemplateCursor = {
|
|
7
7
|
position: Vec3Array;
|
|
8
8
|
raw: RawVoxelData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flat3DIndex, Traverse } from "@amodx/math";
|
|
2
|
-
import { StringPalette } from "../
|
|
3
|
-
import { NumberPalette } from "../
|
|
4
|
-
import { VoxelPalette } from "../Data/
|
|
5
|
-
import { VoxelStruct } from "../Data/
|
|
6
|
-
import {
|
|
2
|
+
import { StringPalette } from "../Util/StringPalette";
|
|
3
|
+
import { NumberPalette } from "../Util/NumberPalette";
|
|
4
|
+
import { VoxelPalette } from "../Data/Palettes/VoxelPalette";
|
|
5
|
+
import { VoxelStruct } from "../Data/Structs/VoxelStruct";
|
|
6
|
+
import { VoxelStructIds } from "../Voxels/Voxel.types";
|
|
7
7
|
import { getPaletteArray } from "../Archive/Functions/Palettes";
|
|
8
8
|
export class VoxelTemplate {
|
|
9
9
|
index = Flat3DIndex.GetXZYOrder();
|
|
@@ -56,7 +56,7 @@ export class VoxelTemplate {
|
|
|
56
56
|
getSecondary(id, index) {
|
|
57
57
|
const secondary = this.secondary;
|
|
58
58
|
VoxelStruct.setVoxel(id);
|
|
59
|
-
if (VoxelStruct.instance[
|
|
59
|
+
if (VoxelStruct.instance[VoxelStructIds.canHaveSecondary] == 1) {
|
|
60
60
|
return VoxelPalette.ids.getNumberId(this.secondaryIdPalette.getStringId(typeof secondary == "number" ? secondary : secondary[index]));
|
|
61
61
|
}
|
|
62
62
|
return this.secondaryStatePalette.getValue(typeof secondary == "number" ? secondary : secondary[index]);
|
|
@@ -5,6 +5,14 @@ export interface VoxelTemplateBuffers {
|
|
|
5
5
|
mod: Uint16Array | Uint8Array | number;
|
|
6
6
|
secondary: Uint16Array | Uint8Array | number;
|
|
7
7
|
}
|
|
8
|
+
export interface FullVoxelTemplateData {
|
|
9
|
+
size: Vec3Array;
|
|
10
|
+
ids: Uint16Array;
|
|
11
|
+
state: Uint16Array;
|
|
12
|
+
light: Uint16Array;
|
|
13
|
+
mod: Uint16Array;
|
|
14
|
+
secondary: Uint16Array;
|
|
15
|
+
}
|
|
8
16
|
export interface VoxelTemplatePaletteData {
|
|
9
17
|
id: string[];
|
|
10
18
|
secondaryId: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type TextureTypes = string;
|
|
2
|
-
export type TextureTypeUVMap = Record<string, Record<string,
|
|
2
|
+
export type TextureTypeUVMap = Record<string, Record<string, number>>;
|
|
3
3
|
export type TextureAnimationData = {
|
|
4
4
|
/**# Frames
|
|
5
5
|
* If the texture has animation frames the number of frames must be set to the number
|
|
@@ -56,10 +56,6 @@ export type TextureData = {
|
|
|
56
56
|
* If the texture is not in the default path specify it here.
|
|
57
57
|
*/
|
|
58
58
|
path?: string;
|
|
59
|
-
/**# Segment
|
|
60
|
-
* Define the segmetn of the texutre. By default it is main.
|
|
61
|
-
*/
|
|
62
|
-
segment?: string;
|
|
63
59
|
/**# normalMap
|
|
64
60
|
* If the texture is an overlay specify it here.
|
|
65
61
|
*/
|
|
@@ -1,135 +1,35 @@
|
|
|
1
1
|
export const TextureAnimationCreator = {
|
|
2
2
|
createAnimations(texture) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
keyCounts = segment.animationTimes[i];
|
|
17
|
-
}
|
|
18
|
-
segment.animations.push({
|
|
19
|
-
uniformIndex: anim[0],
|
|
20
|
-
keys: anim,
|
|
21
|
-
currentFrame: 0,
|
|
22
|
-
currentCount: 0,
|
|
23
|
-
keyCounts: keyCounts,
|
|
24
|
-
});
|
|
25
|
-
i++;
|
|
26
|
-
}
|
|
27
|
-
for (let i = 0; i < segment.totalTextures; i++) {
|
|
28
|
-
if (!animaitonUniform[i]) {
|
|
29
|
-
animaitonUniform[i] = 0;
|
|
3
|
+
if (!texture.paths.size)
|
|
4
|
+
return;
|
|
5
|
+
const animaitonUniform = [];
|
|
6
|
+
let i = 0;
|
|
7
|
+
for (const anim of texture.animationsMap) {
|
|
8
|
+
animaitonUniform[anim[0]] = anim[0];
|
|
9
|
+
let keyCounts = [];
|
|
10
|
+
const animTime = texture.animationTimes[i];
|
|
11
|
+
if (animTime.length == 1) {
|
|
12
|
+
for (let k = 0; k < anim.length; k++) {
|
|
13
|
+
keyCounts.push(animTime[0]);
|
|
30
14
|
}
|
|
31
15
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
id: "textureMasks",
|
|
35
|
-
body: {
|
|
36
|
-
GLSL: /* glsl */ `
|
|
37
|
-
const uint textureIndexMask = uint(0xffff);
|
|
38
|
-
const uint mainTexutreIndex =uint(0);
|
|
39
|
-
const uint secondaryTextureIndex = uint(0xf + 0x1);
|
|
40
|
-
`,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
]);
|
|
44
|
-
segment.animationUniforID =
|
|
45
|
-
`${texture.id}_${key}_texture_animations`.replace("#", "");
|
|
46
|
-
segment.varyingID = `${texture.id}_${key}_texture_index`.replace("#", "");
|
|
47
|
-
const functionName = `get_${texture.id}_${key}_texture_animation_frame`.replace("#", "");
|
|
48
|
-
texture.shader.addUniform([
|
|
49
|
-
[segment.animationUniforID, "float", animaitonUniform.length],
|
|
50
|
-
]);
|
|
51
|
-
if (segment.mode == "sampler") {
|
|
52
|
-
texture.shader.addFunction(functionName, "vertex", {
|
|
53
|
-
inputs: [["index", "int"]],
|
|
54
|
-
output: "float",
|
|
55
|
-
arguments: {},
|
|
56
|
-
body: {
|
|
57
|
-
GLSL: () => /* glsl */ `
|
|
58
|
-
float animatedIndex = ${segment.animationUniforID}[index];
|
|
59
|
-
if(animatedIndex == 0.){
|
|
60
|
-
return float(index);
|
|
61
|
-
}
|
|
62
|
-
if(animatedIndex != 0.){
|
|
63
|
-
return float(animatedIndex);
|
|
64
|
-
}
|
|
65
|
-
return float(index);`,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
texture.shader.addVarying([
|
|
69
|
-
{
|
|
70
|
-
id: segment.varyingID,
|
|
71
|
-
type: "vec3",
|
|
72
|
-
body: {
|
|
73
|
-
GLSL: () => /* glsl */ `
|
|
74
|
-
${segment.varyingID}.x = uv.x;
|
|
75
|
-
${segment.varyingID}.y = uv.y;
|
|
76
|
-
${segment.varyingID}.z = ${functionName}( int( uint( ${segment.attributeID}.x) & textureIndexMask) );
|
|
77
|
-
`,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
]);
|
|
16
|
+
else {
|
|
17
|
+
keyCounts = texture.animationTimes[i];
|
|
81
18
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
frames.x = ${segment.animationUniforID}[texture1Index];
|
|
95
|
-
} else {
|
|
96
|
-
frames.x = float(texture1Index);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
int texture2Index = int(((textureIndexMask << mainTexutreIndex) & uint(${args.attributeID}.y)) >> mainTexutreIndex);
|
|
100
|
-
if( ${segment.animationUniforID}[texture2Index] != 0.) {
|
|
101
|
-
frames.y = ${segment.animationUniforID}[texture2Index];
|
|
102
|
-
} else {
|
|
103
|
-
frames.y = float(texture2Index);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
int texture3Index = int(((textureIndexMask << secondaryTextureIndex) & uint(${args.attributeID}.y)) >> secondaryTextureIndex);
|
|
107
|
-
if( ${segment.animationUniforID}[texture3Index] != 0.) {
|
|
108
|
-
frames.z = ${segment.animationUniforID}[texture3Index];
|
|
109
|
-
} else {
|
|
110
|
-
frames.z = float(texture3Index);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
int texture4Index = int(((textureIndexMask << mainTexutreIndex) & uint(${args.attributeID}.z)) >> mainTexutreIndex);
|
|
114
|
-
if( ${segment.animationUniforID}[texture4Index] != 0.) {
|
|
115
|
-
frames.w = ${segment.animationUniforID}[texture4Index];
|
|
116
|
-
} else {
|
|
117
|
-
frames.w = float(texture4Index);
|
|
118
|
-
}
|
|
119
|
-
return frames;`,
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
texture.shader.addVarying([
|
|
123
|
-
{
|
|
124
|
-
id: segment.varyingID,
|
|
125
|
-
type: "vec4",
|
|
126
|
-
body: {
|
|
127
|
-
GLSL: () => `${segment.varyingID} = ${functionName}();`,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
]);
|
|
19
|
+
texture.animations.push({
|
|
20
|
+
uniformIndex: anim[0],
|
|
21
|
+
keys: anim,
|
|
22
|
+
currentFrame: 0,
|
|
23
|
+
currentCount: 0,
|
|
24
|
+
keyCounts: keyCounts,
|
|
25
|
+
});
|
|
26
|
+
i++;
|
|
27
|
+
}
|
|
28
|
+
for (let i = 0; i < texture.totalTextures; i++) {
|
|
29
|
+
if (!animaitonUniform[i]) {
|
|
30
|
+
animaitonUniform[i] = 0;
|
|
131
31
|
}
|
|
132
|
-
segment.animationUniform = new Float32Array(animaitonUniform);
|
|
133
32
|
}
|
|
33
|
+
texture.animationUniform = new Float32Array(animaitonUniform);
|
|
134
34
|
},
|
|
135
35
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { TextureData } from "./Texture.types";
|
|
2
|
+
export declare class TextureArray {
|
|
3
|
+
id: string;
|
|
4
|
+
extension: string;
|
|
5
|
+
totalTextures: number;
|
|
6
|
+
textureMap: Map<string, TextureData>;
|
|
7
|
+
textures: TextureData[];
|
|
8
|
+
textureIndex: Record<string, number>;
|
|
9
|
+
animationsMap: number[][];
|
|
10
|
+
animationTimes: number[][];
|
|
11
|
+
animations: {
|
|
12
|
+
uniformIndex: number;
|
|
13
|
+
overlay?: boolean;
|
|
14
|
+
keys: number[];
|
|
15
|
+
currentFrame: number;
|
|
16
|
+
currentCount: number;
|
|
17
|
+
keyCounts: number[];
|
|
18
|
+
}[];
|
|
19
|
+
varyingID: string;
|
|
20
|
+
animationUniforID: string;
|
|
21
|
+
animationUniform: Float32Array;
|
|
22
|
+
paths: Map<string, HTMLImageElement | string | false>;
|
|
23
|
+
images: HTMLImageElement[];
|
|
24
|
+
shaderTexture: any | null;
|
|
25
|
+
textureID: string;
|
|
26
|
+
attributeID: string;
|
|
27
|
+
constructor(id: string);
|
|
28
|
+
/**# clearData
|
|
29
|
+
* ---
|
|
30
|
+
* Clear all un-needed data.
|
|
31
|
+
*/
|
|
32
|
+
clearData(): void;
|
|
33
|
+
/**# flush
|
|
34
|
+
* ---
|
|
35
|
+
* Clear all data.
|
|
36
|
+
*/
|
|
37
|
+
flush(): void;
|
|
38
|
+
flushAll(): void;
|
|
39
|
+
build(): Promise<void>;
|
|
40
|
+
getTextureIndex(textureId: string, varation?: string): number;
|
|
41
|
+
addTexture(data: TextureData): void;
|
|
42
|
+
runAnimations(): void;
|
|
43
|
+
getTextureIndexMap(): Record<string, number>;
|
|
44
|
+
_processVariations(textureData: TextureData, paths: Map<string, HTMLImageElement | string | false>, map: Record<string, number>, animations: number[][], textureAnimatioTimes: number[][], extension: string, count: number): number;
|
|
45
|
+
_getPath(textureData: TextureData, varation: string | undefined, extension: string): string;
|
|
46
|
+
buildTextureIndex(): false | undefined;
|
|
47
|
+
}
|