@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,20 @@
|
|
|
1
|
+
import { DivineVoxelEngineConstructor } from "./DivineVoxelEngineConstructor.js";
|
|
2
|
+
import { Threads } from "@amodx/threads/";
|
|
3
|
+
import { CreatePromiseCheck } from "@amodx/core/Intervals/CreatePromiseCheck.js";
|
|
4
|
+
export default async function (DVEC) {
|
|
5
|
+
let parent = "render";
|
|
6
|
+
if (DivineVoxelEngineConstructor.environment == "node") {
|
|
7
|
+
parent = "server";
|
|
8
|
+
}
|
|
9
|
+
await Threads.init("constructor", parent);
|
|
10
|
+
DVEC.TC.registerTasks("thread-ready", () => { });
|
|
11
|
+
DVEC.mesher.init();
|
|
12
|
+
await CreatePromiseCheck({
|
|
13
|
+
check: () => {
|
|
14
|
+
return DVEC.threads.state.isReady();
|
|
15
|
+
},
|
|
16
|
+
onReady() { },
|
|
17
|
+
checkInterval: 1,
|
|
18
|
+
});
|
|
19
|
+
DVEC.TC.registerTasks("ready", () => { });
|
|
20
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { LocationData } from "../../../Math";
|
|
2
|
+
import type { AddToRebuildQueue, BuildTasks, Priorities, PriorityTask } from "../../../Types/Tasks.types";
|
|
3
|
+
import { Thread } from "@amodx/threads/";
|
|
4
|
+
import { VisitedMap } from "../../../Util/VisistedMap";
|
|
5
|
+
import { Vec3Array } from "@amodx/math";
|
|
6
|
+
type RebuildModes = "sync" | "async";
|
|
7
|
+
declare class Request<T, Q> {
|
|
8
|
+
tasksType: string;
|
|
9
|
+
origin: LocationData;
|
|
10
|
+
data: T;
|
|
11
|
+
buildQueue: string;
|
|
12
|
+
originThread: string;
|
|
13
|
+
queues: Q;
|
|
14
|
+
rebuildQueMap: Map<string, boolean>;
|
|
15
|
+
comm: Thread;
|
|
16
|
+
priority: Priorities;
|
|
17
|
+
LOD: number;
|
|
18
|
+
syncQueue: LocationData[];
|
|
19
|
+
aSyncQueue: LocationData[];
|
|
20
|
+
buildMode: RebuildModes;
|
|
21
|
+
buildTasks: PriorityTask<BuildTasks>;
|
|
22
|
+
trackedChunks: Map<string, Vec3Array>;
|
|
23
|
+
keepTrackOfChunks: boolean;
|
|
24
|
+
rebuildTasks: AddToRebuildQueue;
|
|
25
|
+
constructor(tasksType: string, origin: LocationData, data: T, buildQueue: string, originThread: string, queues: Q);
|
|
26
|
+
start(): this;
|
|
27
|
+
stop(): this;
|
|
28
|
+
setPriority(priority: Priorities): this;
|
|
29
|
+
getData(): T;
|
|
30
|
+
getOriginThread(): LocationData;
|
|
31
|
+
getBuildQueue(): string;
|
|
32
|
+
getOrigin(): LocationData;
|
|
33
|
+
needsRebuild(): boolean;
|
|
34
|
+
needsToUpdateOriginThread(): boolean;
|
|
35
|
+
clearBuildQueue(): void;
|
|
36
|
+
setBuldMode(mode: RebuildModes): this;
|
|
37
|
+
addToRebuildQueue(x: number, y: number, z: number): boolean;
|
|
38
|
+
addNeighborsToRebuildQueue(x: number, y: number, z: number): false | this | undefined;
|
|
39
|
+
runRebuildQueue(): this;
|
|
40
|
+
clear(): void;
|
|
41
|
+
}
|
|
42
|
+
type ArrayOfVec3Arrays = [x: number, y: number, z: number][];
|
|
43
|
+
type FlowVec3Array = number[][];
|
|
44
|
+
export declare const TasksRequest: {
|
|
45
|
+
getLightUpdateRequest(origin: LocationData, buildQueue?: string, originThread?: string): Request<any, {
|
|
46
|
+
rgb: {
|
|
47
|
+
update: number[];
|
|
48
|
+
remove: number[];
|
|
49
|
+
map: VisitedMap;
|
|
50
|
+
};
|
|
51
|
+
sun: {
|
|
52
|
+
update: number[];
|
|
53
|
+
remove: number[];
|
|
54
|
+
updateMap: VisitedMap;
|
|
55
|
+
remvoeMap: VisitedMap;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
getFlowUpdateRequest(origin: LocationData, buildQueue?: string, originThread?: string): Request<null, {
|
|
59
|
+
flow: {
|
|
60
|
+
update: {
|
|
61
|
+
queue: FlowVec3Array;
|
|
62
|
+
map: VisitedMap;
|
|
63
|
+
};
|
|
64
|
+
remove: {
|
|
65
|
+
queue: FlowVec3Array;
|
|
66
|
+
map: VisitedMap;
|
|
67
|
+
noRemoveMap: VisitedMap;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
rgb: {
|
|
71
|
+
update: number[];
|
|
72
|
+
remove: number[];
|
|
73
|
+
map: VisitedMap;
|
|
74
|
+
};
|
|
75
|
+
sun: {
|
|
76
|
+
update: number[];
|
|
77
|
+
remove: number[];
|
|
78
|
+
updateMap: VisitedMap;
|
|
79
|
+
remvoeMap: VisitedMap;
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
getVoxelUpdateRequests(origin: LocationData, buildQueue?: string, originThread?: string): Request<null, {
|
|
83
|
+
flow: {
|
|
84
|
+
update: {
|
|
85
|
+
queue: FlowVec3Array;
|
|
86
|
+
map: VisitedMap;
|
|
87
|
+
};
|
|
88
|
+
remove: {
|
|
89
|
+
queue: FlowVec3Array;
|
|
90
|
+
map: VisitedMap;
|
|
91
|
+
noRemoveMap: VisitedMap;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
rgb: {
|
|
95
|
+
update: number[];
|
|
96
|
+
remove: number[];
|
|
97
|
+
map: VisitedMap;
|
|
98
|
+
};
|
|
99
|
+
sun: {
|
|
100
|
+
update: number[];
|
|
101
|
+
remove: number[];
|
|
102
|
+
updateMap: VisitedMap;
|
|
103
|
+
remvoeMap: VisitedMap;
|
|
104
|
+
};
|
|
105
|
+
}>;
|
|
106
|
+
getWorldSunRequests(origin: LocationData, buildQueue?: string, originThread?: string): Request<null, {
|
|
107
|
+
sun: number[];
|
|
108
|
+
}>;
|
|
109
|
+
getExplosionRequests(origin: LocationData, radius: number, buildQueue?: string, originThread?: string): Request<number, {
|
|
110
|
+
flow: {
|
|
111
|
+
update: {
|
|
112
|
+
queue: FlowVec3Array;
|
|
113
|
+
map: VisitedMap;
|
|
114
|
+
};
|
|
115
|
+
remove: {
|
|
116
|
+
queue: FlowVec3Array;
|
|
117
|
+
map: VisitedMap;
|
|
118
|
+
noRemoveMap: VisitedMap;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
rgb: {
|
|
122
|
+
update: number[];
|
|
123
|
+
remove: number[];
|
|
124
|
+
map: VisitedMap;
|
|
125
|
+
};
|
|
126
|
+
sun: {
|
|
127
|
+
update: number[];
|
|
128
|
+
remove: number[];
|
|
129
|
+
updateMap: VisitedMap;
|
|
130
|
+
remvoeMap: VisitedMap;
|
|
131
|
+
};
|
|
132
|
+
queue: ArrayOfVec3Arrays;
|
|
133
|
+
map: VisitedMap;
|
|
134
|
+
}>;
|
|
135
|
+
};
|
|
136
|
+
export type ExplosionTaskRequests = ReturnType<typeof TasksRequest.getExplosionRequests>;
|
|
137
|
+
export type VoxelUpdateTaskRequest = ReturnType<typeof TasksRequest.getVoxelUpdateRequests>;
|
|
138
|
+
export type FlowTaskRequests = ReturnType<typeof TasksRequest.getFlowUpdateRequest>;
|
|
139
|
+
export type LightTaskRequest = ReturnType<typeof TasksRequest.getLightUpdateRequest>;
|
|
140
|
+
export type WorldSunTaskRequest = ReturnType<typeof TasksRequest.getWorldSunRequests>;
|
|
141
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { ConstructorRemoteThreadTasks } from "../../../Contexts/Constructor/ConstructorRemoteThreadTasks";
|
|
2
|
+
import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
|
|
3
|
+
import { Threads } from "@amodx/threads/";
|
|
4
|
+
import { $3dMooreNeighborhood } from "../../../Math/Constants/CardinalNeighbors.js";
|
|
5
|
+
import { WorldSpaces } from "../../../Data/World/WorldSpaces";
|
|
6
|
+
import { WorldRegister } from "../../../Data/World/WorldRegister.js";
|
|
7
|
+
import { ChunkDataTool } from "../../../Tools/Data/WorldData/ChunkDataTool";
|
|
8
|
+
import { VisitedMap } from "../../../Util/VisistedMap";
|
|
9
|
+
import { DivineVoxelEngineConstructor } from "../../../Contexts/Constructor/DivineVoxelEngineConstructor";
|
|
10
|
+
const chunkTool = new ChunkDataTool();
|
|
11
|
+
class Request {
|
|
12
|
+
tasksType;
|
|
13
|
+
origin;
|
|
14
|
+
data;
|
|
15
|
+
buildQueue;
|
|
16
|
+
originThread;
|
|
17
|
+
queues;
|
|
18
|
+
rebuildQueMap = new Map();
|
|
19
|
+
comm;
|
|
20
|
+
priority = 2;
|
|
21
|
+
LOD = 0;
|
|
22
|
+
syncQueue = [];
|
|
23
|
+
aSyncQueue = [];
|
|
24
|
+
buildMode = "sync";
|
|
25
|
+
buildTasks = {
|
|
26
|
+
data: [["main", 0, 0, 0], 1],
|
|
27
|
+
priority: 0,
|
|
28
|
+
};
|
|
29
|
+
trackedChunks = new Map();
|
|
30
|
+
keepTrackOfChunks = false;
|
|
31
|
+
rebuildTasks;
|
|
32
|
+
constructor(tasksType, origin, data, buildQueue = "none", originThread = "self", queues) {
|
|
33
|
+
this.tasksType = tasksType;
|
|
34
|
+
this.origin = origin;
|
|
35
|
+
this.data = data;
|
|
36
|
+
this.buildQueue = buildQueue;
|
|
37
|
+
this.originThread = originThread;
|
|
38
|
+
this.queues = queues;
|
|
39
|
+
if (originThread != "self") {
|
|
40
|
+
this.comm = Threads.getThread(originThread);
|
|
41
|
+
}
|
|
42
|
+
this.rebuildTasks = [this.origin, this.buildQueue, this.priority];
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
start() {
|
|
46
|
+
WorldRegister.instance.cache.enable();
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
stop() {
|
|
50
|
+
WorldRegister.instance.cache.disable();
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
setPriority(priority) {
|
|
54
|
+
this.priority = priority;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
getData() {
|
|
58
|
+
return this.data;
|
|
59
|
+
}
|
|
60
|
+
getOriginThread() {
|
|
61
|
+
return this.origin;
|
|
62
|
+
}
|
|
63
|
+
getBuildQueue() {
|
|
64
|
+
return this.buildQueue;
|
|
65
|
+
}
|
|
66
|
+
getOrigin() {
|
|
67
|
+
return this.origin;
|
|
68
|
+
}
|
|
69
|
+
needsRebuild() {
|
|
70
|
+
return this.buildQueue != "none";
|
|
71
|
+
}
|
|
72
|
+
needsToUpdateOriginThread() {
|
|
73
|
+
return this.originThread != "self";
|
|
74
|
+
}
|
|
75
|
+
clearBuildQueue() {
|
|
76
|
+
this.trackedChunks.clear();
|
|
77
|
+
this.rebuildQueMap.clear();
|
|
78
|
+
this.aSyncQueue = [];
|
|
79
|
+
this.syncQueue = [];
|
|
80
|
+
}
|
|
81
|
+
setBuldMode(mode) {
|
|
82
|
+
this.buildMode = mode;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
addToRebuildQueue(x, y, z) {
|
|
86
|
+
if (EngineSettings.isServer())
|
|
87
|
+
return false;
|
|
88
|
+
if (!this.needsRebuild() && !this.keepTrackOfChunks)
|
|
89
|
+
return false;
|
|
90
|
+
if (!chunkTool.setDimension(this.origin[0]).loadInAt(x, y, z))
|
|
91
|
+
return false;
|
|
92
|
+
const chunkKey = WorldSpaces.chunk.getKeyXYZ(x, y, z);
|
|
93
|
+
if (this.rebuildQueMap.has(chunkKey))
|
|
94
|
+
return false;
|
|
95
|
+
this.rebuildQueMap.set(chunkKey, true);
|
|
96
|
+
const chunkPOS = WorldSpaces.chunk.getPosition();
|
|
97
|
+
if (this.keepTrackOfChunks) {
|
|
98
|
+
!this.trackedChunks.has(chunkKey) &&
|
|
99
|
+
this.trackedChunks.set(chunkKey, [chunkPOS.x, chunkPOS.y, chunkPOS.z]);
|
|
100
|
+
}
|
|
101
|
+
if (this.needsRebuild()) {
|
|
102
|
+
if (this.buildMode == "async") {
|
|
103
|
+
this.aSyncQueue.push([
|
|
104
|
+
this.origin[0],
|
|
105
|
+
chunkPOS.x,
|
|
106
|
+
chunkPOS.y,
|
|
107
|
+
chunkPOS.z,
|
|
108
|
+
]);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
this.syncQueue.push([this.origin[0], chunkPOS.x, chunkPOS.y, chunkPOS.z]);
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
addNeighborsToRebuildQueue(x, y, z) {
|
|
117
|
+
if (!this.needsRebuild() && !this.keepTrackOfChunks)
|
|
118
|
+
return false;
|
|
119
|
+
const voxelPOS = WorldSpaces.voxel.getPositionXYZ(x, y, z);
|
|
120
|
+
if (voxelPOS.x == 0 ||
|
|
121
|
+
voxelPOS.x == WorldSpaces.chunk._bounds.x - 1 ||
|
|
122
|
+
voxelPOS.y == 0 ||
|
|
123
|
+
voxelPOS.y == WorldSpaces.chunk._bounds.y - 1 ||
|
|
124
|
+
voxelPOS.z == 0 ||
|
|
125
|
+
voxelPOS.z == WorldSpaces.chunk._bounds.z - 1) {
|
|
126
|
+
let i = $3dMooreNeighborhood.length;
|
|
127
|
+
while (i--) {
|
|
128
|
+
this.addToRebuildQueue(x + $3dMooreNeighborhood[i][0], y + $3dMooreNeighborhood[i][1], z + $3dMooreNeighborhood[i][2]);
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.addToRebuildQueue(x, y, z);
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
runRebuildQueue() {
|
|
136
|
+
while (this.aSyncQueue.length !== 0) {
|
|
137
|
+
const node = this.aSyncQueue.shift();
|
|
138
|
+
this.buildTasks.priority = this.priority;
|
|
139
|
+
if (!node)
|
|
140
|
+
break;
|
|
141
|
+
this.buildTasks.data[0] = node;
|
|
142
|
+
this.comm.runTasks(ConstructorRemoteThreadTasks.BuildChunk, this.buildTasks);
|
|
143
|
+
}
|
|
144
|
+
while (this.syncQueue.length !== 0) {
|
|
145
|
+
const node = this.syncQueue.shift();
|
|
146
|
+
if (!node)
|
|
147
|
+
break;
|
|
148
|
+
DivineVoxelEngineConstructor.instance.mesher.meshChunk(node, 1, 0);
|
|
149
|
+
}
|
|
150
|
+
this.rebuildQueMap.clear();
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
clear() {
|
|
154
|
+
this.buildTasks.priority = 0;
|
|
155
|
+
this.syncQueue = [];
|
|
156
|
+
this.aSyncQueue = [];
|
|
157
|
+
this.rebuildQueMap.clear();
|
|
158
|
+
this.buildMode = "sync";
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const getLightQueues = () => {
|
|
162
|
+
return {
|
|
163
|
+
rgb: {
|
|
164
|
+
update: [],
|
|
165
|
+
remove: [],
|
|
166
|
+
map: new VisitedMap(),
|
|
167
|
+
},
|
|
168
|
+
sun: {
|
|
169
|
+
update: [],
|
|
170
|
+
remove: [],
|
|
171
|
+
updateMap: new VisitedMap(),
|
|
172
|
+
remvoeMap: new VisitedMap(),
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
const getFlowQueues = () => {
|
|
177
|
+
return {
|
|
178
|
+
update: {
|
|
179
|
+
queue: [],
|
|
180
|
+
map: new VisitedMap(),
|
|
181
|
+
},
|
|
182
|
+
remove: {
|
|
183
|
+
queue: [],
|
|
184
|
+
map: new VisitedMap(),
|
|
185
|
+
noRemoveMap: new VisitedMap(),
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
const getVoxelUpdateQueueData = () => {
|
|
190
|
+
return { ...getLightQueues(), flow: getFlowQueues() };
|
|
191
|
+
};
|
|
192
|
+
const getExplosionQueuesData = () => {
|
|
193
|
+
return {
|
|
194
|
+
queue: [],
|
|
195
|
+
map: new VisitedMap(),
|
|
196
|
+
...getLightQueues(),
|
|
197
|
+
flow: getFlowQueues(),
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
export const TasksRequest = {
|
|
201
|
+
getLightUpdateRequest(origin, buildQueue = "none", originThread = "self") {
|
|
202
|
+
return new Request("light-update", origin, null, buildQueue, originThread, getLightQueues());
|
|
203
|
+
},
|
|
204
|
+
getFlowUpdateRequest(origin, buildQueue = "none", originThread = "self") {
|
|
205
|
+
return new Request("flow-update", origin, null, buildQueue, originThread, getVoxelUpdateQueueData());
|
|
206
|
+
},
|
|
207
|
+
getVoxelUpdateRequests(origin, buildQueue = "none", originThread = "self") {
|
|
208
|
+
return new Request("voxel-update", origin, null, buildQueue, originThread, getVoxelUpdateQueueData());
|
|
209
|
+
},
|
|
210
|
+
getWorldSunRequests(origin, buildQueue = "none", originThread = "self") {
|
|
211
|
+
return new Request("world-sun", origin, null, buildQueue, originThread, {
|
|
212
|
+
sun: [],
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
getExplosionRequests(origin, radius, buildQueue = "none", originThread = "self") {
|
|
216
|
+
return new Request("voxel-update", origin, radius, buildQueue, originThread, getExplosionQueuesData());
|
|
217
|
+
},
|
|
218
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UpdateTasks, VoxelUpdateTasks } from "Types/Tasks.types";
|
|
2
|
+
export declare function EreaseAndUpdate(data: UpdateTasks): Promise<boolean>;
|
|
3
|
+
export declare function PaintAndUpdate(data: VoxelUpdateTasks): Promise<false | undefined>;
|
|
4
|
+
export declare function VoxelUpdate(data: VoxelUpdateTasks): Promise<false | undefined>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { EngineSettings as ES } from "../../../Data/Settings/EngineSettings.js";
|
|
2
|
+
import { $3dCardinalNeighbors } from "../../../Math/Constants/CardinalNeighbors.js";
|
|
3
|
+
import { TasksRequest } from "./TasksRequest.js";
|
|
4
|
+
import { BrushTool } from "../../../Tools/Brush/Brush.js";
|
|
5
|
+
import { DataTool } from "../../../Tools/Data/DataTool.js";
|
|
6
|
+
import { Propagation } from "../../../Propagation/Propagation.js";
|
|
7
|
+
const dataTool = new DataTool();
|
|
8
|
+
const nDataTool = new DataTool();
|
|
9
|
+
const brushTool = new BrushTool();
|
|
10
|
+
const updateLightTask = (tasks) => {
|
|
11
|
+
let doRGB = ES.doRGBPropagation();
|
|
12
|
+
let doSun = ES.doSunPropagation();
|
|
13
|
+
const [dimension, x, y, z] = tasks.origin;
|
|
14
|
+
nDataTool.setDimension(dimension);
|
|
15
|
+
for (const n of $3dCardinalNeighbors) {
|
|
16
|
+
const nx = n[0] + x;
|
|
17
|
+
const ny = n[1] + y;
|
|
18
|
+
const nz = n[2] + z;
|
|
19
|
+
if (!nDataTool.loadInAt(nx, ny, nz))
|
|
20
|
+
continue;
|
|
21
|
+
if (doRGB) {
|
|
22
|
+
if (nDataTool.hasRGBLight()) {
|
|
23
|
+
tasks.queues.rgb.update.push(nx, ny, nz);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (doSun) {
|
|
27
|
+
if (nDataTool.hasSunLight()) {
|
|
28
|
+
tasks.queues.sun.update.push(nx, ny, nz);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export async function EreaseAndUpdate(data) {
|
|
34
|
+
if (!dataTool.setLocation(data[0]).loadIn())
|
|
35
|
+
return false;
|
|
36
|
+
const [dimension, x, y, z] = data[0];
|
|
37
|
+
const tasks = TasksRequest.getVoxelUpdateRequests(data[0], data[1], data[2]);
|
|
38
|
+
tasks.setPriority(0).start().setBuldMode("sync").addToRebuildQueue(x, y, z);
|
|
39
|
+
tasks.setBuldMode("async").addNeighborsToRebuildQueue(x, y, z);
|
|
40
|
+
if (ES.doFlow() && dataTool.isRenderable()) {
|
|
41
|
+
if (dataTool.getSubstnaceData().isLiquid()) {
|
|
42
|
+
await Propagation.instance.flowRemove(tasks);
|
|
43
|
+
tasks.stop();
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const light = dataTool.getLight();
|
|
48
|
+
const isLightSource = dataTool.isLightSource();
|
|
49
|
+
dataTool
|
|
50
|
+
.setLight(light > 0 ? light : 0)
|
|
51
|
+
.setAir()
|
|
52
|
+
.commit(2);
|
|
53
|
+
if (ES.doLight()) {
|
|
54
|
+
if (ES.doRGBPropagation() && isLightSource) {
|
|
55
|
+
tasks.queues.rgb.remove.push(x, y, z);
|
|
56
|
+
Propagation.instance.rgbRemove(tasks);
|
|
57
|
+
}
|
|
58
|
+
updateLightTask(tasks);
|
|
59
|
+
if (ES.doRGBPropagation()) {
|
|
60
|
+
Propagation.instance.rgbUpdate(tasks);
|
|
61
|
+
}
|
|
62
|
+
if (ES.doSunPropagation()) {
|
|
63
|
+
Propagation.instance.sunUpdate(tasks);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
tasks.runRebuildQueue();
|
|
67
|
+
tasks.stop();
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
export async function PaintAndUpdate(data) {
|
|
71
|
+
if (!dataTool.setLocation(data[0]).loadIn())
|
|
72
|
+
return false;
|
|
73
|
+
const [dimension, x, y, z] = data[0];
|
|
74
|
+
const raw = data[1];
|
|
75
|
+
const tasks = TasksRequest.getVoxelUpdateRequests(data[0], data[2], data[3]);
|
|
76
|
+
tasks.start().setPriority(0).setBuldMode("sync").addToRebuildQueue(x, y, z);
|
|
77
|
+
tasks.setBuldMode("async").addNeighborsToRebuildQueue(x, y, z);
|
|
78
|
+
brushTool.setLocation(data[0]).setRaw(raw);
|
|
79
|
+
nDataTool.loadInRaw(raw);
|
|
80
|
+
const isOpaque = nDataTool.isOpaque();
|
|
81
|
+
let doRGB = ES.doRGBPropagation();
|
|
82
|
+
let doSun = ES.doSunPropagation();
|
|
83
|
+
lighttest: if (ES.doLight()) {
|
|
84
|
+
const light = dataTool.getLight();
|
|
85
|
+
if (light <= 0)
|
|
86
|
+
break lighttest;
|
|
87
|
+
if (doSun) {
|
|
88
|
+
if (dataTool.hasSunLight()) {
|
|
89
|
+
tasks.queues.sun.remove.push(x, y, z);
|
|
90
|
+
Propagation.instance.sunRemove(tasks);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (doRGB) {
|
|
94
|
+
if (dataTool.hasRGBLight() && isOpaque) {
|
|
95
|
+
tasks.queues.rgb.remove.push(x, y, z);
|
|
96
|
+
Propagation.instance.rgbRemove(tasks);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
brushTool.paint();
|
|
101
|
+
if (ES.doLight()) {
|
|
102
|
+
updateLightTask(tasks);
|
|
103
|
+
if (doRGB) {
|
|
104
|
+
tasks.queues.rgb.update.push(x, y, z);
|
|
105
|
+
Propagation.instance.rgbUpdate(tasks);
|
|
106
|
+
}
|
|
107
|
+
if (doSun) {
|
|
108
|
+
Propagation.instance.sunUpdate(tasks);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (ES.doFlow()) {
|
|
112
|
+
nDataTool.loadInRaw(raw);
|
|
113
|
+
const substanceData = nDataTool.getSubstnaceData();
|
|
114
|
+
if (substanceData.isLiquid()) {
|
|
115
|
+
Propagation.instance.flowUpdate(tasks);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
tasks.runRebuildQueue();
|
|
119
|
+
tasks.stop();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
export async function VoxelUpdate(data) {
|
|
123
|
+
if (!dataTool.setLocation(data[0]).loadIn())
|
|
124
|
+
return false;
|
|
125
|
+
const [dimension, x, y, z] = data[0];
|
|
126
|
+
const tasks = TasksRequest.getVoxelUpdateRequests(data[0], data[2], data[3]);
|
|
127
|
+
tasks.setPriority(0).start().setBuldMode("sync").addToRebuildQueue(x, y, z);
|
|
128
|
+
tasks.setBuldMode("async").addNeighborsToRebuildQueue(x, y, z);
|
|
129
|
+
dataTool.loadInRaw(data[1]);
|
|
130
|
+
dataTool.commit();
|
|
131
|
+
let doRGB = ES.doRGBPropagation();
|
|
132
|
+
let doSun = ES.doSunPropagation();
|
|
133
|
+
if (ES.doLight()) {
|
|
134
|
+
updateLightTask(tasks);
|
|
135
|
+
if (doRGB) {
|
|
136
|
+
tasks.queues.rgb.update.push(x, y, z);
|
|
137
|
+
Propagation.instance.rgbUpdate(tasks);
|
|
138
|
+
}
|
|
139
|
+
if (doSun) {
|
|
140
|
+
Propagation.instance.sunUpdate(tasks);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (ES.doFlow()) {
|
|
144
|
+
if (dataTool.getSubstnaceData().isLiquid()) {
|
|
145
|
+
Propagation.instance.flowUpdate(tasks);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
tasks.runRebuildQueue();
|
|
149
|
+
tasks.stop();
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DivineVoxelEngineConstructor.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DivineVoxelEngineConstructor.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Threads } from "@amodx/threads/";
|
|
2
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
3
|
+
import { DVEDataCore } from "../../Interfaces/Data/DVEDataCore.js";
|
|
4
|
+
import { RichDataTool } from "../../Tools/Data/RichDataTool.js";
|
|
5
|
+
import { NexusThreads } from "./Threads/NexusTheads.js";
|
|
6
|
+
export type DivineVoxelEngineNexusInitData = {
|
|
7
|
+
data: DVEDataCore;
|
|
8
|
+
};
|
|
9
|
+
export declare class DivineVoxelEngineNexus {
|
|
10
|
+
static instance: DivineVoxelEngineNexus;
|
|
11
|
+
environment: "node" | "browser";
|
|
12
|
+
TC: typeof Threads;
|
|
13
|
+
data: DVEDataCore;
|
|
14
|
+
threads: NexusThreads;
|
|
15
|
+
constructor(data: DivineVoxelEngineNexusInitData);
|
|
16
|
+
init(): Promise<void>;
|
|
17
|
+
getRichDataTool(): RichDataTool;
|
|
18
|
+
getDataTool(): DataTool;
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//intercomms
|
|
2
|
+
//functions
|
|
3
|
+
import InitWorker from "./InitWorker.js";
|
|
4
|
+
import { Threads } from "@amodx/threads/";
|
|
5
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
6
|
+
import { RichDataTool } from "../../Tools/Data/RichDataTool.js";
|
|
7
|
+
import { NexusThreads } from "./Threads/NexusTheads.js";
|
|
8
|
+
export class DivineVoxelEngineNexus {
|
|
9
|
+
static instance;
|
|
10
|
+
environment = "browser";
|
|
11
|
+
TC = Threads;
|
|
12
|
+
data;
|
|
13
|
+
threads = new NexusThreads();
|
|
14
|
+
constructor(data) {
|
|
15
|
+
if (DivineVoxelEngineNexus.instance)
|
|
16
|
+
return DivineVoxelEngineNexus.instance;
|
|
17
|
+
DivineVoxelEngineNexus.instance = this;
|
|
18
|
+
this.data = data.data;
|
|
19
|
+
}
|
|
20
|
+
async init() {
|
|
21
|
+
await InitWorker(this);
|
|
22
|
+
}
|
|
23
|
+
getRichDataTool() {
|
|
24
|
+
return new RichDataTool();
|
|
25
|
+
}
|
|
26
|
+
getDataTool() {
|
|
27
|
+
return new DataTool();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Threads } from "@amodx/threads/";
|
|
2
|
+
import { CreatePromiseCheck } from "@amodx/core/Intervals/CreatePromiseCheck.js";
|
|
3
|
+
export default async function (DVEN) {
|
|
4
|
+
let parent = "render";
|
|
5
|
+
if (DVEN.environment == "node") {
|
|
6
|
+
parent = "server";
|
|
7
|
+
}
|
|
8
|
+
await Threads.init("nexus", parent);
|
|
9
|
+
await CreatePromiseCheck({
|
|
10
|
+
check: () => {
|
|
11
|
+
return DVEN.threads.state.isReady();
|
|
12
|
+
},
|
|
13
|
+
checkInterval: 1,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NexusThreadState } from "./NexusThreadState.js";
|
|
2
|
+
import { ThreadManager } from "../../../Interfaces/Classes/ThreadManager.js";
|
|
3
|
+
export declare const parent: import("@amodx/threads/").Thread;
|
|
4
|
+
export declare const Richworld: import("@amodx/threads/").Thread;
|
|
5
|
+
export declare const world: import("@amodx/threads/").Thread;
|
|
6
|
+
export declare class NexusThreads extends ThreadManager {
|
|
7
|
+
state: NexusThreadState;
|
|
8
|
+
parent: import("@amodx/threads/").Thread;
|
|
9
|
+
world: import("@amodx/threads/").Thread;
|
|
10
|
+
NexusComm: import("@amodx/threads/").Thread;
|
|
11
|
+
DataComm: import("@amodx/threads/").Thread;
|
|
12
|
+
ConstructorComm: import("@amodx/threads/").ThreadPool;
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EngineSettings } from "../../../Data/Settings/EngineSettings.js";
|
|
2
|
+
import { Threads } from "@amodx/threads/";
|
|
3
|
+
import { NexusThreadState } from "./NexusThreadState.js";
|
|
4
|
+
import { DataHooks } from "../../../Data/DataHooks.js";
|
|
5
|
+
import { ThreadManager } from "../../../Interfaces/Classes/ThreadManager.js";
|
|
6
|
+
import { DivineVoxelEngineNexus } from "../DivineVoxelEngineNexus.js";
|
|
7
|
+
export const parent = Threads.parent;
|
|
8
|
+
export const Richworld = Threads.createThread("rich-world");
|
|
9
|
+
export const world = Threads.createThread("world");
|
|
10
|
+
export class NexusThreads extends ThreadManager {
|
|
11
|
+
state = new NexusThreadState(this);
|
|
12
|
+
parent = Threads.parent;
|
|
13
|
+
world = Threads.createThread("world");
|
|
14
|
+
NexusComm = Threads.createThread("nexus");
|
|
15
|
+
DataComm = Threads.createThread("data-loader");
|
|
16
|
+
ConstructorComm = Threads.createThreadPool({
|
|
17
|
+
name: "constructor",
|
|
18
|
+
onPortSet() { },
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
Threads.registerTasks("sync-settings", (settings) => {
|
|
22
|
+
EngineSettings.syncSettings(settings);
|
|
23
|
+
DivineVoxelEngineNexus.instance.threads.state._settingsSynced = true;
|
|
24
|
+
DataHooks.settingsSynced.notify(settings);
|
|
25
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThreadState } from "../../../Interfaces/Classes/ThreadState";
|
|
2
|
+
import { NexusThreads } from "./NexusTheads";
|
|
3
|
+
export declare class NexusThreadState extends ThreadState<NexusThreads> {
|
|
4
|
+
_settingsSynced: boolean;
|
|
5
|
+
constructor(threads: NexusThreads);
|
|
6
|
+
isReady(): boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ThreadState } from "../../../Interfaces/Classes/ThreadState";
|
|
2
|
+
export class NexusThreadState extends ThreadState {
|
|
3
|
+
_settingsSynced = false;
|
|
4
|
+
constructor(threads) {
|
|
5
|
+
super(threads);
|
|
6
|
+
}
|
|
7
|
+
isReady() {
|
|
8
|
+
return this.threads.world.isPortSet() && this._settingsSynced;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DivineVoxelEngineNexus.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DivineVoxelEngineNexus.js";
|