@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,213 @@
|
|
|
1
|
+
import { VoxelPalette } from "../../Data/Voxel/VoxelPalette";
|
|
2
|
+
import { Chunk, Column, } from "../../Data/World/Classes";
|
|
3
|
+
import { VoxelStruct } from "../../Data/Voxel/VoxelStruct";
|
|
4
|
+
import { VoxelTagIDs } from "../../Data/Constants/VoxelTagIds";
|
|
5
|
+
import { NumberPalette } from "../../Interfaces/Data/NumberPalette";
|
|
6
|
+
import { StringPalette } from "../../Interfaces/Data/StringPalette";
|
|
7
|
+
import { getPaletteArray } from "./Palettes";
|
|
8
|
+
let columnStructInstance;
|
|
9
|
+
let chunkStructInstance;
|
|
10
|
+
const updateChunkBuffers = (column, chunk) => {
|
|
11
|
+
if ((column.palettes.id.length <= 15 ||
|
|
12
|
+
(chunk.palettes.id && chunk.palettes.id.length <= 15)) &&
|
|
13
|
+
ArrayBuffer.isView(chunk.buffers.id)) {
|
|
14
|
+
chunk.buffers.id = getPaletteArray(Math.min(chunk.palettes.id?.length || Infinity, column.palettes.id?.length || 0), chunk.buffers.id);
|
|
15
|
+
}
|
|
16
|
+
if (((chunk.palettes.light && chunk.palettes.light.length <= 15) ||
|
|
17
|
+
(column.palettes.light && column.palettes.light.length <= 15)) &&
|
|
18
|
+
ArrayBuffer.isView(chunk.buffers.light)) {
|
|
19
|
+
chunk.buffers.light = getPaletteArray(Math.min(chunk.palettes.light?.length || Infinity, column.palettes.light?.length || 0), chunk.buffers.light);
|
|
20
|
+
}
|
|
21
|
+
if (((chunk.palettes.state && chunk.palettes.state.length <= 15) ||
|
|
22
|
+
(column.palettes.state && column.palettes.state.length <= 15)) &&
|
|
23
|
+
ArrayBuffer.isView(chunk.buffers.state)) {
|
|
24
|
+
chunk.buffers.state = getPaletteArray(Math.min(chunk.palettes.state?.length || Infinity, column.palettes.state?.length || 0), chunk.buffers.state);
|
|
25
|
+
}
|
|
26
|
+
if (((chunk.palettes.mod && chunk.palettes.mod.length <= 15) ||
|
|
27
|
+
(column.palettes.mod && column.palettes.mod.length <= 15)) &&
|
|
28
|
+
ArrayBuffer.isView(chunk.buffers.mod)) {
|
|
29
|
+
chunk.buffers.mod = getPaletteArray(Math.min(chunk.palettes.mod?.length || Infinity, column.palettes.mod?.length || 0), chunk.buffers.mod);
|
|
30
|
+
}
|
|
31
|
+
if (((chunk.palettes.secondaryState &&
|
|
32
|
+
chunk.palettes.secondaryState.length <= 15) ||
|
|
33
|
+
(column.palettes.secondaryState &&
|
|
34
|
+
column.palettes.secondaryState.length <= 15)) &&
|
|
35
|
+
((chunk.palettes.secondaryId && chunk.palettes.secondaryId.length <= 15) ||
|
|
36
|
+
(column.palettes.secondaryId &&
|
|
37
|
+
column.palettes.secondaryId.length <= 15)) &&
|
|
38
|
+
ArrayBuffer.isView(chunk.buffers.secondary)) {
|
|
39
|
+
chunk.buffers.secondary = getPaletteArray(Math.max(Math.min(chunk.palettes.secondaryId?.length || Infinity, column.palettes.secondaryId?.length || 0), Math.min(chunk.palettes.secondaryState?.length || Infinity, column.palettes.secondaryState?.length || 0)), chunk.buffers.secondary);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const getImportedColumnData = (column) => {
|
|
43
|
+
return {
|
|
44
|
+
column,
|
|
45
|
+
idPalette: new StringPalette(column.palettes.id),
|
|
46
|
+
secondaryId: column.palettes.secondaryId
|
|
47
|
+
? new StringPalette(column.palettes.secondaryId)
|
|
48
|
+
: undefined,
|
|
49
|
+
lightPalette: column.palettes.light
|
|
50
|
+
? new NumberPalette(column.palettes.light)
|
|
51
|
+
: undefined,
|
|
52
|
+
statePalette: column.palettes.state
|
|
53
|
+
? new NumberPalette(column.palettes.state)
|
|
54
|
+
: undefined,
|
|
55
|
+
modPalette: column.palettes.mod
|
|
56
|
+
? new NumberPalette(column.palettes.mod)
|
|
57
|
+
: undefined,
|
|
58
|
+
secondaryState: column.palettes.secondaryState
|
|
59
|
+
? new NumberPalette(column.palettes.secondaryState)
|
|
60
|
+
: undefined,
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const getImportedChunkData = (chunk) => {
|
|
64
|
+
return {
|
|
65
|
+
chunk,
|
|
66
|
+
idPalette: chunk.palettes.id
|
|
67
|
+
? new NumberPalette(chunk.palettes.id)
|
|
68
|
+
: undefined,
|
|
69
|
+
lightPalette: chunk.palettes.light
|
|
70
|
+
? new NumberPalette(chunk.palettes.light)
|
|
71
|
+
: undefined,
|
|
72
|
+
statePalette: chunk.palettes.state
|
|
73
|
+
? new NumberPalette(chunk.palettes.state)
|
|
74
|
+
: undefined,
|
|
75
|
+
modPalette: chunk.palettes.mod
|
|
76
|
+
? new NumberPalette(chunk.palettes.mod)
|
|
77
|
+
: undefined,
|
|
78
|
+
secondaryState: chunk.palettes.secondaryState
|
|
79
|
+
? new NumberPalette(chunk.palettes.secondaryState)
|
|
80
|
+
: undefined,
|
|
81
|
+
secondaryId: chunk.palettes.secondaryId
|
|
82
|
+
? new NumberPalette(chunk.palettes.secondaryId)
|
|
83
|
+
: undefined,
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const getId = (value, importedColumn, importedChunk) => {
|
|
87
|
+
if (importedChunk.chunk.buffers.state instanceof Uint16Array)
|
|
88
|
+
return value;
|
|
89
|
+
if (typeof importedChunk.chunk.buffers.id == "number") {
|
|
90
|
+
return VoxelPalette.ids.getNumberId(importedColumn.column.palettes.id[importedChunk.chunk.buffers.id]);
|
|
91
|
+
}
|
|
92
|
+
if (importedChunk.idPalette) {
|
|
93
|
+
return VoxelPalette.ids.getNumberId(importedColumn.idPalette.getStringId(importedChunk.idPalette.getValue(value)));
|
|
94
|
+
}
|
|
95
|
+
return VoxelPalette.ids.getNumberId(importedColumn.idPalette.getStringId(value));
|
|
96
|
+
};
|
|
97
|
+
const getLight = (value, importedColumn, importedChunk) => {
|
|
98
|
+
if (importedChunk.chunk.buffers.light instanceof Uint16Array)
|
|
99
|
+
return value;
|
|
100
|
+
if (typeof importedChunk.chunk.buffers.light == "number") {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
if (importedChunk.lightPalette && importedColumn.lightPalette) {
|
|
104
|
+
return importedColumn.lightPalette.getValue(importedChunk.lightPalette.getValue(value));
|
|
105
|
+
}
|
|
106
|
+
if (importedColumn.lightPalette) {
|
|
107
|
+
return importedColumn.lightPalette.getValue(value);
|
|
108
|
+
}
|
|
109
|
+
return value;
|
|
110
|
+
};
|
|
111
|
+
const getState = (value, importedColumn, importedChunk) => {
|
|
112
|
+
if (importedChunk.chunk.buffers.state instanceof Uint16Array)
|
|
113
|
+
return value;
|
|
114
|
+
if (typeof importedChunk.chunk.buffers.state == "number") {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
if (importedChunk.statePalette && importedColumn.statePalette) {
|
|
118
|
+
return importedColumn.statePalette.getValue(importedChunk.statePalette.getValue(value));
|
|
119
|
+
}
|
|
120
|
+
if (importedColumn.statePalette) {
|
|
121
|
+
return importedColumn.statePalette.getValue(value);
|
|
122
|
+
}
|
|
123
|
+
return value;
|
|
124
|
+
};
|
|
125
|
+
const getMod = (value, importedColumn, importedChunk) => {
|
|
126
|
+
if (importedChunk.chunk.buffers.mod instanceof Uint16Array)
|
|
127
|
+
return value;
|
|
128
|
+
if (typeof importedChunk.chunk.buffers.mod == "number") {
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
if (importedChunk.modPalette && importedColumn.modPalette) {
|
|
132
|
+
return importedColumn.modPalette.getValue(importedChunk.modPalette.getValue(value));
|
|
133
|
+
}
|
|
134
|
+
if (importedColumn.modPalette) {
|
|
135
|
+
return importedColumn.modPalette.getValue(value);
|
|
136
|
+
}
|
|
137
|
+
return value;
|
|
138
|
+
};
|
|
139
|
+
const getSecondary = (voxelId, value, importedColumn, importedChunk) => {
|
|
140
|
+
if (importedChunk.chunk.buffers.state instanceof Uint16Array)
|
|
141
|
+
return value;
|
|
142
|
+
VoxelStruct.setVoxel(voxelId);
|
|
143
|
+
if (VoxelStruct.instance[VoxelTagIDs.canHaveSecondary] == 1) {
|
|
144
|
+
if (typeof importedChunk.chunk.buffers.secondary == "number") {
|
|
145
|
+
return VoxelPalette.ids.getNumberId(importedColumn.column.palettes.secondaryId[importedChunk.chunk.buffers.secondary]);
|
|
146
|
+
}
|
|
147
|
+
if (importedChunk.secondaryId) {
|
|
148
|
+
return VoxelPalette.ids.getNumberId(importedColumn.secondaryId.getStringId(importedChunk.secondaryId.getValue(value)));
|
|
149
|
+
}
|
|
150
|
+
return VoxelPalette.ids.getNumberId(importedColumn.column.palettes.secondaryId[value]);
|
|
151
|
+
}
|
|
152
|
+
if (typeof importedChunk.chunk.buffers.secondary == "number") {
|
|
153
|
+
return value;
|
|
154
|
+
}
|
|
155
|
+
if (importedChunk.secondaryState && importedColumn.secondaryState) {
|
|
156
|
+
return importedColumn.secondaryState.getValue(importedChunk.secondaryState.getValue(value));
|
|
157
|
+
}
|
|
158
|
+
if (importedColumn.secondaryState) {
|
|
159
|
+
return importedColumn.secondaryState.getId(value);
|
|
160
|
+
}
|
|
161
|
+
return value;
|
|
162
|
+
};
|
|
163
|
+
export default function ImportColumn(column, archiveData) {
|
|
164
|
+
if (!columnStructInstance)
|
|
165
|
+
columnStructInstance = Column.StateStruct.instantiate();
|
|
166
|
+
if (!chunkStructInstance)
|
|
167
|
+
chunkStructInstance = Chunk.StateStruct.instantiate();
|
|
168
|
+
const newColumn = Column.CreateNew({});
|
|
169
|
+
if (!archiveData.loadColumnState) {
|
|
170
|
+
columnStructInstance.setBuffer(newColumn.stateBuffer);
|
|
171
|
+
columnStructInstance.deserialize(column.columnState);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
archiveData.loadColumnState(column.columnState, newColumn);
|
|
175
|
+
}
|
|
176
|
+
const importedColumn = getImportedColumnData(column);
|
|
177
|
+
for (let chunkIndex = 0; chunkIndex < column.chunks.length; chunkIndex++) {
|
|
178
|
+
const chunk = column.chunks[chunkIndex];
|
|
179
|
+
const importedChunk = getImportedChunkData(chunk);
|
|
180
|
+
const newChunk = Chunk.CreateNew();
|
|
181
|
+
const chunkState = {};
|
|
182
|
+
for (let i = 0; i < column.keys.chunkState.length; i++) {
|
|
183
|
+
chunkState[column.keys.chunkState[i]] = chunk.state[i];
|
|
184
|
+
}
|
|
185
|
+
updateChunkBuffers(column, chunk);
|
|
186
|
+
if (!archiveData.loadChunkState) {
|
|
187
|
+
chunkStructInstance.setBuffer(newChunk.stateBuffer);
|
|
188
|
+
chunkStructInstance.deserialize(chunkState);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
archiveData.loadChunkState(column.keys.chunkState, chunk.state, newChunk);
|
|
192
|
+
}
|
|
193
|
+
for (let i = 0; i < newChunk.ids.length; i++) {
|
|
194
|
+
newChunk.ids[i] = getId(typeof chunk.buffers.id == "number"
|
|
195
|
+
? chunk.buffers.id
|
|
196
|
+
: chunk.buffers.id[i], importedColumn, importedChunk);
|
|
197
|
+
newChunk.state[i] = getState(typeof chunk.buffers.state == "number"
|
|
198
|
+
? chunk.buffers.state
|
|
199
|
+
: chunk.buffers.state[i], importedColumn, importedChunk);
|
|
200
|
+
newChunk.mod[i] = getMod(typeof chunk.buffers.mod == "number"
|
|
201
|
+
? chunk.buffers.mod
|
|
202
|
+
: chunk.buffers.mod[i], importedColumn, importedChunk);
|
|
203
|
+
newChunk.light[i] = getLight(typeof chunk.buffers.light == "number"
|
|
204
|
+
? chunk.buffers.light
|
|
205
|
+
: chunk.buffers.light[i], importedColumn, importedChunk);
|
|
206
|
+
newChunk.secondary[i] = getSecondary(newChunk.ids[i], typeof chunk.buffers.secondary == "number"
|
|
207
|
+
? chunk.buffers.secondary
|
|
208
|
+
: chunk.buffers.secondary[i], importedColumn, importedChunk);
|
|
209
|
+
}
|
|
210
|
+
newColumn.chunks[chunkIndex] = newChunk;
|
|
211
|
+
}
|
|
212
|
+
return newColumn;
|
|
213
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BitArray } from "@amodx/binary/Arrays/BitArray";
|
|
2
|
+
import { HalfNibbleArray } from "@amodx/binary/Arrays/HalfNibbleArray";
|
|
3
|
+
import { NibbleArray } from "@amodx/binary/Arrays/NibbleArray";
|
|
4
|
+
export declare const convertToPaletteBuffer: (paletteSize: number, data: Uint16Array, sharedMemory?: boolean) => Uint16Array | Uint8Array;
|
|
5
|
+
export declare const getPaletteArray: (size: number, buffer: ArrayBufferLike) => ArrayBuffer | NibbleArray | HalfNibbleArray | BitArray;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BitArray } from "@amodx/binary/Arrays/BitArray";
|
|
2
|
+
import { HalfNibbleArray } from "@amodx/binary/Arrays/HalfNibbleArray";
|
|
3
|
+
import { NibbleArray } from "@amodx/binary/Arrays/NibbleArray";
|
|
4
|
+
export const convertToPaletteBuffer = (paletteSize, data, sharedMemory = false) => {
|
|
5
|
+
let buffer = data;
|
|
6
|
+
if (paletteSize > 15 && paletteSize <= 255) {
|
|
7
|
+
buffer = Uint8Array.from(data);
|
|
8
|
+
}
|
|
9
|
+
else if (paletteSize > 4 && paletteSize <= 15) {
|
|
10
|
+
buffer = new Uint8Array(data.length / 2);
|
|
11
|
+
const nibbleArray = new NibbleArray(buffer);
|
|
12
|
+
for (let i = 0; i < data.length; i++) {
|
|
13
|
+
nibbleArray[i] = data[i];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else if (paletteSize > 2 && paletteSize <= 4) {
|
|
17
|
+
buffer = new Uint8Array(data.length / 4);
|
|
18
|
+
const halfNibbleArray = new HalfNibbleArray(buffer);
|
|
19
|
+
for (let i = 0; i < data.length; i++) {
|
|
20
|
+
halfNibbleArray[i] = data[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else if (paletteSize == 2) {
|
|
24
|
+
buffer = new Uint8Array(data.length / 8);
|
|
25
|
+
const bitArray = new BitArray(buffer);
|
|
26
|
+
for (let i = 0; i < data.length; i++) {
|
|
27
|
+
bitArray[i] = data[i];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (sharedMemory && !(buffer.buffer instanceof SharedArrayBuffer)) {
|
|
31
|
+
const sharedBuffer = new SharedArrayBuffer(buffer.byteLength);
|
|
32
|
+
const sharedView = new Uint8Array(sharedBuffer);
|
|
33
|
+
sharedView.set(buffer);
|
|
34
|
+
return sharedView;
|
|
35
|
+
}
|
|
36
|
+
return buffer;
|
|
37
|
+
};
|
|
38
|
+
export const getPaletteArray = (size, buffer) => {
|
|
39
|
+
if (size == 2)
|
|
40
|
+
return new BitArray(buffer);
|
|
41
|
+
if (size > 2 && size <= 4)
|
|
42
|
+
return new HalfNibbleArray(buffer);
|
|
43
|
+
if (size > 4 && size <= 15)
|
|
44
|
+
return new NibbleArray(buffer);
|
|
45
|
+
return buffer;
|
|
46
|
+
};
|
package/Archive/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConstructorThreadState } from "./ConstructorThreadState";
|
|
2
|
+
import { ThreadManager } from "Interfaces/Classes/ThreadManager";
|
|
3
|
+
export declare class ConstructorThreadManager extends ThreadManager {
|
|
4
|
+
static instnace: ConstructorThreadManager;
|
|
5
|
+
state: ConstructorThreadState;
|
|
6
|
+
parent: import("@amodx/threads/").Thread;
|
|
7
|
+
world: import("@amodx/threads/").Thread;
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Threads } from "@amodx/threads/";
|
|
2
|
+
import { ConstructorThreadState } from "./ConstructorThreadState";
|
|
3
|
+
import { EngineSettings } from "../../Data/Settings/EngineSettings";
|
|
4
|
+
import { ThreadManager } from "Interfaces/Classes/ThreadManager";
|
|
5
|
+
const world = Threads.createThread("world");
|
|
6
|
+
export class ConstructorThreadManager extends ThreadManager {
|
|
7
|
+
static instnace;
|
|
8
|
+
state;
|
|
9
|
+
parent = Threads.parent;
|
|
10
|
+
world = world;
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.state = new ConstructorThreadState(this);
|
|
14
|
+
ConstructorThreadManager.instnace = this;
|
|
15
|
+
this.addThread(this.world);
|
|
16
|
+
this.addThread(this.parent);
|
|
17
|
+
Threads.registerTasks("sync-settings", (settings) => {
|
|
18
|
+
EngineSettings.syncSettings(settings);
|
|
19
|
+
this.state.settingsSynced = true;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var ConstructorRemoteThreadTasks;
|
|
2
|
+
(function (ConstructorRemoteThreadTasks) {
|
|
3
|
+
ConstructorRemoteThreadTasks[ConstructorRemoteThreadTasks["SyncShapeMap"] = -1] = "SyncShapeMap";
|
|
4
|
+
ConstructorRemoteThreadTasks[ConstructorRemoteThreadTasks["AddToRebuildQue"] = 0] = "AddToRebuildQue";
|
|
5
|
+
ConstructorRemoteThreadTasks[ConstructorRemoteThreadTasks["RunRebuildQue"] = 1] = "RunRebuildQue";
|
|
6
|
+
ConstructorRemoteThreadTasks[ConstructorRemoteThreadTasks["AddToRGBLightUpdateQue"] = 2] = "AddToRGBLightUpdateQue";
|
|
7
|
+
ConstructorRemoteThreadTasks[ConstructorRemoteThreadTasks["BuildChunk"] = 3] = "BuildChunk";
|
|
8
|
+
})(ConstructorRemoteThreadTasks || (ConstructorRemoteThreadTasks = {}));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ConstructorTasksIds } from "./ConstructorTasksIds.js";
|
|
2
|
+
import { Threads } from "@amodx/threads/";
|
|
3
|
+
import { WorldRegister } from "../../Data/World/WorldRegister.js";
|
|
4
|
+
import { WorldSpaces } from "../../Data/World/WorldSpaces.js";
|
|
5
|
+
import { EreaseAndUpdate, PaintAndUpdate, VoxelUpdate, } from "./Tasks/VoxelUpdate.js";
|
|
6
|
+
import { TasksRequest } from "./Tasks/TasksRequest.js";
|
|
7
|
+
import { Propagation } from "../../Propagation";
|
|
8
|
+
import { Analyzer } from "../../Analyzer/Analyzer";
|
|
9
|
+
export default function (DVEC) {
|
|
10
|
+
Threads.registerTasks("clear-all", () => {
|
|
11
|
+
WorldRegister.instance.clearAll();
|
|
12
|
+
});
|
|
13
|
+
const propagation = new Propagation();
|
|
14
|
+
const analyzer = new Analyzer();
|
|
15
|
+
Threads.registerTasks(ConstructorTasksIds.VoxelUpdate, async (data, onDone) => {
|
|
16
|
+
await VoxelUpdate(data);
|
|
17
|
+
if (onDone)
|
|
18
|
+
onDone();
|
|
19
|
+
}, "deferred");
|
|
20
|
+
Threads.registerTasks(ConstructorTasksIds.VoxelErease, async (data, onDone) => {
|
|
21
|
+
await EreaseAndUpdate(data);
|
|
22
|
+
if (onDone)
|
|
23
|
+
onDone();
|
|
24
|
+
}, "deferred");
|
|
25
|
+
Threads.registerTasks(ConstructorTasksIds.VoxelPaint, async (data, onDone) => {
|
|
26
|
+
await PaintAndUpdate(data);
|
|
27
|
+
if (onDone)
|
|
28
|
+
onDone();
|
|
29
|
+
}, "deferred");
|
|
30
|
+
Threads.registerTasks(ConstructorTasksIds.Explosion, async (data) => {
|
|
31
|
+
await propagation.explosion(TasksRequest.getExplosionRequests(data[0], data[1], data[2], data[3]));
|
|
32
|
+
});
|
|
33
|
+
Threads.registerTasks(ConstructorTasksIds.WorldSun, (data, onDone) => {
|
|
34
|
+
propagation.worldSun(TasksRequest.getWorldSunRequests(data[0], data[1]));
|
|
35
|
+
if (onDone)
|
|
36
|
+
onDone();
|
|
37
|
+
}, "deferred");
|
|
38
|
+
Threads.registerTasks(ConstructorTasksIds.AnalyzerPropagation, async (data, onDone) => {
|
|
39
|
+
await analyzer.runPropagation(data);
|
|
40
|
+
if (onDone)
|
|
41
|
+
onDone();
|
|
42
|
+
}, "deferred");
|
|
43
|
+
Threads.registerTasks(ConstructorTasksIds.AnalyzerUpdate, async (data, onDone) => {
|
|
44
|
+
await analyzer.runUpdate(data);
|
|
45
|
+
if (onDone)
|
|
46
|
+
onDone();
|
|
47
|
+
}, "deferred");
|
|
48
|
+
Threads.registerTasks(ConstructorTasksIds.BuildChunk, async (buildData, onDone) => {
|
|
49
|
+
WorldRegister.instance.cache.enable();
|
|
50
|
+
const location = buildData.data[0];
|
|
51
|
+
await DVEC.mesher.meshChunk(location, buildData.data[1], 0);
|
|
52
|
+
if (onDone)
|
|
53
|
+
onDone();
|
|
54
|
+
WorldRegister.instance.cache.disable();
|
|
55
|
+
});
|
|
56
|
+
Threads.registerTasks(ConstructorTasksIds.BuildColumn, async (data, onDone) => {
|
|
57
|
+
WorldRegister.instance.setDimension(data[0][0]);
|
|
58
|
+
const column = WorldRegister.instance.column.get(data[0][1], data[0][2], data[0][2]);
|
|
59
|
+
if (!column) {
|
|
60
|
+
console.warn("Tried building a column that does not exists.", data);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (column.chunks.length == 0)
|
|
64
|
+
return false;
|
|
65
|
+
const location = data[0];
|
|
66
|
+
WorldRegister.instance.cache.enable();
|
|
67
|
+
for (let i = 0; i < column.chunks.length; i++) {
|
|
68
|
+
const chunk = column.chunks[i];
|
|
69
|
+
if (!chunk)
|
|
70
|
+
continue;
|
|
71
|
+
DVEC.mesher.meshChunk([
|
|
72
|
+
location[0],
|
|
73
|
+
location[1],
|
|
74
|
+
location[2] + i * WorldSpaces.chunk.getHeight(),
|
|
75
|
+
location[3],
|
|
76
|
+
], 1, 100);
|
|
77
|
+
}
|
|
78
|
+
if (onDone)
|
|
79
|
+
onDone();
|
|
80
|
+
WorldRegister.instance.cache.disable();
|
|
81
|
+
}, "deferred");
|
|
82
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum ConstructorTasksIds {
|
|
2
|
+
BuildChunk = 0,
|
|
3
|
+
BuildColumn = 1,
|
|
4
|
+
Generate = 2,
|
|
5
|
+
Decorate = 3,
|
|
6
|
+
RGBlightUpdate = 4,
|
|
7
|
+
RGBlightRemove = 5,
|
|
8
|
+
WorldSun = 6,
|
|
9
|
+
SunLightUpdate = 7,
|
|
10
|
+
SunLightRemove = 8,
|
|
11
|
+
AnalyzerPropagation = 9,
|
|
12
|
+
AnalyzerUpdate = 10,
|
|
13
|
+
FlowUpdate = 11,
|
|
14
|
+
FlowRemove = 12,
|
|
15
|
+
ConstructEntity = 13,
|
|
16
|
+
ConstructItem = 14,
|
|
17
|
+
Explosion = 15,
|
|
18
|
+
VoxelErease = 16,
|
|
19
|
+
VoxelPaint = 17,
|
|
20
|
+
VoxelUpdate = 18
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export var ConstructorTasksIds;
|
|
2
|
+
(function (ConstructorTasksIds) {
|
|
3
|
+
ConstructorTasksIds[ConstructorTasksIds["BuildChunk"] = 0] = "BuildChunk";
|
|
4
|
+
ConstructorTasksIds[ConstructorTasksIds["BuildColumn"] = 1] = "BuildColumn";
|
|
5
|
+
ConstructorTasksIds[ConstructorTasksIds["Generate"] = 2] = "Generate";
|
|
6
|
+
ConstructorTasksIds[ConstructorTasksIds["Decorate"] = 3] = "Decorate";
|
|
7
|
+
ConstructorTasksIds[ConstructorTasksIds["RGBlightUpdate"] = 4] = "RGBlightUpdate";
|
|
8
|
+
ConstructorTasksIds[ConstructorTasksIds["RGBlightRemove"] = 5] = "RGBlightRemove";
|
|
9
|
+
ConstructorTasksIds[ConstructorTasksIds["WorldSun"] = 6] = "WorldSun";
|
|
10
|
+
ConstructorTasksIds[ConstructorTasksIds["SunLightUpdate"] = 7] = "SunLightUpdate";
|
|
11
|
+
ConstructorTasksIds[ConstructorTasksIds["SunLightRemove"] = 8] = "SunLightRemove";
|
|
12
|
+
ConstructorTasksIds[ConstructorTasksIds["AnalyzerPropagation"] = 9] = "AnalyzerPropagation";
|
|
13
|
+
ConstructorTasksIds[ConstructorTasksIds["AnalyzerUpdate"] = 10] = "AnalyzerUpdate";
|
|
14
|
+
ConstructorTasksIds[ConstructorTasksIds["FlowUpdate"] = 11] = "FlowUpdate";
|
|
15
|
+
ConstructorTasksIds[ConstructorTasksIds["FlowRemove"] = 12] = "FlowRemove";
|
|
16
|
+
ConstructorTasksIds[ConstructorTasksIds["ConstructEntity"] = 13] = "ConstructEntity";
|
|
17
|
+
ConstructorTasksIds[ConstructorTasksIds["ConstructItem"] = 14] = "ConstructItem";
|
|
18
|
+
ConstructorTasksIds[ConstructorTasksIds["Explosion"] = 15] = "Explosion";
|
|
19
|
+
ConstructorTasksIds[ConstructorTasksIds["VoxelErease"] = 16] = "VoxelErease";
|
|
20
|
+
ConstructorTasksIds[ConstructorTasksIds["VoxelPaint"] = 17] = "VoxelPaint";
|
|
21
|
+
ConstructorTasksIds[ConstructorTasksIds["VoxelUpdate"] = 18] = "VoxelUpdate";
|
|
22
|
+
})(ConstructorTasksIds || (ConstructorTasksIds = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Environment } from "@amodx/core/Environment/Environment.js";
|
|
2
|
+
import { ConstructorThreadManager } from "./ConstrcutorTheads";
|
|
3
|
+
import { ThreadState } from "../../Interfaces/Classes/ThreadState";
|
|
4
|
+
export class ConstructorThreadState extends ThreadState {
|
|
5
|
+
environment = Environment.nodeJS.isNode ? "node" : "brwoser";
|
|
6
|
+
isReady() {
|
|
7
|
+
if (this.environment == "node") {
|
|
8
|
+
return (ConstructorThreadManager.instnace.world.isPortSet() &&
|
|
9
|
+
this.settingsSynced);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return (ConstructorThreadManager.instnace.world.isPortSet() &&
|
|
13
|
+
this.settingsSynced);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ThreadPool } from "@amodx/threads";
|
|
2
|
+
import { QueueManager } from "@amodx/threads/Queue/QueueManager";
|
|
3
|
+
import { Observable } from "@amodx/core/Observers/Observable.js";
|
|
4
|
+
export declare class DVEConstructorTasksQueues {
|
|
5
|
+
constructors: ThreadPool;
|
|
6
|
+
static instance: DVEConstructorTasksQueues;
|
|
7
|
+
static onCreated: Observable<DVEConstructorTasksQueues>;
|
|
8
|
+
constructor(constructors: ThreadPool);
|
|
9
|
+
_queueMap: Map<string | number, number>;
|
|
10
|
+
addQueue(queueKey: string | number): boolean;
|
|
11
|
+
removeQueue(queueKey: string | number): boolean;
|
|
12
|
+
/**# Filter Queues
|
|
13
|
+
* ---
|
|
14
|
+
* Go through each current queue. IF the passed fucntion returns false it will remove that queue.
|
|
15
|
+
* @param filter
|
|
16
|
+
*/
|
|
17
|
+
filterQueues(filter: (queueKey: string | number) => boolean): void;
|
|
18
|
+
/**# Filter Old Queues
|
|
19
|
+
* ---
|
|
20
|
+
* Will remove queues older then 10 minutes.
|
|
21
|
+
* @param maxTime Max time in miliseconds.
|
|
22
|
+
*/
|
|
23
|
+
filterOldQueues(maxTime?: number): void;
|
|
24
|
+
registerTasks(id: string, tasksId: number | string): void;
|
|
25
|
+
getTasks(id: string): QueueManager<any>;
|
|
26
|
+
_tasks: Map<string, QueueManager<any>>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//objects
|
|
2
|
+
import { ConstructorTasksIds } from "./ConstructorTasksIds.js";
|
|
3
|
+
import { Observable } from "@amodx/core/Observers/Observable.js";
|
|
4
|
+
export class DVEConstructorTasksQueues {
|
|
5
|
+
constructors;
|
|
6
|
+
static instance;
|
|
7
|
+
static onCreated = new Observable();
|
|
8
|
+
constructor(constructors) {
|
|
9
|
+
this.constructors = constructors;
|
|
10
|
+
if (!DVEConstructorTasksQueues.instance)
|
|
11
|
+
DVEConstructorTasksQueues.instance = this;
|
|
12
|
+
this.registerTasks("build-chunk", ConstructorTasksIds.BuildChunk);
|
|
13
|
+
DVEConstructorTasksQueues.onCreated.notify(this);
|
|
14
|
+
this.addQueue("main");
|
|
15
|
+
}
|
|
16
|
+
_queueMap = new Map();
|
|
17
|
+
addQueue(queueKey) {
|
|
18
|
+
if (this._queueMap.has(queueKey)) {
|
|
19
|
+
this._queueMap.set(queueKey, Date.now());
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
for (const [key, queue] of this._tasks) {
|
|
23
|
+
queue.addQueue(queueKey);
|
|
24
|
+
}
|
|
25
|
+
this._queueMap.set(queueKey, Date.now());
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
removeQueue(queueKey) {
|
|
29
|
+
if (!this._queueMap.has(queueKey))
|
|
30
|
+
return false;
|
|
31
|
+
for (const [key, queue] of this._tasks) {
|
|
32
|
+
queue.removeQueue(queueKey);
|
|
33
|
+
}
|
|
34
|
+
this._queueMap.delete(queueKey);
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
/**# Filter Queues
|
|
38
|
+
* ---
|
|
39
|
+
* Go through each current queue. IF the passed fucntion returns false it will remove that queue.
|
|
40
|
+
* @param filter
|
|
41
|
+
*/
|
|
42
|
+
filterQueues(filter) {
|
|
43
|
+
this._queueMap.forEach((v, key) => {
|
|
44
|
+
if (!filter(key)) {
|
|
45
|
+
this.removeQueue(key);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**# Filter Old Queues
|
|
50
|
+
* ---
|
|
51
|
+
* Will remove queues older then 10 minutes.
|
|
52
|
+
* @param maxTime Max time in miliseconds.
|
|
53
|
+
*/
|
|
54
|
+
filterOldQueues(maxTime = 600000) {
|
|
55
|
+
const t = Date.now();
|
|
56
|
+
this._queueMap.forEach((v, key) => {
|
|
57
|
+
if (t - v > maxTime) {
|
|
58
|
+
this.removeQueue(key);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
registerTasks(id, tasksId) {
|
|
63
|
+
const newTasks = this.constructors.addQueue(id, tasksId);
|
|
64
|
+
this._tasks.set(id, newTasks);
|
|
65
|
+
}
|
|
66
|
+
getTasks(id) {
|
|
67
|
+
const tasks = this._tasks.get(id);
|
|
68
|
+
if (!tasks)
|
|
69
|
+
throw new Error(`The queue with the ${id} does not exist`);
|
|
70
|
+
return tasks;
|
|
71
|
+
}
|
|
72
|
+
_tasks = new Map();
|
|
73
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Threads } from "@amodx/threads/";
|
|
2
|
+
import { DVEFDataCore } from "../../Data/DVEFDataCore.js";
|
|
3
|
+
import { ConstructorThreadManager } from "./ConstrcutorTheads.js";
|
|
4
|
+
import { DVEMesher, DVEMesherInitData } from "Mesher/Mesher.js";
|
|
5
|
+
export type DivineVoxelEngineConstructorInitData = {
|
|
6
|
+
mesherData: DVEMesherInitData;
|
|
7
|
+
};
|
|
8
|
+
export declare class DivineVoxelEngineConstructor {
|
|
9
|
+
static environment: "node" | "browser";
|
|
10
|
+
static instance: DivineVoxelEngineConstructor;
|
|
11
|
+
TC: typeof Threads;
|
|
12
|
+
threads: ConstructorThreadManager;
|
|
13
|
+
data: DVEFDataCore;
|
|
14
|
+
mesher: DVEMesher;
|
|
15
|
+
constructor(data: DivineVoxelEngineConstructorInitData);
|
|
16
|
+
init(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//threadcomm
|
|
2
|
+
import { Threads } from "@amodx/threads/";
|
|
3
|
+
//functions
|
|
4
|
+
import InitWorker from "./InitWorker.js";
|
|
5
|
+
import { Environment } from "@amodx/core/Environment/Environment.js";
|
|
6
|
+
import { DVEFDataCore } from "../../Data/DVEFDataCore.js";
|
|
7
|
+
import ConstructorTasks from "./ConstructorTasks";
|
|
8
|
+
import { ConstructorThreadManager } from "./ConstrcutorTheads.js";
|
|
9
|
+
import { DVEMesher } from "Mesher/Mesher.js";
|
|
10
|
+
export class DivineVoxelEngineConstructor {
|
|
11
|
+
static environment = "browser";
|
|
12
|
+
static instance;
|
|
13
|
+
TC = Threads;
|
|
14
|
+
threads = new ConstructorThreadManager();
|
|
15
|
+
data = new DVEFDataCore();
|
|
16
|
+
mesher;
|
|
17
|
+
constructor(data) {
|
|
18
|
+
if (DivineVoxelEngineConstructor.instance)
|
|
19
|
+
return DivineVoxelEngineConstructor.instance;
|
|
20
|
+
DivineVoxelEngineConstructor.instance = this;
|
|
21
|
+
this.mesher = new DVEMesher(data.mesherData);
|
|
22
|
+
ConstructorTasks(this);
|
|
23
|
+
}
|
|
24
|
+
async init() {
|
|
25
|
+
await InitWorker(this);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
DivineVoxelEngineConstructor.environment = Environment.nodeJS.isNode
|
|
29
|
+
? "node"
|
|
30
|
+
: "browser";
|