@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,90 @@
|
|
|
1
|
+
export class DataMatrix {
|
|
2
|
+
size;
|
|
3
|
+
defaultValue;
|
|
4
|
+
_matrix;
|
|
5
|
+
constructor(size, defaultValue) {
|
|
6
|
+
this.size = size;
|
|
7
|
+
this.defaultValue = defaultValue;
|
|
8
|
+
this._matrix = [];
|
|
9
|
+
this.setAll(defaultValue);
|
|
10
|
+
}
|
|
11
|
+
get sizeX() {
|
|
12
|
+
return this.size[0];
|
|
13
|
+
}
|
|
14
|
+
get sizeY() {
|
|
15
|
+
return this.size[1];
|
|
16
|
+
}
|
|
17
|
+
get sizeZ() {
|
|
18
|
+
return this.size[2];
|
|
19
|
+
}
|
|
20
|
+
setMatrix(matrix) {
|
|
21
|
+
this._matrix = matrix;
|
|
22
|
+
}
|
|
23
|
+
cloneMatrix() {
|
|
24
|
+
return structuredClone(this._matrix);
|
|
25
|
+
}
|
|
26
|
+
setVec3([x, y, z], value) {
|
|
27
|
+
if (!this.isWithinBounds(x, y, z))
|
|
28
|
+
return;
|
|
29
|
+
if (!this._matrix[x])
|
|
30
|
+
this._matrix[x] = [];
|
|
31
|
+
if (!this._matrix[x][y])
|
|
32
|
+
this._matrix[x][y] = [];
|
|
33
|
+
this._matrix[x][y][z] = value;
|
|
34
|
+
}
|
|
35
|
+
setXYZ(x, y, z, value) {
|
|
36
|
+
this.setVec3([x, y, z], value);
|
|
37
|
+
}
|
|
38
|
+
getVec3([x, y, z]) {
|
|
39
|
+
return this.isWithinBounds(x, y, z) ? this._matrix[x]?.[y]?.[z] : undefined;
|
|
40
|
+
}
|
|
41
|
+
getXYZ(x, y, z) {
|
|
42
|
+
return this.getVec3([x, y, z]);
|
|
43
|
+
}
|
|
44
|
+
deleteVec3([x, y, z]) {
|
|
45
|
+
if (this.isWithinBounds(x, y, z))
|
|
46
|
+
this._matrix[x][y][z] = this.defaultValue;
|
|
47
|
+
}
|
|
48
|
+
deleteXYZ(x, y, z) {
|
|
49
|
+
this.deleteVec3([x, y, z]);
|
|
50
|
+
}
|
|
51
|
+
setAll(value) {
|
|
52
|
+
for (let x = 0; x < this.size[0]; x++) {
|
|
53
|
+
this._matrix[x] = [];
|
|
54
|
+
for (let y = 0; y < this.size[1]; y++) {
|
|
55
|
+
this._matrix[x][y] = [];
|
|
56
|
+
for (let z = 0; z < this.size[2]; z++) {
|
|
57
|
+
this._matrix[x][y][z] = value;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
*getAll() {
|
|
63
|
+
for (let x = 0; x < this.size[0]; x++) {
|
|
64
|
+
for (let y = 0; y < this.size[1]; y++) {
|
|
65
|
+
for (let z = 0; z < this.size[2]; z++) {
|
|
66
|
+
yield [[x, y, z], this._matrix[x][y][z]];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
swap(startPosition, endPosition) {
|
|
72
|
+
const startValue = this.getVec3(startPosition);
|
|
73
|
+
const endValue = this.getVec3(endPosition);
|
|
74
|
+
if (startValue !== undefined && endValue !== undefined) {
|
|
75
|
+
this.setVec3(startPosition, endValue);
|
|
76
|
+
this.setVec3(endPosition, startValue);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
isCube() {
|
|
80
|
+
return this.sizeX === this.sizeY && this.sizeZ === this.sizeX;
|
|
81
|
+
}
|
|
82
|
+
isWithinBounds(x, y, z) {
|
|
83
|
+
return (x >= 0 &&
|
|
84
|
+
x < this.size[0] &&
|
|
85
|
+
y >= 0 &&
|
|
86
|
+
y < this.size[1] &&
|
|
87
|
+
z >= 0 &&
|
|
88
|
+
z < this.size[2]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LocationData } from "../Math/index.js";
|
|
2
|
+
export declare class LocationVisitedMap {
|
|
3
|
+
_map: Map<string, boolean>;
|
|
4
|
+
get size(): number;
|
|
5
|
+
has(location: LocationData): boolean;
|
|
6
|
+
add(location: LocationData): void;
|
|
7
|
+
remove(location: LocationData): void;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class LocationVisitedMap {
|
|
2
|
+
_map = new Map();
|
|
3
|
+
get size() {
|
|
4
|
+
return this._map.size;
|
|
5
|
+
}
|
|
6
|
+
has(location) {
|
|
7
|
+
return this._map.has(location.toString());
|
|
8
|
+
}
|
|
9
|
+
add(location) {
|
|
10
|
+
this._map.set(location.toString(), true);
|
|
11
|
+
}
|
|
12
|
+
remove(location) {
|
|
13
|
+
this._map.delete(location.toString());
|
|
14
|
+
}
|
|
15
|
+
clear() {
|
|
16
|
+
this._map.clear();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class VisitedMap {
|
|
2
|
+
_map: Map<string, boolean>;
|
|
3
|
+
get size(): number;
|
|
4
|
+
_getKey(x: number, y: number, z: number): string;
|
|
5
|
+
inMap(x: number, y: number, z: number): boolean;
|
|
6
|
+
add(x: number, y: number, z: number): void;
|
|
7
|
+
remove(x: number, y: number, z: number): void;
|
|
8
|
+
removeDiffernce(map: VisitedMap): VisitedMap;
|
|
9
|
+
clear(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class VisitedMap {
|
|
2
|
+
_map = new Map();
|
|
3
|
+
get size() {
|
|
4
|
+
return this._map.size;
|
|
5
|
+
}
|
|
6
|
+
_getKey(x, y, z) {
|
|
7
|
+
return `${x}_${y}_${z}`;
|
|
8
|
+
}
|
|
9
|
+
inMap(x, y, z) {
|
|
10
|
+
return this._map.has(this._getKey(x, y, z));
|
|
11
|
+
}
|
|
12
|
+
add(x, y, z) {
|
|
13
|
+
this._map.set(this._getKey(x, y, z), true);
|
|
14
|
+
}
|
|
15
|
+
remove(x, y, z) {
|
|
16
|
+
this._map.delete(this._getKey(x, y, z));
|
|
17
|
+
}
|
|
18
|
+
removeDiffernce(map) {
|
|
19
|
+
for (const [key] of map._map) {
|
|
20
|
+
if (this._map.has(key)) {
|
|
21
|
+
this._map.delete(key);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return map;
|
|
25
|
+
}
|
|
26
|
+
clear() {
|
|
27
|
+
this._map.clear();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { DataMatrix } from "./DataMatrix.js";
|
|
3
|
+
import { Flat3DIndex } from "@amodx/math/Volumes/Indexing/Flat3DIndex.js";
|
|
4
|
+
import { DataTool } from "../Tools/Data/DataTool";
|
|
5
|
+
export declare class VoxelIDMatrix extends DataMatrix<string | number> {
|
|
6
|
+
size: Vec3Array;
|
|
7
|
+
static dataTool: DataTool;
|
|
8
|
+
index: Flat3DIndex;
|
|
9
|
+
constructor(size: Vec3Array);
|
|
10
|
+
setBounds(size: Vec3Array): void;
|
|
11
|
+
toFlatArray(): number[];
|
|
12
|
+
toTypedArray(): Uint16Array;
|
|
13
|
+
fromFlatArray(voxels: ArrayLike<number>): void;
|
|
14
|
+
copy(matrix: VoxelIDMatrix): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DataMatrix } from "./DataMatrix.js";
|
|
2
|
+
import { Flat3DIndex } from "@amodx/math/Volumes/Indexing/Flat3DIndex.js";
|
|
3
|
+
import { DataTool } from "../Tools/Data/DataTool";
|
|
4
|
+
export class VoxelIDMatrix extends DataMatrix {
|
|
5
|
+
size;
|
|
6
|
+
static dataTool = new DataTool();
|
|
7
|
+
index = Flat3DIndex.GetXYZOrder();
|
|
8
|
+
constructor(size) {
|
|
9
|
+
super(size, 0);
|
|
10
|
+
this.size = size;
|
|
11
|
+
this.setBounds(size);
|
|
12
|
+
}
|
|
13
|
+
setBounds(size) {
|
|
14
|
+
this.index.setBounds(size[0], size[1], size[2]);
|
|
15
|
+
}
|
|
16
|
+
toFlatArray() {
|
|
17
|
+
const voxels = [];
|
|
18
|
+
for (const [location, vox] of this.getAll()) {
|
|
19
|
+
const i = this.index.getIndexVec3Array(location);
|
|
20
|
+
if (typeof vox !== "string") {
|
|
21
|
+
voxels[i] = 0;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
voxels[i] = VoxelIDMatrix.dataTool.setStringId(vox).getId();
|
|
25
|
+
}
|
|
26
|
+
return voxels;
|
|
27
|
+
}
|
|
28
|
+
toTypedArray() {
|
|
29
|
+
const length = this.sizeX * this.sizeY * this.sizeZ;
|
|
30
|
+
const voxels = new Uint16Array(length);
|
|
31
|
+
for (const [location, vox] of this.getAll()) {
|
|
32
|
+
const i = this.index.getIndexVec3Array(location);
|
|
33
|
+
if (typeof vox !== "string") {
|
|
34
|
+
voxels[i] = 0;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
voxels[i] = VoxelIDMatrix.dataTool.setStringId(vox).getId();
|
|
38
|
+
}
|
|
39
|
+
return voxels;
|
|
40
|
+
}
|
|
41
|
+
fromFlatArray(voxels) {
|
|
42
|
+
for (const [location, nodeId] of this.getAll()) {
|
|
43
|
+
const rawValue = voxels[this.index.getIndexVec3Array(location)];
|
|
44
|
+
if (!rawValue) {
|
|
45
|
+
this.setVec3(location, 0);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
this.setVec3(location, VoxelIDMatrix.dataTool.setId(rawValue).getStringId());
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
copy(matrix) {
|
|
52
|
+
this.setBounds(matrix.size);
|
|
53
|
+
this.setMatrix(matrix.cloneMatrix());
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VoxelConstructorsRegister } from "../../Mesher/Constructors/Voxel/VoxelConstructorsRegister";
|
|
2
|
+
import { VoxelModelVoxelConstructor } from "./VoxelModelVoxelConstructor";
|
|
3
|
+
import { VoxelModelConstructorRegister } from "./Register/VoxelModelConstructorRegister";
|
|
4
|
+
import { VoxelGeometryLookUp } from "./VoxelGeometryLookUp";
|
|
5
|
+
import { SchemaRegister } from "../State/SchemaRegister";
|
|
6
|
+
export default function (DVEC) {
|
|
7
|
+
VoxelGeometryLookUp.init();
|
|
8
|
+
DVEC.TC.registerTasks("sync-voxel-model-data", (data) => {
|
|
9
|
+
VoxelModelConstructorRegister.setGeometryPalette(data.geometryPalette);
|
|
10
|
+
VoxelModelConstructorRegister.registerGeometry(data.geometry);
|
|
11
|
+
VoxelModelConstructorRegister.registerModels(data.models);
|
|
12
|
+
for (const model of data.models) {
|
|
13
|
+
SchemaRegister.registerModel(model.id, model.schema);
|
|
14
|
+
}
|
|
15
|
+
for (const voxel of data.voxels) {
|
|
16
|
+
SchemaRegister.registerVoxel(voxel.id, voxel.modelId, voxel.modSchema);
|
|
17
|
+
VoxelConstructorsRegister.registerVoxel(new VoxelModelVoxelConstructor(voxel.id, VoxelModelConstructorRegister.models.get(voxel.modelId), voxel));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VoxelMesherDataTool } from "../../../Mesher/Tools/VoxelMesherDataTool";
|
|
2
|
+
import { Vector3Like } from "@amodx/math";
|
|
3
|
+
import { VoxelGeometryConstructor } from "../Register/VoxelGeometryConstructor";
|
|
4
|
+
export declare abstract class GeoemtryNode<Args> {
|
|
5
|
+
geometryPaletteId: number;
|
|
6
|
+
geomtry: VoxelGeometryConstructor;
|
|
7
|
+
faceIndex: number;
|
|
8
|
+
vertexIndex: number;
|
|
9
|
+
faceCount: number;
|
|
10
|
+
vertexCount: number;
|
|
11
|
+
tool: VoxelMesherDataTool;
|
|
12
|
+
origin: Vector3Like;
|
|
13
|
+
constructor(geometryPaletteId: number, geomtry: VoxelGeometryConstructor);
|
|
14
|
+
abstract add(tool: VoxelMesherDataTool, originHash: number, origin: Vector3Like, args: Args): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class GeoemtryNode {
|
|
2
|
+
geometryPaletteId;
|
|
3
|
+
geomtry;
|
|
4
|
+
faceIndex = -1;
|
|
5
|
+
vertexIndex = -1;
|
|
6
|
+
faceCount = -1;
|
|
7
|
+
vertexCount = -1;
|
|
8
|
+
tool;
|
|
9
|
+
origin;
|
|
10
|
+
constructor(geometryPaletteId, geomtry) {
|
|
11
|
+
this.geometryPaletteId = geometryPaletteId;
|
|
12
|
+
this.geomtry = geomtry;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Vec4Array, Vector3Like } from "@amodx/math";
|
|
2
|
+
import { VoxelFaces } from "../../../../Math";
|
|
3
|
+
import { QuadScalarVertexData } from "@amodx/meshing";
|
|
4
|
+
import { VoxelBoxGeometryNode } from "../../../VoxelModel.types";
|
|
5
|
+
import { Quad } from "@amodx/meshing/Classes/Quad";
|
|
6
|
+
import { VoxelMesherDataTool } from "../../../../Mesher/Tools/VoxelMesherDataTool";
|
|
7
|
+
import { BoxVoxelGometryArgs } from "../../../Input/BoxVoxelGometryInputs";
|
|
8
|
+
import { GeoemtryNode } from "../GeometryNode";
|
|
9
|
+
import { VoxelGeometryConstructor } from "../../Register/VoxelGeometryConstructor";
|
|
10
|
+
import { VoxelGeometryTransform } from "../../../VoxelModelRules.types";
|
|
11
|
+
export declare class BoxVoxelGometryNode extends GeoemtryNode<BoxVoxelGometryArgs> {
|
|
12
|
+
data: VoxelBoxGeometryNode;
|
|
13
|
+
quads: Quad[];
|
|
14
|
+
vertexWeights: [Vec4Array, Vec4Array, Vec4Array, Vec4Array][];
|
|
15
|
+
worldLight: QuadScalarVertexData;
|
|
16
|
+
worldAO: QuadScalarVertexData;
|
|
17
|
+
constructor(geometryPaletteId: number, geometry: VoxelGeometryConstructor, data: VoxelBoxGeometryNode, transform: VoxelGeometryTransform);
|
|
18
|
+
isExposed(face: VoxelFaces): boolean;
|
|
19
|
+
determineShading(face: VoxelFaces): void;
|
|
20
|
+
shouldFlip(): boolean;
|
|
21
|
+
add(tool: VoxelMesherDataTool, originHash: number, origin: Vector3Like, args: BoxVoxelGometryArgs): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Vector3Like } from "@amodx/math";
|
|
2
|
+
import { VoxelFaces } from "../../../../Math";
|
|
3
|
+
import { Quad } from "@amodx/meshing/Classes/Quad";
|
|
4
|
+
import { VoxelGeometry } from "../../../../Mesher/Geometry/VoxelGeometry";
|
|
5
|
+
import { BoxVoxelGometryInputs, } from "../../../Input/BoxVoxelGometryInputs";
|
|
6
|
+
import { VoxelGeometryLookUp } from "../../VoxelGeometryLookUp";
|
|
7
|
+
import { GeoemtryNode } from "../GeometryNode";
|
|
8
|
+
import { addQuadWeights, getInterpolationValue, shouldCauseFlip, } from "../../../../Mesher/Calc/CalcConstants";
|
|
9
|
+
import { LightData } from "../../../../Data/LightData";
|
|
10
|
+
import { VoxelRelativeCubeIndexPositionMap } from "../../../Indexing/VoxelRelativeCubeIndex";
|
|
11
|
+
import { TransformBox } from "../../../Shared/Transform";
|
|
12
|
+
const ArgIndexes = BoxVoxelGometryInputs.ArgIndexes;
|
|
13
|
+
export class BoxVoxelGometryNode extends GeoemtryNode {
|
|
14
|
+
data;
|
|
15
|
+
quads = [];
|
|
16
|
+
vertexWeights = [];
|
|
17
|
+
worldLight;
|
|
18
|
+
worldAO;
|
|
19
|
+
constructor(geometryPaletteId, geometry, data, transform) {
|
|
20
|
+
super(geometryPaletteId, geometry);
|
|
21
|
+
this.data = data;
|
|
22
|
+
const [start, end] = data.points.map((_) => Vector3Like.Create(..._));
|
|
23
|
+
this.faceCount = 6;
|
|
24
|
+
this.vertexCount = this.faceCount * 4;
|
|
25
|
+
const quadPoints = [
|
|
26
|
+
//top
|
|
27
|
+
[
|
|
28
|
+
[end.x, end.y, end.z],
|
|
29
|
+
[start.x, end.y, end.z],
|
|
30
|
+
[start.x, end.y, start.z],
|
|
31
|
+
[end.x, end.y, start.z],
|
|
32
|
+
],
|
|
33
|
+
//bottom
|
|
34
|
+
[
|
|
35
|
+
[start.x, start.y, end.z],
|
|
36
|
+
[end.x, start.y, end.z],
|
|
37
|
+
[end.x, start.y, start.z],
|
|
38
|
+
[start.x, start.y, start.z],
|
|
39
|
+
],
|
|
40
|
+
//north
|
|
41
|
+
[
|
|
42
|
+
[start.x, end.y, end.z],
|
|
43
|
+
[end.x, end.y, end.z],
|
|
44
|
+
[end.x, start.y, end.z],
|
|
45
|
+
[start.x, start.y, end.z],
|
|
46
|
+
],
|
|
47
|
+
//south
|
|
48
|
+
[
|
|
49
|
+
[end.x, end.y, start.z],
|
|
50
|
+
[start.x, end.y, start.z],
|
|
51
|
+
[start.x, start.y, start.z],
|
|
52
|
+
[end.x, start.y, start.z],
|
|
53
|
+
],
|
|
54
|
+
//east
|
|
55
|
+
[
|
|
56
|
+
[end.x, end.y, end.z],
|
|
57
|
+
[end.x, end.y, start.z],
|
|
58
|
+
[end.x, start.y, start.z],
|
|
59
|
+
[end.x, start.y, end.z],
|
|
60
|
+
],
|
|
61
|
+
//west
|
|
62
|
+
[
|
|
63
|
+
[start.x, end.y, start.z],
|
|
64
|
+
[start.x, end.y, end.z],
|
|
65
|
+
[start.x, start.y, end.z],
|
|
66
|
+
[start.x, start.y, start.z],
|
|
67
|
+
],
|
|
68
|
+
];
|
|
69
|
+
const tranformed = TransformBox(quadPoints.map((_) => Quad.Create(_)), transform);
|
|
70
|
+
this.quads[VoxelFaces.Up] = tranformed[VoxelFaces.Up];
|
|
71
|
+
tranformed[VoxelFaces.Up].orientation = 0;
|
|
72
|
+
this.vertexWeights[VoxelFaces.Up] = addQuadWeights(this.quads[VoxelFaces.Up], VoxelFaces.Up);
|
|
73
|
+
this.quads[VoxelFaces.Down] = tranformed[VoxelFaces.Down];
|
|
74
|
+
tranformed[VoxelFaces.Down].orientation = 0;
|
|
75
|
+
this.vertexWeights[VoxelFaces.Down] = addQuadWeights(this.quads[VoxelFaces.Down], VoxelFaces.Down);
|
|
76
|
+
this.quads[VoxelFaces.North] = tranformed[VoxelFaces.North];
|
|
77
|
+
tranformed[VoxelFaces.North].orientation = 0;
|
|
78
|
+
this.vertexWeights[VoxelFaces.North] = addQuadWeights(this.quads[VoxelFaces.North], VoxelFaces.North);
|
|
79
|
+
this.quads[VoxelFaces.South] = tranformed[VoxelFaces.South];
|
|
80
|
+
tranformed[VoxelFaces.South].orientation = 0;
|
|
81
|
+
this.vertexWeights[VoxelFaces.South] = addQuadWeights(this.quads[VoxelFaces.South], VoxelFaces.South);
|
|
82
|
+
this.quads[VoxelFaces.East] = tranformed[VoxelFaces.East];
|
|
83
|
+
tranformed[VoxelFaces.East].orientation = 0;
|
|
84
|
+
this.vertexWeights[VoxelFaces.East] = addQuadWeights(this.quads[VoxelFaces.East], VoxelFaces.East);
|
|
85
|
+
this.quads[VoxelFaces.West] = tranformed[VoxelFaces.West];
|
|
86
|
+
tranformed[VoxelFaces.West].orientation = 0;
|
|
87
|
+
this.vertexWeights[VoxelFaces.West] = addQuadWeights(this.quads[VoxelFaces.West], VoxelFaces.West);
|
|
88
|
+
}
|
|
89
|
+
isExposed(face) {
|
|
90
|
+
const trueFaceIndex = face + this.faceIndex;
|
|
91
|
+
const faceIndexes = this.geomtry.data.faceCullMap[trueFaceIndex];
|
|
92
|
+
if (!faceIndexes)
|
|
93
|
+
return true;
|
|
94
|
+
const tool = this.tool;
|
|
95
|
+
for (let positionIndex = 0; positionIndex < faceIndexes.length; positionIndex++) {
|
|
96
|
+
const currentIndex = faceIndexes[positionIndex];
|
|
97
|
+
const p = VoxelRelativeCubeIndexPositionMap[currentIndex];
|
|
98
|
+
const hashed = VoxelGeometryLookUp.getHash(tool.voxel.x + p[0], tool.voxel.y + p[1], tool.voxel.z + p[2]);
|
|
99
|
+
const offsetBaseGometry = VoxelGeometryLookUp.geometryCache[hashed];
|
|
100
|
+
const offsetConditonalGeometry = VoxelGeometryLookUp.conditionalGeometryCache[hashed];
|
|
101
|
+
if (offsetBaseGometry) {
|
|
102
|
+
for (let i = 0; i < offsetBaseGometry.length; i++) {
|
|
103
|
+
const geoId = offsetBaseGometry[i];
|
|
104
|
+
if (VoxelGeometryLookUp.isRulesless(geoId))
|
|
105
|
+
continue;
|
|
106
|
+
const faceIndex = this.geomtry.cullIndex.getValue(geoId, currentIndex, trueFaceIndex);
|
|
107
|
+
if (faceIndex > -1 &&
|
|
108
|
+
!VoxelGeometryLookUp.voxelHash[hashed].isShapeStateFaceTransparent(VoxelGeometryLookUp.modCache[hashed], VoxelGeometryLookUp.stateCache[hashed], geoId, faceIndex)) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (!offsetConditonalGeometry)
|
|
114
|
+
continue;
|
|
115
|
+
for (let i = 0; i < offsetConditonalGeometry.length; i++) {
|
|
116
|
+
const cond = offsetConditonalGeometry[i];
|
|
117
|
+
for (let k = 0; k < cond.length; k++) {
|
|
118
|
+
const geoId = cond[k];
|
|
119
|
+
if (VoxelGeometryLookUp.isRulesless(geoId))
|
|
120
|
+
continue;
|
|
121
|
+
const faceIndex = this.geomtry.cullIndex.getValue(geoId, currentIndex, trueFaceIndex);
|
|
122
|
+
if (faceIndex > -1 &&
|
|
123
|
+
!VoxelGeometryLookUp.voxelHash[hashed].isCondtionalStateFaceTransparent(VoxelGeometryLookUp.modCache[hashed], VoxelGeometryLookUp.stateCache[hashed], geoId, faceIndex))
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
determineShading(face) {
|
|
131
|
+
const tool = this.tool;
|
|
132
|
+
const lightData = tool.lightData[face];
|
|
133
|
+
const noAO = this.tool.voxel.isLightSource() || this.tool.voxel.noAO();
|
|
134
|
+
const worldLight = this.worldLight;
|
|
135
|
+
const worldAO = this.worldAO;
|
|
136
|
+
for (let v = 0; v < 4; v++) {
|
|
137
|
+
worldAO.vertices[v] = 0;
|
|
138
|
+
worldLight.vertices[v] = getInterpolationValue(lightData, this.vertexWeights[face][v]);
|
|
139
|
+
if (noAO)
|
|
140
|
+
continue;
|
|
141
|
+
const trueVertexIndex = this.vertexIndex + face * 4 + v;
|
|
142
|
+
const aoIndexes = this.geomtry.data.vertexHitMap[trueVertexIndex];
|
|
143
|
+
if (!aoIndexes)
|
|
144
|
+
continue;
|
|
145
|
+
for (let positionIndex = 0; positionIndex < aoIndexes.length; positionIndex++) {
|
|
146
|
+
const currentIndex = aoIndexes[positionIndex];
|
|
147
|
+
const p = VoxelRelativeCubeIndexPositionMap[currentIndex];
|
|
148
|
+
const hashed = VoxelGeometryLookUp.getHash(tool.voxel.x + p[0], tool.voxel.y + p[1], tool.voxel.z + p[2]);
|
|
149
|
+
if (VoxelGeometryLookUp.noCastAO[hashed] === true)
|
|
150
|
+
continue;
|
|
151
|
+
const baseGeo = VoxelGeometryLookUp.geometryCache[hashed];
|
|
152
|
+
const conditonalGeo = VoxelGeometryLookUp.conditionalGeometryCache[hashed];
|
|
153
|
+
if (!baseGeo && !conditonalGeo)
|
|
154
|
+
continue;
|
|
155
|
+
let length = 0;
|
|
156
|
+
let shaded = false;
|
|
157
|
+
if (baseGeo) {
|
|
158
|
+
length = baseGeo.length;
|
|
159
|
+
for (let geoIndex = 0; geoIndex < length; geoIndex++) {
|
|
160
|
+
if (this.geomtry.aoIndex.getValue(baseGeo[geoIndex], currentIndex, trueVertexIndex)) {
|
|
161
|
+
worldAO.vertices[v] = 1;
|
|
162
|
+
shaded = true;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (!conditonalGeo)
|
|
168
|
+
continue;
|
|
169
|
+
length = conditonalGeo.length;
|
|
170
|
+
for (let condtionsIndex = 0; condtionsIndex < length; condtionsIndex++) {
|
|
171
|
+
const condiotnalength = conditonalGeo[condtionsIndex].length;
|
|
172
|
+
for (let geoIndex = 0; geoIndex < condiotnalength; geoIndex++) {
|
|
173
|
+
if (this.geomtry.aoIndex.getValue(conditonalGeo[condtionsIndex][geoIndex], currentIndex, trueVertexIndex)) {
|
|
174
|
+
worldAO.vertices[v] = 1;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
shouldFlip() {
|
|
183
|
+
if (shouldCauseFlip(this.worldAO.vertices[0], this.worldAO.vertices[1], this.worldAO.vertices[2], this.worldAO.vertices[3]))
|
|
184
|
+
return true;
|
|
185
|
+
return (shouldCauseFlip(LightData.getS(this.worldLight.vertices[0]), LightData.getS(this.worldLight.vertices[1]), LightData.getS(this.worldLight.vertices[2]), LightData.getS(this.worldLight.vertices[3])) ||
|
|
186
|
+
shouldCauseFlip(LightData.sumRGB(this.worldLight.vertices[0]), LightData.sumRGB(this.worldLight.vertices[1]), LightData.sumRGB(this.worldLight.vertices[2]), LightData.sumRGB(this.worldLight.vertices[3])));
|
|
187
|
+
}
|
|
188
|
+
add(tool, originHash, origin, args) {
|
|
189
|
+
this.tool = tool;
|
|
190
|
+
this.origin = tool.voxel;
|
|
191
|
+
this.worldAO = tool.getWorldAO();
|
|
192
|
+
this.worldLight = tool.getWorldLight();
|
|
193
|
+
for (let face = 0; face < 6; face++) {
|
|
194
|
+
if (args[face][ArgIndexes.Enabled] && this.isExposed(face)) {
|
|
195
|
+
tool.calculateFaceData(face);
|
|
196
|
+
this.determineShading(face);
|
|
197
|
+
const faceArgs = args[face];
|
|
198
|
+
const quad = this.quads[face];
|
|
199
|
+
quad.flip = this.shouldFlip() || faceArgs[ArgIndexes.Fliped];
|
|
200
|
+
tool.setTexture(faceArgs[ArgIndexes.Texture]);
|
|
201
|
+
const uvs = faceArgs[ArgIndexes.UVs];
|
|
202
|
+
//1
|
|
203
|
+
quad.uvs.vertices[0].x = uvs[0][0];
|
|
204
|
+
quad.uvs.vertices[0].y = uvs[0][1];
|
|
205
|
+
//2
|
|
206
|
+
quad.uvs.vertices[1].x = uvs[1][0];
|
|
207
|
+
quad.uvs.vertices[1].y = uvs[1][1];
|
|
208
|
+
//3
|
|
209
|
+
quad.uvs.vertices[2].x = uvs[2][0];
|
|
210
|
+
quad.uvs.vertices[2].y = uvs[2][1];
|
|
211
|
+
//4
|
|
212
|
+
quad.uvs.vertices[3].x = uvs[3][0];
|
|
213
|
+
quad.uvs.vertices[3].y = uvs[3][1];
|
|
214
|
+
VoxelGeometry.addQuad(tool, origin, quad);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
this.worldLight.setAll(0);
|
|
218
|
+
this.worldAO.setAll(0);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Vec4Array, Vector3Like } from "@amodx/math";
|
|
2
|
+
import { VoxelFaces } from "../../../../Math";
|
|
3
|
+
import { QuadScalarVertexData } from "@amodx/meshing";
|
|
4
|
+
import { VoxelQuadGeometryNode } from "../../../VoxelModel.types";
|
|
5
|
+
import { Quad } from "@amodx/meshing/Classes/Quad";
|
|
6
|
+
import { VoxelMesherDataTool } from "../../../../Mesher/Tools/VoxelMesherDataTool";
|
|
7
|
+
import { GeoemtryNode } from "../GeometryNode";
|
|
8
|
+
import { VoxelGeometryConstructor } from "../../Register/VoxelGeometryConstructor";
|
|
9
|
+
import { QuadVoxelGometryArgs } from "../../../Input/QuadVoxelGometryInputs";
|
|
10
|
+
import { VoxelGeometryTransform } from "../../../VoxelModelRules.types";
|
|
11
|
+
export declare class QuadVoxelGometryNode extends GeoemtryNode<QuadVoxelGometryArgs> {
|
|
12
|
+
data: VoxelQuadGeometryNode;
|
|
13
|
+
quad: Quad;
|
|
14
|
+
vertexWeights: [Vec4Array, Vec4Array, Vec4Array, Vec4Array];
|
|
15
|
+
worldLight: QuadScalarVertexData;
|
|
16
|
+
worldAO: QuadScalarVertexData;
|
|
17
|
+
closestFace: VoxelFaces;
|
|
18
|
+
constructor(geometryPaletteId: number, geometry: VoxelGeometryConstructor, data: VoxelQuadGeometryNode, transform: VoxelGeometryTransform);
|
|
19
|
+
isExposed(): boolean;
|
|
20
|
+
determineShading(): void;
|
|
21
|
+
shouldFlip(): boolean;
|
|
22
|
+
add(tool: VoxelMesherDataTool, originHash: number, origin: Vector3Like, args: QuadVoxelGometryArgs): void;
|
|
23
|
+
}
|