@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,255 @@
|
|
|
1
|
+
import { OverrideManager } from "../../Rules/Overrides/OverridesManager.js";
|
|
2
|
+
import { LightData } from "../../../Data/LightData";
|
|
3
|
+
import { QuadScalarVertexData, QuadVec3ArrayVertexData } from "@amodx/meshing/Classes/QuadVertexData";
|
|
4
|
+
import { SubstanceRules } from "../../Rules/SubstanceRules.js";
|
|
5
|
+
import { QuadVerticies } from "@amodx/meshing/Geometry.types";
|
|
6
|
+
import { VoxelFaces, VoxelFaceDirections } from "../../../Math";
|
|
7
|
+
import { Vector3Like } from "@amodx/math";
|
|
8
|
+
import { GradientCheckSets } from "../CalcConstants";
|
|
9
|
+
const LD = LightData;
|
|
10
|
+
const LightValue = new QuadScalarVertexData();
|
|
11
|
+
const AOValue = new QuadScalarVertexData();
|
|
12
|
+
const AOGeometryValues = new QuadVec3ArrayVertexData();
|
|
13
|
+
const isMax = (num, v1, v2) => {
|
|
14
|
+
return num >= v1 && num >= v2;
|
|
15
|
+
};
|
|
16
|
+
const isAllEqual = (num, v1, v2, v3) => {
|
|
17
|
+
return num == v1 && v1 == v2 && v2 == v3;
|
|
18
|
+
};
|
|
19
|
+
const shouldSunFlip = (face) => {
|
|
20
|
+
const upRight = LD.getS(LightValue.vertices[QuadVerticies.TopRight]);
|
|
21
|
+
const upLeft = LD.getS(LightValue.vertices[QuadVerticies.TopLeft]);
|
|
22
|
+
const downLeft = LD.getS(LightValue.vertices[QuadVerticies.BottomLeft]);
|
|
23
|
+
const downRight = LD.getS(LightValue.vertices[QuadVerticies.BottomRight]);
|
|
24
|
+
if (isAllEqual(upRight, upLeft, downLeft, downRight))
|
|
25
|
+
return false;
|
|
26
|
+
const t1 = downLeft > upLeft && downLeft > upRight && downLeft > downRight;
|
|
27
|
+
const t2 = upRight > upLeft && upRight > downLeft && upRight > downRight;
|
|
28
|
+
const t3 = upLeft < downLeft && upLeft < upRight && upLeft < downRight;
|
|
29
|
+
const t4 = downRight < upLeft && downRight < upRight && downRight < upLeft;
|
|
30
|
+
if (t1 && !t2)
|
|
31
|
+
return true;
|
|
32
|
+
if (t2 && !t1)
|
|
33
|
+
return true;
|
|
34
|
+
if (t3)
|
|
35
|
+
return true;
|
|
36
|
+
if (t4)
|
|
37
|
+
return true;
|
|
38
|
+
return false;
|
|
39
|
+
};
|
|
40
|
+
const shouldRGBFlip = (face) => {
|
|
41
|
+
const upRight = LD.getRGB(LightValue.vertices[QuadVerticies.TopRight]);
|
|
42
|
+
const upLeft = LD.getRGB(LightValue.vertices[QuadVerticies.TopLeft]);
|
|
43
|
+
const downLeft = LD.getRGB(LightValue.vertices[QuadVerticies.BottomLeft]);
|
|
44
|
+
const downRight = LD.getRGB(LightValue.vertices[QuadVerticies.BottomRight]);
|
|
45
|
+
if (isAllEqual(upRight, upLeft, downLeft, downRight))
|
|
46
|
+
return false;
|
|
47
|
+
const t1 = downLeft > upLeft && downLeft > upRight && downLeft > downRight;
|
|
48
|
+
const t2 = upRight > upLeft && upRight > downLeft && upRight > downRight;
|
|
49
|
+
const t3 = upLeft < downLeft && upLeft < upRight && upLeft < downRight;
|
|
50
|
+
const t4 = downRight < upLeft && downRight < upRight && downRight < upLeft;
|
|
51
|
+
if (t1 && !t2)
|
|
52
|
+
return true;
|
|
53
|
+
if (t2 && !t1)
|
|
54
|
+
return true;
|
|
55
|
+
if (t3)
|
|
56
|
+
return true;
|
|
57
|
+
if (t4)
|
|
58
|
+
return true;
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
const shouldAOFlip = (face) => {
|
|
62
|
+
if (states.ignoreAO)
|
|
63
|
+
return false;
|
|
64
|
+
LightGradient.tool.faceDataOverride.face = face;
|
|
65
|
+
LightGradient.tool.faceDataOverride.default = false;
|
|
66
|
+
if (OverrideManager.AOFlipFace.run(LightGradient.tool.voxel.getShapeId(), OverrideManager.ANY, LightGradient.tool.faceDataOverride)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const upRight = AOValue.vertices[QuadVerticies.TopRight];
|
|
70
|
+
const upLeft = AOValue.vertices[QuadVerticies.TopLeft];
|
|
71
|
+
const downRight = AOValue.vertices[QuadVerticies.BottomRight];
|
|
72
|
+
const downLeft = AOValue.vertices[QuadVerticies.BottomLeft];
|
|
73
|
+
if (isAllEqual(upRight, upLeft, downLeft, downRight))
|
|
74
|
+
return false;
|
|
75
|
+
const t1 = isMax(upRight, upLeft, downRight);
|
|
76
|
+
const t2 = isMax(downLeft, upLeft, downRight);
|
|
77
|
+
if (t1 || t2)
|
|
78
|
+
return true;
|
|
79
|
+
return false;
|
|
80
|
+
};
|
|
81
|
+
const flipCheck = (face) => {
|
|
82
|
+
if (shouldAOFlip(face))
|
|
83
|
+
return true;
|
|
84
|
+
if (shouldRGBFlip(face))
|
|
85
|
+
return true;
|
|
86
|
+
return shouldSunFlip(face);
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
2 1
|
|
91
|
+
| / |
|
|
92
|
+
| / |
|
|
93
|
+
| / |
|
|
94
|
+
| / |
|
|
95
|
+
3 4
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
*/
|
|
99
|
+
const states = { ignoreAO: false };
|
|
100
|
+
const newRGBValues = [];
|
|
101
|
+
const RGBValues = { r: 0, g: 0, b: 0 };
|
|
102
|
+
const sunValues = { s: 0 };
|
|
103
|
+
const nlValues = { s: 0, r: 0, g: 0, b: 0 };
|
|
104
|
+
const AOValues = { a: 0 };
|
|
105
|
+
export const LightGradient = {
|
|
106
|
+
tool: {},
|
|
107
|
+
settings: {
|
|
108
|
+
doAO: true,
|
|
109
|
+
doRGB: true,
|
|
110
|
+
doSun: true,
|
|
111
|
+
},
|
|
112
|
+
aoOffset: Vector3Like.Create(),
|
|
113
|
+
calculate(face, tool, ignoreAO) {
|
|
114
|
+
tool.setFaceFlipped(false).getWorldLight().setAll(0);
|
|
115
|
+
tool.getWorldAO().setAll(0);
|
|
116
|
+
this.tool = tool;
|
|
117
|
+
const voxelSubstance = SubstanceRules.getSubstanceParent(tool.voxel.getSubstance());
|
|
118
|
+
const isLightSource = tool.voxel.isLightSource();
|
|
119
|
+
let light = tool.voxel.getLight();
|
|
120
|
+
let aoOverRide = -1;
|
|
121
|
+
AOValue.setAll(1);
|
|
122
|
+
if (this.settings.doAO && !ignoreAO) {
|
|
123
|
+
states.ignoreAO = false;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
states.ignoreAO = true;
|
|
127
|
+
}
|
|
128
|
+
let baseAO = 0;
|
|
129
|
+
const faceNormal = VoxelFaceDirections[face];
|
|
130
|
+
tool.nVoxel.loadInAt(tool.voxel.x + faceNormal[0], tool.voxel.y + faceNormal[1], tool.voxel.z + faceNormal[2]);
|
|
131
|
+
light = tool.nVoxel.getLight();
|
|
132
|
+
if (light < 0) {
|
|
133
|
+
if (tool.voxel.getLight() >= 0) {
|
|
134
|
+
light = tool.voxel.getLight();
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
light = 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (face == VoxelFaces.Up) {
|
|
141
|
+
if (tool.nVoxel.isRenderable() && !tool.nVoxel.isLightSource()) {
|
|
142
|
+
tool.faceDataOverride.face = face;
|
|
143
|
+
tool.faceDataOverride.default = false;
|
|
144
|
+
if (OverrideManager.DarkenFaceUnderneath.run(tool.nVoxel.getShapeId(), OverrideManager.ANY, tool.faceDataOverride)) {
|
|
145
|
+
aoOverRide = 1;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
for (let vertex = 0; vertex < 4; vertex++) {
|
|
150
|
+
const checkSet = GradientCheckSets[face][vertex];
|
|
151
|
+
if (this.settings.doRGB || this.settings.doSun) {
|
|
152
|
+
const values = LD.getLightValues(light);
|
|
153
|
+
if (this.settings.doSun) {
|
|
154
|
+
sunValues.s = values[0];
|
|
155
|
+
}
|
|
156
|
+
if (this.settings.doRGB) {
|
|
157
|
+
RGBValues.r = values[1];
|
|
158
|
+
RGBValues.g = values[2];
|
|
159
|
+
RGBValues.b = values[3];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
AOValues.a = 0;
|
|
163
|
+
let checkSetIndex = 0;
|
|
164
|
+
for (let i = 0; i < 9; i += 3) {
|
|
165
|
+
if (this.settings.doRGB || this.settings.doSun) {
|
|
166
|
+
if (!tool.nVoxel.loadInAt(checkSet[i] + tool.voxel.x, checkSet[i + 1] + tool.voxel.y, checkSet[i + 2] + tool.voxel.z))
|
|
167
|
+
continue;
|
|
168
|
+
const nl = tool.nVoxel.getLight();
|
|
169
|
+
if (nl >= 0) {
|
|
170
|
+
const values = LD.getLightValues(nl);
|
|
171
|
+
nlValues.s = values[0];
|
|
172
|
+
nlValues.r = values[1];
|
|
173
|
+
nlValues.g = values[2];
|
|
174
|
+
nlValues.b = values[3];
|
|
175
|
+
if (this.settings.doRGB) {
|
|
176
|
+
if (LD.removeS(nl)) {
|
|
177
|
+
if (nlValues.r > RGBValues.r && RGBValues.r < 15) {
|
|
178
|
+
RGBValues.r = nlValues.r;
|
|
179
|
+
}
|
|
180
|
+
if (nlValues.g > RGBValues.g && RGBValues.g < 15) {
|
|
181
|
+
RGBValues.g = nlValues.g;
|
|
182
|
+
}
|
|
183
|
+
if (nlValues.b > RGBValues.b && RGBValues.b < 15) {
|
|
184
|
+
RGBValues.b = nlValues.b;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (this.settings.doSun) {
|
|
189
|
+
if (LD.getS(nl)) {
|
|
190
|
+
if (sunValues.s < nlValues.s && sunValues.s < 15) {
|
|
191
|
+
sunValues.s = nlValues.s;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/*
|
|
198
|
+
Do AO
|
|
199
|
+
*/
|
|
200
|
+
if (!states.ignoreAO) {
|
|
201
|
+
if (!tool.nVoxel.loadInAt(tool.nVoxel.x + this.aoOffset.x, tool.nVoxel.y + this.aoOffset.y, tool.nVoxel.z + this.aoOffset.z))
|
|
202
|
+
continue;
|
|
203
|
+
if (aoOverRide > 0) {
|
|
204
|
+
AOValues.a = aoOverRide;
|
|
205
|
+
}
|
|
206
|
+
else if (!tool.nVoxel.isRenderable()) {
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const neighborVoxelSubstance = SubstanceRules.getSubstanceParent(tool.nVoxel.getSubstance());
|
|
210
|
+
const neightLightSource = tool.nVoxel.isLightSource();
|
|
211
|
+
let finalResult = true;
|
|
212
|
+
if (neighborVoxelSubstance != voxelSubstance) {
|
|
213
|
+
finalResult = false;
|
|
214
|
+
}
|
|
215
|
+
if (isLightSource || neightLightSource) {
|
|
216
|
+
finalResult = false;
|
|
217
|
+
}
|
|
218
|
+
tool.faceDataOverride.face = face;
|
|
219
|
+
tool.faceDataOverride.default = finalResult;
|
|
220
|
+
finalResult = OverrideManager.AO.run(tool.voxel.getShapeId(), tool.nVoxel.getShapeId(), tool.faceDataOverride);
|
|
221
|
+
if (finalResult) {
|
|
222
|
+
AOValues.a++;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
checkSetIndex++;
|
|
227
|
+
}
|
|
228
|
+
/*
|
|
229
|
+
Light End
|
|
230
|
+
*/
|
|
231
|
+
if (this.settings.doSun || this.settings.doRGB) {
|
|
232
|
+
newRGBValues[0] = sunValues.s;
|
|
233
|
+
newRGBValues[1] = RGBValues.r;
|
|
234
|
+
newRGBValues[2] = RGBValues.g;
|
|
235
|
+
newRGBValues[3] = RGBValues.b;
|
|
236
|
+
LightValue.setVertex(vertex, LD.setLightValues(newRGBValues));
|
|
237
|
+
}
|
|
238
|
+
/*
|
|
239
|
+
AO End
|
|
240
|
+
*/
|
|
241
|
+
if (this.settings.doAO) {
|
|
242
|
+
AOValue.setVertex(vertex, Math.ceil((AOValues.a / 3) * 15));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
tool
|
|
246
|
+
.setFaceFlipped(flipCheck(face))
|
|
247
|
+
.getWorldLight()
|
|
248
|
+
.set(LightValue.vertices[QuadVerticies.TopRight], LightValue.vertices[QuadVerticies.TopLeft], LightValue.vertices[QuadVerticies.BottomLeft], LightValue.vertices[QuadVerticies.BottomRight]);
|
|
249
|
+
if (!states.ignoreAO) {
|
|
250
|
+
tool
|
|
251
|
+
.getWorldAO()
|
|
252
|
+
.set(AOValue.vertices[QuadVerticies.TopRight], AOValue.vertices[QuadVerticies.TopLeft], AOValue.vertices[QuadVerticies.BottomLeft], AOValue.vertices[QuadVerticies.BottomRight]);
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VoxelMesherDataTool } from "../../../../Tools/VoxelMesherDataTool.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { TextureRegister } from "../../../../../Textures/TextureRegister.js";
|
|
4
|
+
import type { ConstructorTextureData } from "../../../../../Textures/Constructor.types.js";
|
|
5
|
+
import { VoxelFaces } from "../../../../../Math/index.js";
|
|
6
|
+
export declare class ModCubeVoxelConstructor extends VoxelConstructor {
|
|
7
|
+
id: string;
|
|
8
|
+
textureData: ConstructorTextureData[] | Record<VoxelFaces, ConstructorTextureData[]>;
|
|
9
|
+
textures: Record<VoxelFaces, number[]>;
|
|
10
|
+
constructor(id: string, textureData: ConstructorTextureData[] | Record<VoxelFaces, ConstructorTextureData[]>);
|
|
11
|
+
process(tool: VoxelMesherDataTool): void;
|
|
12
|
+
onTexturesRegistered(textureManager: typeof TextureRegister): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { CubeVoxelShape } from "../../../../Shapes/default/Cube/Cube.voxel.shape.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { VoxelFaces, VoxelFacesArray } from "../../../../../Math/index.js";
|
|
4
|
+
export class ModCubeVoxelConstructor extends VoxelConstructor {
|
|
5
|
+
id;
|
|
6
|
+
textureData;
|
|
7
|
+
textures = {
|
|
8
|
+
[VoxelFaces.Up]: [],
|
|
9
|
+
[VoxelFaces.Down]: [],
|
|
10
|
+
[VoxelFaces.North]: [],
|
|
11
|
+
[VoxelFaces.South]: [],
|
|
12
|
+
[VoxelFaces.East]: [],
|
|
13
|
+
[VoxelFaces.West]: [],
|
|
14
|
+
};
|
|
15
|
+
constructor(id, textureData) {
|
|
16
|
+
super();
|
|
17
|
+
this.id = id;
|
|
18
|
+
this.textureData = textureData;
|
|
19
|
+
}
|
|
20
|
+
process(tool) {
|
|
21
|
+
tool.getOverlayTextures().setAll(0);
|
|
22
|
+
const shapeState = tool.voxel.getMod();
|
|
23
|
+
if (tool.isFaceExposed(VoxelFaces.Up)) {
|
|
24
|
+
tool
|
|
25
|
+
.setTexture(this.textures[VoxelFaces.Up][shapeState])
|
|
26
|
+
.calculateLight(VoxelFaces.Up);
|
|
27
|
+
CubeVoxelShape.add.up();
|
|
28
|
+
}
|
|
29
|
+
if (tool.isFaceExposed(VoxelFaces.Down)) {
|
|
30
|
+
tool
|
|
31
|
+
.setTexture(this.textures[VoxelFaces.Down][shapeState])
|
|
32
|
+
.calculateLight(VoxelFaces.Down);
|
|
33
|
+
CubeVoxelShape.add.down();
|
|
34
|
+
}
|
|
35
|
+
if (tool.isFaceExposed(VoxelFaces.East)) {
|
|
36
|
+
tool
|
|
37
|
+
.setTexture(this.textures[VoxelFaces.East][shapeState])
|
|
38
|
+
.calculateLight(VoxelFaces.East);
|
|
39
|
+
CubeVoxelShape.add.east();
|
|
40
|
+
}
|
|
41
|
+
if (tool.isFaceExposed(VoxelFaces.West)) {
|
|
42
|
+
tool
|
|
43
|
+
.setTexture(this.textures[VoxelFaces.West][shapeState])
|
|
44
|
+
.calculateLight(VoxelFaces.West);
|
|
45
|
+
CubeVoxelShape.add.west();
|
|
46
|
+
}
|
|
47
|
+
if (tool.isFaceExposed(VoxelFaces.South)) {
|
|
48
|
+
tool
|
|
49
|
+
.setTexture(this.textures[VoxelFaces.South][shapeState])
|
|
50
|
+
.calculateLight(VoxelFaces.South);
|
|
51
|
+
CubeVoxelShape.add.south();
|
|
52
|
+
}
|
|
53
|
+
if (tool.isFaceExposed(VoxelFaces.North)) {
|
|
54
|
+
tool
|
|
55
|
+
.setTexture(this.textures[VoxelFaces.North][shapeState])
|
|
56
|
+
.calculateLight(VoxelFaces.North);
|
|
57
|
+
CubeVoxelShape.add.north();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
onTexturesRegistered(textureManager) {
|
|
61
|
+
const textures = this.textureData;
|
|
62
|
+
const push = (direction, ...textureIndex) => {
|
|
63
|
+
this.textures[direction].push(...textureIndex);
|
|
64
|
+
};
|
|
65
|
+
if (Array.isArray(textures)) {
|
|
66
|
+
for (const texture of textures) {
|
|
67
|
+
for (const face of VoxelFacesArray) {
|
|
68
|
+
push(face, textureManager.getTextureUV(texture));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
for (const face of VoxelFacesArray) {
|
|
74
|
+
push(face, ...textures[face].map((_) => textureManager.getTextureUV(_)));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConstructorTextureData } from "../../../../../Textures/Constructor.types.js";
|
|
2
|
+
import { VoxelMesherDataTool } from "../../../../Tools/VoxelMesherDataTool.js";
|
|
3
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
4
|
+
import { TextureRegister } from "../../../../../Textures/TextureRegister.js";
|
|
5
|
+
export type PillarCubeVoxelConstructorData = {
|
|
6
|
+
top: ConstructorTextureData;
|
|
7
|
+
bottom: ConstructorTextureData;
|
|
8
|
+
sideMiddle: ConstructorTextureData;
|
|
9
|
+
sideBottom: ConstructorTextureData;
|
|
10
|
+
sideTop: ConstructorTextureData;
|
|
11
|
+
sideFloat: ConstructorTextureData;
|
|
12
|
+
};
|
|
13
|
+
export declare class PillarCubeVoxelConstructor extends VoxelConstructor {
|
|
14
|
+
id: string;
|
|
15
|
+
textureData: PillarCubeVoxelConstructorData;
|
|
16
|
+
textures: [
|
|
17
|
+
up: number,
|
|
18
|
+
down: number,
|
|
19
|
+
sideMiddle: number,
|
|
20
|
+
sideDown: number,
|
|
21
|
+
sideUp: number,
|
|
22
|
+
sideFloat: number
|
|
23
|
+
];
|
|
24
|
+
constructor(id: string, textureData: PillarCubeVoxelConstructorData);
|
|
25
|
+
process(tool: VoxelMesherDataTool): void;
|
|
26
|
+
onTexturesRegistered(textureManager: typeof TextureRegister): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CubeVoxelShape } from "../../../../Shapes/default/Cube/Cube.voxel.shape.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { VoxelFaces } from "../../../../../Math";
|
|
4
|
+
export class PillarCubeVoxelConstructor extends VoxelConstructor {
|
|
5
|
+
id;
|
|
6
|
+
textureData;
|
|
7
|
+
textures;
|
|
8
|
+
constructor(id, textureData) {
|
|
9
|
+
super();
|
|
10
|
+
this.id = id;
|
|
11
|
+
this.textureData = textureData;
|
|
12
|
+
}
|
|
13
|
+
process(tool) {
|
|
14
|
+
const upCheck = tool.nVoxel.loadInAt(tool.voxel.x, tool.voxel.y + 1, tool.voxel.z) &&
|
|
15
|
+
tool.voxel.isSameVoxel(tool.nVoxel);
|
|
16
|
+
const downCheck = tool.nVoxel.loadInAt(tool.voxel.x, tool.voxel.y - 1, tool.voxel.z) &&
|
|
17
|
+
tool.voxel.isSameVoxel(tool.nVoxel);
|
|
18
|
+
let side = -1;
|
|
19
|
+
determineText: if (side) {
|
|
20
|
+
if (upCheck && downCheck) {
|
|
21
|
+
side = this.textures[2];
|
|
22
|
+
break determineText;
|
|
23
|
+
}
|
|
24
|
+
if (upCheck && !downCheck) {
|
|
25
|
+
side = this.textures[3];
|
|
26
|
+
break determineText;
|
|
27
|
+
}
|
|
28
|
+
if (!upCheck && downCheck) {
|
|
29
|
+
side = this.textures[4];
|
|
30
|
+
break determineText;
|
|
31
|
+
}
|
|
32
|
+
if (!upCheck && !downCheck) {
|
|
33
|
+
side = this.textures[5];
|
|
34
|
+
break determineText;
|
|
35
|
+
}
|
|
36
|
+
side = 0;
|
|
37
|
+
}
|
|
38
|
+
tool.getOverlayTextures().setAll(0);
|
|
39
|
+
if (tool.isFaceExposed(VoxelFaces.Up)) {
|
|
40
|
+
tool.setTexture(this.textures[0]).calculateLight(VoxelFaces.Up);
|
|
41
|
+
CubeVoxelShape.add.up();
|
|
42
|
+
}
|
|
43
|
+
if (tool.isFaceExposed(VoxelFaces.Down)) {
|
|
44
|
+
tool.setTexture(this.textures[1]).calculateLight(VoxelFaces.Down);
|
|
45
|
+
CubeVoxelShape.add.down();
|
|
46
|
+
}
|
|
47
|
+
if (tool.isFaceExposed(VoxelFaces.East)) {
|
|
48
|
+
tool.setTexture(side).calculateLight(VoxelFaces.East);
|
|
49
|
+
CubeVoxelShape.add.east();
|
|
50
|
+
}
|
|
51
|
+
if (tool.isFaceExposed(VoxelFaces.West)) {
|
|
52
|
+
tool.setTexture(side).calculateLight(VoxelFaces.West);
|
|
53
|
+
CubeVoxelShape.add.west();
|
|
54
|
+
}
|
|
55
|
+
if (tool.isFaceExposed(VoxelFaces.South)) {
|
|
56
|
+
tool.setTexture(side).calculateLight(VoxelFaces.South);
|
|
57
|
+
CubeVoxelShape.add.south();
|
|
58
|
+
}
|
|
59
|
+
if (tool.isFaceExposed(VoxelFaces.North)) {
|
|
60
|
+
tool.setTexture(side).calculateLight(VoxelFaces.North);
|
|
61
|
+
CubeVoxelShape.add.north();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
onTexturesRegistered(textureManager) {
|
|
65
|
+
this.textures = [
|
|
66
|
+
textureManager.getTextureUV(this.textureData.top),
|
|
67
|
+
textureManager.getTextureUV(this.textureData.bottom),
|
|
68
|
+
textureManager.getTextureUV(this.textureData.sideMiddle),
|
|
69
|
+
textureManager.getTextureUV(this.textureData.sideBottom),
|
|
70
|
+
textureManager.getTextureUV(this.textureData.sideTop),
|
|
71
|
+
textureManager.getTextureUV(this.textureData.sideFloat),
|
|
72
|
+
];
|
|
73
|
+
this.textureData = null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VoxelMesherDataTool } from "../../../../Tools/VoxelMesherDataTool.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { TextureRegister } from "../../../../../Textures/TextureRegister.js";
|
|
4
|
+
import { DirectionNames } from "../../../../../Types";
|
|
5
|
+
import type { ConstructorTextureData } from "../../../../../Textures/Constructor.types.js";
|
|
6
|
+
export declare class SimpleCubeVoxelConstructor extends VoxelConstructor {
|
|
7
|
+
id: string;
|
|
8
|
+
textureData: ConstructorTextureData | Record<DirectionNames, ConstructorTextureData>;
|
|
9
|
+
textures: number[];
|
|
10
|
+
constructor(id: string, textureData: ConstructorTextureData | Record<DirectionNames, ConstructorTextureData>);
|
|
11
|
+
process(tool: VoxelMesherDataTool): void;
|
|
12
|
+
onTexturesRegistered(textureManager: typeof TextureRegister): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CubeVoxelShape } from "../../../../Shapes/default/Cube/Cube.voxel.shape.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { VoxelFaces } from "../../../../../Math/index.js";
|
|
4
|
+
export class SimpleCubeVoxelConstructor extends VoxelConstructor {
|
|
5
|
+
id;
|
|
6
|
+
textureData;
|
|
7
|
+
textures = [];
|
|
8
|
+
constructor(id, textureData) {
|
|
9
|
+
super();
|
|
10
|
+
this.id = id;
|
|
11
|
+
this.textureData = textureData;
|
|
12
|
+
}
|
|
13
|
+
process(tool) {
|
|
14
|
+
tool.getOverlayTextures().setAll(0);
|
|
15
|
+
if (tool.isFaceExposed(VoxelFaces.Up)) {
|
|
16
|
+
tool.setTexture(this.textures[0]).calculateLight(VoxelFaces.Up);
|
|
17
|
+
CubeVoxelShape.add.up();
|
|
18
|
+
}
|
|
19
|
+
if (tool.isFaceExposed(VoxelFaces.Down)) {
|
|
20
|
+
tool.setTexture(this.textures[1]).calculateLight(VoxelFaces.Down);
|
|
21
|
+
CubeVoxelShape.add.down();
|
|
22
|
+
}
|
|
23
|
+
if (tool.isFaceExposed(VoxelFaces.East)) {
|
|
24
|
+
tool.setTexture(this.textures[2]).calculateLight(VoxelFaces.East);
|
|
25
|
+
CubeVoxelShape.add.east();
|
|
26
|
+
}
|
|
27
|
+
if (tool.isFaceExposed(VoxelFaces.West)) {
|
|
28
|
+
tool.setTexture(this.textures[3]).calculateLight(VoxelFaces.West);
|
|
29
|
+
CubeVoxelShape.add.west();
|
|
30
|
+
}
|
|
31
|
+
if (tool.isFaceExposed(VoxelFaces.South)) {
|
|
32
|
+
tool.setTexture(this.textures[4]).calculateLight(VoxelFaces.South);
|
|
33
|
+
CubeVoxelShape.add.south();
|
|
34
|
+
}
|
|
35
|
+
if (tool.isFaceExposed(VoxelFaces.North)) {
|
|
36
|
+
tool.setTexture(this.textures[5]).calculateLight(VoxelFaces.North);
|
|
37
|
+
CubeVoxelShape.add.north();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
onTexturesRegistered(textureManager) {
|
|
41
|
+
const textures = this.textureData;
|
|
42
|
+
if (Array.isArray(textures)) {
|
|
43
|
+
let i = 6;
|
|
44
|
+
while (i--) {
|
|
45
|
+
this.textures.push(textureManager.getTextureUV(textures));
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.textures.push(textureManager.getTextureUV(textures.up));
|
|
50
|
+
this.textures.push(textureManager.getTextureUV(textures.down));
|
|
51
|
+
this.textures.push(textureManager.getTextureUV(textures.east));
|
|
52
|
+
this.textures.push(textureManager.getTextureUV(textures.west));
|
|
53
|
+
this.textures.push(textureManager.getTextureUV(textures.south));
|
|
54
|
+
this.textures.push(textureManager.getTextureUV(textures.north));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VoxelMesherDataTool } from "../../../../Tools/VoxelMesherDataTool.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { TextureRegister } from "../../../../../Textures/TextureRegister.js";
|
|
4
|
+
import type { ConstructorTextureData } from "../../../../../Textures/Constructor.types.js";
|
|
5
|
+
import { VoxelFaces } from "../../../../../Math/index.js";
|
|
6
|
+
export declare class ModHalfCubeVoxelConstructor extends VoxelConstructor {
|
|
7
|
+
id: string;
|
|
8
|
+
textureData: ConstructorTextureData[];
|
|
9
|
+
textures: Record<VoxelFaces, number[]>;
|
|
10
|
+
constructor(id: string, textureData: ConstructorTextureData[]);
|
|
11
|
+
process(tool: VoxelMesherDataTool): void;
|
|
12
|
+
onTexturesRegistered(textureManager: typeof TextureRegister): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
2
|
+
import { VoxelFaces, VoxelFacesArray } from "../../../../../Math/index.js";
|
|
3
|
+
import { HalfCubeStates, HalfCubeVoxelShape, } from "../../../../Shapes/default/Cube/HalfCube.voxel.shape.js";
|
|
4
|
+
import { LightGradient } from "../../../../Calc/Light/LightGradient.js";
|
|
5
|
+
export class ModHalfCubeVoxelConstructor extends VoxelConstructor {
|
|
6
|
+
id;
|
|
7
|
+
textureData;
|
|
8
|
+
textures = {
|
|
9
|
+
[VoxelFaces.Up]: [],
|
|
10
|
+
[VoxelFaces.Down]: [],
|
|
11
|
+
[VoxelFaces.North]: [],
|
|
12
|
+
[VoxelFaces.South]: [],
|
|
13
|
+
[VoxelFaces.East]: [],
|
|
14
|
+
[VoxelFaces.West]: [],
|
|
15
|
+
};
|
|
16
|
+
constructor(id, textureData) {
|
|
17
|
+
super();
|
|
18
|
+
this.id = id;
|
|
19
|
+
this.textureData = textureData;
|
|
20
|
+
}
|
|
21
|
+
process(tool) {
|
|
22
|
+
HalfCubeVoxelShape.start();
|
|
23
|
+
tool.getOverlayTextures().setAll(0);
|
|
24
|
+
const modState = tool.voxel.getMod();
|
|
25
|
+
const shapeState = tool.voxel.getShapeState();
|
|
26
|
+
if (tool.isFaceExposed(VoxelFaces.Up)) {
|
|
27
|
+
if (shapeState == HalfCubeStates.Down)
|
|
28
|
+
LightGradient.aoOffset.y = -1;
|
|
29
|
+
tool
|
|
30
|
+
.setTexture(this.textures[VoxelFaces.Up][modState])
|
|
31
|
+
.calculateLight(VoxelFaces.Up);
|
|
32
|
+
HalfCubeVoxelShape.add.up();
|
|
33
|
+
LightGradient.aoOffset.y = 0;
|
|
34
|
+
}
|
|
35
|
+
if (tool.isFaceExposed(VoxelFaces.Down)) {
|
|
36
|
+
tool
|
|
37
|
+
.setTexture(this.textures[VoxelFaces.Down][modState])
|
|
38
|
+
.calculateLight(VoxelFaces.Down);
|
|
39
|
+
HalfCubeVoxelShape.add.down();
|
|
40
|
+
}
|
|
41
|
+
if (tool.isFaceExposed(VoxelFaces.East)) {
|
|
42
|
+
tool
|
|
43
|
+
.setTexture(this.textures[VoxelFaces.East][modState])
|
|
44
|
+
.calculateLight(VoxelFaces.East);
|
|
45
|
+
HalfCubeVoxelShape.add.east();
|
|
46
|
+
}
|
|
47
|
+
if (tool.isFaceExposed(VoxelFaces.West)) {
|
|
48
|
+
tool
|
|
49
|
+
.setTexture(this.textures[VoxelFaces.West][modState])
|
|
50
|
+
.calculateLight(VoxelFaces.West);
|
|
51
|
+
HalfCubeVoxelShape.add.west();
|
|
52
|
+
}
|
|
53
|
+
if (tool.isFaceExposed(VoxelFaces.South)) {
|
|
54
|
+
tool
|
|
55
|
+
.setTexture(this.textures[VoxelFaces.South][modState])
|
|
56
|
+
.calculateLight(VoxelFaces.South);
|
|
57
|
+
HalfCubeVoxelShape.add.south();
|
|
58
|
+
}
|
|
59
|
+
if (tool.isFaceExposed(VoxelFaces.North)) {
|
|
60
|
+
tool
|
|
61
|
+
.setTexture(this.textures[VoxelFaces.North][modState])
|
|
62
|
+
.calculateLight(VoxelFaces.North);
|
|
63
|
+
HalfCubeVoxelShape.add.north();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
onTexturesRegistered(textureManager) {
|
|
67
|
+
const textures = this.textureData;
|
|
68
|
+
const push = (direction, ...textureIndex) => {
|
|
69
|
+
this.textures[direction].push(...textureIndex);
|
|
70
|
+
};
|
|
71
|
+
if (Array.isArray(textures)) {
|
|
72
|
+
for (const texture of textures) {
|
|
73
|
+
for (const face of VoxelFacesArray) {
|
|
74
|
+
push(face, textureManager.getTextureUV(texture));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VoxelMesherDataTool } from "../../../../Tools/VoxelMesherDataTool.js";
|
|
2
|
+
import { VoxelConstructor } from "../VoxelConstructor.js";
|
|
3
|
+
import { TextureRegister } from "../../../../../Textures/TextureRegister.js";
|
|
4
|
+
import type { ConstructorTextureData } from "../../../../../Textures/Constructor.types.js";
|
|
5
|
+
export type SimpleHalfCubeVoxelConstructorData = ConstructorTextureData | {
|
|
6
|
+
sides: ConstructorTextureData;
|
|
7
|
+
downAndUp: ConstructorTextureData;
|
|
8
|
+
};
|
|
9
|
+
export declare class SimpleHalfCubeVoxelConstructor extends VoxelConstructor {
|
|
10
|
+
id: string;
|
|
11
|
+
textureData: SimpleHalfCubeVoxelConstructorData;
|
|
12
|
+
textures: number[];
|
|
13
|
+
constructor(id: string, textureData: SimpleHalfCubeVoxelConstructorData);
|
|
14
|
+
process(tool: VoxelMesherDataTool): void;
|
|
15
|
+
onTexturesRegistered(textureManager: typeof TextureRegister): void;
|
|
16
|
+
}
|