@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,186 @@
|
|
|
1
|
+
import { DVEMesher } from "../Mesher.js";
|
|
2
|
+
import { VoxelFaceDirections, VoxelFaces } from "../../Math/index.js";
|
|
3
|
+
/*
|
|
4
|
+
0 -> normal direction
|
|
5
|
+
1 -> top right
|
|
6
|
+
2 -> top left
|
|
7
|
+
*/
|
|
8
|
+
const uvsSets = {
|
|
9
|
+
//top bottom faces
|
|
10
|
+
north: {
|
|
11
|
+
0b0: 0,
|
|
12
|
+
0b101: 1,
|
|
13
|
+
0b011: 2,
|
|
14
|
+
0b001: 3,
|
|
15
|
+
},
|
|
16
|
+
south: {
|
|
17
|
+
0b0: 4,
|
|
18
|
+
0b101: 5,
|
|
19
|
+
0b011: 6,
|
|
20
|
+
0b001: 7,
|
|
21
|
+
},
|
|
22
|
+
east: {
|
|
23
|
+
0b0: 8,
|
|
24
|
+
},
|
|
25
|
+
west: {
|
|
26
|
+
0b0: 9,
|
|
27
|
+
},
|
|
28
|
+
//side faces
|
|
29
|
+
top: {
|
|
30
|
+
0b0: 0,
|
|
31
|
+
0b101: 1,
|
|
32
|
+
0b011: 2,
|
|
33
|
+
0b001: 3,
|
|
34
|
+
},
|
|
35
|
+
bottom: {
|
|
36
|
+
0b0: 4,
|
|
37
|
+
0b101: 5,
|
|
38
|
+
0b011: 6,
|
|
39
|
+
0b001: 7,
|
|
40
|
+
},
|
|
41
|
+
right: {
|
|
42
|
+
0b0: 8,
|
|
43
|
+
},
|
|
44
|
+
left: {
|
|
45
|
+
0b0: 9,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const topAndDown = {
|
|
49
|
+
north: [
|
|
50
|
+
[0, 0, 1],
|
|
51
|
+
[1, 0, 1],
|
|
52
|
+
[-1, 0, 1],
|
|
53
|
+
],
|
|
54
|
+
south: [
|
|
55
|
+
[0, 0, -1],
|
|
56
|
+
[1, 0, -1],
|
|
57
|
+
[-1, 0, -1],
|
|
58
|
+
],
|
|
59
|
+
east: [[1, 0, 0]],
|
|
60
|
+
west: [[-1, 0, 0]],
|
|
61
|
+
};
|
|
62
|
+
const eastAndWest = {
|
|
63
|
+
top: [
|
|
64
|
+
[0, 1, 0],
|
|
65
|
+
[0, 1, 1],
|
|
66
|
+
[0, 1, -1],
|
|
67
|
+
],
|
|
68
|
+
bottom: [
|
|
69
|
+
[0, -1, 0],
|
|
70
|
+
[0, -1, 1],
|
|
71
|
+
[0, -1, -1],
|
|
72
|
+
],
|
|
73
|
+
right: [[0, 0, 1]],
|
|
74
|
+
left: [[0, 0, -1]],
|
|
75
|
+
};
|
|
76
|
+
const northAndSouth = {
|
|
77
|
+
top: [
|
|
78
|
+
[0, 1, 0],
|
|
79
|
+
[1, 1, 0],
|
|
80
|
+
[-1, 1, 0],
|
|
81
|
+
],
|
|
82
|
+
bottom: [
|
|
83
|
+
[0, -1, 0],
|
|
84
|
+
[1, -1, 0],
|
|
85
|
+
[-1, -1, 0],
|
|
86
|
+
],
|
|
87
|
+
right: [[1, 0, 0]],
|
|
88
|
+
left: [[-1, 0, 0]],
|
|
89
|
+
};
|
|
90
|
+
const CheckSets = {
|
|
91
|
+
[VoxelFaces.Up]: topAndDown,
|
|
92
|
+
[VoxelFaces.Down]: topAndDown,
|
|
93
|
+
[VoxelFaces.East]: eastAndWest,
|
|
94
|
+
[VoxelFaces.West]: eastAndWest,
|
|
95
|
+
[VoxelFaces.North]: northAndSouth,
|
|
96
|
+
[VoxelFaces.South]: northAndSouth,
|
|
97
|
+
};
|
|
98
|
+
const generateCheck = (direction, tool, normal, sets) => {
|
|
99
|
+
const { x, y, z } = tool.voxel;
|
|
100
|
+
let key = 0b0;
|
|
101
|
+
for (let i = 0; i < sets.length; i++) {
|
|
102
|
+
const set = sets[i];
|
|
103
|
+
const cx = x + set[0];
|
|
104
|
+
const cy = y + set[1];
|
|
105
|
+
const cz = z + set[2];
|
|
106
|
+
tool.nVoxel.loadInAt(cx, cy, cz);
|
|
107
|
+
const sameLevelCheck = tool.voxel.isSameVoxel(tool.nVoxel);
|
|
108
|
+
let normalCheck = true;
|
|
109
|
+
if (tool.nVoxel.loadInAt(cx + normal[0], cy + normal[1], cz + normal[2])) {
|
|
110
|
+
if (tool.nVoxel.isRenderable() && tool.nVoxel.isOpaque()) {
|
|
111
|
+
normalCheck = false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (sameLevelCheck && normalCheck) {
|
|
115
|
+
key |= 0b1 << i;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
key |= 0b0 << i;
|
|
119
|
+
if (i == 0)
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (uvsSets[direction][key] == undefined)
|
|
124
|
+
return 0;
|
|
125
|
+
const index = uvsSets[direction][key];
|
|
126
|
+
return OutlinedVoxelTool._currentTexts[index];
|
|
127
|
+
};
|
|
128
|
+
export class OutlinedVoxelTool {
|
|
129
|
+
static _currentTexts = [];
|
|
130
|
+
static setCurrentTextures(textures) {
|
|
131
|
+
this._currentTexts = textures;
|
|
132
|
+
}
|
|
133
|
+
static addTo = {
|
|
134
|
+
top: (tool) => {
|
|
135
|
+
const normal = VoxelFaceDirections[VoxelFaces.Up];
|
|
136
|
+
const set = CheckSets[VoxelFaces.Up];
|
|
137
|
+
tool
|
|
138
|
+
.getOverlayTextures()
|
|
139
|
+
.set(generateCheck("north", tool, normal, set.north), generateCheck("south", tool, normal, set.south), generateCheck("east", tool, normal, set.east), generateCheck("west", tool, normal, set.west));
|
|
140
|
+
},
|
|
141
|
+
bottom: (tool) => {
|
|
142
|
+
const normal = VoxelFaceDirections[VoxelFaces.Down];
|
|
143
|
+
const set = CheckSets[VoxelFaces.Down];
|
|
144
|
+
tool
|
|
145
|
+
.getOverlayTextures()
|
|
146
|
+
.set(generateCheck("north", tool, normal, set.north), generateCheck("south", tool, normal, set.south), generateCheck("east", tool, normal, set.east), generateCheck("west", tool, normal, set.west));
|
|
147
|
+
},
|
|
148
|
+
north: (tool) => {
|
|
149
|
+
const normal = VoxelFaceDirections[VoxelFaces.North];
|
|
150
|
+
const set = CheckSets[VoxelFaces.North];
|
|
151
|
+
tool
|
|
152
|
+
.getOverlayTextures()
|
|
153
|
+
.set(generateCheck("top", tool, normal, set.top), generateCheck("bottom", tool, normal, set.bottom), generateCheck("left", tool, normal, set.left), generateCheck("right", tool, normal, set.right));
|
|
154
|
+
},
|
|
155
|
+
south: (tool) => {
|
|
156
|
+
const normal = VoxelFaceDirections[VoxelFaces.South];
|
|
157
|
+
const set = CheckSets[VoxelFaces.South];
|
|
158
|
+
tool
|
|
159
|
+
.getOverlayTextures()
|
|
160
|
+
.set(generateCheck("top", tool, normal, set.top), generateCheck("bottom", tool, normal, set.bottom), generateCheck("left", tool, normal, set.left), generateCheck("right", tool, normal, set.right));
|
|
161
|
+
},
|
|
162
|
+
east: (tool) => {
|
|
163
|
+
const normal = VoxelFaceDirections[VoxelFaces.East];
|
|
164
|
+
const set = CheckSets[VoxelFaces.East];
|
|
165
|
+
tool
|
|
166
|
+
.getOverlayTextures()
|
|
167
|
+
.set(generateCheck("top", tool, normal, set.top), generateCheck("bottom", tool, normal, set.bottom), generateCheck("left", tool, normal, set.left), generateCheck("right", tool, normal, set.right));
|
|
168
|
+
},
|
|
169
|
+
west: (tool) => {
|
|
170
|
+
const normal = VoxelFaceDirections[VoxelFaces.West];
|
|
171
|
+
const set = CheckSets[VoxelFaces.West];
|
|
172
|
+
tool
|
|
173
|
+
.getOverlayTextures()
|
|
174
|
+
.set(generateCheck("top", tool, normal, set.top), generateCheck("bottom", tool, normal, set.bottom), generateCheck("left", tool, normal, set.left), generateCheck("right", tool, normal, set.right));
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
static getOutlineUVs(texture, onRegister) {
|
|
178
|
+
const overlayTextures = [];
|
|
179
|
+
DVEMesher.observers.texturesRegistered.subscribeOnce((textureManager) => {
|
|
180
|
+
const type = texture[0];
|
|
181
|
+
const id = texture[1];
|
|
182
|
+
overlayTextures.push(textureManager.getTextureUV([type, id, "top"], true) /** */, textureManager.getTextureUV([type, id, "corner-top-right"], true), textureManager.getTextureUV([type, id, "corner-top-left"], true), textureManager.getTextureUV([type, id, "corner-top-left-top-right"], true), textureManager.getTextureUV([type, id, "bottom"], true), textureManager.getTextureUV([type, id, "corner-bottom-right"], true), textureManager.getTextureUV([type, id, "corner-bottom-left"], true), textureManager.getTextureUV([type, id, "corner-bottom-left-bottom-right"], true), textureManager.getTextureUV([type, id, "right"], true), textureManager.getTextureUV([type, id, "left"], true));
|
|
183
|
+
onRegister(overlayTextures);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FaceDataOverride } from "../Types/Override.types";
|
|
2
|
+
import { BuilderDataTool } from "./BuilderDataTool.js";
|
|
3
|
+
import { MesherDataTool } from "@amodx/meshing/Tools/MesherDataTools";
|
|
4
|
+
import { QuadScalarVertexData } from "@amodx/meshing/Classes/QuadVertexData";
|
|
5
|
+
import { VoxelTemplateDataTool } from "./VoxelTemplateDataTool.js";
|
|
6
|
+
import { VoxelFaces } from "../../Math";
|
|
7
|
+
import { QuadVerticies } from "@amodx/meshing/Geometry.types";
|
|
8
|
+
export declare class VoxelMesherDataTool extends MesherDataTool {
|
|
9
|
+
template: VoxelTemplateDataTool;
|
|
10
|
+
voxel: BuilderDataTool;
|
|
11
|
+
nVoxel: BuilderDataTool;
|
|
12
|
+
dataCalculated: Record<VoxelFaces, boolean>;
|
|
13
|
+
condiotnalGeometryData: Record<VoxelFaces, Record<QuadVerticies, [number[][], number[][], number[][]]>>;
|
|
14
|
+
lightData: Record<VoxelFaces, Record<QuadVerticies, number>>;
|
|
15
|
+
faceDataOverride: FaceDataOverride;
|
|
16
|
+
constructor();
|
|
17
|
+
calculateFaceData(direction: VoxelFaces): true | undefined;
|
|
18
|
+
clearCalculatedData(): void;
|
|
19
|
+
calculateLight(direction: VoxelFaces, ignoreAO?: boolean): void;
|
|
20
|
+
calculateFlow(): void;
|
|
21
|
+
getAnimationData(): QuadScalarVertexData;
|
|
22
|
+
getWorldLight(): QuadScalarVertexData;
|
|
23
|
+
getWorldAO(): QuadScalarVertexData;
|
|
24
|
+
getWorldLevel(): QuadScalarVertexData;
|
|
25
|
+
getOverlayTextures(): QuadScalarVertexData;
|
|
26
|
+
setTexture(uv: number): this;
|
|
27
|
+
getTexture(): number;
|
|
28
|
+
setFaceFlipped(value: boolean): this;
|
|
29
|
+
isFaceFlipped(): boolean;
|
|
30
|
+
isFaceExposed(face: VoxelFaces): boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
//objects
|
|
2
|
+
import { LightGradient } from "../Calc/Light/LightGradient.js";
|
|
3
|
+
import { FlowGradient } from "../Calc/Flow/FlowGradient.js";
|
|
4
|
+
import { OverrideManager } from "../Rules/Overrides/OverridesManager.js";
|
|
5
|
+
import { SubstanceRules } from "../Rules/SubstanceRules.js";
|
|
6
|
+
//tools
|
|
7
|
+
import { BuilderDataTool } from "./BuilderDataTool.js";
|
|
8
|
+
import { MesherDataTool } from "@amodx/meshing/Tools/MesherDataTools";
|
|
9
|
+
//data
|
|
10
|
+
import { QuadScalarVertexData } from "@amodx/meshing/Classes/QuadVertexData";
|
|
11
|
+
import { VoxelTemplateDataTool } from "./VoxelTemplateDataTool.js";
|
|
12
|
+
import { BinaryNumberTypes } from "@amodx/binary";
|
|
13
|
+
import { VoxelFaces, VoxelFaceDirections, VoxelFacesArray, } from "../../Math";
|
|
14
|
+
import { QuadVerticies } from "@amodx/meshing/Geometry.types";
|
|
15
|
+
import { FaceDataCalc } from "../Calc/Light/FaceDataCalc";
|
|
16
|
+
export class VoxelMesherDataTool extends MesherDataTool {
|
|
17
|
+
template = new VoxelTemplateDataTool();
|
|
18
|
+
voxel = new BuilderDataTool();
|
|
19
|
+
nVoxel = new BuilderDataTool();
|
|
20
|
+
dataCalculated;
|
|
21
|
+
condiotnalGeometryData;
|
|
22
|
+
lightData;
|
|
23
|
+
faceDataOverride = {
|
|
24
|
+
face: VoxelFaces.South,
|
|
25
|
+
default: false,
|
|
26
|
+
currentVoxel: {},
|
|
27
|
+
neighborVoxel: {},
|
|
28
|
+
};
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
this.faceDataOverride.currentVoxel = this.voxel;
|
|
32
|
+
this.faceDataOverride.neighborVoxel = this.nVoxel;
|
|
33
|
+
this.dataCalculated = [];
|
|
34
|
+
for (const face of VoxelFacesArray) {
|
|
35
|
+
this.dataCalculated[face] = false;
|
|
36
|
+
}
|
|
37
|
+
this.condiotnalGeometryData = [];
|
|
38
|
+
for (const face of VoxelFacesArray) {
|
|
39
|
+
this.condiotnalGeometryData[face] = [];
|
|
40
|
+
this.condiotnalGeometryData[face][QuadVerticies.TopRight] = [[], [], []];
|
|
41
|
+
this.condiotnalGeometryData[face][QuadVerticies.TopLeft] = [[], [], []];
|
|
42
|
+
this.condiotnalGeometryData[face][QuadVerticies.BottomLeft] = [
|
|
43
|
+
[],
|
|
44
|
+
[],
|
|
45
|
+
[],
|
|
46
|
+
];
|
|
47
|
+
this.condiotnalGeometryData[face][QuadVerticies.BottomRight] = [
|
|
48
|
+
[],
|
|
49
|
+
[],
|
|
50
|
+
[],
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
this.lightData = [];
|
|
54
|
+
for (const face of VoxelFacesArray) {
|
|
55
|
+
this.lightData[face] = [];
|
|
56
|
+
this.lightData[face][QuadVerticies.TopRight] = 0;
|
|
57
|
+
this.lightData[face][QuadVerticies.TopLeft] = 0;
|
|
58
|
+
this.lightData[face][QuadVerticies.BottomLeft] = 0;
|
|
59
|
+
this.lightData[face][QuadVerticies.BottomRight] = 0;
|
|
60
|
+
}
|
|
61
|
+
[
|
|
62
|
+
["voxelData", [[], 1, BinaryNumberTypes.Float32]],
|
|
63
|
+
["uv", [[], 2, BinaryNumberTypes.Float32]],
|
|
64
|
+
["textureIndex", [[], 3, BinaryNumberTypes.Float32]],
|
|
65
|
+
["colors", [[], 3, BinaryNumberTypes.Float32]],
|
|
66
|
+
].forEach(([key, data]) => this.attributes.set(key, data));
|
|
67
|
+
[
|
|
68
|
+
["light", new QuadScalarVertexData()],
|
|
69
|
+
["ao", new QuadScalarVertexData()],
|
|
70
|
+
["animation", new QuadScalarVertexData()],
|
|
71
|
+
["level", new QuadScalarVertexData()],
|
|
72
|
+
["overlay-uvs", new QuadScalarVertexData()],
|
|
73
|
+
].forEach(([key, data]) => this.quadVertexData.set(key, data));
|
|
74
|
+
[
|
|
75
|
+
["face-flipped", 0],
|
|
76
|
+
["texture-index", 0],
|
|
77
|
+
].forEach(([key, data]) => this.vars.set(key, data));
|
|
78
|
+
}
|
|
79
|
+
calculateFaceData(direction) {
|
|
80
|
+
if (this.dataCalculated[direction])
|
|
81
|
+
return true;
|
|
82
|
+
FaceDataCalc.calculate(direction, this);
|
|
83
|
+
this.dataCalculated[direction] = true;
|
|
84
|
+
}
|
|
85
|
+
clearCalculatedData() {
|
|
86
|
+
this.dataCalculated[VoxelFaces.Up] = false;
|
|
87
|
+
this.dataCalculated[VoxelFaces.Down] = false;
|
|
88
|
+
this.dataCalculated[VoxelFaces.North] = false;
|
|
89
|
+
this.dataCalculated[VoxelFaces.South] = false;
|
|
90
|
+
this.dataCalculated[VoxelFaces.East] = false;
|
|
91
|
+
this.dataCalculated[VoxelFaces.West] = false;
|
|
92
|
+
}
|
|
93
|
+
calculateLight(direction, ignoreAO = false) {
|
|
94
|
+
/* if (this.template.isAcive()) {
|
|
95
|
+
this.template._light = this.template._lights[direction];
|
|
96
|
+
this.template._ao = this.template._aos[direction];
|
|
97
|
+
return;
|
|
98
|
+
} */
|
|
99
|
+
LightGradient.calculate(direction, this, ignoreAO);
|
|
100
|
+
}
|
|
101
|
+
calculateFlow() {
|
|
102
|
+
if (this.template.isAcive()) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
FlowGradient.calculate(this);
|
|
106
|
+
}
|
|
107
|
+
getAnimationData() {
|
|
108
|
+
return this.quadVertexData.get("animation");
|
|
109
|
+
}
|
|
110
|
+
getWorldLight() {
|
|
111
|
+
if (this.template.isAcive()) {
|
|
112
|
+
return this.template._light;
|
|
113
|
+
}
|
|
114
|
+
return this.quadVertexData.get("light");
|
|
115
|
+
}
|
|
116
|
+
getWorldAO() {
|
|
117
|
+
if (this.template.isAcive()) {
|
|
118
|
+
return this.template._ao;
|
|
119
|
+
}
|
|
120
|
+
return this.quadVertexData.get("ao");
|
|
121
|
+
}
|
|
122
|
+
getWorldLevel() {
|
|
123
|
+
if (this.template.isAcive()) {
|
|
124
|
+
return this.template._level;
|
|
125
|
+
}
|
|
126
|
+
return this.quadVertexData.get("level");
|
|
127
|
+
}
|
|
128
|
+
getOverlayTextures() {
|
|
129
|
+
return this.quadVertexData.get("overlay-uvs");
|
|
130
|
+
}
|
|
131
|
+
setTexture(uv) {
|
|
132
|
+
this.vars.set("texture-index", uv);
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
getTexture() {
|
|
136
|
+
return this.vars.get("texture-index");
|
|
137
|
+
}
|
|
138
|
+
setFaceFlipped(value) {
|
|
139
|
+
this.vars.set("face-flipped", value ? 1 : 0);
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
isFaceFlipped() {
|
|
143
|
+
return this.vars.get("face-flipped") == 1;
|
|
144
|
+
}
|
|
145
|
+
isFaceExposed(face) {
|
|
146
|
+
/* if (this.template.isAcive()) {
|
|
147
|
+
return this.template.isFaceExposed(face);
|
|
148
|
+
} */
|
|
149
|
+
const voxelExists = this.nVoxel.loadInAt(VoxelFaceDirections[face][0] + this.voxel.x, VoxelFaceDirections[face][1] + this.voxel.y, VoxelFaceDirections[face][2] + this.voxel.z);
|
|
150
|
+
if (!voxelExists || !this.nVoxel.isRenderable())
|
|
151
|
+
return true;
|
|
152
|
+
let finalResult = false;
|
|
153
|
+
let substanceRuleResult = SubstanceRules.exposedCheck(this.voxel.getSubstance(), this.nVoxel.getSubstance());
|
|
154
|
+
this.faceDataOverride.face = face;
|
|
155
|
+
this.faceDataOverride.default = substanceRuleResult;
|
|
156
|
+
finalResult = substanceRuleResult;
|
|
157
|
+
this.faceDataOverride.default = finalResult;
|
|
158
|
+
finalResult = OverrideManager.FaceExposedShapeCheck.run(this.voxel.getShapeId(), OverrideManager.ANY, this.faceDataOverride);
|
|
159
|
+
this.faceDataOverride.default = finalResult;
|
|
160
|
+
finalResult = OverrideManager.FaceExposedShapeCheck.run(this.voxel.getShapeId(), this.nVoxel.getShapeId(), this.faceDataOverride);
|
|
161
|
+
this.faceDataOverride.default = finalResult;
|
|
162
|
+
finalResult = OverrideManager.FaceExposedVoxelCheck.run(this.voxel.getId(true), OverrideManager.ANY, this.faceDataOverride);
|
|
163
|
+
finalResult = OverrideManager.FaceExposedVoxelCheck.run(this.voxel.getId(true), this.nVoxel.getId(true), this.faceDataOverride);
|
|
164
|
+
return finalResult;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DirectionNames } from "../../Types/Util.types.js";
|
|
2
|
+
import { QuadScalarVertexData } from "@amodx/meshing/Classes/QuadVertexData";
|
|
3
|
+
export declare class VoxelTemplateDataTool {
|
|
4
|
+
_active: boolean;
|
|
5
|
+
_faces: Record<DirectionNames, number>;
|
|
6
|
+
_lights: Record<DirectionNames, QuadScalarVertexData>;
|
|
7
|
+
_aos: Record<DirectionNames, QuadScalarVertexData>;
|
|
8
|
+
_light: QuadScalarVertexData;
|
|
9
|
+
_level: QuadScalarVertexData;
|
|
10
|
+
_ao: QuadScalarVertexData;
|
|
11
|
+
isAcive(): boolean;
|
|
12
|
+
setActive(active: boolean): void;
|
|
13
|
+
load(template: Uint32Array, index: number): void;
|
|
14
|
+
isFaceExposed(face: DirectionNames): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//data
|
|
2
|
+
import { QuadScalarVertexData } from "@amodx/meshing/Classes/QuadVertexData";
|
|
3
|
+
export class VoxelTemplateDataTool {
|
|
4
|
+
_active = false;
|
|
5
|
+
_faces = {
|
|
6
|
+
up: 0,
|
|
7
|
+
down: 0,
|
|
8
|
+
west: 0,
|
|
9
|
+
east: 0,
|
|
10
|
+
north: 0,
|
|
11
|
+
south: 0,
|
|
12
|
+
};
|
|
13
|
+
_lights = {
|
|
14
|
+
up: new QuadScalarVertexData(),
|
|
15
|
+
down: new QuadScalarVertexData(),
|
|
16
|
+
west: new QuadScalarVertexData(),
|
|
17
|
+
east: new QuadScalarVertexData(),
|
|
18
|
+
north: new QuadScalarVertexData(),
|
|
19
|
+
south: new QuadScalarVertexData(),
|
|
20
|
+
};
|
|
21
|
+
_aos = {
|
|
22
|
+
up: new QuadScalarVertexData(),
|
|
23
|
+
down: new QuadScalarVertexData(),
|
|
24
|
+
west: new QuadScalarVertexData(),
|
|
25
|
+
east: new QuadScalarVertexData(),
|
|
26
|
+
north: new QuadScalarVertexData(),
|
|
27
|
+
south: new QuadScalarVertexData(),
|
|
28
|
+
};
|
|
29
|
+
_light = new QuadScalarVertexData();
|
|
30
|
+
_level = new QuadScalarVertexData();
|
|
31
|
+
_ao = new QuadScalarVertexData();
|
|
32
|
+
isAcive() {
|
|
33
|
+
return this._active;
|
|
34
|
+
}
|
|
35
|
+
setActive(active) {
|
|
36
|
+
this._active = active;
|
|
37
|
+
}
|
|
38
|
+
load(template, index) {
|
|
39
|
+
const segment2 = template[index + 1];
|
|
40
|
+
const faceByte = segment2 & 0xff;
|
|
41
|
+
this._faces.up = (faceByte & (0b1 << 0)) >> 0;
|
|
42
|
+
this._faces.down = (faceByte & (0b1 << 1)) >> 1;
|
|
43
|
+
this._faces.west = (faceByte & (0b1 << 2)) >> 2;
|
|
44
|
+
this._faces.east = (faceByte & (0b1 << 3)) >> 3;
|
|
45
|
+
this._faces.north = (faceByte & (0b1 << 4)) >> 4;
|
|
46
|
+
this._faces.south = (faceByte & (0b1 << 5)) >> 5;
|
|
47
|
+
//deocde light
|
|
48
|
+
let lightIndex = index + 2;
|
|
49
|
+
{
|
|
50
|
+
const light1 = template[lightIndex];
|
|
51
|
+
const light2 = template[lightIndex + 1];
|
|
52
|
+
this._lights.up.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
53
|
+
}
|
|
54
|
+
{
|
|
55
|
+
const light1 = template[lightIndex + 2];
|
|
56
|
+
const light2 = template[lightIndex + 3];
|
|
57
|
+
this._lights.down.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
58
|
+
}
|
|
59
|
+
{
|
|
60
|
+
const light1 = template[lightIndex + 4];
|
|
61
|
+
const light2 = template[lightIndex + 5];
|
|
62
|
+
this._lights.west.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
63
|
+
}
|
|
64
|
+
{
|
|
65
|
+
const light1 = template[lightIndex + 6];
|
|
66
|
+
const light2 = template[lightIndex + 7];
|
|
67
|
+
this._lights.east.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
68
|
+
}
|
|
69
|
+
{
|
|
70
|
+
const light1 = template[lightIndex + 8];
|
|
71
|
+
const light2 = template[lightIndex + 9];
|
|
72
|
+
this._lights.north.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
73
|
+
}
|
|
74
|
+
{
|
|
75
|
+
const light1 = template[lightIndex + 10];
|
|
76
|
+
const light2 = template[lightIndex + 11];
|
|
77
|
+
this._lights.south.set(light1 & 0xffff, ((0xffff << 16) & light1) >>> 16, light2 & 0xffff, ((0xffff << 16) & light2) >>> 16);
|
|
78
|
+
}
|
|
79
|
+
let aoIndex = lightIndex + 12;
|
|
80
|
+
//decode ao
|
|
81
|
+
{
|
|
82
|
+
const ao = template[aoIndex];
|
|
83
|
+
this._aos.up.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
84
|
+
}
|
|
85
|
+
{
|
|
86
|
+
const ao = ((0xffff << 16) & template[aoIndex]) >> 16;
|
|
87
|
+
this._aos.down.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
88
|
+
}
|
|
89
|
+
{
|
|
90
|
+
const ao = template[aoIndex + 1];
|
|
91
|
+
this._aos.west.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
92
|
+
}
|
|
93
|
+
{
|
|
94
|
+
const ao = ((0xffff << 16) & template[aoIndex + 1]) >> 16;
|
|
95
|
+
this._aos.east.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
96
|
+
}
|
|
97
|
+
{
|
|
98
|
+
const ao = template[aoIndex + 2];
|
|
99
|
+
this._aos.north.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
100
|
+
}
|
|
101
|
+
{
|
|
102
|
+
const ao = ((0xffff << 16) & template[aoIndex + 2]) >> 16;
|
|
103
|
+
this._aos.south.set(ao & 0xf, ((0xf << 4) & ao) >>> 4, ((0xf << 8) & ao) >>> 8, ((0xf << 12) & ao) >>> 12);
|
|
104
|
+
}
|
|
105
|
+
// this._light.setAll(LightData.setRGB(0xf0f, 0));
|
|
106
|
+
// this._ao.setAll(1);
|
|
107
|
+
this._level.setAll(0xf);
|
|
108
|
+
}
|
|
109
|
+
isFaceExposed(face) {
|
|
110
|
+
return this._faces[face] == 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Override.types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Override.types.js";
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
//data
|
|
2
|
+
import { $3dCardinalNeighbors } from "../../Math/Constants/CardinalNeighbors.js";
|
|
3
|
+
//objects
|
|
4
|
+
import { DataTool } from "../../Tools/Data/DataTool.js";
|
|
5
|
+
import { LightData } from "../../Data/LightData.js";
|
|
6
|
+
//functions
|
|
7
|
+
import { Distance3D } from "@amodx/math/Vectors/Functions/Distance3d";
|
|
8
|
+
import { RGBRemove, RGBUpdate } from "../Illumanation/Functions/RGBUpdate.js";
|
|
9
|
+
import { SunRemove, SunUpdate } from "../Illumanation/Functions/SunUpdate.js";
|
|
10
|
+
import { FlowManager } from "../Flow/FlowManager.js";
|
|
11
|
+
const dataTool = new DataTool();
|
|
12
|
+
const nDataTool = new DataTool();
|
|
13
|
+
export const ExplosionManager = {
|
|
14
|
+
runExplosion(tasks) {
|
|
15
|
+
tasks.start();
|
|
16
|
+
const [dimension, sx, sy, sz] = tasks.origin;
|
|
17
|
+
FlowManager.setDimension(dimension);
|
|
18
|
+
tasks.setPriority(0);
|
|
19
|
+
const queue = tasks.queues.queue;
|
|
20
|
+
const map = tasks.queues.map;
|
|
21
|
+
queue.push([sx, sy, sz]);
|
|
22
|
+
dataTool.setDimension(dimension);
|
|
23
|
+
nDataTool.setDimension(dimension);
|
|
24
|
+
const radius = tasks.getData();
|
|
25
|
+
while (queue.length) {
|
|
26
|
+
const node = queue.shift();
|
|
27
|
+
if (!node)
|
|
28
|
+
break;
|
|
29
|
+
const x = node[0];
|
|
30
|
+
const y = node[1];
|
|
31
|
+
const z = node[2];
|
|
32
|
+
if (!map.inMap(x + 1, y, z)) {
|
|
33
|
+
if (dataTool.loadInAt(x + 1, y, z)) {
|
|
34
|
+
const d = Distance3D(sx, sy, sz, x + 1, y, z);
|
|
35
|
+
if (d <= radius) {
|
|
36
|
+
queue.push([x + 1, y, z]);
|
|
37
|
+
}
|
|
38
|
+
map.add(x + 1, y, z);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!map.inMap(x - 1, y, z)) {
|
|
42
|
+
if (dataTool.loadInAt(x - 1, y, z)) {
|
|
43
|
+
const d = Distance3D(sx, sy, sz, x - 1, y, z);
|
|
44
|
+
if (d <= radius) {
|
|
45
|
+
queue.push([x - 1, y, z]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
map.add(x - 1, y, z);
|
|
49
|
+
}
|
|
50
|
+
if (!map.inMap(x, y, z + 1)) {
|
|
51
|
+
if (dataTool.loadInAt(x, y, z + 1)) {
|
|
52
|
+
const d = Distance3D(sx, sy, sz, x, y, z + 1);
|
|
53
|
+
if (d <= radius) {
|
|
54
|
+
queue.push([x, y, z + 1]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
map.add(x, y, z + 1);
|
|
58
|
+
}
|
|
59
|
+
if (!map.inMap(x, y, z - 1)) {
|
|
60
|
+
if (dataTool.loadInAt(x, y, z - 1)) {
|
|
61
|
+
const d = Distance3D(sx, sy, sz, x, y, z - 1);
|
|
62
|
+
if (d <= radius) {
|
|
63
|
+
queue.push([x, y, z - 1]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
map.add(x, y, z - 1);
|
|
67
|
+
}
|
|
68
|
+
if (!map.inMap(x, y + 1, z)) {
|
|
69
|
+
if (dataTool.loadInAt(x, y + 1, z)) {
|
|
70
|
+
const d = Distance3D(sx, sy, sz, x, y + 1, z);
|
|
71
|
+
if (d <= radius) {
|
|
72
|
+
queue.push([x, y + 1, z]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
map.add(x, y + 1, z);
|
|
76
|
+
}
|
|
77
|
+
if (!map.inMap(x, y - 1, z)) {
|
|
78
|
+
if (dataTool.loadInAt(x, y - 1, z)) {
|
|
79
|
+
const d = Distance3D(sx, sy, sz, x, y - 1, z);
|
|
80
|
+
if (d <= radius) {
|
|
81
|
+
queue.push([x, y - 1, z]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
map.add(x, y - 1, z);
|
|
85
|
+
}
|
|
86
|
+
if (dataTool.loadInAt(x, y, z)) {
|
|
87
|
+
if (dataTool.isRenderable()) {
|
|
88
|
+
for (const n of $3dCardinalNeighbors) {
|
|
89
|
+
const nx = x + n[0];
|
|
90
|
+
const ny = y + n[1];
|
|
91
|
+
const nz = z + n[2];
|
|
92
|
+
if (nDataTool.loadInAt(nx, ny, nz)) {
|
|
93
|
+
const l = nDataTool.getLight();
|
|
94
|
+
if (l > 0) {
|
|
95
|
+
if (LightData.getS(l) > 0) {
|
|
96
|
+
tasks.queues.sun.remove.push(nx, ny, nz);
|
|
97
|
+
}
|
|
98
|
+
if (LightData.hasRGBLight(l)) {
|
|
99
|
+
tasks.queues.rgb.remove.push(nx, ny, nz);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
tasks.addNeighborsToRebuildQueue(x, y, z);
|
|
105
|
+
if (dataTool.getHardness() > 10_000 ||
|
|
106
|
+
dataTool.getSubstnaceData().isLiquid()) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
dataTool.setAir().commit(2);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
RGBRemove(tasks);
|
|
114
|
+
SunRemove(tasks);
|
|
115
|
+
RGBUpdate(tasks);
|
|
116
|
+
SunUpdate(tasks);
|
|
117
|
+
tasks.runRebuildQueue();
|
|
118
|
+
tasks.stop();
|
|
119
|
+
},
|
|
120
|
+
};
|