@divinevoxel/vlox 0.0.0
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/Analyzer/Analyzer.d.ts +18 -0
- package/Analyzer/Analyzer.js +91 -0
- package/Analyzer/AnalyzerProcessor.d.ts +6 -0
- package/Analyzer/AnalyzerProcessor.js +39 -0
- package/Analyzer/AnalyzerUpdater.d.ts +10 -0
- package/Analyzer/AnalyzerUpdater.js +13 -0
- package/Archive/Archive.types.d.ts +176 -0
- package/Archive/Archive.types.js +1 -0
- package/Archive/Functions/ArchiveArea.d.ts +10 -0
- package/Archive/Functions/ArchiveArea.js +315 -0
- package/Archive/Functions/ArchiveColumn.d.ts +8 -0
- package/Archive/Functions/ArchiveColumn.js +293 -0
- package/Archive/Functions/ImportColumn.d.ts +9 -0
- package/Archive/Functions/ImportColumn.js +213 -0
- package/Archive/Functions/Palettes.d.ts +5 -0
- package/Archive/Functions/Palettes.js +46 -0
- package/Archive/Functions/index.d.ts +3 -0
- package/Archive/Functions/index.js +3 -0
- package/Archive/index.d.ts +2 -0
- package/Archive/index.js +2 -0
- package/Contexts/Constructor/ConstrcutorTheads.d.ts +9 -0
- package/Contexts/Constructor/ConstrcutorTheads.js +22 -0
- package/Contexts/Constructor/ConstructorRemoteThreadTasks.d.ts +7 -0
- package/Contexts/Constructor/ConstructorRemoteThreadTasks.js +8 -0
- package/Contexts/Constructor/ConstructorTasks.d.ts +2 -0
- package/Contexts/Constructor/ConstructorTasks.js +82 -0
- package/Contexts/Constructor/ConstructorTasksIds.d.ts +21 -0
- package/Contexts/Constructor/ConstructorTasksIds.js +22 -0
- package/Contexts/Constructor/ConstructorThreadState.d.ts +5 -0
- package/Contexts/Constructor/ConstructorThreadState.js +16 -0
- package/Contexts/Constructor/DVEConstructorTasksQueues.d.ts +27 -0
- package/Contexts/Constructor/DVEConstructorTasksQueues.js +73 -0
- package/Contexts/Constructor/DivineVoxelEngineConstructor.d.ts +17 -0
- package/Contexts/Constructor/DivineVoxelEngineConstructor.js +30 -0
- package/Contexts/Constructor/InitWorker.d.ts +2 -0
- package/Contexts/Constructor/InitWorker.js +20 -0
- package/Contexts/Constructor/Tasks/TasksRequest.d.ts +141 -0
- package/Contexts/Constructor/Tasks/TasksRequest.js +218 -0
- package/Contexts/Constructor/Tasks/VoxelUpdate.d.ts +4 -0
- package/Contexts/Constructor/Tasks/VoxelUpdate.js +151 -0
- package/Contexts/Constructor/index.d.ts +1 -0
- package/Contexts/Constructor/index.js +1 -0
- package/Contexts/Nexus/DivineVoxelEngineNexus.d.ts +19 -0
- package/Contexts/Nexus/DivineVoxelEngineNexus.js +29 -0
- package/Contexts/Nexus/InitWorker.d.ts +2 -0
- package/Contexts/Nexus/InitWorker.js +15 -0
- package/Contexts/Nexus/Threads/NexusTheads.d.ts +13 -0
- package/Contexts/Nexus/Threads/NexusTheads.js +25 -0
- package/Contexts/Nexus/Threads/NexusThreadState.d.ts +7 -0
- package/Contexts/Nexus/Threads/NexusThreadState.js +10 -0
- package/Contexts/Nexus/index.d.ts +1 -0
- package/Contexts/Nexus/index.js +1 -0
- package/Contexts/Render/DVERenderThreads.d.ts +11 -0
- package/Contexts/Render/DVERenderThreads.js +47 -0
- package/Contexts/Render/DivineVoxelEngineRender.d.ts +70 -0
- package/Contexts/Render/DivineVoxelEngineRender.js +54 -0
- package/Contexts/Render/InitThreads.d.ts +2 -0
- package/Contexts/Render/InitThreads.js +53 -0
- package/Contexts/Render/Scene/MeshManager.d.ts +15 -0
- package/Contexts/Render/Scene/MeshManager.js +105 -0
- package/Contexts/Render/Scene/MeshRegister.d.ts +32 -0
- package/Contexts/Render/Scene/MeshRegister.js +195 -0
- package/Contexts/Render/Scene/MeshRegister.types.d.ts +13 -0
- package/Contexts/Render/Scene/MeshRegister.types.js +1 -0
- package/Contexts/Render/Tasks/RenderTasks.d.ts +7 -0
- package/Contexts/Render/Tasks/RenderTasks.js +24 -0
- package/Contexts/Render/Tasks/RenderTasks.types.d.ts +27 -0
- package/Contexts/Render/Tasks/RenderTasks.types.js +1 -0
- package/Contexts/Render/index.d.ts +1 -0
- package/Contexts/Render/index.js +1 -0
- package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.d.ts +21 -0
- package/Contexts/RichWorld/DivineStarVoxelEngineRichWorld.js +33 -0
- package/Contexts/RichWorld/InitWorker.d.ts +2 -0
- package/Contexts/RichWorld/InitWorker.js +15 -0
- package/Contexts/RichWorld/RichDataRegister.d.ts +24 -0
- package/Contexts/RichWorld/RichDataRegister.js +110 -0
- package/Contexts/RichWorld/RichWorldTasks.d.ts +2 -0
- package/Contexts/RichWorld/RichWorldTasks.js +58 -0
- package/Contexts/RichWorld/Threads/RichWorldThreadState.d.ts +7 -0
- package/Contexts/RichWorld/Threads/RichWorldThreadState.js +10 -0
- package/Contexts/RichWorld/Threads/RichWorldThreads.d.ts +10 -0
- package/Contexts/RichWorld/Threads/RichWorldThreads.js +22 -0
- package/Contexts/RichWorld/Tools/RichColumnDataTool.d.ts +7 -0
- package/Contexts/RichWorld/Tools/RichColumnDataTool.js +18 -0
- package/Contexts/RichWorld/Tools/RichDataTool.d.ts +14 -0
- package/Contexts/RichWorld/Tools/RichDataTool.js +71 -0
- package/Contexts/RichWorld/index.d.ts +1 -0
- package/Contexts/RichWorld/index.js +1 -0
- package/Contexts/World/Data/Classes/RegisterDataManager.d.ts +8 -0
- package/Contexts/World/Data/Classes/RegisterDataManager.js +22 -0
- package/Contexts/World/Data/Classes/StructBuilder.d.ts +31 -0
- package/Contexts/World/Data/Classes/StructBuilder.js +173 -0
- package/Contexts/World/Data/DVEFDataStructs.d.ts +7 -0
- package/Contexts/World/Data/DVEFDataStructs.js +21 -0
- package/Contexts/World/Data/DataRegister.d.ts +8 -0
- package/Contexts/World/Data/DataRegister.js +9 -0
- package/Contexts/World/Data/DataStructBuilders.d.ts +12 -0
- package/Contexts/World/Data/DataStructBuilders.js +23 -0
- package/Contexts/World/Data/DataSync.d.ts +51 -0
- package/Contexts/World/Data/DataSync.js +215 -0
- package/Contexts/World/Data/DataSyncNode.d.ts +28 -0
- package/Contexts/World/Data/DataSyncNode.js +54 -0
- package/Contexts/World/Data/Generators/SubstanceDataGenerator.d.ts +5 -0
- package/Contexts/World/Data/Generators/SubstanceDataGenerator.js +36 -0
- package/Contexts/World/Data/Generators/VoxelDataGenerator.d.ts +9 -0
- package/Contexts/World/Data/Generators/VoxelDataGenerator.js +64 -0
- package/Contexts/World/Data/Generators/WorldDataGenerator.d.ts +12 -0
- package/Contexts/World/Data/Generators/WorldDataGenerator.js +24 -0
- package/Contexts/World/Data/Managers/DataManagers.d.ts +5 -0
- package/Contexts/World/Data/Managers/DataManagers.js +126 -0
- package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.d.ts +2 -0
- package/Contexts/World/Data/StructBuilders/SubstanceStructBuilder.js +57 -0
- package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.d.ts +2 -0
- package/Contexts/World/Data/StructBuilders/VoxelStructBuilder.js +68 -0
- package/Contexts/World/Data/Structs/ChunkStruct.d.ts +3 -0
- package/Contexts/World/Data/Structs/ChunkStruct.js +29 -0
- package/Contexts/World/Data/Structs/ColumnStruct.d.ts +3 -0
- package/Contexts/World/Data/Structs/ColumnStruct.js +45 -0
- package/Contexts/World/Data/Structs/RegionStruct.d.ts +4 -0
- package/Contexts/World/Data/Structs/RegionStruct.js +50 -0
- package/Contexts/World/DivineVoxelEngineWorld.d.ts +34 -0
- package/Contexts/World/DivineVoxelEngineWorld.js +64 -0
- package/Contexts/World/InitWorker.d.ts +2 -0
- package/Contexts/World/InitWorker.js +35 -0
- package/Contexts/World/Lock/WorldLock.d.ts +12 -0
- package/Contexts/World/Lock/WorldLock.js +86 -0
- package/Contexts/World/Tasks/WorldTasks.d.ts +11 -0
- package/Contexts/World/Tasks/WorldTasks.js +98 -0
- package/Contexts/World/WorldDataHooks.d.ts +1 -0
- package/Contexts/World/WorldDataHooks.js +96 -0
- package/Contexts/World/WorldThreadState.d.ts +4 -0
- package/Contexts/World/WorldThreadState.js +6 -0
- package/Contexts/World/WorldThreads.d.ts +14 -0
- package/Contexts/World/WorldThreads.js +34 -0
- package/Contexts/World/index.d.ts +1 -0
- package/Contexts/World/index.js +1 -0
- package/Data/Constants/DVEFDataSyncIds.d.ts +12 -0
- package/Data/Constants/DVEFDataSyncIds.js +13 -0
- package/Data/Constants/DataHeaders.d.ts +6 -0
- package/Data/Constants/DataHeaders.js +6 -0
- package/Data/Constants/Structs/ChunkStructProperties.d.ts +10 -0
- package/Data/Constants/Structs/ChunkStructProperties.js +10 -0
- package/Data/Constants/Structs/SubstanceStructProperties.d.ts +8 -0
- package/Data/Constants/Structs/SubstanceStructProperties.js +8 -0
- package/Data/Constants/Structs/VoxelStructProperties.d.ts +11 -0
- package/Data/Constants/Structs/VoxelStructProperties.js +11 -0
- package/Data/Constants/Structs/WorldDataStructProperties.d.ts +8 -0
- package/Data/Constants/Structs/WorldDataStructProperties.js +8 -0
- package/Data/Constants/SubstanceTagIds.d.ts +12 -0
- package/Data/Constants/SubstanceTagIds.js +13 -0
- package/Data/Constants/VoxelTagIds.d.ts +14 -0
- package/Data/Constants/VoxelTagIds.js +15 -0
- package/Data/DVEFDataCore.d.ts +7 -0
- package/Data/DVEFDataCore.js +7 -0
- package/Data/DVEFDataManager.d.ts +31 -0
- package/Data/DVEFDataManager.js +23 -0
- package/Data/DVEFDataSyncNode.d.ts +20 -0
- package/Data/DVEFDataSyncNode.js +53 -0
- package/Data/DataHooks.d.ts +51 -0
- package/Data/DataHooks.js +29 -0
- package/Data/LightData.d.ts +150 -0
- package/Data/LightData.js +402 -0
- package/Data/RegionHeaderRegister.d.ts +29 -0
- package/Data/RegionHeaderRegister.js +56 -0
- package/Data/Register/MappedDataRegister.d.ts +5 -0
- package/Data/Register/MappedDataRegister.js +8 -0
- package/Data/Register/MappedRegisterBase.d.ts +14 -0
- package/Data/Register/MappedRegisterBase.js +50 -0
- package/Data/Settings/EngineSettings.d.ts +27 -0
- package/Data/Settings/EngineSettings.js +81 -0
- package/Data/Substance/SubstancePalette.d.ts +9 -0
- package/Data/Substance/SubstancePalette.js +16 -0
- package/Data/Substance/SubstanceStruct.d.ts +20 -0
- package/Data/Substance/SubstanceStruct.js +19 -0
- package/Data/Types/DataSync.types.d.ts +3 -0
- package/Data/Types/DataSync.types.js +1 -0
- package/Data/Types/DimensionData.types.d.ts +9 -0
- package/Data/Types/DimensionData.types.js +1 -0
- package/Data/Types/RichWorldData.types.d.ts +15 -0
- package/Data/Types/RichWorldData.types.js +1 -0
- package/Data/Types/VoxelData.types.d.ts +7 -0
- package/Data/Types/VoxelData.types.js +1 -0
- package/Data/Types/WorldData.types.d.ts +10 -0
- package/Data/Types/WorldData.types.js +19 -0
- package/Data/Voxel/VoxelPalette.d.ts +12 -0
- package/Data/Voxel/VoxelPalette.js +22 -0
- package/Data/Voxel/VoxelStruct.d.ts +26 -0
- package/Data/Voxel/VoxelStruct.js +29 -0
- package/Data/VoxelShaderData.d.ts +17 -0
- package/Data/VoxelShaderData.js +34 -0
- package/Data/VoxelStateReader.d.ts +12 -0
- package/Data/VoxelStateReader.js +30 -0
- package/Data/World/Classes/Chunk.d.ts +21 -0
- package/Data/World/Classes/Chunk.js +46 -0
- package/Data/World/Classes/Column.d.ts +17 -0
- package/Data/World/Classes/Column.js +31 -0
- package/Data/World/Classes/Dimension.d.ts +14 -0
- package/Data/World/Classes/Dimension.js +20 -0
- package/Data/World/Classes/Region.d.ts +23 -0
- package/Data/World/Classes/Region.js +67 -0
- package/Data/World/Classes/index.d.ts +4 -0
- package/Data/World/Classes/index.js +4 -0
- package/Data/World/DimensionsRegister.d.ts +14 -0
- package/Data/World/DimensionsRegister.js +53 -0
- package/Data/World/WorldBounds.d.ts +19 -0
- package/Data/World/WorldBounds.js +34 -0
- package/Data/World/WorldPainter.d.ts +11 -0
- package/Data/World/WorldPainter.js +71 -0
- package/Data/World/WorldRegister.d.ts +51 -0
- package/Data/World/WorldRegister.js +220 -0
- package/Data/World/WorldRegisterCache.d.ts +23 -0
- package/Data/World/WorldRegisterCache.js +68 -0
- package/Data/World/WorldSpaces.d.ts +4 -0
- package/Data/World/WorldSpaces.js +23 -0
- package/DataLoader/Broswer/DataHandler.d.ts +20 -0
- package/DataLoader/Broswer/DataHandler.js +54 -0
- package/DataLoader/Broswer/WorldDataBase.d.ts +26 -0
- package/DataLoader/Broswer/WorldDataBase.js +81 -0
- package/DataLoader/Broswer/WorldDataBaseManager.d.ts +6 -0
- package/DataLoader/Broswer/WorldDataBaseManager.js +30 -0
- package/DataLoader/Broswer/WorldDataTool.d.ts +16 -0
- package/DataLoader/Broswer/WorldDataTool.js +64 -0
- package/DataLoader/Broswer/index.d.ts +1 -0
- package/DataLoader/Broswer/index.js +1 -0
- package/DataLoader/Constructor/DataLoaderTasks.d.ts +2 -0
- package/DataLoader/Constructor/DataLoaderTasks.js +14 -0
- package/DataLoader/Constructor/DivineVoxelEngineDataLoaderConstructor.d.ts +9 -0
- package/DataLoader/Constructor/DivineVoxelEngineDataLoaderConstructor.js +17 -0
- package/DataLoader/Constructor/WorldDataSerializer.d.ts +15 -0
- package/DataLoader/Constructor/WorldDataSerializer.js +54 -0
- package/DataLoader/Constructor/index.d.ts +1 -0
- package/DataLoader/Constructor/index.js +1 -0
- package/DataLoader/Node/DivineVoxelEngineData.d.ts +48 -0
- package/DataLoader/Node/DivineVoxelEngineData.js +47 -0
- package/DataLoader/Node/System/RegionSystem.d.ts +28 -0
- package/DataLoader/Node/System/RegionSystem.js +147 -0
- package/DataLoader/Node/System/System.d.ts +13 -0
- package/DataLoader/Node/System/System.js +168 -0
- package/DataLoader/Node/System/SystemPath.d.ts +12 -0
- package/DataLoader/Node/System/SystemPath.js +29 -0
- package/DataLoader/Node/Tools/NodeRegionTool.d.ts +28 -0
- package/DataLoader/Node/Tools/NodeRegionTool.js +134 -0
- package/DataLoader/Node/Util/DVED.util.d.ts +17 -0
- package/DataLoader/Node/Util/DVED.util.js +25 -0
- package/DataLoader/Node/index.d.ts +3 -0
- package/DataLoader/Node/index.js +3 -0
- package/DataLoader/Types/DVED.types.d.ts +13 -0
- package/DataLoader/Types/DVED.types.js +1 -0
- package/DataLoader/World/DataHandlerWrapper.d.ts +23 -0
- package/DataLoader/World/DataHandlerWrapper.js +179 -0
- package/DataLoader/World/DataLoaderTasks.d.ts +2 -0
- package/DataLoader/World/DataLoaderTasks.js +70 -0
- package/DataLoader/World/DivineVoxelEngineDataLoaderWorld.d.ts +12 -0
- package/DataLoader/World/DivineVoxelEngineDataLoaderWorld.js +17 -0
- package/DataLoader/World/Tools/DataLoaderTool.d.ts +24 -0
- package/DataLoader/World/Tools/DataLoaderTool.js +113 -0
- package/DataLoader/World/Tools/DataSerializerTool.d.ts +8 -0
- package/DataLoader/World/Tools/DataSerializerTool.js +27 -0
- package/DataLoader/World/Tools/LoaderRegister.d.ts +9 -0
- package/DataLoader/World/Tools/LoaderRegister.js +29 -0
- package/IWG/Constants/ColumnState.d.ts +6 -0
- package/IWG/Constants/ColumnState.js +7 -0
- package/IWG/World/Classes/DebouncedTasks.d.ts +16 -0
- package/IWG/World/Classes/DebouncedTasks.js +34 -0
- package/IWG/World/Classes/Generator.d.ts +52 -0
- package/IWG/World/Classes/Generator.js +485 -0
- package/IWG/World/Classes/Tasks/IWGBatchTask.d.ts +7 -0
- package/IWG/World/Classes/Tasks/IWGBatchTask.js +35 -0
- package/IWG/World/Classes/Tasks/IWGSingleTask.d.ts +6 -0
- package/IWG/World/Classes/Tasks/IWGSingleTask.js +29 -0
- package/IWG/World/Classes/Tasks/IWGTaskBase.d.ts +27 -0
- package/IWG/World/Classes/Tasks/IWGTaskBase.js +34 -0
- package/IWG/World/Classes/Tasks/IWGTaskRegister.d.ts +6 -0
- package/IWG/World/Classes/Tasks/IWGTaskRegister.js +14 -0
- package/IWG/World/IWG.d.ts +22 -0
- package/IWG/World/IWG.js +83 -0
- package/IWG/World/Load/InitLoad.d.ts +5 -0
- package/IWG/World/Load/InitLoad.js +17 -0
- package/IWG/World/Load/LoaderBase.d.ts +16 -0
- package/IWG/World/Load/LoaderBase.js +57 -0
- package/IWG/World/Load/SafeExit.d.ts +5 -0
- package/IWG/World/Load/SafeExit.js +16 -0
- package/IWG/World/Load/Teleport.d.ts +9 -0
- package/IWG/World/Load/Teleport.js +26 -0
- package/IWG/World/Tasks/RegisterDefaultTasks.d.ts +1 -0
- package/IWG/World/Tasks/RegisterDefaultTasks.js +12 -0
- package/IWG/World/Tasks/Rendering/IWGBuildTasks.d.ts +8 -0
- package/IWG/World/Tasks/Rendering/IWGBuildTasks.js +26 -0
- package/IWG/World/Tasks/Saving/IWGSaveAndUnloadTasks.d.ts +8 -0
- package/IWG/World/Tasks/Saving/IWGSaveAndUnloadTasks.js +22 -0
- package/IWG/World/Tasks/Saving/IWGSaveTasks.d.ts +8 -0
- package/IWG/World/Tasks/Saving/IWGSaveTasks.js +22 -0
- package/IWG/World/Tasks/WorldGen/IWGDecorateTasks.d.ts +8 -0
- package/IWG/World/Tasks/WorldGen/IWGDecorateTasks.js +29 -0
- package/IWG/World/Tasks/WorldGen/IWGGenerateTasks.d.ts +8 -0
- package/IWG/World/Tasks/WorldGen/IWGGenerateTasks.js +29 -0
- package/IWG/World/Tasks/WorldGen/IWGLoadTasks.d.ts +8 -0
- package/IWG/World/Tasks/WorldGen/IWGLoadTasks.js +58 -0
- package/IWG/World/Tasks/WorldGen/IWGPropagationTasks.d.ts +8 -0
- package/IWG/World/Tasks/WorldGen/IWGPropagationTasks.js +27 -0
- package/IWG/World/Tasks/WorldGen/IWGWorldSunTasks.d.ts +8 -0
- package/IWG/World/Tasks/WorldGen/IWGWorldSunTasks.js +27 -0
- package/IWG/World/Types/IWG.types.d.ts +20 -0
- package/IWG/World/Types/IWG.types.js +7 -0
- package/IWG/World/index.d.ts +2 -0
- package/IWG/World/index.js +2 -0
- package/IWG/index.d.ts +1 -0
- package/IWG/index.js +1 -0
- package/Init/StartConstructor.d.ts +2 -0
- package/Init/StartConstructor.js +8 -0
- package/Init/StartWorld.d.ts +7 -0
- package/Init/StartWorld.js +9 -0
- package/Interfaces/Anaylzer/DVEAnaylzer.d.ts +5 -0
- package/Interfaces/Anaylzer/DVEAnaylzer.js +2 -0
- package/Interfaces/Classes/ThreadManager.d.ts +16 -0
- package/Interfaces/Classes/ThreadManager.js +42 -0
- package/Interfaces/Classes/ThreadState.d.ts +7 -0
- package/Interfaces/Classes/ThreadState.js +7 -0
- package/Interfaces/Common/DataSyncIds.d.ts +8 -0
- package/Interfaces/Common/DataSyncIds.js +9 -0
- package/Interfaces/Data/DVEDataCore.d.ts +6 -0
- package/Interfaces/Data/DVEDataCore.js +2 -0
- package/Interfaces/Data/DataManager.d.ts +13 -0
- package/Interfaces/Data/DataManager.js +14 -0
- package/Interfaces/Data/LocationBoundToolBase.d.ts +24 -0
- package/Interfaces/Data/LocationBoundToolBase.js +61 -0
- package/Interfaces/Data/NumberPalette.d.ts +13 -0
- package/Interfaces/Data/NumberPalette.js +40 -0
- package/Interfaces/Data/RemoteDataSyncNode.d.ts +16 -0
- package/Interfaces/Data/RemoteDataSyncNode.js +36 -0
- package/Interfaces/Data/StringPalette.d.ts +13 -0
- package/Interfaces/Data/StringPalette.js +38 -0
- package/Interfaces/DataLoader/DVEDataHandler.d.ts +17 -0
- package/Interfaces/DataLoader/DVEDataHandler.js +14 -0
- package/Interfaces/Render/DVEFOManager.d.ts +7 -0
- package/Interfaces/Render/DVEFOManager.js +6 -0
- package/Interfaces/Render/DVEMeshCuller.d.ts +7 -0
- package/Interfaces/Render/DVEMeshCuller.js +8 -0
- package/Interfaces/Render/DVERenderer.d.ts +14 -0
- package/Interfaces/Render/DVERenderer.js +2 -0
- package/Interfaces/Render/Nodes/DVENodeManager.d.ts +6 -0
- package/Interfaces/Render/Nodes/DVENodeManager.js +2 -0
- package/Interfaces/Render/Nodes/DVERenderNode.types.d.ts +39 -0
- package/Interfaces/Render/Nodes/DVERenderNode.types.js +1 -0
- package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.d.ts +5 -0
- package/Interfaces/Render/Nodes/Materials/DVENodeMaterialManager.js +2 -0
- package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.d.ts +13 -0
- package/Interfaces/Render/Nodes/Meshes/DVENodeMesh.js +6 -0
- package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.d.ts +5 -0
- package/Interfaces/Render/Nodes/Meshes/DVENodeMeshManager.js +2 -0
- package/Interfaces/WorldGen/WorldGen.types.d.ts +5 -0
- package/Interfaces/WorldGen/WorldGen.types.js +1 -0
- package/LICENSE.md +9 -0
- package/Math/Classes/BoundingBox.d.ts +27 -0
- package/Math/Classes/BoundingBox.js +44 -0
- package/Math/Classes/MatrixArray.d.ts +66 -0
- package/Math/Classes/MatrixArray.js +243 -0
- package/Math/Classes/Plane.d.ts +22 -0
- package/Math/Classes/Plane.js +53 -0
- package/Math/Classes/Scalar.d.ts +5 -0
- package/Math/Classes/Scalar.js +9 -0
- package/Math/Classes/SimpleBoundingBox.d.ts +40 -0
- package/Math/Classes/SimpleBoundingBox.js +157 -0
- package/Math/Classes/Vector3.d.ts +54 -0
- package/Math/Classes/Vector3.js +236 -0
- package/Math/Constants/CardinalNeighbors.d.ts +3 -0
- package/Math/Constants/CardinalNeighbors.js +25 -0
- package/Math/Constants/ConstantMartrix.d.ts +3 -0
- package/Math/Constants/ConstantMartrix.js +8 -0
- package/Math/Constants/Faces.d.ts +5 -0
- package/Math/Constants/Faces.js +28 -0
- package/Math/Constants/VoxelFaces.d.ts +20 -0
- package/Math/Constants/VoxelFaces.js +92 -0
- package/Math/Math.types.d.ts +25 -0
- package/Math/Math.types.js +1 -0
- package/Math/Objects/CompassDirection.d.ts +9 -0
- package/Math/Objects/CompassDirection.js +19 -0
- package/Math/Spaces/VoxelSpace.d.ts +32 -0
- package/Math/Spaces/VoxelSpace.js +99 -0
- package/Math/Spaces/VoxelSpaces.d.ts +50 -0
- package/Math/Spaces/VoxelSpaces.js +117 -0
- package/Math/Spaces/VoxelSpaces.types.d.ts +6 -0
- package/Math/Spaces/VoxelSpaces.types.js +1 -0
- package/Math/VisitAll.d.ts +10 -0
- package/Math/VisitAll.js +69 -0
- package/Math/VoxelMath.d.ts +21 -0
- package/Math/VoxelMath.js +47 -0
- package/Math/index.d.ts +11 -0
- package/Math/index.js +11 -0
- package/Mesher/Calc/CalcConstants.d.ts +16 -0
- package/Mesher/Calc/CalcConstants.js +375 -0
- package/Mesher/Calc/Flow/FlowGradient.d.ts +5 -0
- package/Mesher/Calc/Flow/FlowGradient.js +74 -0
- package/Mesher/Calc/Light/FaceDataCalc.d.ts +9 -0
- package/Mesher/Calc/Light/FaceDataCalc.js +58 -0
- package/Mesher/Calc/Light/LightGradient.d.ts +13 -0
- package/Mesher/Calc/Light/LightGradient.js +255 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.d.ts +13 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/ModCube.constructor.js +77 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.d.ts +27 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/PillarCube.constructor.js +75 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.d.ts +13 -0
- package/Mesher/Constructors/Voxel/Classes/Cube/SimpleCube.constructor.js +56 -0
- package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.d.ts +13 -0
- package/Mesher/Constructors/Voxel/Classes/HalfCube/ModHalfCube.constructor.js +80 -0
- package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.d.ts +16 -0
- package/Mesher/Constructors/Voxel/Classes/HalfCube/SimpleHalfCube.constructor.js +58 -0
- package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.d.ts +12 -0
- package/Mesher/Constructors/Voxel/Classes/Liquid/SimpleLiquid.constructor.js +46 -0
- package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.d.ts +12 -0
- package/Mesher/Constructors/Voxel/Classes/Panel/SimpleCrossedPanel.constructor.js +23 -0
- package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.d.ts +12 -0
- package/Mesher/Constructors/Voxel/Classes/Panel/SimplePanel.constructor.js +23 -0
- package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.d.ts +12 -0
- package/Mesher/Constructors/Voxel/Classes/Stair/ModStair.constructor.js +50 -0
- package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.d.ts +12 -0
- package/Mesher/Constructors/Voxel/Classes/Stair/SimpleStair.constructor.js +45 -0
- package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.d.ts +7 -0
- package/Mesher/Constructors/Voxel/Classes/VoxelConstructor.js +3 -0
- package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.d.ts +44 -0
- package/Mesher/Constructors/Voxel/VoxelConstructorsRegister.js +75 -0
- package/Mesher/Geometry/VoxelGeometry.d.ts +7 -0
- package/Mesher/Geometry/VoxelGeometry.js +111 -0
- package/Mesher/Mesher.d.ts +80 -0
- package/Mesher/Mesher.js +62 -0
- package/Mesher/Meshers/Classes/Mesher.d.ts +6 -0
- package/Mesher/Meshers/Classes/Mesher.js +6 -0
- package/Mesher/Meshers/MesherManager.d.ts +7 -0
- package/Mesher/Meshers/MesherManager.js +16 -0
- package/Mesher/Meshers/Meshers/TextureMesher.d.ts +13 -0
- package/Mesher/Meshers/Meshers/TextureMesher.js +186 -0
- package/Mesher/Meshers/Meshers/VoxelMesher.d.ts +11 -0
- package/Mesher/Meshers/Meshers/VoxelMesher.js +47 -0
- package/Mesher/Processors/ChunkProcessor.d.ts +9 -0
- package/Mesher/Processors/ChunkProcessor.js +79 -0
- package/Mesher/Processors/TemplateProcessor.d.ts +16 -0
- package/Mesher/Processors/TemplateProcessor.js +71 -0
- package/Mesher/Rules/Overrides/OverrideBase.d.ts +8 -0
- package/Mesher/Rules/Overrides/OverrideBase.js +20 -0
- package/Mesher/Rules/Overrides/OverridesManager.d.ts +10 -0
- package/Mesher/Rules/Overrides/OverridesManager.js +10 -0
- package/Mesher/Rules/RenderedSubstances.d.ts +6 -0
- package/Mesher/Rules/RenderedSubstances.js +13 -0
- package/Mesher/Rules/SubstanceRules.d.ts +7 -0
- package/Mesher/Rules/SubstanceRules.js +60 -0
- package/Mesher/Shapes/ShapeTool.d.ts +8 -0
- package/Mesher/Shapes/ShapeTool.js +9 -0
- package/Mesher/Shapes/VoxelShapeBase.d.ts +5 -0
- package/Mesher/Shapes/VoxelShapeBase.js +3 -0
- package/Mesher/Shapes/VoxelShapeManager.d.ts +10 -0
- package/Mesher/Shapes/VoxelShapeManager.js +37 -0
- package/Mesher/Shapes/default/Cube/Cube.voxel.shape.d.ts +15 -0
- package/Mesher/Shapes/default/Cube/Cube.voxel.shape.js +234 -0
- package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.d.ts +24 -0
- package/Mesher/Shapes/default/Cube/HalfCube.voxel.shape.js +231 -0
- package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.d.ts +16 -0
- package/Mesher/Shapes/default/Liquid/Liquid.voxel.shape.js +250 -0
- package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.d.ts +8 -0
- package/Mesher/Shapes/default/Panel/CrossedPanels.voxel.shape.js +67 -0
- package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.d.ts +8 -0
- package/Mesher/Shapes/default/Panel/FlatPanel.voxel.shape.js +68 -0
- package/Mesher/Shapes/default/Panel/PanelStates.d.ts +8 -0
- package/Mesher/Shapes/default/Panel/PanelStates.js +9 -0
- package/Mesher/Shapes/default/RegisterDefaultShapes.d.ts +1 -0
- package/Mesher/Shapes/default/RegisterDefaultShapes.js +10 -0
- package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.d.ts +15 -0
- package/Mesher/Shapes/default/Stairs/Stair.voxel.shape.js +31 -0
- package/Mesher/Shapes/default/Stairs/StairOverrides.d.ts +17 -0
- package/Mesher/Shapes/default/Stairs/StairOverrides.js +151 -0
- package/Mesher/Shapes/default/Stairs/StairShapes.d.ts +2 -0
- package/Mesher/Shapes/default/Stairs/StairShapes.js +546 -0
- package/Mesher/Shapes/default/Stairs/StairStates.d.ts +19 -0
- package/Mesher/Shapes/default/Stairs/StairStates.js +37 -0
- package/Mesher/Shapes/default/index.d.ts +6 -0
- package/Mesher/Shapes/default/index.js +6 -0
- package/Mesher/Tasks/BuidlerTasks.types.d.ts +7 -0
- package/Mesher/Tasks/BuidlerTasks.types.js +1 -0
- package/Mesher/Tools/BuilderDataTool.d.ts +4 -0
- package/Mesher/Tools/BuilderDataTool.js +7 -0
- package/Mesher/Tools/OutlinedVoxelTool.d.ts +15 -0
- package/Mesher/Tools/OutlinedVoxelTool.js +186 -0
- package/Mesher/Tools/VoxelMesherDataTool.d.ts +31 -0
- package/Mesher/Tools/VoxelMesherDataTool.js +166 -0
- package/Mesher/Tools/VoxelTemplateDataTool.d.ts +15 -0
- package/Mesher/Tools/VoxelTemplateDataTool.js +112 -0
- package/Mesher/Types/Override.types.d.ts +8 -0
- package/Mesher/Types/Override.types.js +1 -0
- package/Mesher/Types/index.d.ts +1 -0
- package/Mesher/Types/index.js +1 -0
- package/Propagation/Explosion/ExplosionManager.d.ts +4 -0
- package/Propagation/Explosion/ExplosionManager.js +120 -0
- package/Propagation/Flow/FlowManager.d.ts +66 -0
- package/Propagation/Flow/FlowManager.js +154 -0
- package/Propagation/Flow/Functions/FlowRemove.d.ts +2 -0
- package/Propagation/Flow/Functions/FlowRemove.js +162 -0
- package/Propagation/Flow/Functions/FlowUpdate.d.ts +2 -0
- package/Propagation/Flow/Functions/FlowUpdate.js +96 -0
- package/Propagation/Illumanation/Functions/RGBUpdate.d.ts +3 -0
- package/Propagation/Illumanation/Functions/RGBUpdate.js +169 -0
- package/Propagation/Illumanation/Functions/SunUpdate.d.ts +3 -0
- package/Propagation/Illumanation/Functions/SunUpdate.js +187 -0
- package/Propagation/Illumanation/Functions/WorldSun.d.ts +2 -0
- package/Propagation/Illumanation/Functions/WorldSun.js +190 -0
- package/Propagation/Illumanation/IlluminationManager.d.ts +48 -0
- package/Propagation/Illumanation/IlluminationManager.js +13 -0
- package/Propagation/Propagation.d.ts +13 -0
- package/Propagation/Propagation.js +37 -0
- package/Propagation/index.d.ts +1 -0
- package/Propagation/index.js +1 -0
- package/README.md +11 -0
- package/Shaders/Code/Functions/FogShaders.d.ts +2 -0
- package/Shaders/Code/Functions/FogShaders.js +59 -0
- package/Shaders/Code/Functions/FragmentFunctions.d.ts +2 -0
- package/Shaders/Code/Functions/FragmentFunctions.js +155 -0
- package/Shaders/Code/Functions/UtilShaders.d.ts +2 -0
- package/Shaders/Code/Functions/UtilShaders.js +209 -0
- package/Shaders/Code/Functions/VertexFunctions.d.ts +2 -0
- package/Shaders/Code/Functions/VertexFunctions.js +73 -0
- package/Shaders/Code/Snippets/FragmentSnippets.d.ts +2 -0
- package/Shaders/Code/Snippets/FragmentSnippets.js +93 -0
- package/Shaders/Code/Snippets/VertexSnippets.d.ts +2 -0
- package/Shaders/Code/Snippets/VertexSnippets.js +28 -0
- package/Shaders/Code/Snippets/VoxelSnippets.d.ts +2 -0
- package/Shaders/Code/Snippets/VoxelSnippets.js +137 -0
- package/Shaders/DVEShaderRegister.d.ts +42 -0
- package/Shaders/DVEShaderRegister.js +15 -0
- package/Shaders/DVEShaders.d.ts +55 -0
- package/Shaders/DVEShaders.js +369 -0
- package/Shaders/Types/Shader.types.d.ts +14 -0
- package/Shaders/Types/Shader.types.js +1 -0
- package/Templates/Functions/CreateTemplate.d.ts +3 -0
- package/Templates/Functions/CreateTemplate.js +113 -0
- package/Templates/Functions/FlipTemplate.d.ts +3 -0
- package/Templates/Functions/FlipTemplate.js +47 -0
- package/Templates/Functions/RotateTemplate.d.ts +4 -0
- package/Templates/Functions/RotateTemplate.js +110 -0
- package/Templates/Functions/index.d.ts +3 -0
- package/Templates/Functions/index.js +3 -0
- package/Templates/VoxelTemplate.d.ts +31 -0
- package/Templates/VoxelTemplate.js +122 -0
- package/Templates/VoxelTemplates.types.d.ts +23 -0
- package/Templates/VoxelTemplates.types.js +1 -0
- package/Templates/index.d.ts +1 -0
- package/Templates/index.js +1 -0
- package/Textures/Constructor.types.d.ts +5 -0
- package/Textures/Constructor.types.js +1 -0
- package/Textures/Texture.types.d.ts +79 -0
- package/Textures/Texture.types.js +1 -0
- package/Textures/TextureAnimations.d.ts +4 -0
- package/Textures/TextureAnimations.js +135 -0
- package/Textures/TextureBuilder.d.ts +16 -0
- package/Textures/TextureBuilder.js +245 -0
- package/Textures/TextureManager.d.ts +22 -0
- package/Textures/TextureManager.js +153 -0
- package/Textures/TextureRegister.d.ts +10 -0
- package/Textures/TextureRegister.js +33 -0
- package/Textures/TextureType.d.ts +63 -0
- package/Textures/TextureType.js +287 -0
- package/Tools/Anaylzer/AnaylzerTool.d.ts +6 -0
- package/Tools/Anaylzer/AnaylzerTool.js +31 -0
- package/Tools/Brush/AdvancedBrushTool.d.ts +15 -0
- package/Tools/Brush/AdvancedBrushTool.js +69 -0
- package/Tools/Brush/Brush.d.ts +28 -0
- package/Tools/Brush/Brush.js +124 -0
- package/Tools/Classes/DataToolBase.d.ts +43 -0
- package/Tools/Classes/DataToolBase.js +85 -0
- package/Tools/Classes/LocationBoundTool.d.ts +20 -0
- package/Tools/Classes/LocationBoundTool.js +45 -0
- package/Tools/Classes/RichDataToolBase.d.ts +10 -0
- package/Tools/Classes/RichDataToolBase.js +26 -0
- package/Tools/Data/DataTool.d.ts +101 -0
- package/Tools/Data/DataTool.js +431 -0
- package/Tools/Data/RichDataTool.d.ts +25 -0
- package/Tools/Data/RichDataTool.js +121 -0
- package/Tools/Data/SubstanceDataTool.d.ts +16 -0
- package/Tools/Data/SubstanceDataTool.js +62 -0
- package/Tools/Data/WorldData/ChunkDataTool.d.ts +11 -0
- package/Tools/Data/WorldData/ChunkDataTool.js +38 -0
- package/Tools/Data/WorldData/ColumnDataTool.d.ts +26 -0
- package/Tools/Data/WorldData/ColumnDataTool.js +81 -0
- package/Tools/Data/WorldData/HeightMapTool.d.ts +24 -0
- package/Tools/Data/WorldData/HeightMapTool.js +117 -0
- package/Tools/Data/WorldData/RegionDataTool.d.ts +13 -0
- package/Tools/Data/WorldData/RegionDataTool.js +39 -0
- package/Tools/Mesher/MesherTool.d.ts +19 -0
- package/Tools/Mesher/MesherTool.js +52 -0
- package/Tools/Tasks/TasksTool.d.ts +92 -0
- package/Tools/Tasks/TasksTool.js +217 -0
- package/Tools/index.d.ts +0 -0
- package/Tools/index.js +1 -0
- package/Types/DataSync.types.d.ts +25 -0
- package/Types/DataSync.types.js +1 -0
- package/Types/EngineSettings.types.d.ts +73 -0
- package/Types/EngineSettings.types.js +73 -0
- package/Types/StructBuilder.types.d.ts +30 -0
- package/Types/StructBuilder.types.js +1 -0
- package/Types/Substances.types.d.ts +4 -0
- package/Types/Substances.types.js +1 -0
- package/Types/Tasks.types.d.ts +85 -0
- package/Types/Tasks.types.js +1 -0
- package/Types/Util.types.d.ts +5 -0
- package/Types/Util.types.js +1 -0
- package/Types/Voxel.types.d.ts +12 -0
- package/Types/Voxel.types.js +1 -0
- package/Types/index.d.ts +2 -0
- package/Types/index.js +2 -0
- package/Util/DataMatrix.d.ts +23 -0
- package/Util/DataMatrix.js +90 -0
- package/Util/LocationVisitedMap.d.ts +9 -0
- package/Util/LocationVisitedMap.js +18 -0
- package/Util/VisistedMap.d.ts +10 -0
- package/Util/VisistedMap.js +29 -0
- package/Util/VoxelIDMatrix.d.ts +15 -0
- package/Util/VoxelIDMatrix.js +55 -0
- package/VoxelModels/Constructor/InitVoxelModelsConstructor.d.ts +2 -0
- package/VoxelModels/Constructor/InitVoxelModelsConstructor.js +20 -0
- package/VoxelModels/Constructor/Nodes/GeometryNode.d.ts +15 -0
- package/VoxelModels/Constructor/Nodes/GeometryNode.js +14 -0
- package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +22 -0
- package/VoxelModels/Constructor/Nodes/Ruled/BoxVoxelGeometryNode.js +220 -0
- package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +23 -0
- package/VoxelModels/Constructor/Nodes/Ruled/QuadVoxelGeometryNode.js +185 -0
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +21 -0
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +138 -0
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +22 -0
- package/VoxelModels/Constructor/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +109 -0
- package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.d.ts +15 -0
- package/VoxelModels/Constructor/Nodes/RulelessGeometryNode.js +14 -0
- package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.d.ts +13 -0
- package/VoxelModels/Constructor/Register/VoxelGeometryConstructor.js +33 -0
- package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.d.ts +9 -0
- package/VoxelModels/Constructor/Register/VoxelGeometryRulelessConstructor.js +27 -0
- package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.d.ts +14 -0
- package/VoxelModels/Constructor/Register/VoxelModelConstructorRegister.js +31 -0
- package/VoxelModels/Constructor/Register/VoxelModelsConstructor.d.ts +13 -0
- package/VoxelModels/Constructor/Register/VoxelModelsConstructor.js +21 -0
- package/VoxelModels/Constructor/VoxelGeometryLookUp.d.ts +20 -0
- package/VoxelModels/Constructor/VoxelGeometryLookUp.js +77 -0
- package/VoxelModels/Constructor/VoxelModelVoxelConstructor.d.ts +24 -0
- package/VoxelModels/Constructor/VoxelModelVoxelConstructor.js +75 -0
- package/VoxelModels/Defaults/CubeVoxelGeometry.d.ts +9 -0
- package/VoxelModels/Defaults/CubeVoxelGeometry.js +922 -0
- package/VoxelModels/Defaults/CubeVoxelModels.d.ts +5 -0
- package/VoxelModels/Defaults/CubeVoxelModels.js +825 -0
- package/VoxelModels/Defaults/PanelVoxelGeometry.d.ts +6 -0
- package/VoxelModels/Defaults/PanelVoxelGeometry.js +500 -0
- package/VoxelModels/Defaults/PanelVoxelModels.d.ts +3 -0
- package/VoxelModels/Defaults/PanelVoxelModels.js +1061 -0
- package/VoxelModels/Defaults/StairVoxelModel.d.ts +2 -0
- package/VoxelModels/Defaults/StairVoxelModel.js +1358 -0
- package/VoxelModels/Examples.d.ts +14 -0
- package/VoxelModels/Examples.js +1910 -0
- package/VoxelModels/Indexing/VoxelAOResultsIndex.d.ts +12 -0
- package/VoxelModels/Indexing/VoxelAOResultsIndex.js +20 -0
- package/VoxelModels/Indexing/VoxelFaceCullResultsIndex.d.ts +12 -0
- package/VoxelModels/Indexing/VoxelFaceCullResultsIndex.js +21 -0
- package/VoxelModels/Indexing/VoxelFaceTransparentResultsIndex.d.ts +11 -0
- package/VoxelModels/Indexing/VoxelFaceTransparentResultsIndex.js +15 -0
- package/VoxelModels/Indexing/VoxelRelativeCubeIndex.d.ts +6 -0
- package/VoxelModels/Indexing/VoxelRelativeCubeIndex.js +14 -0
- package/VoxelModels/InitVoxelModels.d.ts +10 -0
- package/VoxelModels/InitVoxelModels.js +109 -0
- package/VoxelModels/Input/BoxVoxelGometryInputs.d.ts +23 -0
- package/VoxelModels/Input/BoxVoxelGometryInputs.js +33 -0
- package/VoxelModels/Input/QuadVoxelGometryInputs.d.ts +24 -0
- package/VoxelModels/Input/QuadVoxelGometryInputs.js +29 -0
- package/VoxelModels/Rules/Classes/OcclusionFace.d.ts +65 -0
- package/VoxelModels/Rules/Classes/OcclusionFace.js +492 -0
- package/VoxelModels/Rules/Classes/VoxelRulesGeometry.d.ts +19 -0
- package/VoxelModels/Rules/Classes/VoxelRulesGeometry.js +32 -0
- package/VoxelModels/Rules/Classes/VoxelRulesModel.d.ts +18 -0
- package/VoxelModels/Rules/Classes/VoxelRulesModel.js +29 -0
- package/VoxelModels/Rules/Functions/BuildFinalInputs.d.ts +7 -0
- package/VoxelModels/Rules/Functions/BuildFinalInputs.js +91 -0
- package/VoxelModels/Rules/Functions/BuildGeomtryInputs.d.ts +6 -0
- package/VoxelModels/Rules/Functions/BuildGeomtryInputs.js +223 -0
- package/VoxelModels/Rules/Functions/BuildRules.d.ts +8 -0
- package/VoxelModels/Rules/Functions/BuildRules.js +187 -0
- package/VoxelModels/Rules/Functions/BuildStateData.d.ts +23 -0
- package/VoxelModels/Rules/Functions/BuildStateData.js +337 -0
- package/VoxelModels/Rules/Functions/GetOcclusionFaces.d.ts +4 -0
- package/VoxelModels/Rules/Functions/GetOcclusionFaces.js +112 -0
- package/VoxelModels/Rules/VoxelModelManager.d.ts +18 -0
- package/VoxelModels/Rules/VoxelModelManager.js +80 -0
- package/VoxelModels/Shared/Transform.d.ts +4 -0
- package/VoxelModels/Shared/Transform.js +264 -0
- package/VoxelModels/State/CondiotnalTreeReader.d.ts +10 -0
- package/VoxelModels/State/CondiotnalTreeReader.js +22 -0
- package/VoxelModels/State/LogicStatementReader.d.ts +8 -0
- package/VoxelModels/State/LogicStatementReader.js +50 -0
- package/VoxelModels/State/Schema/BinarySchema.d.ts +14 -0
- package/VoxelModels/State/Schema/BinarySchema.js +52 -0
- package/VoxelModels/State/Schema/BinarySchemaNode.d.ts +11 -0
- package/VoxelModels/State/Schema/BinarySchemaNode.js +21 -0
- package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.d.ts +8 -0
- package/VoxelModels/State/Schema/Conditions/SameVoxelConditions.js +13 -0
- package/VoxelModels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.d.ts +6 -0
- package/VoxelModels/State/Schema/Conditions/ShapeStateSchemaRelationsCondition.js +6 -0
- package/VoxelModels/State/Schema/ShapeStateRelationsNode.d.ts +10 -0
- package/VoxelModels/State/Schema/ShapeStateRelationsNode.js +26 -0
- package/VoxelModels/State/Schema/StateSchema.d.ts +10 -0
- package/VoxelModels/State/Schema/StateSchema.js +18 -0
- package/VoxelModels/State/SchemaRegister.d.ts +15 -0
- package/VoxelModels/State/SchemaRegister.js +50 -0
- package/VoxelModels/State/State.types.d.ts +32 -0
- package/VoxelModels/State/State.types.js +22 -0
- package/VoxelModels/State/StateTreeReader.d.ts +9 -0
- package/VoxelModels/State/StateTreeReader.js +35 -0
- package/VoxelModels/Tags/TagsOverrides.d.ts +5 -0
- package/VoxelModels/Tags/TagsOverrides.js +4 -0
- package/VoxelModels/VoxelModel.types.d.ts +135 -0
- package/VoxelModels/VoxelModel.types.js +1 -0
- package/VoxelModels/VoxelModelRules.types.d.ts +67 -0
- package/VoxelModels/VoxelModelRules.types.js +1 -0
- package/VoxelModels/World/InitVoxelModelsWorld.d.ts +2 -0
- package/VoxelModels/World/InitVoxelModelsWorld.js +11 -0
- package/WorldGeneration/WorldGenBrush.d.ts +75 -0
- package/WorldGeneration/WorldGenBrush.js +136 -0
- package/WorldGeneration/WorldGenRegister.d.ts +14 -0
- package/WorldGeneration/WorldGenRegister.js +94 -0
- package/WorldGeneration/WorldGeneration.d.ts +14 -0
- package/WorldGeneration/WorldGeneration.js +54 -0
- package/package.json +32 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
2
|
+
import { BrushTool } from "../../Tools/Brush/Brush.js";
|
|
3
|
+
import type { FlowTaskRequests } from "../../Contexts/Constructor/Tasks/TasksRequest";
|
|
4
|
+
import { SubstanceDataTool } from "../../Tools/Data/SubstanceDataTool.js";
|
|
5
|
+
export declare class FlowManager {
|
|
6
|
+
static lightData: {
|
|
7
|
+
SRS: number;
|
|
8
|
+
_lightValues: [s: number, r: number, g: number, b: number];
|
|
9
|
+
sumRGB(value: number): number;
|
|
10
|
+
getS(value: number): number;
|
|
11
|
+
getR(value: number): number;
|
|
12
|
+
getG(value: number): number;
|
|
13
|
+
getB(value: number): number;
|
|
14
|
+
setS(value: number, sl: number): number;
|
|
15
|
+
setR(value: number, sl: number): number;
|
|
16
|
+
setG(value: number, sl: number): number;
|
|
17
|
+
setB(value: number, sl: number): number;
|
|
18
|
+
removeS(sl: number): number;
|
|
19
|
+
hasRGBLight(sl: number): boolean;
|
|
20
|
+
hasSunLight(sl: number): boolean;
|
|
21
|
+
mixLight(l1: number, l2: number): number;
|
|
22
|
+
getRGB(sl: number): number;
|
|
23
|
+
setRGB(value: number, sl: number): number;
|
|
24
|
+
decodeLightFromVoxelData(voxelData: number): number;
|
|
25
|
+
encodeLightIntoVoxelData(voxelData: number, encodedLight: number): number;
|
|
26
|
+
setLightValues(values: ArrayLike<number>): number;
|
|
27
|
+
getLightValues(value: number): [s: number, r: number, g: number, b: number];
|
|
28
|
+
getLightValuesToRef(value: number, values: [s: number, r: number, g: number, b: number]): [s: number, r: number, g: number, b: number];
|
|
29
|
+
isLessThanForRGBRemove(n1: number, n2: number): boolean;
|
|
30
|
+
isLessThanForRGBAdd(n1: number, n2: number): boolean;
|
|
31
|
+
isGreaterOrEqualThanForRGBRemove(n1: number, n2: number): boolean;
|
|
32
|
+
getMinusOneForRGB(sl: number, nl: number): number;
|
|
33
|
+
removeRGBLight(sl: number): number;
|
|
34
|
+
getFullSunLight(sl: number): number;
|
|
35
|
+
isLessThanForSunAdd(n1: number, n2: number): boolean;
|
|
36
|
+
isLessThanForSunAddDown(n1: number, n2: number): boolean;
|
|
37
|
+
isLessThanForSunAddUp(n1: number, n2: number): boolean;
|
|
38
|
+
getSunLightForUnderVoxel(sl: number, nl: number): number;
|
|
39
|
+
getMinusOneForSun(sl: number, nl: number): number;
|
|
40
|
+
isLessThanForSunRemove(n1: number, sl: number): boolean;
|
|
41
|
+
isGreaterOrEqualThanForSunRemove(n1: number, sl: number): boolean;
|
|
42
|
+
sunLightCompareForDownSunRemove(n1: number, sl: number): boolean;
|
|
43
|
+
removeSunLight(sl: number): number;
|
|
44
|
+
minusOneForAll(sl: number): number;
|
|
45
|
+
addLightValues(sl: number, sl2: number): number;
|
|
46
|
+
divideLightValue(sl: number, divisor: number): number;
|
|
47
|
+
};
|
|
48
|
+
static _brush: BrushTool;
|
|
49
|
+
static _sDataTool: DataTool;
|
|
50
|
+
static _nDataTool: DataTool;
|
|
51
|
+
static _substanceTool: SubstanceDataTool;
|
|
52
|
+
static setVoxel(tasks: FlowTaskRequests, vox: string, level: number, levelState: number, x: number, y: number, z: number): void;
|
|
53
|
+
static setDimension(dimension: string): void;
|
|
54
|
+
static removeVoxel(tasks: FlowTaskRequests, x: number, y: number, z: number): void;
|
|
55
|
+
static getFlowRate(substance: string): number;
|
|
56
|
+
static getVoxel(x: number, y: number, z: number): false | DataTool;
|
|
57
|
+
static setLevel(level: number, x: number, y: number, z: number): void;
|
|
58
|
+
static getLevel(vox: string, x: number, y: number, z: number): number;
|
|
59
|
+
static getLevelState(vox: string, x: number, y: number, z: number): number;
|
|
60
|
+
static canFlowOutwardTest(vox: string, x: number, y: number, z: number): boolean;
|
|
61
|
+
static flowDownTest(vox: string, x: number, y: number, z: number): boolean;
|
|
62
|
+
static wait(ms: number): Promise<unknown>;
|
|
63
|
+
static _lightValues: [s: number, r: number, g: number, b: number];
|
|
64
|
+
static getAbsorbLight(x: number, y: number, z: number): number;
|
|
65
|
+
static sunCheck(tasks: FlowTaskRequests, x: number, y: number, z: number): void;
|
|
66
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { $3dCardinalNeighbors } from "../../Math/Constants/CardinalNeighbors.js";
|
|
2
|
+
import { LightData } from "../../Data/LightData.js";
|
|
3
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
4
|
+
import { BrushTool } from "../../Tools/Brush/Brush.js";
|
|
5
|
+
import { SunRemove, SunUpdate } from "../Illumanation/Functions/SunUpdate.js";
|
|
6
|
+
import { RGBRemove, RGBUpdate } from "../Illumanation/Functions/RGBUpdate.js";
|
|
7
|
+
import { IlluminationManager } from "../Illumanation/IlluminationManager.js";
|
|
8
|
+
import { SubstanceDataTool } from "../../Tools/Data/SubstanceDataTool.js";
|
|
9
|
+
export class FlowManager {
|
|
10
|
+
static lightData = LightData;
|
|
11
|
+
static _brush = new BrushTool();
|
|
12
|
+
static _sDataTool = new DataTool();
|
|
13
|
+
static _nDataTool = new DataTool();
|
|
14
|
+
static _substanceTool = new SubstanceDataTool();
|
|
15
|
+
static setVoxel(tasks, vox, level, levelState, x, y, z) {
|
|
16
|
+
this.sunCheck(tasks, x, y, z);
|
|
17
|
+
SunRemove(tasks);
|
|
18
|
+
this._brush.setId(vox).setXYZ(x, y, z).paint();
|
|
19
|
+
this._sDataTool.loadInAt(x, y, z);
|
|
20
|
+
this._sDataTool
|
|
21
|
+
.setLevel(level)
|
|
22
|
+
.setLevelState(levelState)
|
|
23
|
+
.setLight(this.getAbsorbLight(x, y, z))
|
|
24
|
+
.commit();
|
|
25
|
+
SunUpdate(tasks);
|
|
26
|
+
}
|
|
27
|
+
static setDimension(dimension) {
|
|
28
|
+
this._sDataTool.setDimension(dimension);
|
|
29
|
+
this._nDataTool.setDimension(dimension);
|
|
30
|
+
this._brush.setDimension(dimension);
|
|
31
|
+
IlluminationManager.setDimension(dimension);
|
|
32
|
+
}
|
|
33
|
+
static removeVoxel(tasks, x, y, z) {
|
|
34
|
+
for (const n of $3dCardinalNeighbors) {
|
|
35
|
+
const nx = x + n[0];
|
|
36
|
+
const ny = y + n[1];
|
|
37
|
+
const nz = z + n[2];
|
|
38
|
+
if (!this._nDataTool.loadInAt(nx, ny, nz))
|
|
39
|
+
continue;
|
|
40
|
+
const l = this._nDataTool.getLight();
|
|
41
|
+
if (l <= 0)
|
|
42
|
+
continue;
|
|
43
|
+
if (this.lightData.getS(l) > 0) {
|
|
44
|
+
tasks.queues.sun.update.push(nx, ny, nz);
|
|
45
|
+
}
|
|
46
|
+
if (this.lightData.hasRGBLight(l)) {
|
|
47
|
+
tasks.queues.rgb.update.push(nx, ny, nz);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
this._nDataTool.loadInAt(x, y, z);
|
|
51
|
+
const currentLight = this._nDataTool.getLight();
|
|
52
|
+
this._brush.setXYZ(x, y, z).erase();
|
|
53
|
+
this._nDataTool.clear().loadInAt(x, y, z);
|
|
54
|
+
this._nDataTool.setLight(currentLight).commit();
|
|
55
|
+
tasks.queues.rgb.remove.push(x, y, z);
|
|
56
|
+
RGBRemove(tasks);
|
|
57
|
+
SunUpdate(tasks);
|
|
58
|
+
RGBUpdate(tasks);
|
|
59
|
+
}
|
|
60
|
+
static getFlowRate(substance) {
|
|
61
|
+
this._substanceTool.setSubstanceFromString(substance);
|
|
62
|
+
return this._substanceTool.getFlowRate();
|
|
63
|
+
}
|
|
64
|
+
static getVoxel(x, y, z) {
|
|
65
|
+
if (!this._sDataTool.loadInAt(x, y, z))
|
|
66
|
+
return false;
|
|
67
|
+
if (!this._sDataTool.isRenderable())
|
|
68
|
+
return false;
|
|
69
|
+
const substance = this._sDataTool.getSubstnaceData();
|
|
70
|
+
if (!substance.isLiquid())
|
|
71
|
+
return false;
|
|
72
|
+
return this._sDataTool;
|
|
73
|
+
}
|
|
74
|
+
static setLevel(level, x, y, z) {
|
|
75
|
+
this._nDataTool.loadInAt(x, y, z);
|
|
76
|
+
this._nDataTool.setLevel(level).commit();
|
|
77
|
+
}
|
|
78
|
+
static getLevel(vox, x, y, z) {
|
|
79
|
+
if (!this._nDataTool.loadInAt(x, y, z))
|
|
80
|
+
return -2;
|
|
81
|
+
const voxel = this._nDataTool.getStringId();
|
|
82
|
+
if (this._nDataTool.isAir()) {
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
if (voxel == vox) {
|
|
86
|
+
return this._nDataTool.getLevel();
|
|
87
|
+
}
|
|
88
|
+
return -1;
|
|
89
|
+
}
|
|
90
|
+
static getLevelState(vox, x, y, z) {
|
|
91
|
+
if (!this._nDataTool.loadInAt(x, y, z))
|
|
92
|
+
return -2;
|
|
93
|
+
const voxel = this._nDataTool.getStringId();
|
|
94
|
+
if (voxel == vox) {
|
|
95
|
+
return this._nDataTool.getLevelState();
|
|
96
|
+
}
|
|
97
|
+
if (this._nDataTool.isAir()) {
|
|
98
|
+
return -1;
|
|
99
|
+
}
|
|
100
|
+
return -3;
|
|
101
|
+
}
|
|
102
|
+
static canFlowOutwardTest(vox, x, y, z) {
|
|
103
|
+
const level = this.getLevel(vox, x, y - 1, z);
|
|
104
|
+
if (level == -1) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
static flowDownTest(vox, x, y, z) {
|
|
110
|
+
const level = this.getLevel(vox, x, y - 1, z);
|
|
111
|
+
if (level >= 0) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
static wait(ms) {
|
|
117
|
+
return new Promise((resolve, reject) => setTimeout(resolve, ms));
|
|
118
|
+
}
|
|
119
|
+
static _lightValues = [
|
|
120
|
+
0, 0, 0, 0,
|
|
121
|
+
];
|
|
122
|
+
static getAbsorbLight(x, y, z) {
|
|
123
|
+
for (const n of $3dCardinalNeighbors) {
|
|
124
|
+
if (!n[0] && !n[1] && !n[2])
|
|
125
|
+
continue;
|
|
126
|
+
if (!this._nDataTool.loadInAt(x + n[0], y + n[1], z + n[2]))
|
|
127
|
+
continue;
|
|
128
|
+
let l = this._nDataTool.getLight();
|
|
129
|
+
if (l <= 0)
|
|
130
|
+
continue;
|
|
131
|
+
const v = this.lightData.getLightValues(l);
|
|
132
|
+
for (let i = 0; i < 4; i++) {
|
|
133
|
+
if (this._lightValues[i] < v[i]) {
|
|
134
|
+
this._lightValues[i] = v[i];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
let brightest = this.lightData.setLightValues(this._lightValues);
|
|
139
|
+
for (let i = 0; i < 4; i++) {
|
|
140
|
+
this._lightValues[i] = 0;
|
|
141
|
+
}
|
|
142
|
+
return this.lightData.minusOneForAll(brightest);
|
|
143
|
+
}
|
|
144
|
+
static sunCheck(tasks, x, y, z) {
|
|
145
|
+
if (!this._nDataTool.loadInAt(x, y - 1, z))
|
|
146
|
+
return;
|
|
147
|
+
if (!this._nDataTool.isAir())
|
|
148
|
+
return;
|
|
149
|
+
const l = this._nDataTool.getLight();
|
|
150
|
+
if (this.lightData.getS(l) == 0xf) {
|
|
151
|
+
tasks.queues.sun.remove.push(x, y - 1, z);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { FlowUpdate } from "./FlowUpdate.js";
|
|
2
|
+
import { FlowManager as FM } from "../FlowManager.js";
|
|
3
|
+
import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
|
|
4
|
+
function RunRemoveCheck(tasks, vox) {
|
|
5
|
+
const [dimension, x, y, z] = tasks.origin;
|
|
6
|
+
const queue = tasks.queues.flow.remove.queue;
|
|
7
|
+
const cl = FM.getLevel(vox, x, y, z);
|
|
8
|
+
queue.push([x, y, z]);
|
|
9
|
+
const n1 = FM.getLevel(vox, x + 1, y, z);
|
|
10
|
+
const n1s = FM.getLevelState(vox, x + 1, y, z);
|
|
11
|
+
if ((n1 > -1 && n1 < cl) || n1s == 1) {
|
|
12
|
+
queue.push([x + 1, y, z]);
|
|
13
|
+
}
|
|
14
|
+
const n2 = FM.getLevel(vox, x - 1, y, z);
|
|
15
|
+
const n2s = FM.getLevelState(vox, x - 1, y, z);
|
|
16
|
+
if ((n2 > -1 && n2 < cl) || n2s == 1) {
|
|
17
|
+
queue.push([x - 1, y, z]);
|
|
18
|
+
}
|
|
19
|
+
const n3 = FM.getLevel(vox, x, y, z + 1);
|
|
20
|
+
const n3s = FM.getLevelState(vox, x, y, z + 1);
|
|
21
|
+
if ((n3 > -1 && n3 < cl) || n3s == 1) {
|
|
22
|
+
queue.push([x, y, z + 1]);
|
|
23
|
+
}
|
|
24
|
+
const n4 = FM.getLevel(vox, x, y, z - 1);
|
|
25
|
+
const n4s = FM.getLevelState(vox, x, y, z - 1);
|
|
26
|
+
if ((n4 > -1 && n4 < cl) || n4s == 1) {
|
|
27
|
+
queue.push([x, y, z - 1]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function FlowRemove(tasks) {
|
|
31
|
+
const [dimension, x, y, z] = tasks.origin;
|
|
32
|
+
FM.setDimension(dimension);
|
|
33
|
+
const vox = FM.getVoxel(x, y, z);
|
|
34
|
+
if (!vox)
|
|
35
|
+
return;
|
|
36
|
+
const voxId = vox.getStringId();
|
|
37
|
+
const flowRate = vox.getSubstnaceData().getFlowRate();
|
|
38
|
+
RunRemoveCheck(tasks, voxId);
|
|
39
|
+
const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
|
|
40
|
+
while (tasks.queues.flow.remove.queue.length != 0) {
|
|
41
|
+
FM.setDimension(dimension);
|
|
42
|
+
RunRemovePropagation(tasks, voxId);
|
|
43
|
+
RunFlowReduce(tasks, voxId);
|
|
44
|
+
await FlowUpdate(tasks, false);
|
|
45
|
+
noRemoveMap.clear();
|
|
46
|
+
tasks.runRebuildQueue();
|
|
47
|
+
await FM.wait(EngineSettings.settings.flow.baseFlowLimit * flowRate);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function RunRemovePropagation(tasks, vox) {
|
|
51
|
+
const removeQ = tasks.queues.flow.remove.queue;
|
|
52
|
+
const updateQ = tasks.queues.flow.update.queue;
|
|
53
|
+
const map = tasks.queues.flow.update.map;
|
|
54
|
+
const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
|
|
55
|
+
for (let i = 0; i < removeQ.length; i++) {
|
|
56
|
+
const node = removeQ[i];
|
|
57
|
+
const x = node[0];
|
|
58
|
+
const y = node[1];
|
|
59
|
+
const z = node[2];
|
|
60
|
+
const l = FM.getLevel(vox, x, y, z);
|
|
61
|
+
const s = FM.getLevelState(vox, x, y, z);
|
|
62
|
+
map.add(x, y, z);
|
|
63
|
+
if (noRemoveMap.inMap(x, y, z))
|
|
64
|
+
continue;
|
|
65
|
+
n1t: if (!map.inMap(x + 1, y, z)) {
|
|
66
|
+
const n1 = FM.getLevel(vox, x + 1, y, z);
|
|
67
|
+
const n1s = FM.getLevelState(vox, x + 1, y, z);
|
|
68
|
+
if (n1 <= 0 || n1s == 1)
|
|
69
|
+
break n1t;
|
|
70
|
+
if (n1 < l && l > 0 && n1 > 0) {
|
|
71
|
+
removeQ.push([x + 1, y, z]);
|
|
72
|
+
}
|
|
73
|
+
if (n1 > l) {
|
|
74
|
+
updateQ.push([x + 1, y, z]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
n2t: if (!map.inMap(x - 1, y, z)) {
|
|
78
|
+
const n2 = FM.getLevel(vox, x - 1, y, z);
|
|
79
|
+
const n2s = FM.getLevelState(vox, x - 1, y, z);
|
|
80
|
+
if (n2 <= 0 || n2s == 1)
|
|
81
|
+
break n2t;
|
|
82
|
+
if (n2 < l && l > 0 && n2 > 0) {
|
|
83
|
+
removeQ.push([x - 1, y, z]);
|
|
84
|
+
}
|
|
85
|
+
if (n2 > l) {
|
|
86
|
+
updateQ.push([x - 1, y, z]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
n3t: if (!map.inMap(x, y, z + 1)) {
|
|
90
|
+
const n3 = FM.getLevel(vox, x, y, z + 1);
|
|
91
|
+
const n3s = FM.getLevelState(vox, x, y, z + 1);
|
|
92
|
+
if (n3 <= 0 || n3s == 1)
|
|
93
|
+
break n3t;
|
|
94
|
+
if (n3 < l && l > 0 && n3 > 0) {
|
|
95
|
+
removeQ.push([x, y, z + 1]);
|
|
96
|
+
}
|
|
97
|
+
if (n3 > l) {
|
|
98
|
+
updateQ.push([x, y, z + 1]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
n4t: if (!map.inMap(x, y, z - 1)) {
|
|
102
|
+
const n4 = FM.getLevel(vox, x, y, z - 1);
|
|
103
|
+
const n4s = FM.getLevelState(vox, x, y, z - 1);
|
|
104
|
+
if (n4 <= 0 || n4s == 1)
|
|
105
|
+
break n4t;
|
|
106
|
+
if (n4 < l && l > 0 && n4 > 0) {
|
|
107
|
+
removeQ.push([x, y, z - 1]);
|
|
108
|
+
}
|
|
109
|
+
if (n4 > l) {
|
|
110
|
+
updateQ.push([x, y, z - 1]);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (!map.inMap(x, y - 1, z)) {
|
|
114
|
+
const n5 = FM.getLevel(vox, x, y - 1, z);
|
|
115
|
+
if (n5 < 0)
|
|
116
|
+
continue;
|
|
117
|
+
const n5s = FM.getLevelState(vox, x, y - 1, z);
|
|
118
|
+
let add = false;
|
|
119
|
+
if (s == 1 && n5s == 1) {
|
|
120
|
+
if (l <= 1) {
|
|
121
|
+
add = true;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (s == 0 && l <= 1) {
|
|
125
|
+
add = true;
|
|
126
|
+
}
|
|
127
|
+
if (add) {
|
|
128
|
+
removeQ.push([x, y - 1, z]);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
map.clear();
|
|
133
|
+
}
|
|
134
|
+
function RunFlowReduce(tasks, vox) {
|
|
135
|
+
const queue = tasks.queues.flow.remove.queue;
|
|
136
|
+
const map = tasks.queues.flow.remove.map;
|
|
137
|
+
const reque = [];
|
|
138
|
+
while (queue.length != 0) {
|
|
139
|
+
const node = queue.shift();
|
|
140
|
+
if (!node) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
const x = node[0];
|
|
144
|
+
const y = node[1];
|
|
145
|
+
const z = node[2];
|
|
146
|
+
if (map.inMap(x, y, z))
|
|
147
|
+
continue;
|
|
148
|
+
map.add(x, y, z);
|
|
149
|
+
const l = FM.getLevel(vox, x, y, z);
|
|
150
|
+
if (l <= 1) {
|
|
151
|
+
FM.removeVoxel(tasks, x, y, z);
|
|
152
|
+
reque.push([x, y, z]);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
FM.setLevel(l - 1, x, y, z);
|
|
156
|
+
reque.push([x, y, z]);
|
|
157
|
+
}
|
|
158
|
+
tasks.addToRebuildQueue(x, y, z);
|
|
159
|
+
}
|
|
160
|
+
tasks.queues.flow.remove.queue = reque;
|
|
161
|
+
map.clear();
|
|
162
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { FlowManager as FM } from "../FlowManager.js";
|
|
2
|
+
import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
|
|
3
|
+
export async function FlowUpdate(tasks, rebuild = true) {
|
|
4
|
+
const [dimension, x, y, z] = tasks.origin;
|
|
5
|
+
FM.setDimension(dimension);
|
|
6
|
+
const vox = FM.getVoxel(x, y, z);
|
|
7
|
+
if (!vox)
|
|
8
|
+
return;
|
|
9
|
+
const flowRate = vox.getSubstnaceData().getFlowRate();
|
|
10
|
+
const level = FM.getLevel(vox.getStringId(), x, y, z);
|
|
11
|
+
if (level < 0)
|
|
12
|
+
return;
|
|
13
|
+
const levelState = FM.getLevelState(vox.getStringId(), x, y, z);
|
|
14
|
+
tasks.queues.flow.update.queue.push([x, y, z, level, levelState]);
|
|
15
|
+
while (tasks.queues.flow.update.queue.length != 0) {
|
|
16
|
+
FM.setDimension(dimension);
|
|
17
|
+
RunFlowPropagation(tasks, vox.getStringId());
|
|
18
|
+
RunFlowIncrease(tasks, vox.getStringId());
|
|
19
|
+
if (rebuild) {
|
|
20
|
+
tasks.runRebuildQueue();
|
|
21
|
+
await FM.wait(EngineSettings.settings.flow.baseFlowLimit * flowRate);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function RunFlowPropagation(tasks, vox) {
|
|
26
|
+
const que = tasks.queues.flow.update.queue;
|
|
27
|
+
const noRemoveMap = tasks.queues.flow.remove.noRemoveMap;
|
|
28
|
+
for (let i = 0; i < que.length; i++) {
|
|
29
|
+
const node = que[i];
|
|
30
|
+
const x = node[0];
|
|
31
|
+
const y = node[1];
|
|
32
|
+
const z = node[2];
|
|
33
|
+
const l = FM.getLevel(vox, x, y, z);
|
|
34
|
+
const s = FM.getLevelState(vox, x, y, z);
|
|
35
|
+
noRemoveMap.add(x, y, z);
|
|
36
|
+
if (FM.canFlowOutwardTest(vox, x, y, z)) {
|
|
37
|
+
const n1 = FM.getLevel(vox, x + 1, y, z);
|
|
38
|
+
if (n1 + 1 < l && n1 >= 0) {
|
|
39
|
+
let n1l = l - 1;
|
|
40
|
+
que.push([x + 1, y, z, n1l, 0]);
|
|
41
|
+
}
|
|
42
|
+
const n2 = FM.getLevel(vox, x - 1, y, z);
|
|
43
|
+
if (n2 + 1 < l && n2 >= 0) {
|
|
44
|
+
let n2l = l - 1;
|
|
45
|
+
que.push([x - 1, y, z, n2l, 0]);
|
|
46
|
+
}
|
|
47
|
+
const n3 = FM.getLevel(vox, x, y, z + 1);
|
|
48
|
+
if (n3 + 1 < l && n3 >= 0) {
|
|
49
|
+
let n3l = l - 1;
|
|
50
|
+
que.push([x, y, z + 1, n3l, 0]);
|
|
51
|
+
}
|
|
52
|
+
const n4 = FM.getLevel(vox, x, y, z - 1);
|
|
53
|
+
if (n4 + 1 < l && n4 >= 0) {
|
|
54
|
+
let n4l = l - 1;
|
|
55
|
+
que.push([x, y, z - 1, n4l, 0]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const n5 = FM.getLevel(vox, x, y - 1, z);
|
|
59
|
+
if (n5 <= l && n5 >= 0) {
|
|
60
|
+
let state = 1;
|
|
61
|
+
let level = 7;
|
|
62
|
+
if (l <= 0 && s != 1) {
|
|
63
|
+
state = 0;
|
|
64
|
+
level = l - 2;
|
|
65
|
+
}
|
|
66
|
+
que.push([x, y - 1, z, level, state]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function RunFlowIncrease(tasks, vox) {
|
|
71
|
+
const que = tasks.queues.flow.update.queue;
|
|
72
|
+
const map = tasks.queues.flow.update.map;
|
|
73
|
+
const reque = [];
|
|
74
|
+
while (que.length != 0) {
|
|
75
|
+
const node = que.shift();
|
|
76
|
+
if (!node) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
const x = node[0];
|
|
80
|
+
const y = node[1];
|
|
81
|
+
const z = node[2];
|
|
82
|
+
const level = node[3];
|
|
83
|
+
const levelState = node[4];
|
|
84
|
+
if (map.inMap(x, y, z))
|
|
85
|
+
continue;
|
|
86
|
+
map.add(x, y, z);
|
|
87
|
+
if (level > -1) {
|
|
88
|
+
FM.setVoxel(tasks, vox, level, levelState, x, y, z);
|
|
89
|
+
reque.push([x, y, z, -1]);
|
|
90
|
+
}
|
|
91
|
+
tasks.addToRebuildQueue(x, y, z);
|
|
92
|
+
}
|
|
93
|
+
//@ts-ignore
|
|
94
|
+
tasks.queues.flow.update.queue = reque;
|
|
95
|
+
map.clear();
|
|
96
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { IlluminationManager as IM } from "../IlluminationManager.js";
|
|
2
|
+
export function RGBUpdate(tasks) {
|
|
3
|
+
IM.setDimension(tasks.origin[0]);
|
|
4
|
+
const queue = tasks.queues.rgb.update;
|
|
5
|
+
while (queue.length != 0) {
|
|
6
|
+
const x = queue.shift();
|
|
7
|
+
const y = queue.shift();
|
|
8
|
+
const z = queue.shift();
|
|
9
|
+
if (!IM._sDataTool.loadInAt(x, y, z))
|
|
10
|
+
continue;
|
|
11
|
+
if (IM._sDataTool.isBarrier())
|
|
12
|
+
continue;
|
|
13
|
+
const sl = IM._sDataTool.getLight();
|
|
14
|
+
if (sl <= 0)
|
|
15
|
+
continue;
|
|
16
|
+
if (IM._nDataTool.loadInAt(x - 1, y, z)) {
|
|
17
|
+
const nl = IM._nDataTool.getLight();
|
|
18
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
19
|
+
queue.push(x - 1, y, z);
|
|
20
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (IM._nDataTool.loadInAt(x + 1, y, z)) {
|
|
24
|
+
const nl = IM._nDataTool.getLight();
|
|
25
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
26
|
+
queue.push(x + 1, y, z);
|
|
27
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (IM._nDataTool.loadInAt(x, y, z - 1)) {
|
|
31
|
+
const nl = IM._nDataTool.getLight();
|
|
32
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
33
|
+
queue.push(x, y, z - 1);
|
|
34
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (IM._nDataTool.loadInAt(x, y, z + 1)) {
|
|
38
|
+
const nl = IM._nDataTool.getLight();
|
|
39
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
40
|
+
queue.push(x, y, z + 1);
|
|
41
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (IM._nDataTool.loadInAt(x, y - 1, z)) {
|
|
45
|
+
const nl = IM._nDataTool.getLight();
|
|
46
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
47
|
+
queue.push(x, y - 1, z);
|
|
48
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (IM._nDataTool.loadInAt(x, y + 1, z)) {
|
|
52
|
+
const nl = IM._nDataTool.getLight();
|
|
53
|
+
if (nl > -1 && IM.lightData.isLessThanForRGBAdd(nl, sl)) {
|
|
54
|
+
queue.push(x, y + 1, z);
|
|
55
|
+
IM._nDataTool.setLight(IM.lightData.getMinusOneForRGB(sl, nl)).commit();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
tasks.addNeighborsToRebuildQueue(x, y, z);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export function RGBRemove(tasks) {
|
|
62
|
+
IM.setDimension(tasks.origin[0]);
|
|
63
|
+
const remove = tasks.queues.rgb.remove;
|
|
64
|
+
const update = tasks.queues.rgb.update;
|
|
65
|
+
const map = tasks.queues.rgb.map;
|
|
66
|
+
while (remove.length != 0) {
|
|
67
|
+
const x = remove.shift();
|
|
68
|
+
const y = remove.shift();
|
|
69
|
+
const z = remove.shift();
|
|
70
|
+
if (map.inMap(x, y, z))
|
|
71
|
+
continue;
|
|
72
|
+
map.add(x, y, z);
|
|
73
|
+
if (!IM._sDataTool.loadInAt(x, y, z))
|
|
74
|
+
continue;
|
|
75
|
+
const sl = IM._sDataTool.getLight();
|
|
76
|
+
if (sl <= 0)
|
|
77
|
+
continue;
|
|
78
|
+
if (IM._nDataTool.loadInAt(x - 1, y, z)) {
|
|
79
|
+
const nl = IM._nDataTool.getLight();
|
|
80
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
81
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
82
|
+
remove.push(x - 1, y, z);
|
|
83
|
+
if (IM._nDataTool.isLightSource()) {
|
|
84
|
+
update.push(x - 1, y, z);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
89
|
+
update.push(x - 1, y, z);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (IM._nDataTool.loadInAt(x + 1, y, z)) {
|
|
94
|
+
const nl = IM._nDataTool.getLight();
|
|
95
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
96
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
97
|
+
remove.push(x + 1, y, z);
|
|
98
|
+
if (IM._nDataTool.isLightSource()) {
|
|
99
|
+
update.push(x + 1, y, z);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
104
|
+
update.push(x + 1, y, z);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (IM._nDataTool.loadInAt(x, y, z - 1)) {
|
|
109
|
+
const nl = IM._nDataTool.getLight();
|
|
110
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
111
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
112
|
+
remove.push(x, y, z - 1);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
116
|
+
update.push(x, y, z - 1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (IM._nDataTool.loadInAt(x, y, z + 1)) {
|
|
121
|
+
const nl = IM._nDataTool.getLight();
|
|
122
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
123
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
124
|
+
remove.push(x, y, z + 1);
|
|
125
|
+
if (IM._nDataTool.isLightSource()) {
|
|
126
|
+
update.push(x, y, z + 1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
131
|
+
update.push(x, y, z + 1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (IM._nDataTool.loadInAt(x, y - 1, z)) {
|
|
136
|
+
const nl = IM._nDataTool.getLight();
|
|
137
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
138
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
139
|
+
remove.push(x, y - 1, z);
|
|
140
|
+
if (IM._nDataTool.isLightSource()) {
|
|
141
|
+
update.push(x, y - 1, z);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
146
|
+
update.push(x, y - 1, z);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (IM._nDataTool.loadInAt(x, y + 1, z)) {
|
|
151
|
+
const nl = IM._nDataTool.getLight();
|
|
152
|
+
const n1HasRGB = IM.lightData.hasRGBLight(nl);
|
|
153
|
+
if (n1HasRGB && IM.lightData.isLessThanForRGBRemove(nl, sl)) {
|
|
154
|
+
remove.push(x, y + 1, z);
|
|
155
|
+
if (IM._nDataTool.isLightSource()) {
|
|
156
|
+
update.push(x, y + 1, z);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
if (n1HasRGB && IM.lightData.isGreaterOrEqualThanForRGBRemove(nl, sl)) {
|
|
161
|
+
update.push(x, y + 1, z);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
tasks.addNeighborsToRebuildQueue(x, y, z);
|
|
166
|
+
IM._sDataTool.setLight(IM.lightData.removeRGBLight(sl)).commit();
|
|
167
|
+
}
|
|
168
|
+
map.clear();
|
|
169
|
+
}
|