@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,287 @@
|
|
|
1
|
+
import { URIShader } from "@amodx/uri/Shaders/Classes/URIShader";
|
|
2
|
+
import { TextureManager } from "./TextureManager.js";
|
|
3
|
+
import { TextureAnimationCreator } from "./TextureAnimations.js";
|
|
4
|
+
import { TextureBuilder } from "./TextureBuilder.js";
|
|
5
|
+
class TextureSegment {
|
|
6
|
+
parentID;
|
|
7
|
+
id;
|
|
8
|
+
mode;
|
|
9
|
+
attributeID;
|
|
10
|
+
totalTextures = 0;
|
|
11
|
+
textureMap = new Map();
|
|
12
|
+
textures = [];
|
|
13
|
+
textureIndex = {};
|
|
14
|
+
animationsMap = [];
|
|
15
|
+
animationTimes = [];
|
|
16
|
+
animations = [];
|
|
17
|
+
varyingID = "";
|
|
18
|
+
animationUniforID = "";
|
|
19
|
+
animationUniform = new Float32Array();
|
|
20
|
+
paths = new Map();
|
|
21
|
+
shaderTexture = null;
|
|
22
|
+
textureID = "";
|
|
23
|
+
constructor(parentID, id, mode, attributeID) {
|
|
24
|
+
this.parentID = parentID;
|
|
25
|
+
this.id = id;
|
|
26
|
+
this.mode = mode;
|
|
27
|
+
this.attributeID = attributeID;
|
|
28
|
+
this.textureID = `${parentID}_${id}`.replace("#", "");
|
|
29
|
+
}
|
|
30
|
+
/**# clearData
|
|
31
|
+
* ---
|
|
32
|
+
* Clear all un-needed data.
|
|
33
|
+
*/
|
|
34
|
+
clearData() {
|
|
35
|
+
this.paths.clear();
|
|
36
|
+
this.textures = [];
|
|
37
|
+
this.textureMap.clear();
|
|
38
|
+
this.textureIndex = {};
|
|
39
|
+
this.shaderTexture = null;
|
|
40
|
+
this.animationsMap = [];
|
|
41
|
+
this.animationTimes = [];
|
|
42
|
+
}
|
|
43
|
+
/**# flush
|
|
44
|
+
* ---
|
|
45
|
+
* Clear all data.
|
|
46
|
+
*/
|
|
47
|
+
flush() {
|
|
48
|
+
this.clearData();
|
|
49
|
+
this.shaderTexture?.dispose();
|
|
50
|
+
this.shaderTexture = null;
|
|
51
|
+
this.animations = [];
|
|
52
|
+
this.animationTimes = [];
|
|
53
|
+
this.animationsMap = [];
|
|
54
|
+
this.textureIndex = {};
|
|
55
|
+
this.totalTextures = 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export class TextureType {
|
|
59
|
+
id;
|
|
60
|
+
extension = "png";
|
|
61
|
+
segments;
|
|
62
|
+
materials = new Map();
|
|
63
|
+
shader;
|
|
64
|
+
constructor(id) {
|
|
65
|
+
this.id = id;
|
|
66
|
+
const main = new TextureSegment(id, "main", "sampler", "textureIndex");
|
|
67
|
+
const overlay = new TextureSegment(id, "overlay", "overlay", "textureIndex");
|
|
68
|
+
this.segments = new Map([
|
|
69
|
+
["main", main],
|
|
70
|
+
["overlay", overlay],
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
flushAll() {
|
|
74
|
+
this.segments.forEach((_, key) => _.flush());
|
|
75
|
+
this.materials.clear();
|
|
76
|
+
}
|
|
77
|
+
async build() {
|
|
78
|
+
this.buildTextureIndex();
|
|
79
|
+
this.shader = new URIShader(this.id);
|
|
80
|
+
for (const [id, segment] of this.segments) {
|
|
81
|
+
segment.shaderTexture = await TextureBuilder.createMaterialTexture(id, segment.paths);
|
|
82
|
+
this.shader.addTextures([
|
|
83
|
+
[segment.textureID, { type: "sampler2DArray" }],
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
TextureAnimationCreator.createAnimations(this);
|
|
87
|
+
}
|
|
88
|
+
getTextureIndex(textureId, varation = "", segment = "main") {
|
|
89
|
+
const textureSegment = this.segments.get(segment);
|
|
90
|
+
let id = textureId;
|
|
91
|
+
if (varation) {
|
|
92
|
+
id = `${textureId}:${varation}`;
|
|
93
|
+
}
|
|
94
|
+
let uv = -1;
|
|
95
|
+
uv = textureSegment.textureIndex[id];
|
|
96
|
+
if (uv == -1) {
|
|
97
|
+
throw new Error(`Texture with id: ${id} does not exists.typeId : ${this.id} segment : ${segment}`);
|
|
98
|
+
}
|
|
99
|
+
return uv;
|
|
100
|
+
}
|
|
101
|
+
clearSegmentData() {
|
|
102
|
+
this.segments.forEach((_) => _.clearData());
|
|
103
|
+
}
|
|
104
|
+
removeSegment(id) {
|
|
105
|
+
const segment = this.segments.get(id);
|
|
106
|
+
if (!segment)
|
|
107
|
+
return false;
|
|
108
|
+
if (this.shader)
|
|
109
|
+
this.shader.data.textures.delete(segment.textureID);
|
|
110
|
+
this.segments.delete(id);
|
|
111
|
+
}
|
|
112
|
+
addTexture(data) {
|
|
113
|
+
const segment = this.segments.get(data.segment ? data.segment : "main");
|
|
114
|
+
if (!segment)
|
|
115
|
+
return false;
|
|
116
|
+
segment.textures.push(data);
|
|
117
|
+
segment.textureMap.set(data.id, data);
|
|
118
|
+
}
|
|
119
|
+
addToShader(shader) {
|
|
120
|
+
const main = this.segments.get("main");
|
|
121
|
+
const overlay = this.segments.get("overlay");
|
|
122
|
+
if (overlay) {
|
|
123
|
+
shader.setArgumentOverride("function", "getBaseColor", {
|
|
124
|
+
textureID: main.textureID,
|
|
125
|
+
overlayTextureID: overlay.textureID,
|
|
126
|
+
mainVarying: main.varyingID,
|
|
127
|
+
overlayVarying: overlay.varyingID,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
shader.setArgumentOverride("function", "getMainColor", {
|
|
131
|
+
textureID: main.textureID,
|
|
132
|
+
mainVarying: main.varyingID,
|
|
133
|
+
});
|
|
134
|
+
return this.shader.merge(shader, false);
|
|
135
|
+
}
|
|
136
|
+
addToMaterial(material) {
|
|
137
|
+
for (const [key, segment] of this.segments) {
|
|
138
|
+
if (!segment.shaderTexture)
|
|
139
|
+
continue;
|
|
140
|
+
material.setTexture(segment.textureID, segment.shaderTexture);
|
|
141
|
+
material.setNumberArray(segment.animationUniforID, segment.animationUniform);
|
|
142
|
+
}
|
|
143
|
+
this.materials.set(material.id, material);
|
|
144
|
+
}
|
|
145
|
+
runAnimations() {
|
|
146
|
+
for (const [key, segment] of this.segments) {
|
|
147
|
+
for (let i = 0; i < segment.animations.length; i++) {
|
|
148
|
+
const anim = segment.animations[i];
|
|
149
|
+
if (anim.currentCount <= anim.keyCounts[anim.currentFrame]) {
|
|
150
|
+
anim.currentCount++;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
anim.currentCount = 0;
|
|
154
|
+
if (anim.currentFrame < anim.keys.length - 1) {
|
|
155
|
+
anim.currentFrame++;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
anim.currentFrame = 0;
|
|
159
|
+
}
|
|
160
|
+
segment.animationUniform[anim.uniformIndex] =
|
|
161
|
+
anim.keys[anim.currentFrame];
|
|
162
|
+
for (const [key, material] of this.materials) {
|
|
163
|
+
material.setNumberArray(segment.animationUniforID, segment.animationUniform);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
getTextureIndexMap() {
|
|
169
|
+
const segmentMap = {};
|
|
170
|
+
for (const [key, segment] of this.segments) {
|
|
171
|
+
segmentMap[key] ??= {};
|
|
172
|
+
segmentMap[key] = segment.textureIndex;
|
|
173
|
+
}
|
|
174
|
+
return segmentMap;
|
|
175
|
+
}
|
|
176
|
+
_processVariations(textureData, paths, map, animations, textureAnimatioTimes, extension, count) {
|
|
177
|
+
if (!textureData.variations)
|
|
178
|
+
return count;
|
|
179
|
+
for (const varation of Object.keys(textureData.variations)) {
|
|
180
|
+
const data = textureData.variations[varation];
|
|
181
|
+
if (data.frames == 0) {
|
|
182
|
+
map[`${textureData.id}:${varation}`] = count;
|
|
183
|
+
const assetPath = this._getPath(textureData, varation, extension);
|
|
184
|
+
let raw = false;
|
|
185
|
+
if (data.rawData && !Array.isArray(data.rawData)) {
|
|
186
|
+
raw = data.rawData;
|
|
187
|
+
}
|
|
188
|
+
if (data.base64 && !Array.isArray(data.base64)) {
|
|
189
|
+
raw = data.base64;
|
|
190
|
+
}
|
|
191
|
+
paths.set(assetPath, raw);
|
|
192
|
+
count++;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
if (!data.animKeys)
|
|
196
|
+
throw new Error("Texture Varation must have supplied animKeys if frames are greater than 0.");
|
|
197
|
+
for (let i = 1; i <= data.frames; i++) {
|
|
198
|
+
map[`${textureData.id}:${varation}-${i}`] = count;
|
|
199
|
+
const assetPath = this._getPath(textureData, `${varation}-${i}`, extension);
|
|
200
|
+
let raw = false;
|
|
201
|
+
if (data.rawData) {
|
|
202
|
+
raw = data.rawData[i - 1];
|
|
203
|
+
}
|
|
204
|
+
if (data.base64) {
|
|
205
|
+
raw = data.base64[i - 1];
|
|
206
|
+
}
|
|
207
|
+
paths.set(assetPath, raw);
|
|
208
|
+
count++;
|
|
209
|
+
}
|
|
210
|
+
const trueKeys = [];
|
|
211
|
+
for (let i = 0; i < data.animKeys.length; i++) {
|
|
212
|
+
trueKeys.push(map[`${textureData.id}:${varation}-${data.animKeys[i]}`]);
|
|
213
|
+
}
|
|
214
|
+
if (data.animKeyFrameTimes) {
|
|
215
|
+
textureAnimatioTimes.push(data.animKeyFrameTimes);
|
|
216
|
+
}
|
|
217
|
+
if (data.globalFrameTime) {
|
|
218
|
+
textureAnimatioTimes.push([data.globalFrameTime]);
|
|
219
|
+
}
|
|
220
|
+
animations.push(trueKeys);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return count;
|
|
224
|
+
}
|
|
225
|
+
_getPath(textureData, varation = "default", extension) {
|
|
226
|
+
return `${textureData.path ? textureData.path : TextureManager.defaultTexturePath}/${textureData.id}/${varation}.${extension}`;
|
|
227
|
+
}
|
|
228
|
+
buildTextureIndex() {
|
|
229
|
+
const texture = this;
|
|
230
|
+
if (!texture)
|
|
231
|
+
return false;
|
|
232
|
+
const extension = texture.extension;
|
|
233
|
+
for (const [key, segment] of texture.segments) {
|
|
234
|
+
let count = 1;
|
|
235
|
+
const map = segment.textureIndex;
|
|
236
|
+
const paths = segment.paths;
|
|
237
|
+
const animationTimes = segment.animationTimes;
|
|
238
|
+
const animations = segment.animationsMap;
|
|
239
|
+
for (const textureData of segment.textures) {
|
|
240
|
+
if (textureData.frames == 0) {
|
|
241
|
+
segment.textureIndex[`${textureData.id}`] = count;
|
|
242
|
+
const assetPath = this._getPath(textureData, "default", extension);
|
|
243
|
+
let raw = false;
|
|
244
|
+
if (textureData.rawData && !Array.isArray(raw)) {
|
|
245
|
+
raw = textureData.rawData;
|
|
246
|
+
}
|
|
247
|
+
if (textureData.base64 && !Array.isArray(textureData.base64)) {
|
|
248
|
+
raw = textureData.base64;
|
|
249
|
+
}
|
|
250
|
+
paths.set(assetPath, raw);
|
|
251
|
+
count++;
|
|
252
|
+
count = this._processVariations(textureData, paths, map, animations, animationTimes, extension, count);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
if (!textureData.animKeys)
|
|
256
|
+
throw new Error("Texture must have supplied animKeys if frames are greater than 0.");
|
|
257
|
+
const rawData = textureData.rawData;
|
|
258
|
+
for (let i = 1; i <= textureData.frames; i++) {
|
|
259
|
+
const assetPath = this._getPath(textureData, `default-${i}`, extension);
|
|
260
|
+
let raw = false;
|
|
261
|
+
if (rawData) {
|
|
262
|
+
raw = rawData[i - 1];
|
|
263
|
+
}
|
|
264
|
+
if (textureData.base64) {
|
|
265
|
+
raw = textureData.base64[i - 1];
|
|
266
|
+
}
|
|
267
|
+
paths.set(assetPath, raw);
|
|
268
|
+
count++;
|
|
269
|
+
}
|
|
270
|
+
const trueKeys = [];
|
|
271
|
+
for (let i = 0; i < textureData.animKeys.length; i++) {
|
|
272
|
+
trueKeys.push(map[`${textureData.id}:default-${textureData.animKeys[i]}`]);
|
|
273
|
+
}
|
|
274
|
+
if (textureData.animKeyFrameTimes) {
|
|
275
|
+
animationTimes.push(textureData.animKeyFrameTimes);
|
|
276
|
+
}
|
|
277
|
+
if (textureData.globalFrameTime) {
|
|
278
|
+
animationTimes.push([textureData.globalFrameTime]);
|
|
279
|
+
}
|
|
280
|
+
animations.push(trueKeys);
|
|
281
|
+
count = this._processVariations(textureData, paths, map, animations, animationTimes, extension, count);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
segment.totalTextures = count;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColumnDataTool } from "../Data/WorldData/ColumnDataTool.js";
|
|
2
|
+
import { LocationBoundTool } from "../Classes/LocationBoundTool.js";
|
|
3
|
+
export declare class AnaylzerTool extends LocationBoundTool {
|
|
4
|
+
static columnDataTool: ColumnDataTool;
|
|
5
|
+
runUpdate(radius: number, onDone: Function): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Distance3D } from "@amodx/math/Vectors/Functions/Distance3d";
|
|
2
|
+
import { ColumnDataTool } from "../Data/WorldData/ColumnDataTool.js";
|
|
3
|
+
import { LocationBoundTool } from "../Classes/LocationBoundTool.js";
|
|
4
|
+
import { WorldRegister } from "../../Data/World/WorldRegister.js";
|
|
5
|
+
import { SafeInterval } from "@amodx/core/Intervals/SafeInterval.js";
|
|
6
|
+
export class AnaylzerTool extends LocationBoundTool {
|
|
7
|
+
static columnDataTool = new ColumnDataTool();
|
|
8
|
+
runUpdate(radius, onDone) {
|
|
9
|
+
const [dimension, sx, sy, sz] = this.location;
|
|
10
|
+
const dim = WorldRegister.instance.dimensions.get(dimension);
|
|
11
|
+
if (!dim)
|
|
12
|
+
return;
|
|
13
|
+
let totalColumns = 0;
|
|
14
|
+
for (const [key, region] of dim.regions) {
|
|
15
|
+
for (const [index, column] of region.columns) {
|
|
16
|
+
const [cx, cy, cz] = region.getColumnPosition(index);
|
|
17
|
+
if (Distance3D(sx, sy, sz, cx, cy, cz) > radius) {
|
|
18
|
+
totalColumns++;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const inte = new SafeInterval().setInterval(1).setOnRun(() => {
|
|
23
|
+
if (totalColumns == 0) {
|
|
24
|
+
inte.stop();
|
|
25
|
+
if (onDone)
|
|
26
|
+
onDone();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
inte.start();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrushTool } from "./Brush.js";
|
|
2
|
+
import { TaskRunModes, TaskTool } from "../Tasks/TasksTool.js";
|
|
3
|
+
export declare class AdvancedBrush extends BrushTool {
|
|
4
|
+
tasks: TaskTool;
|
|
5
|
+
mode: TaskRunModes;
|
|
6
|
+
setMode(mode: TaskRunModes): this;
|
|
7
|
+
paintAndAwaitUpdate(): Promise<unknown>;
|
|
8
|
+
eraseAndAwaitUpdate(): Promise<unknown>;
|
|
9
|
+
paintAndUpdate(onDone?: Function): void;
|
|
10
|
+
eraseAndUpdate(onDone?: Function): void;
|
|
11
|
+
update(onDone?: Function): void;
|
|
12
|
+
updateAndAwait(): Promise<unknown>;
|
|
13
|
+
explode(radius?: number, onDone?: Function): void;
|
|
14
|
+
explodeAwaitUpdate(radius?: number): Promise<unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//util
|
|
2
|
+
//tools
|
|
3
|
+
import { BrushTool } from "./Brush.js";
|
|
4
|
+
import { TaskTool } from "../Tasks/TasksTool.js";
|
|
5
|
+
export class AdvancedBrush extends BrushTool {
|
|
6
|
+
tasks = new TaskTool();
|
|
7
|
+
mode = "async";
|
|
8
|
+
setMode(mode) {
|
|
9
|
+
this.mode = mode;
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
paintAndAwaitUpdate() {
|
|
13
|
+
return new Promise((resolve) => {
|
|
14
|
+
this.paintAndUpdate(() => {
|
|
15
|
+
resolve(true);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
eraseAndAwaitUpdate() {
|
|
20
|
+
const self = this;
|
|
21
|
+
return new Promise((resolve) => {
|
|
22
|
+
self.eraseAndUpdate(() => {
|
|
23
|
+
resolve(true);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
paintAndUpdate(onDone) {
|
|
28
|
+
this.tasks.setFocalPoint(this.location);
|
|
29
|
+
this.tasks.voxelUpdate.paint.run(this.location, this.getRaw(), () => {
|
|
30
|
+
if (onDone)
|
|
31
|
+
onDone();
|
|
32
|
+
}, this.mode);
|
|
33
|
+
}
|
|
34
|
+
eraseAndUpdate(onDone) {
|
|
35
|
+
this.tasks.setFocalPoint(this.location);
|
|
36
|
+
this.tasks.voxelUpdate.erase.run(this.location, () => {
|
|
37
|
+
if (onDone)
|
|
38
|
+
onDone();
|
|
39
|
+
}, this.mode);
|
|
40
|
+
}
|
|
41
|
+
update(onDone) {
|
|
42
|
+
this.tasks.setFocalPoint(this.location);
|
|
43
|
+
this.tasks.voxelUpdate.update.run(this.location, this.getRaw(), () => {
|
|
44
|
+
if (onDone)
|
|
45
|
+
onDone();
|
|
46
|
+
}, this.mode);
|
|
47
|
+
}
|
|
48
|
+
updateAndAwait() {
|
|
49
|
+
return new Promise((resolve) => {
|
|
50
|
+
this.update(() => {
|
|
51
|
+
resolve(true);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
explode(radius = 6, onDone) {
|
|
56
|
+
this.tasks.setFocalPoint(this.location);
|
|
57
|
+
this.tasks.explosion.run(this.location, radius, () => {
|
|
58
|
+
if (onDone)
|
|
59
|
+
onDone();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
explodeAwaitUpdate(radius = 6) {
|
|
63
|
+
return new Promise((resolve) => {
|
|
64
|
+
this.explode(radius, () => {
|
|
65
|
+
resolve(true);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
2
|
+
import type { RawVoxelData } from "../../Data/Types/VoxelData.types.js";
|
|
3
|
+
import { WorldPainter } from "../../Data/World/WorldPainter.js";
|
|
4
|
+
import { LocationBoundTool } from "../Classes/LocationBoundTool.js";
|
|
5
|
+
import { AddVoxelData } from "../../Data/Types/WorldData.types.js";
|
|
6
|
+
export declare class BrushTool extends LocationBoundTool {
|
|
7
|
+
data: AddVoxelData;
|
|
8
|
+
name: string;
|
|
9
|
+
_worldPainter: WorldPainter;
|
|
10
|
+
_dt: DataTool;
|
|
11
|
+
setData(data: Partial<AddVoxelData>): this;
|
|
12
|
+
setId(id: string): this;
|
|
13
|
+
setName(name: string): this;
|
|
14
|
+
setDimension(dimensionId: string): this;
|
|
15
|
+
setSecondaryId(id: string): this;
|
|
16
|
+
setShapeState(state: number): this;
|
|
17
|
+
setLevel(level: number): this;
|
|
18
|
+
setLevelState(levelState: number): this;
|
|
19
|
+
setMod(mod: number): this;
|
|
20
|
+
clear(): void;
|
|
21
|
+
setRaw(data: RawVoxelData): this;
|
|
22
|
+
getRaw(): RawVoxelData;
|
|
23
|
+
getData(): AddVoxelData;
|
|
24
|
+
paint(): this;
|
|
25
|
+
erase(): this;
|
|
26
|
+
start(): this;
|
|
27
|
+
stop(): this;
|
|
28
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
2
|
+
import { WorldPainter } from "../../Data/World/WorldPainter.js";
|
|
3
|
+
import { WorldRegister } from "../../Data/World/WorldRegister.js";
|
|
4
|
+
import { VoxelPalette } from "../../Data/Voxel/VoxelPalette.js";
|
|
5
|
+
import { LocationBoundTool } from "../Classes/LocationBoundTool.js";
|
|
6
|
+
const air = "dve_air";
|
|
7
|
+
export class BrushTool extends LocationBoundTool {
|
|
8
|
+
data = {
|
|
9
|
+
id: air,
|
|
10
|
+
shapeState: 0,
|
|
11
|
+
secondaryVoxelId: air,
|
|
12
|
+
level: 0,
|
|
13
|
+
levelState: 0,
|
|
14
|
+
mod: 0,
|
|
15
|
+
};
|
|
16
|
+
name = air;
|
|
17
|
+
_worldPainter = new WorldPainter();
|
|
18
|
+
_dt = new DataTool();
|
|
19
|
+
setData(data) {
|
|
20
|
+
this.data.id = data.id ? data.id : air;
|
|
21
|
+
this.data.shapeState = data.shapeState ? data.shapeState : 0;
|
|
22
|
+
this.data.secondaryVoxelId = data.secondaryVoxelId
|
|
23
|
+
? data.secondaryVoxelId
|
|
24
|
+
: air;
|
|
25
|
+
this.data.level = data.level ? data.level : 0;
|
|
26
|
+
this.data.levelState = data.levelState ? data.levelState : 0;
|
|
27
|
+
this.data.mod = data.mod ? data.mod : 0;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
setId(id) {
|
|
31
|
+
this.data.id = id;
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
setName(name) {
|
|
35
|
+
this.data.id = VoxelPalette.name.getId(name);
|
|
36
|
+
this.name = name;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
setDimension(dimensionId) {
|
|
40
|
+
this.dimension = dimensionId;
|
|
41
|
+
this._dt.setDimension(dimensionId);
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
setSecondaryId(id) {
|
|
45
|
+
this.data.secondaryVoxelId = id;
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
setShapeState(state) {
|
|
49
|
+
this.data.shapeState = state;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
setLevel(level) {
|
|
53
|
+
this.data.level = level;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
setLevelState(levelState) {
|
|
57
|
+
this.data.levelState = levelState;
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
setMod(mod) {
|
|
61
|
+
this.data.mod = mod;
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
clear() {
|
|
65
|
+
this.data.id = "dve_air";
|
|
66
|
+
this.data.secondaryVoxelId = "dve_air";
|
|
67
|
+
this.data.level = 0;
|
|
68
|
+
this.data.levelState = 0;
|
|
69
|
+
this.data.shapeState = 0;
|
|
70
|
+
this.data.mod = 0;
|
|
71
|
+
this.x = 0;
|
|
72
|
+
this.y = 0;
|
|
73
|
+
this.z = 0;
|
|
74
|
+
}
|
|
75
|
+
setRaw(data) {
|
|
76
|
+
this._dt.loadInRaw(data);
|
|
77
|
+
this.data.id = this._dt.getStringId();
|
|
78
|
+
this.data.shapeState = this._dt.getShapeState();
|
|
79
|
+
this.data.levelState = this._dt.getLevelState();
|
|
80
|
+
this.data.level = this._dt.getLevel();
|
|
81
|
+
this._dt.setSecondary(true);
|
|
82
|
+
if (this._dt.data.secondaryId >= 2) {
|
|
83
|
+
this.data.secondaryVoxelId = this._dt.getStringId();
|
|
84
|
+
}
|
|
85
|
+
this._dt.setSecondary(false);
|
|
86
|
+
this.data.mod = this._dt.getMod();
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
getRaw() {
|
|
90
|
+
this._dt.setId(VoxelPalette.ids.getNumberId(this.data.id));
|
|
91
|
+
this._dt
|
|
92
|
+
.setSecondary(true)
|
|
93
|
+
.setId(VoxelPalette.ids.getNumberId(this.data.secondaryVoxelId))
|
|
94
|
+
.setSecondary(false);
|
|
95
|
+
this._dt.setLevel(this.data.level);
|
|
96
|
+
this._dt.setLevelState(this.data.levelState);
|
|
97
|
+
this._dt.setShapeState(this.data.shapeState);
|
|
98
|
+
this._dt.data.raw[3] == -1 ? (this._dt.data.raw[3] = 0) : false;
|
|
99
|
+
this._dt.data.raw[4] = this.data.mod;
|
|
100
|
+
return this._dt.data.raw;
|
|
101
|
+
}
|
|
102
|
+
getData() {
|
|
103
|
+
return this.data;
|
|
104
|
+
}
|
|
105
|
+
paint() {
|
|
106
|
+
this._worldPainter.dimenion = this.dimension;
|
|
107
|
+
this._worldPainter.data = this.data;
|
|
108
|
+
this._worldPainter.paintVoxel(this.x, this.y, this.z);
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
erase() {
|
|
112
|
+
this._worldPainter.dimenion = this.dimension;
|
|
113
|
+
this._worldPainter.eraseVoxel(this.x, this.y, this.z);
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
start() {
|
|
117
|
+
WorldRegister.instance.cache.enable();
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
stop() {
|
|
121
|
+
WorldRegister.instance.cache.disable();
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RemoteBinaryStruct } from "@amodx/binary/";
|
|
2
|
+
import type { LocationData } from "../../Math";
|
|
3
|
+
import { DimensionsRegister } from "../../Data/World/DimensionsRegister.js";
|
|
4
|
+
import { LocationBoundTool } from "./LocationBoundTool.js";
|
|
5
|
+
import { Vector3Like, Vec3Array } from "@amodx/math";
|
|
6
|
+
export declare abstract class DataToolBase extends LocationBoundTool {
|
|
7
|
+
struct: RemoteBinaryStruct;
|
|
8
|
+
_c: ArrayBuffer | SharedArrayBuffer | DataView;
|
|
9
|
+
_dimensionRegister: DimensionsRegister;
|
|
10
|
+
constructor();
|
|
11
|
+
getStructValue(id: string): number;
|
|
12
|
+
setTagValue(id: string, value: number): boolean;
|
|
13
|
+
getArrayTagValue(id: string, index: number): number;
|
|
14
|
+
setArrayTagValue(id: string, index: number, value: number): number | void;
|
|
15
|
+
setBuffer(buffer: ArrayBuffer | DataView | SharedArrayBuffer): void;
|
|
16
|
+
getBuffer(): ArrayBuffer;
|
|
17
|
+
getAsArrayBuffer(): ArrayBuffer;
|
|
18
|
+
getBufferSize(): number;
|
|
19
|
+
abstract loadIn(): boolean;
|
|
20
|
+
loadInAt(x: number, y: number, z: number): boolean;
|
|
21
|
+
loadInVec3Array(vec3: Vec3Array): boolean;
|
|
22
|
+
loadInVec3(vec3: Vector3Like): boolean;
|
|
23
|
+
loadInAtLocation(location: LocationData): boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare abstract class EncodedPositionDataTool extends DataToolBase {
|
|
26
|
+
position: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
z: number;
|
|
30
|
+
};
|
|
31
|
+
constructor();
|
|
32
|
+
getPositionData(): {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
z: number;
|
|
36
|
+
};
|
|
37
|
+
setPositionData(x: number, y: number, z: number): {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
z: number;
|
|
41
|
+
};
|
|
42
|
+
getLocationData(): LocationData;
|
|
43
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
;
|
|
2
|
+
import { DimensionsRegister } from "../../Data/World/DimensionsRegister.js";
|
|
3
|
+
import { LocationBoundTool } from "./LocationBoundTool.js";
|
|
4
|
+
import { WorldDataStructProperties } from "../../Data/Constants/Structs/WorldDataStructProperties.js";
|
|
5
|
+
import { arrayBufferToSharedArrayBuffer } from "@amodx/core/Buffers/arrayBufferToSharedArrayBuffer.js";
|
|
6
|
+
export class DataToolBase extends LocationBoundTool {
|
|
7
|
+
struct;
|
|
8
|
+
_c;
|
|
9
|
+
_dimensionRegister = new DimensionsRegister();
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
getStructValue(id) {
|
|
14
|
+
this.struct.setBuffer(this._c);
|
|
15
|
+
return this.struct.getProperty(id);
|
|
16
|
+
}
|
|
17
|
+
setTagValue(id, value) {
|
|
18
|
+
this.struct.setBuffer(this._c);
|
|
19
|
+
return this.struct.setProperty(id, value);
|
|
20
|
+
}
|
|
21
|
+
getArrayTagValue(id, index) {
|
|
22
|
+
this.struct.setBuffer(this._c);
|
|
23
|
+
return this.struct.getArrayPropertyValue(id, index);
|
|
24
|
+
}
|
|
25
|
+
setArrayTagValue(id, index, value) {
|
|
26
|
+
this.struct.setBuffer(this._c);
|
|
27
|
+
return this.struct.setArrayPropertyValue(id, index, value);
|
|
28
|
+
}
|
|
29
|
+
setBuffer(buffer) {
|
|
30
|
+
this._c = buffer;
|
|
31
|
+
this.struct.setBuffer(this._c);
|
|
32
|
+
}
|
|
33
|
+
getBuffer() {
|
|
34
|
+
if (this._c instanceof DataView)
|
|
35
|
+
return this._c.buffer;
|
|
36
|
+
return this._c;
|
|
37
|
+
}
|
|
38
|
+
getAsArrayBuffer() {
|
|
39
|
+
const buffer = this.getBuffer();
|
|
40
|
+
if (buffer instanceof ArrayBuffer)
|
|
41
|
+
return buffer;
|
|
42
|
+
return arrayBufferToSharedArrayBuffer(this.getBuffer());
|
|
43
|
+
}
|
|
44
|
+
getBufferSize() {
|
|
45
|
+
return this.struct.getBuffer().byteLength;
|
|
46
|
+
}
|
|
47
|
+
loadInAt(x, y, z) {
|
|
48
|
+
this.setXYZ(x, y, z);
|
|
49
|
+
return this.loadIn();
|
|
50
|
+
}
|
|
51
|
+
loadInVec3Array(vec3) {
|
|
52
|
+
this.setXYZ(vec3[0], vec3[1], vec3[2]);
|
|
53
|
+
return this.loadIn();
|
|
54
|
+
}
|
|
55
|
+
loadInVec3(vec3) {
|
|
56
|
+
this.setXYZ(vec3.x, vec3.y, vec3.z);
|
|
57
|
+
return this.loadIn();
|
|
58
|
+
}
|
|
59
|
+
loadInAtLocation(location) {
|
|
60
|
+
this.setLocation(location);
|
|
61
|
+
return this.loadIn();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class EncodedPositionDataTool extends DataToolBase {
|
|
65
|
+
position = { x: 0, y: 0, z: 0 };
|
|
66
|
+
constructor() {
|
|
67
|
+
super();
|
|
68
|
+
}
|
|
69
|
+
getPositionData() {
|
|
70
|
+
this.position.x = this.getStructValue(WorldDataStructProperties.positionX);
|
|
71
|
+
this.position.y = this.getStructValue(WorldDataStructProperties.positionY);
|
|
72
|
+
this.position.z = this.getStructValue(WorldDataStructProperties.positionZ);
|
|
73
|
+
return this.position;
|
|
74
|
+
}
|
|
75
|
+
setPositionData(x, y, z) {
|
|
76
|
+
this.setTagValue(WorldDataStructProperties.positionX, x);
|
|
77
|
+
this.setTagValue(WorldDataStructProperties.positionY, y);
|
|
78
|
+
this.setTagValue(WorldDataStructProperties.positionZ, z);
|
|
79
|
+
return this.position;
|
|
80
|
+
}
|
|
81
|
+
getLocationData() {
|
|
82
|
+
const pos = this.getPositionData();
|
|
83
|
+
return [this.dimension, pos.x, pos.y, pos.z];
|
|
84
|
+
}
|
|
85
|
+
}
|