@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,22 @@
|
|
|
1
|
+
export var StateCompareOperations;
|
|
2
|
+
(function (StateCompareOperations) {
|
|
3
|
+
StateCompareOperations[StateCompareOperations["Equals"] = 0] = "Equals";
|
|
4
|
+
StateCompareOperations[StateCompareOperations["NotEquals"] = 1] = "NotEquals";
|
|
5
|
+
StateCompareOperations[StateCompareOperations["GreaterThan"] = 2] = "GreaterThan";
|
|
6
|
+
StateCompareOperations[StateCompareOperations["LessThan"] = 3] = "LessThan";
|
|
7
|
+
})(StateCompareOperations || (StateCompareOperations = {}));
|
|
8
|
+
export var StateLogiceOperations;
|
|
9
|
+
(function (StateLogiceOperations) {
|
|
10
|
+
StateLogiceOperations[StateLogiceOperations["And"] = 0] = "And";
|
|
11
|
+
StateLogiceOperations[StateLogiceOperations["Or"] = 1] = "Or";
|
|
12
|
+
})(StateLogiceOperations || (StateLogiceOperations = {}));
|
|
13
|
+
export const StateCompareOperationsMap = {
|
|
14
|
+
"=": StateCompareOperations.Equals,
|
|
15
|
+
"!=": StateCompareOperations.NotEquals,
|
|
16
|
+
">": StateCompareOperations.GreaterThan,
|
|
17
|
+
"<": StateCompareOperations.LessThan,
|
|
18
|
+
};
|
|
19
|
+
export const StateLogicOperationsMap = {
|
|
20
|
+
"&&": StateLogiceOperations.And,
|
|
21
|
+
"||": StateLogiceOperations.Or,
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StateSchema } from "./Schema/StateSchema";
|
|
2
|
+
export declare class StateTreeReader {
|
|
3
|
+
schema: StateSchema;
|
|
4
|
+
defaultValue: number;
|
|
5
|
+
tree: any[];
|
|
6
|
+
startingIndex: number;
|
|
7
|
+
constructor(schema: StateSchema, defaultValue: number, tree: any[]);
|
|
8
|
+
getState(shapeState: number): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export class StateTreeReader {
|
|
2
|
+
schema;
|
|
3
|
+
defaultValue;
|
|
4
|
+
tree;
|
|
5
|
+
startingIndex = 0;
|
|
6
|
+
constructor(schema, defaultValue = 0, tree) {
|
|
7
|
+
this.schema = schema;
|
|
8
|
+
this.defaultValue = defaultValue;
|
|
9
|
+
this.tree = tree;
|
|
10
|
+
}
|
|
11
|
+
getState(shapeState) {
|
|
12
|
+
if (!this.tree.length)
|
|
13
|
+
return this.defaultValue;
|
|
14
|
+
let found = -1;
|
|
15
|
+
let index = this.startingIndex;
|
|
16
|
+
let curretNode = this.tree;
|
|
17
|
+
while (found == -1) {
|
|
18
|
+
curretNode =
|
|
19
|
+
curretNode[index][this.schema.nodes[index].getValue(shapeState)];
|
|
20
|
+
if (typeof curretNode == "number") {
|
|
21
|
+
return curretNode;
|
|
22
|
+
}
|
|
23
|
+
for (let i = 0; i < curretNode.length; i++) {
|
|
24
|
+
if (curretNode[i]) {
|
|
25
|
+
index = i;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (typeof curretNode == "number") {
|
|
30
|
+
return curretNode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return found;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Vec2Array, Vec3Array } from "@amodx/math";
|
|
2
|
+
import { QuadUVData } from "@amodx/meshing/Geometry.types";
|
|
3
|
+
import { VoxelFaceNames } from "../Math";
|
|
4
|
+
export interface VoxelModelConstructorData {
|
|
5
|
+
id: string;
|
|
6
|
+
modRelationSchema?: VoxelModelRelationsSchemaData[];
|
|
7
|
+
modSchema?: VoxelBinaryStringSchemaData[];
|
|
8
|
+
inputs: Record<string, Record<string, any>>;
|
|
9
|
+
tagOverrides?: {
|
|
10
|
+
isLightSource?: Record<string, boolean>;
|
|
11
|
+
lightValue?: Record<string, Vec3Array>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface VoxelBoxGeometryNode {
|
|
15
|
+
type: "box";
|
|
16
|
+
noShade?: boolean;
|
|
17
|
+
points: [start: Vec3Array, end: Vec3Array];
|
|
18
|
+
rotation?: Vec3Array;
|
|
19
|
+
faces: Record<VoxelFaceNames, VoxelBoxFaceData>;
|
|
20
|
+
}
|
|
21
|
+
export interface VoxelBoxFaceData {
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
flip?: boolean;
|
|
24
|
+
texture: string;
|
|
25
|
+
transparent?: boolean | string;
|
|
26
|
+
uv: [x1: number, y1: number, x2: number, y2: number] | string;
|
|
27
|
+
rotation?: number | string;
|
|
28
|
+
}
|
|
29
|
+
export interface VoxelQuadGeometryNode {
|
|
30
|
+
type: "quad";
|
|
31
|
+
doubleSided?: boolean | string;
|
|
32
|
+
points: [p1: Vec3Array, p2: Vec3Array, p3: Vec3Array, p4: Vec3Array];
|
|
33
|
+
transparent?: boolean | string;
|
|
34
|
+
texture: string;
|
|
35
|
+
uv: [x1: number, y1: number, x2: number, y2: number] | QuadUVData | string;
|
|
36
|
+
textureRotation?: number | string;
|
|
37
|
+
}
|
|
38
|
+
export interface VoxelTriangleGeometryNode {
|
|
39
|
+
type: "triangle";
|
|
40
|
+
orientation?: 0 | 1;
|
|
41
|
+
doubleSided?: boolean;
|
|
42
|
+
points: [p1: Vec3Array, p2: Vec3Array, p3: Vec3Array];
|
|
43
|
+
transparent?: boolean | string;
|
|
44
|
+
texture: string;
|
|
45
|
+
uv: [v1: Vec2Array, v2: Vec2Array, v3: Vec2Array] | string;
|
|
46
|
+
textureRotation?: number | string;
|
|
47
|
+
}
|
|
48
|
+
export interface VoxelRawGeometryGeometryNode {
|
|
49
|
+
type: "raw-geometry";
|
|
50
|
+
positions: number[];
|
|
51
|
+
normals: number[];
|
|
52
|
+
indices: number[];
|
|
53
|
+
uvs: number[];
|
|
54
|
+
texture: string;
|
|
55
|
+
}
|
|
56
|
+
export interface VoxelGeometryTextureArgument {
|
|
57
|
+
type: "texture";
|
|
58
|
+
}
|
|
59
|
+
export interface VoxelGeometryBooleanArgument {
|
|
60
|
+
type: "boolean";
|
|
61
|
+
default: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface VoxelGeometryIntArgument {
|
|
64
|
+
type: "int";
|
|
65
|
+
default: number;
|
|
66
|
+
}
|
|
67
|
+
export interface VoxelGeometryFloatArgument {
|
|
68
|
+
type: "float";
|
|
69
|
+
default: number;
|
|
70
|
+
}
|
|
71
|
+
export interface VoxelGeometryBoxUVArgument {
|
|
72
|
+
type: "box-uv";
|
|
73
|
+
default: [x1: number, y1: number, x2: number, y2: number];
|
|
74
|
+
}
|
|
75
|
+
export interface VoxelGeometryVector3Argument {
|
|
76
|
+
type: "vector3";
|
|
77
|
+
default?: Vec3Array;
|
|
78
|
+
min?: Vec3Array;
|
|
79
|
+
max?: Vec3Array;
|
|
80
|
+
}
|
|
81
|
+
export interface VoxelBinaryStringSchemaData {
|
|
82
|
+
name: string;
|
|
83
|
+
type: "string";
|
|
84
|
+
values: Record<number, string>;
|
|
85
|
+
}
|
|
86
|
+
export interface VoxelBinaryNumberSchemaData {
|
|
87
|
+
name: string;
|
|
88
|
+
type: "number";
|
|
89
|
+
maxValue: number;
|
|
90
|
+
}
|
|
91
|
+
export interface SameVoxelRelationsConditionData {
|
|
92
|
+
type: "same-voxel";
|
|
93
|
+
direction: Vec3Array;
|
|
94
|
+
}
|
|
95
|
+
export interface AnyVoxelRelationsConditionData {
|
|
96
|
+
type: "any-voxel";
|
|
97
|
+
direction: Vec3Array;
|
|
98
|
+
}
|
|
99
|
+
export type VoxelModelRelationsConditionData = SameVoxelRelationsConditionData | AnyVoxelRelationsConditionData;
|
|
100
|
+
export interface VoxelModelRelationsSchemaData {
|
|
101
|
+
name: string;
|
|
102
|
+
conditions: VoxelModelRelationsConditionData[];
|
|
103
|
+
}
|
|
104
|
+
export type VoxelGeometryNodes = VoxelBoxGeometryNode | VoxelTriangleGeometryNode | VoxelQuadGeometryNode | VoxelRawGeometryGeometryNode;
|
|
105
|
+
export interface VoxelGeometryData {
|
|
106
|
+
id: string;
|
|
107
|
+
nodes: VoxelGeometryNodes[];
|
|
108
|
+
/**
|
|
109
|
+
* If this is set the voxel geometry will not be included in the
|
|
110
|
+
* geometry rules and will be fall back to custom inputs.
|
|
111
|
+
* Ideal for advanced or non cubic models.
|
|
112
|
+
* */
|
|
113
|
+
doNotBuildRules?: true;
|
|
114
|
+
arguments: Record<string, VoxelGeometryTextureArgument | VoxelGeometryBoxUVArgument | VoxelGeometryVector3Argument | VoxelGeometryIntArgument | VoxelGeometryBooleanArgument | VoxelGeometryFloatArgument>;
|
|
115
|
+
}
|
|
116
|
+
export interface VoxelGeometryBaseLinkData {
|
|
117
|
+
inputs: Record<string, any>;
|
|
118
|
+
scale?: Vec3Array;
|
|
119
|
+
position?: Vec3Array;
|
|
120
|
+
rotation?: Vec3Array;
|
|
121
|
+
rotationPivot?: Vec3Array;
|
|
122
|
+
flip?: [flipX: 0 | 1, flipY: 0 | 1, flipZ: 0 | 1];
|
|
123
|
+
}
|
|
124
|
+
export interface VoxelGeometryLinkData extends VoxelGeometryBaseLinkData {
|
|
125
|
+
id: string;
|
|
126
|
+
geometryId: string;
|
|
127
|
+
}
|
|
128
|
+
export interface VoxelModelData {
|
|
129
|
+
id: string;
|
|
130
|
+
arguments: Record<string, VoxelGeometryTextureArgument | VoxelGeometryBoxUVArgument | VoxelGeometryVector3Argument | VoxelGeometryIntArgument | VoxelGeometryBooleanArgument | VoxelGeometryFloatArgument>;
|
|
131
|
+
shapeStateSchema: (VoxelBinaryStringSchemaData | VoxelBinaryNumberSchemaData)[];
|
|
132
|
+
relationsSchema: VoxelModelRelationsSchemaData[];
|
|
133
|
+
shapeStatesNodes: Record<string, VoxelGeometryLinkData[]>;
|
|
134
|
+
shapeStatesConditonalNodes: Record<string, VoxelGeometryLinkData[]>;
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { VoxelAOResultsIndexData } from "./Indexing/VoxelAOResultsIndex";
|
|
3
|
+
import { VoxelFaceCullResultsIndexData } from "./Indexing/VoxelFaceCullResultsIndex";
|
|
4
|
+
import { VoxelFaceTransparentResultsIndexData } from "./Indexing/VoxelFaceTransparentResultsIndex";
|
|
5
|
+
import { VoxelModelStateSchemaData, StateLogicStatement } from "./State/State.types";
|
|
6
|
+
import { VoxelGeometryData, VoxelGeometryNodes } from "./VoxelModel.types";
|
|
7
|
+
export interface PrcoessedVoxelGeometryNodes {
|
|
8
|
+
node: VoxelGeometryNodes;
|
|
9
|
+
tranform: VoxelGeometryTransform;
|
|
10
|
+
}
|
|
11
|
+
export interface VoxelGeometryTransform {
|
|
12
|
+
position?: Vec3Array;
|
|
13
|
+
scale?: Vec3Array;
|
|
14
|
+
rotation?: Vec3Array;
|
|
15
|
+
rotationPivot?: Vec3Array;
|
|
16
|
+
lockUVs?: true;
|
|
17
|
+
flip?: [flipX: 0 | 1, flipY: 0 | 1, flipZ: 0 | 1];
|
|
18
|
+
}
|
|
19
|
+
export interface PrcoessedVoxelGeometryData {
|
|
20
|
+
id: string;
|
|
21
|
+
ogData: VoxelGeometryData;
|
|
22
|
+
nodes: PrcoessedVoxelGeometryNodes[];
|
|
23
|
+
}
|
|
24
|
+
export interface VoxelGeometrySyncData {
|
|
25
|
+
id: string;
|
|
26
|
+
nodes: PrcoessedVoxelGeometryNodes[];
|
|
27
|
+
faceCullMap: number[][];
|
|
28
|
+
vertexHitMap: number[][];
|
|
29
|
+
aoIndex: VoxelAOResultsIndexData;
|
|
30
|
+
cullIndex: VoxelFaceCullResultsIndexData;
|
|
31
|
+
}
|
|
32
|
+
export interface VoxelGeometryRulelessSyncData {
|
|
33
|
+
id: string;
|
|
34
|
+
nodes: PrcoessedVoxelGeometryNodes[];
|
|
35
|
+
ruleless: true;
|
|
36
|
+
}
|
|
37
|
+
export interface VoxelModelSyncData {
|
|
38
|
+
id: string;
|
|
39
|
+
schema: VoxelModelStateSchemaData[];
|
|
40
|
+
geoLinkMap: number[];
|
|
41
|
+
shapeStateTree: any[];
|
|
42
|
+
shapeStateMap: number[][];
|
|
43
|
+
shapeStateGeometryMap: number[][];
|
|
44
|
+
shapeStateRelativeGeometryMap: number[][];
|
|
45
|
+
relativeGeometryByteIndexMap: number[];
|
|
46
|
+
condiotnalStatements: StateLogicStatement[];
|
|
47
|
+
condiotnalStateMap: number[][];
|
|
48
|
+
condiotnalShapeStateMap: number[][][];
|
|
49
|
+
condiotnalShapeStateGeometryMap: number[][][];
|
|
50
|
+
condiotnalShapeStateRelativeGeometryMap: number[][];
|
|
51
|
+
condiotnalStateTree: any[];
|
|
52
|
+
}
|
|
53
|
+
export interface VoxelInputsSyncData {
|
|
54
|
+
id: string;
|
|
55
|
+
modelId: string;
|
|
56
|
+
transparentFaceIndex: VoxelFaceTransparentResultsIndexData;
|
|
57
|
+
modSchema: VoxelModelStateSchemaData[];
|
|
58
|
+
modStateTree: any[];
|
|
59
|
+
baseGeometryInputMap: any[][];
|
|
60
|
+
condiotnalGeometryInputMap: any[][];
|
|
61
|
+
}
|
|
62
|
+
export interface ConstructorVoxelModelSyncData {
|
|
63
|
+
geometryPalette: string[];
|
|
64
|
+
geometry: (VoxelGeometrySyncData | VoxelGeometryRulelessSyncData)[];
|
|
65
|
+
models: VoxelModelSyncData[];
|
|
66
|
+
voxels: VoxelInputsSyncData[];
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SchemaRegister } from "../State/SchemaRegister";
|
|
2
|
+
export default function (DVEW) {
|
|
3
|
+
DVEW.TC.registerTasks("sync-voxel-model-data", (data) => {
|
|
4
|
+
for (const model of data.models) {
|
|
5
|
+
SchemaRegister.registerModel(model.id, model.schema);
|
|
6
|
+
}
|
|
7
|
+
for (const voxel of data.voxels) {
|
|
8
|
+
SchemaRegister.registerVoxel(voxel.id, voxel.modelId, voxel.modSchema);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { RichDataTool } from "../Tools/Data/RichDataTool.js";
|
|
3
|
+
import { BrushTool } from "../Tools/Brush/Brush.js";
|
|
4
|
+
export declare class WorldGenBrush extends BrushTool {
|
|
5
|
+
constructor();
|
|
6
|
+
requestsId: "";
|
|
7
|
+
tasks: {
|
|
8
|
+
rebuildQueMap: Map<string, boolean>;
|
|
9
|
+
comm: import("@amodx/threads").Thread;
|
|
10
|
+
priority: import("../Types/Tasks.types.js").Priorities;
|
|
11
|
+
LOD: number;
|
|
12
|
+
syncQueue: import("../Math/index.js").LocationData[];
|
|
13
|
+
aSyncQueue: import("../Math/index.js").LocationData[];
|
|
14
|
+
buildMode: "sync" | "async";
|
|
15
|
+
buildTasks: import("../Types/Tasks.types.js").PriorityTask<import("../Types/Tasks.types.js").BuildTasks>;
|
|
16
|
+
trackedChunks: Map<string, Vec3Array>;
|
|
17
|
+
keepTrackOfChunks: boolean;
|
|
18
|
+
rebuildTasks: import("../Types/Tasks.types.js").AddToRebuildQueue;
|
|
19
|
+
tasksType: string;
|
|
20
|
+
origin: import("../Math/index.js").LocationData;
|
|
21
|
+
data: null;
|
|
22
|
+
buildQueue: string;
|
|
23
|
+
originThread: string;
|
|
24
|
+
queues: {
|
|
25
|
+
flow: {
|
|
26
|
+
update: {
|
|
27
|
+
queue: number[][];
|
|
28
|
+
map: import("../Util/VisistedMap.js").VisitedMap;
|
|
29
|
+
};
|
|
30
|
+
remove: {
|
|
31
|
+
queue: number[][];
|
|
32
|
+
map: import("../Util/VisistedMap.js").VisitedMap;
|
|
33
|
+
noRemoveMap: import("../Util/VisistedMap.js").VisitedMap;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
rgb: {
|
|
37
|
+
update: number[];
|
|
38
|
+
remove: number[];
|
|
39
|
+
map: import("../Util/VisistedMap.js").VisitedMap;
|
|
40
|
+
};
|
|
41
|
+
sun: {
|
|
42
|
+
update: number[];
|
|
43
|
+
remove: number[];
|
|
44
|
+
updateMap: import("../Util/VisistedMap.js").VisitedMap;
|
|
45
|
+
remvoeMap: import("../Util/VisistedMap.js").VisitedMap;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
start(): any;
|
|
49
|
+
stop(): any;
|
|
50
|
+
setPriority(priority: import("../Types/Tasks.types.js").Priorities): any;
|
|
51
|
+
getData(): null;
|
|
52
|
+
getOriginThread(): import("../Math/index.js").LocationData;
|
|
53
|
+
getBuildQueue(): string;
|
|
54
|
+
getOrigin(): import("../Math/index.js").LocationData;
|
|
55
|
+
needsRebuild(): boolean;
|
|
56
|
+
needsToUpdateOriginThread(): boolean;
|
|
57
|
+
clearBuildQueue(): void;
|
|
58
|
+
setBuldMode(mode: "sync" | "async"): any;
|
|
59
|
+
addToRebuildQueue(x: number, y: number, z: number): boolean;
|
|
60
|
+
addNeighborsToRebuildQueue(x: number, y: number, z: number): false | any | undefined;
|
|
61
|
+
runRebuildQueue(): any;
|
|
62
|
+
clear(): void;
|
|
63
|
+
};
|
|
64
|
+
richData: RichDataTool;
|
|
65
|
+
setDimension(dimensionId: string): this;
|
|
66
|
+
get keepTrackOfChunksToBuild(): boolean;
|
|
67
|
+
set keepTrackOfChunksToBuild(value: boolean);
|
|
68
|
+
paint(): this;
|
|
69
|
+
getUpdatedChunks(): Vec3Array[];
|
|
70
|
+
update(): false | undefined;
|
|
71
|
+
erase(): this;
|
|
72
|
+
runUpdates(): void;
|
|
73
|
+
worldAlloc(start: Vec3Array, end: Vec3Array): Promise<boolean>;
|
|
74
|
+
worldDealloc(start: Vec3Array, end: Vec3Array): Promise<boolean>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { WorldGenRegister } from "./WorldGenRegister.js";
|
|
2
|
+
import { RichDataTool } from "../Tools/Data/RichDataTool.js";
|
|
3
|
+
import { BrushTool } from "../Tools/Brush/Brush.js";
|
|
4
|
+
import { LightData } from "../Data/LightData.js";
|
|
5
|
+
import { TasksRequest } from "../Contexts/Constructor/Tasks/TasksRequest.js";
|
|
6
|
+
import { WorldGeneration } from "./WorldGeneration.js";
|
|
7
|
+
import { SafePromise } from "@amodx/core/Promises/SafePromise.js";
|
|
8
|
+
import { Propagation } from "../Propagation/Propagation.js";
|
|
9
|
+
import { DivineVoxelEngineConstructor } from "../Contexts/Constructor/DivineVoxelEngineConstructor.js";
|
|
10
|
+
export class WorldGenBrush extends BrushTool {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
WorldGeneration._brushes.push(this);
|
|
14
|
+
}
|
|
15
|
+
requestsId;
|
|
16
|
+
tasks = TasksRequest.getVoxelUpdateRequests(["main", 0, 0, 0]);
|
|
17
|
+
richData = new RichDataTool();
|
|
18
|
+
setDimension(dimensionId) {
|
|
19
|
+
this.dimension = dimensionId;
|
|
20
|
+
this.tasks.origin[0] = dimensionId;
|
|
21
|
+
this._dt.setDimension(dimensionId);
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
get keepTrackOfChunksToBuild() {
|
|
25
|
+
return this.tasks.keepTrackOfChunks;
|
|
26
|
+
}
|
|
27
|
+
set keepTrackOfChunksToBuild(value) {
|
|
28
|
+
this.tasks.keepTrackOfChunks = value;
|
|
29
|
+
}
|
|
30
|
+
paint() {
|
|
31
|
+
if (!this._dt.setDimension(this.dimension).loadInAt(this.x, this.y, this.z)) {
|
|
32
|
+
if (this.requestsId != "") {
|
|
33
|
+
WorldGenRegister.addToRequest(this.requestsId, [this.dimension, this.x, this.y, this.z], [...this.getRaw()]);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
throw new Error(`Tried painting in an unloaded location ${[
|
|
37
|
+
this.dimension,
|
|
38
|
+
this.x,
|
|
39
|
+
this.y,
|
|
40
|
+
this.z,
|
|
41
|
+
].toString()}`);
|
|
42
|
+
}
|
|
43
|
+
if (this._dt.isRenderable()) {
|
|
44
|
+
this.erase();
|
|
45
|
+
this._dt.setDimension(this.dimension).loadInAt(this.x, this.y, this.z);
|
|
46
|
+
}
|
|
47
|
+
const sl = this._dt.getLight();
|
|
48
|
+
if (LightData.hasRGBLight(sl)) {
|
|
49
|
+
this.tasks.queues.rgb.remove.push(this.x, this.y, this.z);
|
|
50
|
+
Propagation.instance.rgbRemove(this.tasks);
|
|
51
|
+
}
|
|
52
|
+
if (LightData.hasSunLight(sl)) {
|
|
53
|
+
this.tasks.queues.sun.remove.push(this.x, this.y, this.z);
|
|
54
|
+
Propagation.instance.sunRemove(this.tasks);
|
|
55
|
+
}
|
|
56
|
+
this._worldPainter.dimenion = this.dimension;
|
|
57
|
+
this._worldPainter.data = this.data;
|
|
58
|
+
this._worldPainter.paintVoxel(this.x, this.y, this.z);
|
|
59
|
+
if (this.keepTrackOfChunksToBuild) {
|
|
60
|
+
this.tasks.addNeighborsToRebuildQueue(this.x, this.y, this.z);
|
|
61
|
+
}
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
getUpdatedChunks() {
|
|
65
|
+
const queue = [];
|
|
66
|
+
if (this.keepTrackOfChunksToBuild) {
|
|
67
|
+
for (const [key, position] of this.tasks.trackedChunks) {
|
|
68
|
+
queue.push(position);
|
|
69
|
+
}
|
|
70
|
+
this.tasks.trackedChunks.clear();
|
|
71
|
+
}
|
|
72
|
+
this.tasks.clearBuildQueue();
|
|
73
|
+
return queue;
|
|
74
|
+
}
|
|
75
|
+
update() {
|
|
76
|
+
if (!this._dt.setDimension(this.dimension).loadInAt(this.x, this.y, this.z) &&
|
|
77
|
+
this.requestsId != "")
|
|
78
|
+
return false;
|
|
79
|
+
const sl = this._dt.getLight();
|
|
80
|
+
if (LightData.hasRGBLight(sl)) {
|
|
81
|
+
this.tasks.queues.rgb.update.push(this.x, this.y, this.z);
|
|
82
|
+
Propagation.instance.rgbUpdate(this.tasks);
|
|
83
|
+
}
|
|
84
|
+
if (LightData.hasSunLight(sl)) {
|
|
85
|
+
this.tasks.queues.sun.update.push(this.x, this.y, this.z);
|
|
86
|
+
Propagation.instance.sunUpdate(this.tasks);
|
|
87
|
+
}
|
|
88
|
+
if (this.keepTrackOfChunksToBuild) {
|
|
89
|
+
this.tasks.addNeighborsToRebuildQueue(this.x, this.y, this.z);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
erase() {
|
|
93
|
+
if (!this._dt.setDimension(this.dimension).loadInAt(this.x, this.y, this.z) &&
|
|
94
|
+
this.requestsId != "")
|
|
95
|
+
return this;
|
|
96
|
+
const sl = this._dt.getLight();
|
|
97
|
+
this._worldPainter.dimenion = this.dimension;
|
|
98
|
+
this._worldPainter.eraseVoxel(this.x, this.y, this.z);
|
|
99
|
+
this._dt
|
|
100
|
+
.setAir()
|
|
101
|
+
.setLight(sl > 0 ? sl : 0)
|
|
102
|
+
.commit();
|
|
103
|
+
if (LightData.hasRGBLight(sl)) {
|
|
104
|
+
this.tasks.queues.rgb.remove.push(this.x, this.y, this.z);
|
|
105
|
+
Propagation.instance.rgbRemove(this.tasks);
|
|
106
|
+
}
|
|
107
|
+
if (LightData.hasSunLight(sl)) {
|
|
108
|
+
this.tasks.queues.sun.remove.push(this.x, this.y, this.z);
|
|
109
|
+
Propagation.instance.sunRemove(this.tasks);
|
|
110
|
+
}
|
|
111
|
+
if (this.keepTrackOfChunksToBuild) {
|
|
112
|
+
this.tasks.addNeighborsToRebuildQueue(this.x, this.y, this.z);
|
|
113
|
+
}
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
runUpdates() {
|
|
117
|
+
Propagation.instance.rgbUpdate(this.tasks);
|
|
118
|
+
Propagation.instance.sunUpdate(this.tasks);
|
|
119
|
+
this.tasks.queues.rgb.map.clear();
|
|
120
|
+
this.tasks.queues.sun.updateMap.clear();
|
|
121
|
+
}
|
|
122
|
+
worldAlloc(start, end) {
|
|
123
|
+
return new SafePromise("worldAlloc", (resolve) => {
|
|
124
|
+
DivineVoxelEngineConstructor.instance.threads.world.runPromiseTasks("world-alloc", [this.dimension, start, end], [], () => {
|
|
125
|
+
resolve(true);
|
|
126
|
+
});
|
|
127
|
+
}).run();
|
|
128
|
+
}
|
|
129
|
+
worldDealloc(start, end) {
|
|
130
|
+
return new SafePromise("worldDealloc", (resolve) => {
|
|
131
|
+
DivineVoxelEngineConstructor.instance.threads.world.runPromiseTasks("world-dealloc", [this.dimension, start, end], [], () => {
|
|
132
|
+
resolve(true);
|
|
133
|
+
});
|
|
134
|
+
}).run();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LocationData } from "../Math";
|
|
2
|
+
import { RawVoxelData } from "../Data/Types/VoxelData.types";
|
|
3
|
+
export declare class WorldGenRegister {
|
|
4
|
+
static MAX_ATTEMPTS: number;
|
|
5
|
+
static _requests: Map<string, {
|
|
6
|
+
attempts: number;
|
|
7
|
+
dimension: string;
|
|
8
|
+
chunks: Map<string, [x: number, y: number, z: number]>;
|
|
9
|
+
voxels: [x: number, y: number, z: number, data: RawVoxelData][];
|
|
10
|
+
}>;
|
|
11
|
+
static registerRequest(location: LocationData): string;
|
|
12
|
+
static addToRequest(registerId: string, location: LocationData, rawData: RawVoxelData): false | undefined;
|
|
13
|
+
static attemptRequestFullFill(registerId: string): boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { WorldSpaces } from "../Data/World/WorldSpaces.js";
|
|
2
|
+
import { BrushTool } from "../Tools/Brush/Brush";
|
|
3
|
+
import { ChunkDataTool } from "../Tools/Data/WorldData/ChunkDataTool";
|
|
4
|
+
import { WorldBounds } from "../Data/World/WorldBounds";
|
|
5
|
+
import { DivineVoxelEngineConstructor } from "Contexts/Constructor";
|
|
6
|
+
const brush = new BrushTool();
|
|
7
|
+
const dataTool = brush._dt;
|
|
8
|
+
const chunkTool = new ChunkDataTool();
|
|
9
|
+
export class WorldGenRegister {
|
|
10
|
+
static MAX_ATTEMPTS = 100;
|
|
11
|
+
static _requests = new Map();
|
|
12
|
+
static registerRequest(location) {
|
|
13
|
+
const id = location.toString();
|
|
14
|
+
this._requests.set(id, {
|
|
15
|
+
attempts: 0,
|
|
16
|
+
chunks: new Map(),
|
|
17
|
+
dimension: location[0],
|
|
18
|
+
voxels: [],
|
|
19
|
+
});
|
|
20
|
+
return id;
|
|
21
|
+
}
|
|
22
|
+
static addToRequest(registerId, location, rawData) {
|
|
23
|
+
if (location[2] < WorldBounds.bounds.MinY ||
|
|
24
|
+
location[2] >= WorldBounds.bounds.MaxY)
|
|
25
|
+
return false;
|
|
26
|
+
const requests = this._requests.get(registerId);
|
|
27
|
+
if (!requests)
|
|
28
|
+
return;
|
|
29
|
+
const chunkPOS = WorldSpaces.chunk.getPositionXYZ(location[1], location[2], location[3]);
|
|
30
|
+
const chunkKey = WorldSpaces.chunk.getKeyXYZ(location[1], location[2], location[3]);
|
|
31
|
+
if (!chunkTool.loadInAtLocation(location)) {
|
|
32
|
+
if (!requests.chunks.has(chunkKey)) {
|
|
33
|
+
DivineVoxelEngineConstructor.instance.threads.world.runTasks("add-chunk", [
|
|
34
|
+
requests.dimension,
|
|
35
|
+
chunkPOS.x,
|
|
36
|
+
chunkPOS.y,
|
|
37
|
+
chunkPOS.z,
|
|
38
|
+
]);
|
|
39
|
+
requests.chunks.set(chunkKey, [chunkPOS.x, chunkPOS.y, chunkPOS.z]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const [dim, x, y, z] = location;
|
|
43
|
+
requests.voxels.push([x, y, z, rawData]);
|
|
44
|
+
}
|
|
45
|
+
static attemptRequestFullFill(registerId) {
|
|
46
|
+
const requests = this._requests.get(registerId);
|
|
47
|
+
if (!requests || !requests.voxels.length)
|
|
48
|
+
return true;
|
|
49
|
+
chunkTool.setDimension(requests.dimension);
|
|
50
|
+
let done = true;
|
|
51
|
+
for (const [key, pos] of requests.chunks) {
|
|
52
|
+
if (pos[0] < WorldBounds.bounds.MinX ||
|
|
53
|
+
pos[0] > WorldBounds.bounds.MaxX ||
|
|
54
|
+
pos[1] < WorldBounds.bounds.MinY ||
|
|
55
|
+
pos[1] > WorldBounds.bounds.MaxY ||
|
|
56
|
+
pos[2] < WorldBounds.bounds.MinZ ||
|
|
57
|
+
pos[2] > WorldBounds.bounds.MaxZ) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (!chunkTool.loadInAt(pos[0], pos[1], pos[2])) {
|
|
61
|
+
done = false;
|
|
62
|
+
DivineVoxelEngineConstructor.instance.threads.world.runTasks("add-chunk", [
|
|
63
|
+
requests.dimension,
|
|
64
|
+
pos[0],
|
|
65
|
+
pos[1],
|
|
66
|
+
pos[2],
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (!done) {
|
|
71
|
+
requests.attempts++;
|
|
72
|
+
if (requests.attempts >= this.MAX_ATTEMPTS) {
|
|
73
|
+
console.error(`World gen requests cancled after max attempts`, requests);
|
|
74
|
+
this._requests.delete(registerId);
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
brush.setDimension(requests.dimension);
|
|
80
|
+
dataTool.setDimension(requests.dimension);
|
|
81
|
+
const voxels = requests.voxels;
|
|
82
|
+
brush.start();
|
|
83
|
+
while (voxels.length) {
|
|
84
|
+
const data = voxels.shift();
|
|
85
|
+
if (!data)
|
|
86
|
+
break;
|
|
87
|
+
dataTool.loadInAt(data[0], data[1], data[2]);
|
|
88
|
+
brush.setXYZ(data[0], data[1], data[2]).setRaw(data[3]).paint();
|
|
89
|
+
}
|
|
90
|
+
brush.stop();
|
|
91
|
+
this._requests.delete(registerId);
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WorldBounds } from "../Data/World/WorldBounds.js";
|
|
2
|
+
import { WorldGenRegister } from "./WorldGenRegister.js";
|
|
3
|
+
import { WorldGenBrush } from "./WorldGenBrush.js";
|
|
4
|
+
import { WorldGenInterface } from "../Interfaces/WorldGen/WorldGen.types.js";
|
|
5
|
+
import { GenerateTasks } from "../Types/Tasks.types.js";
|
|
6
|
+
export declare class WorldGeneration {
|
|
7
|
+
static worldGen: WorldGenInterface | null;
|
|
8
|
+
static register: typeof WorldGenRegister;
|
|
9
|
+
static worldBounds: typeof WorldBounds;
|
|
10
|
+
static _brushes: any[];
|
|
11
|
+
static setWorldGen(worldGen: WorldGenInterface): void;
|
|
12
|
+
static generate(data: GenerateTasks, mode: "generate" | "decorate", onDone: Function): Promise<void>;
|
|
13
|
+
static getBrush(): WorldGenBrush;
|
|
14
|
+
}
|