@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,220 @@
|
|
|
1
|
+
import { DataHooks } from "../../Data/DataHooks.js";
|
|
2
|
+
import { Chunk, Column, Dimension, Region, } from "./Classes/";
|
|
3
|
+
import { WorldBounds } from "../../Data/World/WorldBounds.js";
|
|
4
|
+
import { DimensionsRegister } from "./DimensionsRegister.js";
|
|
5
|
+
import { WorldSpaces } from "../../Data/World/WorldSpaces.js";
|
|
6
|
+
import { ColumnDataTool } from "../../Tools/Data/WorldData/ColumnDataTool.js";
|
|
7
|
+
import { RegionDataTool } from "../../Tools/Data/WorldData/RegionDataTool.js";
|
|
8
|
+
import { WorldRegisterCache } from "./WorldRegisterCache.js";
|
|
9
|
+
class WorldRegisterDimensions {
|
|
10
|
+
_register;
|
|
11
|
+
constructor(_register) {
|
|
12
|
+
this._register = _register;
|
|
13
|
+
}
|
|
14
|
+
add(id) {
|
|
15
|
+
id = this._register._dimensionRegister.getDimensionStringId(id);
|
|
16
|
+
const dimesnion = Dimension.CreateNew(id);
|
|
17
|
+
this._register._dimensions.set(id, dimesnion);
|
|
18
|
+
return dimesnion;
|
|
19
|
+
}
|
|
20
|
+
get(id) {
|
|
21
|
+
id = this._register._dimensionRegister.getDimensionStringId(id);
|
|
22
|
+
return this._register._dimensions.get(id);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class WorldRegisterRegions {
|
|
26
|
+
_register;
|
|
27
|
+
constructor(_register) {
|
|
28
|
+
this._register = _register;
|
|
29
|
+
}
|
|
30
|
+
add(x, y, z, region) {
|
|
31
|
+
let dimension = this._register.dimensions.get(this._register._currentDimension);
|
|
32
|
+
if (!dimension) {
|
|
33
|
+
dimension = this._register.dimensions.add(this._register._currentDimension);
|
|
34
|
+
}
|
|
35
|
+
const newRegion = Region.toObject(region);
|
|
36
|
+
const regionPOS = WorldSpaces.region.getPositionXYZ(x, y, z);
|
|
37
|
+
this._register.regionTool.setRegion(newRegion);
|
|
38
|
+
this._register.regionTool.setPositionData(regionPOS.x, regionPOS.y, regionPOS.z);
|
|
39
|
+
dimension.set(WorldSpaces.region.getKeyXYZ(x, y, z), newRegion);
|
|
40
|
+
return newRegion;
|
|
41
|
+
}
|
|
42
|
+
get(x, y, z) {
|
|
43
|
+
const dimension = this._register.dimensions.get(this._register._currentDimension);
|
|
44
|
+
if (!dimension)
|
|
45
|
+
return false;
|
|
46
|
+
const region = dimension.get(WorldSpaces.region.getKeyXYZ(x, y, z));
|
|
47
|
+
if (!region)
|
|
48
|
+
return false;
|
|
49
|
+
return region;
|
|
50
|
+
}
|
|
51
|
+
remove(x, y, z) {
|
|
52
|
+
const dimension = this._register.dimensions.get(this._register._currentDimension);
|
|
53
|
+
if (!dimension)
|
|
54
|
+
return false;
|
|
55
|
+
const key = WorldSpaces.region.getKeyXYZ(x, y, z);
|
|
56
|
+
const region = dimension.get(key);
|
|
57
|
+
if (!region)
|
|
58
|
+
return false;
|
|
59
|
+
dimension.delete(key);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
class WorldRegisterColumns {
|
|
64
|
+
_register;
|
|
65
|
+
constructor(_register) {
|
|
66
|
+
this._register = _register;
|
|
67
|
+
}
|
|
68
|
+
add(x, y, z, column) {
|
|
69
|
+
let region = this._register.region.get(x, y, z);
|
|
70
|
+
if (!region) {
|
|
71
|
+
let newRegion = DataHooks.region.onGetSync.pipe({
|
|
72
|
+
location: [this._register._currentDimension, x, y, z],
|
|
73
|
+
region: null,
|
|
74
|
+
});
|
|
75
|
+
if (!newRegion.region)
|
|
76
|
+
return;
|
|
77
|
+
region = this._register.region.add(x, y, z, newRegion.region);
|
|
78
|
+
DataHooks.region.onNew.notify([
|
|
79
|
+
this._register._currentDimension,
|
|
80
|
+
x,
|
|
81
|
+
y,
|
|
82
|
+
z,
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
85
|
+
const newColumn = Column.toObject(column);
|
|
86
|
+
region.columns.set(region.getColumnIndex(x, y, z), newColumn);
|
|
87
|
+
return newColumn;
|
|
88
|
+
}
|
|
89
|
+
get(x, y, z) {
|
|
90
|
+
const columnKey = this._register.cache.getColumnIndex(x, y, z);
|
|
91
|
+
let addColumn = false;
|
|
92
|
+
if (this._register._cacheOn) {
|
|
93
|
+
const column = this._register.cache.getColumn(columnKey);
|
|
94
|
+
if (column)
|
|
95
|
+
return column;
|
|
96
|
+
addColumn = true;
|
|
97
|
+
}
|
|
98
|
+
const region = this._register.region.get(x, y, z);
|
|
99
|
+
if (!region)
|
|
100
|
+
return false;
|
|
101
|
+
const column = region.columns.get(WorldSpaces.column.getIndexXYZ(x, y, z));
|
|
102
|
+
if (!column)
|
|
103
|
+
return false;
|
|
104
|
+
if (addColumn) {
|
|
105
|
+
this._register.cache.addColumn(columnKey, column);
|
|
106
|
+
}
|
|
107
|
+
return column;
|
|
108
|
+
}
|
|
109
|
+
remove(x, y, z) {
|
|
110
|
+
const region = this._register.region.get(x, y, z);
|
|
111
|
+
if (!region)
|
|
112
|
+
return false;
|
|
113
|
+
const index = WorldSpaces.column.getIndexXYZ(x, y, z);
|
|
114
|
+
const column = region.columns.get(index);
|
|
115
|
+
if (!column)
|
|
116
|
+
return false;
|
|
117
|
+
region.columns.delete(index);
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
fill(x, y, z) {
|
|
121
|
+
for (let cy = WorldBounds.bounds.MinY; cy < WorldBounds.bounds.MaxY; cy += WorldSpaces.chunk._bounds.y) {
|
|
122
|
+
let y = cy;
|
|
123
|
+
if (!this._register.chunk.get(x, y, z)) {
|
|
124
|
+
const newChunk = DataHooks.chunk.onGetSync.pipe({
|
|
125
|
+
location: [this._register._currentDimension, x, y, z],
|
|
126
|
+
chunk: null,
|
|
127
|
+
});
|
|
128
|
+
if (!newChunk.chunk)
|
|
129
|
+
continue;
|
|
130
|
+
this._register.chunk.add(x, y, z, newChunk.chunk);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
class WorldRegisterChunks {
|
|
136
|
+
_register;
|
|
137
|
+
constructor(_register) {
|
|
138
|
+
this._register = _register;
|
|
139
|
+
}
|
|
140
|
+
add(x, y, z, chunk) {
|
|
141
|
+
let column = this._register.column.get(x, y, z);
|
|
142
|
+
if (!column) {
|
|
143
|
+
let newColumn = DataHooks.column.onGetSync.pipe({
|
|
144
|
+
location: [this._register._currentDimension, x, y, z],
|
|
145
|
+
column: null,
|
|
146
|
+
});
|
|
147
|
+
if (!newColumn.column)
|
|
148
|
+
return;
|
|
149
|
+
column = this._register.column.add(x, y, z, newColumn.column);
|
|
150
|
+
DataHooks.column.onNew.notify([
|
|
151
|
+
this._register._currentDimension,
|
|
152
|
+
x,
|
|
153
|
+
y,
|
|
154
|
+
z,
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
if (!column)
|
|
158
|
+
return;
|
|
159
|
+
const newChunk = Chunk.toObject(chunk);
|
|
160
|
+
column.chunks[WorldSpaces.chunk.getIndexXYZ(x, y, z)] = newChunk;
|
|
161
|
+
DataHooks.chunk.onNew.notify([this._register._currentDimension, x, y, z]);
|
|
162
|
+
return newChunk;
|
|
163
|
+
}
|
|
164
|
+
get(x, y, z) {
|
|
165
|
+
const chunkKey = this._register.cache.getChunkIndex(x, y, z);
|
|
166
|
+
let addChunk = false;
|
|
167
|
+
if (this._register._cacheOn) {
|
|
168
|
+
const chunk = this._register.cache.getChunk(chunkKey);
|
|
169
|
+
if (chunk)
|
|
170
|
+
return chunk;
|
|
171
|
+
addChunk = true;
|
|
172
|
+
}
|
|
173
|
+
const column = this._register.column.get(x, y, z);
|
|
174
|
+
if (!column)
|
|
175
|
+
return false;
|
|
176
|
+
const chunk = column.chunks[WorldSpaces.chunk.getIndexXYZ(x, y, z)];
|
|
177
|
+
if (!chunk)
|
|
178
|
+
return;
|
|
179
|
+
if (addChunk) {
|
|
180
|
+
this._register.cache.addChunk(chunkKey, chunk);
|
|
181
|
+
}
|
|
182
|
+
return chunk;
|
|
183
|
+
}
|
|
184
|
+
remove(x, y, z) {
|
|
185
|
+
const column = this._register.column.get(x, y, z);
|
|
186
|
+
if (!column)
|
|
187
|
+
return false;
|
|
188
|
+
const index = WorldSpaces.chunk.getIndexXYZ(x, y, z);
|
|
189
|
+
const chunk = column.chunks[index];
|
|
190
|
+
if (!chunk)
|
|
191
|
+
return false;
|
|
192
|
+
delete column.chunks[index];
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
export class WorldRegister {
|
|
197
|
+
static instance;
|
|
198
|
+
columnTool = new ColumnDataTool();
|
|
199
|
+
regionTool = new RegionDataTool();
|
|
200
|
+
_dimensions = new Map();
|
|
201
|
+
_cacheOn = false;
|
|
202
|
+
_dimensionRegister = new DimensionsRegister();
|
|
203
|
+
constructor() {
|
|
204
|
+
if (WorldRegister.instance)
|
|
205
|
+
return WorldRegister.instance;
|
|
206
|
+
WorldRegister.instance = this;
|
|
207
|
+
}
|
|
208
|
+
cache = new WorldRegisterCache();
|
|
209
|
+
dimensions = new WorldRegisterDimensions(this);
|
|
210
|
+
region = new WorldRegisterRegions(this);
|
|
211
|
+
column = new WorldRegisterColumns(this);
|
|
212
|
+
chunk = new WorldRegisterChunks(this);
|
|
213
|
+
_currentDimension = "main";
|
|
214
|
+
setDimension(dimension) {
|
|
215
|
+
this._currentDimension = dimension;
|
|
216
|
+
}
|
|
217
|
+
clearAll() {
|
|
218
|
+
this._dimensions.clear();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Chunk, Column } from "./Classes/index.js";
|
|
2
|
+
import { Vector3Like } from "@amodx/math";
|
|
3
|
+
export declare class WorldRegisterCache {
|
|
4
|
+
_cacheOn: boolean;
|
|
5
|
+
_chunkCache: Chunk[];
|
|
6
|
+
_columnCache: Column[];
|
|
7
|
+
worldSize: Vector3Like;
|
|
8
|
+
chunkSize: Vector3Like;
|
|
9
|
+
chunkSizePower: Vector3Like;
|
|
10
|
+
columnSize: Vector3Like;
|
|
11
|
+
columnSizePower: Vector3Like;
|
|
12
|
+
constructor();
|
|
13
|
+
symcSettings(): void;
|
|
14
|
+
enable(): void;
|
|
15
|
+
disable(): void;
|
|
16
|
+
addChunk(key: number, data: Chunk): void;
|
|
17
|
+
addColumn(key: number, data: Column): void;
|
|
18
|
+
getChunk(key: number): Chunk;
|
|
19
|
+
getColumn(key: number): Column;
|
|
20
|
+
getChunkIndex(x: number, y: number, z: number): number;
|
|
21
|
+
getColumnIndex(x: number, y: number, z: number): number;
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { WorldBounds } from "../../Data/World/WorldBounds.js";
|
|
2
|
+
import { Vector3Like } from "@amodx/math";
|
|
3
|
+
import { EngineSettings } from "../../Data/Settings/EngineSettings.js";
|
|
4
|
+
export class WorldRegisterCache {
|
|
5
|
+
_cacheOn = false;
|
|
6
|
+
_chunkCache = [];
|
|
7
|
+
_columnCache = [];
|
|
8
|
+
worldSize = Vector3Like.Create();
|
|
9
|
+
chunkSize = Vector3Like.Create();
|
|
10
|
+
chunkSizePower = Vector3Like.Create();
|
|
11
|
+
columnSize = Vector3Like.Create();
|
|
12
|
+
columnSizePower = Vector3Like.Create();
|
|
13
|
+
constructor() {
|
|
14
|
+
this.symcSettings();
|
|
15
|
+
EngineSettings.observers.updated.subscribe("WorldRegisterCache", () => {
|
|
16
|
+
this.symcSettings();
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
symcSettings() {
|
|
20
|
+
const size = WorldBounds.getWorldDimensions();
|
|
21
|
+
this.chunkSize.x = 2 ** EngineSettings.settings.chunks.chunkXPow2;
|
|
22
|
+
this.chunkSize.y = 2 ** EngineSettings.settings.chunks.chunkYPow2;
|
|
23
|
+
this.chunkSize.z = 2 ** EngineSettings.settings.chunks.chunkZPow2;
|
|
24
|
+
this.chunkSizePower = Vector3Like.Create(EngineSettings.settings.chunks.chunkXPow2 - 1, EngineSettings.settings.chunks.chunkYPow2 - 1, EngineSettings.settings.chunks.chunkZPow2 - 1);
|
|
25
|
+
this.columnSizePower = Vector3Like.Create(EngineSettings.settings.chunks.chunkXPow2 - 1, EngineSettings.settings.regions.regionYPow2 - 1, EngineSettings.settings.chunks.chunkZPow2 - 1);
|
|
26
|
+
this.worldSize = Vector3Like.Create(size.width, size.height, size.depth);
|
|
27
|
+
this.columnSize.x = 2 ** EngineSettings.settings.chunks.chunkXPow2;
|
|
28
|
+
this.columnSize.y = 2 ** EngineSettings.settings.regions.regionYPow2;
|
|
29
|
+
this.columnSize.z = 2 ** EngineSettings.settings.chunks.chunkZPow2;
|
|
30
|
+
}
|
|
31
|
+
enable() {
|
|
32
|
+
this._cacheOn = true;
|
|
33
|
+
this._chunkCache.length = 0;
|
|
34
|
+
this._columnCache.length = 0;
|
|
35
|
+
}
|
|
36
|
+
disable() {
|
|
37
|
+
this._cacheOn = false;
|
|
38
|
+
this._chunkCache.length = 0;
|
|
39
|
+
this._columnCache.length = 0;
|
|
40
|
+
}
|
|
41
|
+
addChunk(key, data) {
|
|
42
|
+
this._chunkCache[key] = data;
|
|
43
|
+
}
|
|
44
|
+
addColumn(key, data) {
|
|
45
|
+
this._columnCache[key] = data;
|
|
46
|
+
}
|
|
47
|
+
getChunk(key) {
|
|
48
|
+
return this._chunkCache[key];
|
|
49
|
+
}
|
|
50
|
+
getColumn(key) {
|
|
51
|
+
return this._columnCache[key];
|
|
52
|
+
}
|
|
53
|
+
getChunkIndex(x, y, z) {
|
|
54
|
+
return Vector3Like.HashXYZ(((x >> this.chunkSizePower.x) << this.chunkSizePower.x) /
|
|
55
|
+
this.chunkSize.x, ((y >> this.chunkSizePower.y) << this.chunkSizePower.y) /
|
|
56
|
+
this.chunkSize.y, ((z >> this.chunkSizePower.z) << this.chunkSizePower.z) / this.chunkSize.z);
|
|
57
|
+
}
|
|
58
|
+
getColumnIndex(x, y, z) {
|
|
59
|
+
return Vector3Like.HashXYZ(((x >> this.columnSizePower.x) << this.columnSizePower.x) /
|
|
60
|
+
this.columnSize.x, ((y >> this.columnSizePower.y) << this.columnSizePower.y) /
|
|
61
|
+
this.columnSize.y, ((z >> this.columnSizePower.z) << this.columnSizePower.z) /
|
|
62
|
+
this.columnSize.z);
|
|
63
|
+
}
|
|
64
|
+
clear() {
|
|
65
|
+
this._chunkCache.length = 0;
|
|
66
|
+
this._columnCache.length = 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//types
|
|
2
|
+
import { VoxelSpaces } from "../../Math/Spaces/VoxelSpaces.js";
|
|
3
|
+
//Objects
|
|
4
|
+
export const WorldSpaces = new VoxelSpaces();
|
|
5
|
+
export function InitWorldSpaces(settings) {
|
|
6
|
+
WorldSpaces.setDimensions({
|
|
7
|
+
regions: {
|
|
8
|
+
x: settings.regions.regionXPow2,
|
|
9
|
+
y: settings.regions.regionYPow2,
|
|
10
|
+
z: settings.regions.regionZPow2,
|
|
11
|
+
},
|
|
12
|
+
columns: {
|
|
13
|
+
x: settings.chunks.chunkXPow2,
|
|
14
|
+
y: settings.regions.regionYPow2,
|
|
15
|
+
z: settings.chunks.chunkZPow2,
|
|
16
|
+
},
|
|
17
|
+
chunks: {
|
|
18
|
+
x: settings.chunks.chunkXPow2,
|
|
19
|
+
y: settings.chunks.chunkYPow2,
|
|
20
|
+
z: settings.chunks.chunkZPow2,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { WorldDataTool } from "./WorldDataTool";
|
|
2
|
+
import { LocationData } from "../../Math";
|
|
3
|
+
import { DVEDataHandler } from "../../Interfaces/DataLoader/DVEDataHandler";
|
|
4
|
+
import { WorldDataBase } from "./WorldDataBase";
|
|
5
|
+
export declare class DefaultDataHandler extends DVEDataHandler {
|
|
6
|
+
static instance: DefaultDataHandler;
|
|
7
|
+
worldDataTool: WorldDataTool;
|
|
8
|
+
worldData: WorldDataBase;
|
|
9
|
+
constructor();
|
|
10
|
+
init(): Promise<void>;
|
|
11
|
+
openWorldDataBae(id: string, dimension?: string): Promise<void>;
|
|
12
|
+
getRegionHeader(location: LocationData): Promise<ArrayBuffer>;
|
|
13
|
+
getColumn(location: LocationData): Promise<ArrayBufferLike>;
|
|
14
|
+
saveColumn(location: LocationData, buffer: ArrayBuffer): Promise<boolean>;
|
|
15
|
+
setPath(id: string): Promise<boolean>;
|
|
16
|
+
columnExists(location: LocationData): Promise<boolean>;
|
|
17
|
+
columnExistsBatch(location: LocationData[]): Promise<Record<string, boolean>>;
|
|
18
|
+
columnTimestamp(location: LocationData): Promise<number>;
|
|
19
|
+
columnHasSegment(location: LocationData, segment: "rich-data" | "dbo" | "entities"): Promise<boolean>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { DVEDataHandler } from "../../Interfaces/DataLoader/DVEDataHandler";
|
|
2
|
+
import { WorldDataBaseManager } from "./WorldDataBaseManager";
|
|
3
|
+
export class DefaultDataHandler extends DVEDataHandler {
|
|
4
|
+
static instance;
|
|
5
|
+
worldDataTool;
|
|
6
|
+
worldData;
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
if (DefaultDataHandler.instance)
|
|
10
|
+
return DefaultDataHandler.instance;
|
|
11
|
+
DefaultDataHandler.instance = this;
|
|
12
|
+
}
|
|
13
|
+
async init() {
|
|
14
|
+
await WorldDataBaseManager.init();
|
|
15
|
+
}
|
|
16
|
+
async openWorldDataBae(id, dimension = "main") {
|
|
17
|
+
const worldDataBase = await WorldDataBaseManager.getWorldDataBase(id);
|
|
18
|
+
await worldDataBase.setDimension(dimension);
|
|
19
|
+
this.worldData = worldDataBase;
|
|
20
|
+
this.worldDataTool = worldDataBase.worldDataTool;
|
|
21
|
+
}
|
|
22
|
+
async getRegionHeader(location) {
|
|
23
|
+
this.worldDataTool.setType(this.dataType);
|
|
24
|
+
return await this.worldDataTool.loadRegionHeader(location);
|
|
25
|
+
}
|
|
26
|
+
async getColumn(location) {
|
|
27
|
+
this.worldDataTool.setType(this.dataType);
|
|
28
|
+
return await this.worldDataTool.loadColumn(location);
|
|
29
|
+
}
|
|
30
|
+
async saveColumn(location, buffer) {
|
|
31
|
+
this.worldDataTool.setType(this.dataType);
|
|
32
|
+
return await this.worldDataTool.saveColumn(location, buffer);
|
|
33
|
+
}
|
|
34
|
+
async setPath(id) {
|
|
35
|
+
this.worldDataTool.setType(this.dataType);
|
|
36
|
+
return this.worldDataTool.setPath(id);
|
|
37
|
+
}
|
|
38
|
+
async columnExists(location) {
|
|
39
|
+
this.worldDataTool.setType(this.dataType);
|
|
40
|
+
return await this.worldDataTool.columnExists(location);
|
|
41
|
+
}
|
|
42
|
+
async columnExistsBatch(location) {
|
|
43
|
+
this.worldDataTool.setType(this.dataType);
|
|
44
|
+
return await this.worldDataTool.columnExistsBatch(location);
|
|
45
|
+
}
|
|
46
|
+
async columnTimestamp(location) {
|
|
47
|
+
this.worldDataTool.setType(this.dataType);
|
|
48
|
+
return await this.worldDataTool.columnTimestamp(location);
|
|
49
|
+
}
|
|
50
|
+
async columnHasSegment(location, segment) {
|
|
51
|
+
this.worldDataTool.setType(segment);
|
|
52
|
+
return await this.worldDataTool.columnExists(location);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DataBase, ObjectStore } from "@amodx/indexdb/";
|
|
2
|
+
import type { DVEDDataTypes } from "../Types/DVED.types";
|
|
3
|
+
import { WorldDataTool } from "./WorldDataTool";
|
|
4
|
+
export declare class WorldDataBase {
|
|
5
|
+
database: DataBase;
|
|
6
|
+
dimension: string;
|
|
7
|
+
typeStores: Record<DVEDDataTypes, ObjectStore<any>>;
|
|
8
|
+
worldDataTool: WorldDataTool;
|
|
9
|
+
constructor(database: DataBase);
|
|
10
|
+
setDimension(dimensionId: string): Promise<void>;
|
|
11
|
+
regionHeader: {
|
|
12
|
+
set: (key: string, type: DVEDDataTypes, data: ArrayBuffer) => Promise<void>;
|
|
13
|
+
get: (key: string, type: DVEDDataTypes) => Promise<ArrayBuffer | false>;
|
|
14
|
+
getKey(key: string, type: DVEDDataTypes): string;
|
|
15
|
+
};
|
|
16
|
+
column: {
|
|
17
|
+
set: (key: string, type: DVEDDataTypes, data: ArrayBuffer) => Promise<void>;
|
|
18
|
+
get: (key: string, type: DVEDDataTypes) => Promise<false | ArrayBuffer>;
|
|
19
|
+
getKey(key: string, type: DVEDDataTypes): string;
|
|
20
|
+
};
|
|
21
|
+
columnTimestamp: {
|
|
22
|
+
set: (key: string, type: DVEDDataTypes, timeStamp: number) => Promise<void>;
|
|
23
|
+
get: (key: string, type: DVEDDataTypes) => Promise<number | false>;
|
|
24
|
+
getKey: (key: string, type: DVEDDataTypes) => string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { WorldDataTool } from "./WorldDataTool";
|
|
2
|
+
export class WorldDataBase {
|
|
3
|
+
database;
|
|
4
|
+
dimension = "";
|
|
5
|
+
typeStores;
|
|
6
|
+
worldDataTool;
|
|
7
|
+
constructor(database) {
|
|
8
|
+
this.database = database;
|
|
9
|
+
this.worldDataTool = new WorldDataTool(this);
|
|
10
|
+
}
|
|
11
|
+
async setDimension(dimensionId) {
|
|
12
|
+
if (this.dimension != dimensionId) {
|
|
13
|
+
const worldDataId = `${dimensionId}-world-data`;
|
|
14
|
+
const richDataId = `${dimensionId}-rich-data`;
|
|
15
|
+
const entitiesId = `${dimensionId}-entities`;
|
|
16
|
+
const dboId = `${dimensionId}-dbo`;
|
|
17
|
+
this.database.close();
|
|
18
|
+
await this.database.addObjectStore({
|
|
19
|
+
name: worldDataId,
|
|
20
|
+
schema: [],
|
|
21
|
+
}, {
|
|
22
|
+
name: richDataId,
|
|
23
|
+
schema: [],
|
|
24
|
+
}, {
|
|
25
|
+
name: entitiesId,
|
|
26
|
+
schema: [],
|
|
27
|
+
}, {
|
|
28
|
+
name: dboId,
|
|
29
|
+
schema: [],
|
|
30
|
+
});
|
|
31
|
+
this.typeStores = {};
|
|
32
|
+
this.typeStores["world-data"] = await this.database.getObjectStore(worldDataId);
|
|
33
|
+
this.typeStores["rich-data"] = await this.database.getObjectStore(richDataId);
|
|
34
|
+
this.typeStores["entities"] = await this.database.getObjectStore(entitiesId);
|
|
35
|
+
this.typeStores["dbo"] = await this.database.getObjectStore(dboId);
|
|
36
|
+
}
|
|
37
|
+
this.dimension = dimensionId;
|
|
38
|
+
}
|
|
39
|
+
regionHeader = {
|
|
40
|
+
set: async (key, type, data) => {
|
|
41
|
+
await this.typeStores[type].set(this.regionHeader.getKey(key, type), data);
|
|
42
|
+
},
|
|
43
|
+
get: async (key, type) => {
|
|
44
|
+
const buffer = (await this.typeStores[type].get(this.regionHeader.getKey(key, type)));
|
|
45
|
+
if (!buffer)
|
|
46
|
+
return false;
|
|
47
|
+
return buffer;
|
|
48
|
+
},
|
|
49
|
+
getKey(key, type) {
|
|
50
|
+
return `${key}_${type}_region_header`;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
column = {
|
|
54
|
+
set: async (key, type, data) => {
|
|
55
|
+
await this.typeStores[type].set(this.column.getKey(key, type), data);
|
|
56
|
+
},
|
|
57
|
+
get: async (key, type) => {
|
|
58
|
+
const buffer = (await this.typeStores[type].get(this.column.getKey(key, type)));
|
|
59
|
+
if (!buffer)
|
|
60
|
+
return false;
|
|
61
|
+
return await buffer;
|
|
62
|
+
},
|
|
63
|
+
getKey(key, type) {
|
|
64
|
+
return `${key}_${type}_column`;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
columnTimestamp = {
|
|
68
|
+
set: async (key, type, timeStamp) => {
|
|
69
|
+
await this.typeStores[type].set(this.columnTimestamp.getKey(key, type), timeStamp);
|
|
70
|
+
},
|
|
71
|
+
get: async (key, type) => {
|
|
72
|
+
const timeStamp = (await this.typeStores[type].get(this.columnTimestamp.getKey(key, type)));
|
|
73
|
+
if (!timeStamp)
|
|
74
|
+
return false;
|
|
75
|
+
return Number(timeStamp);
|
|
76
|
+
},
|
|
77
|
+
getKey: (key, type) => {
|
|
78
|
+
return `${key}_${type}_column_timestamp`;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WorldDataBase } from "./WorldDataBase";
|
|
2
|
+
export declare class WorldDataBaseManager {
|
|
3
|
+
static init(): Promise<void>;
|
|
4
|
+
static getWorldDataBase(dbName: string, dimension?: string): Promise<WorldDataBase>;
|
|
5
|
+
static deleteWorldDataBase(dbName: string): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IndexDB } from "@amodx/indexdb/";
|
|
2
|
+
import { WorldDataBase } from "./WorldDataBase";
|
|
3
|
+
export class WorldDataBaseManager {
|
|
4
|
+
static async init() {
|
|
5
|
+
await IndexDB.init();
|
|
6
|
+
}
|
|
7
|
+
static async getWorldDataBase(dbName, dimension = "main") {
|
|
8
|
+
let db;
|
|
9
|
+
const existanceCheck = await IndexDB.databaseExists(dbName);
|
|
10
|
+
if (!existanceCheck) {
|
|
11
|
+
db = await IndexDB.createDatabase({
|
|
12
|
+
databaseName: dbName,
|
|
13
|
+
objectStores: [
|
|
14
|
+
{
|
|
15
|
+
name: "world-meta",
|
|
16
|
+
schema: [],
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
});
|
|
20
|
+
return new WorldDataBase(db);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
db = await IndexDB.getDatabase(dbName);
|
|
24
|
+
return new WorldDataBase(db);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
static async deleteWorldDataBase(dbName) {
|
|
28
|
+
await IndexDB.deleteDatabase(dbName);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WorldDataBase } from "./WorldDataBase";
|
|
2
|
+
import { LocationData } from "../../Math";
|
|
3
|
+
import { DataLoaderSegments } from "Interfaces/DataLoader/DVEDataHandler";
|
|
4
|
+
export declare class WorldDataTool {
|
|
5
|
+
worldDataBase: WorldDataBase;
|
|
6
|
+
setPath(id: string): Promise<boolean>;
|
|
7
|
+
constructor(worldDataBase: WorldDataBase);
|
|
8
|
+
dataType: DataLoaderSegments;
|
|
9
|
+
setType(data: DataLoaderSegments): void;
|
|
10
|
+
columnExists(location: LocationData): Promise<boolean>;
|
|
11
|
+
columnExistsBatch(locations: LocationData[]): Promise<Record<string, boolean>>;
|
|
12
|
+
columnTimestamp(location: LocationData): Promise<number>;
|
|
13
|
+
loadRegionHeader(location: LocationData): Promise<ArrayBuffer>;
|
|
14
|
+
loadColumn(location: LocationData): Promise<ArrayBufferLike>;
|
|
15
|
+
saveColumn(location: LocationData, buffer: ArrayBuffer): Promise<boolean>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { WorldSpaces } from "../../Data/World/WorldSpaces";
|
|
2
|
+
import { Compressor } from "@amodx/core/Compression/Compression";
|
|
3
|
+
export class WorldDataTool {
|
|
4
|
+
worldDataBase;
|
|
5
|
+
async setPath(id) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
constructor(worldDataBase) {
|
|
9
|
+
this.worldDataBase = worldDataBase;
|
|
10
|
+
}
|
|
11
|
+
dataType = "world-data";
|
|
12
|
+
setType(data) {
|
|
13
|
+
this.dataType = data;
|
|
14
|
+
}
|
|
15
|
+
async columnExists(location) {
|
|
16
|
+
await this.worldDataBase.setDimension(location[0]);
|
|
17
|
+
return (await this.columnTimestamp(location)) > 0;
|
|
18
|
+
}
|
|
19
|
+
async columnExistsBatch(locations) {
|
|
20
|
+
await this.worldDataBase.setDimension(locations[0][0]);
|
|
21
|
+
const existsRecord = {};
|
|
22
|
+
const transication = await this.worldDataBase.database.getTransaction("readonly", this.worldDataBase.typeStores["world-data"].id);
|
|
23
|
+
const proms = [];
|
|
24
|
+
const keys = [];
|
|
25
|
+
for (const location of locations) {
|
|
26
|
+
const key = location.toString();
|
|
27
|
+
keys.push(key);
|
|
28
|
+
proms.push(transication.get(this.worldDataBase.columnTimestamp.getKey(WorldSpaces.column.getKeyXYZ(location[1], location[2], location[3]), this.dataType)));
|
|
29
|
+
}
|
|
30
|
+
const resolved = await Promise.all(proms);
|
|
31
|
+
for (let i = 0; i < keys.length; i++) {
|
|
32
|
+
existsRecord[keys[i]] = resolved[i] !== undefined;
|
|
33
|
+
}
|
|
34
|
+
return existsRecord;
|
|
35
|
+
}
|
|
36
|
+
async columnTimestamp(location) {
|
|
37
|
+
await this.worldDataBase.setDimension(location[0]);
|
|
38
|
+
const stamp = await this.worldDataBase.columnTimestamp.get(WorldSpaces.column.getKeyXYZ(location[1], location[2], location[3]), this.dataType);
|
|
39
|
+
if (!stamp)
|
|
40
|
+
return 0;
|
|
41
|
+
return stamp;
|
|
42
|
+
}
|
|
43
|
+
async loadRegionHeader(location) {
|
|
44
|
+
await this.worldDataBase.setDimension(location[0]);
|
|
45
|
+
const buffer = await this.worldDataBase.regionHeader.get(WorldSpaces.region.getKeyXYZ(location[1], location[2], location[3]), this.dataType);
|
|
46
|
+
if (!buffer)
|
|
47
|
+
return new ArrayBuffer(0);
|
|
48
|
+
return buffer;
|
|
49
|
+
}
|
|
50
|
+
async loadColumn(location) {
|
|
51
|
+
await this.worldDataBase.setDimension(location[0]);
|
|
52
|
+
const buffer = await this.worldDataBase.column.get(WorldSpaces.column.getKeyXYZ(location[1], location[2], location[3]), this.dataType);
|
|
53
|
+
if (!buffer)
|
|
54
|
+
return new ArrayBuffer(0);
|
|
55
|
+
return await (await Compressor.decompressArray(buffer, "Uint8")).buffer;
|
|
56
|
+
}
|
|
57
|
+
async saveColumn(location, buffer) {
|
|
58
|
+
const compressed = await Compressor.compressArray(new Uint8Array(buffer));
|
|
59
|
+
await this.worldDataBase.setDimension(location[0]);
|
|
60
|
+
await this.worldDataBase.column.set(WorldSpaces.column.getKeyXYZ(location[1], location[2], location[3]), this.dataType, compressed.buffer);
|
|
61
|
+
await this.worldDataBase.columnTimestamp.set(WorldSpaces.column.getKeyXYZ(location[1], location[2], location[3]), this.dataType, Date.now());
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataHandler";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataHandler";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
;
|
|
2
|
+
import { Threads } from "@amodx/threads/";
|
|
3
|
+
export default function (DVEDL) {
|
|
4
|
+
Threads.registerTasks("serialize-column", async (location, onDone) => {
|
|
5
|
+
const seralized = DVEDL.serializer.serializeColumn(location);
|
|
6
|
+
if (!seralized)
|
|
7
|
+
return onDone ? onDone(false) : false;
|
|
8
|
+
return onDone ? onDone(seralized, [seralized]) : seralized;
|
|
9
|
+
}, "deferred");
|
|
10
|
+
Threads.registerTasks("deserialize-column", async (columnData, onDone) => {
|
|
11
|
+
const deSeralized = DVEDL.serializer.deSerializeColumn(columnData);
|
|
12
|
+
return onDone ? onDone(deSeralized) : deSeralized;
|
|
13
|
+
}, "deferred");
|
|
14
|
+
}
|