@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,113 @@
|
|
|
1
|
+
import { Flat3DIndex, Traverse } from "@amodx/math";
|
|
2
|
+
import { StringPalette } from "../../Interfaces/Data/StringPalette";
|
|
3
|
+
import { VoxelTemplate } from "../VoxelTemplate";
|
|
4
|
+
import { NumberPalette } from "../../Interfaces/Data/NumberPalette";
|
|
5
|
+
import { DataTool } from "../../Tools/Data/DataTool";
|
|
6
|
+
import { convertToPaletteBuffer } from "../../Archive/Functions/Palettes";
|
|
7
|
+
export default function CreateTemplate(dimension, start, end) {
|
|
8
|
+
const dataTool = new DataTool();
|
|
9
|
+
const index = Flat3DIndex.GetXZYOrder();
|
|
10
|
+
const [sx, sy, sz] = [
|
|
11
|
+
end[0] - start[0],
|
|
12
|
+
end[1] - start[1],
|
|
13
|
+
end[2] - start[2],
|
|
14
|
+
];
|
|
15
|
+
index.setBounds(sx, sy, sz);
|
|
16
|
+
const idPalette = new StringPalette();
|
|
17
|
+
const secondaryIdPalette = new StringPalette();
|
|
18
|
+
const statePalette = new NumberPalette();
|
|
19
|
+
const modPalette = new NumberPalette();
|
|
20
|
+
const secondaryStatePalette = new NumberPalette();
|
|
21
|
+
const ids = new Array(index.size);
|
|
22
|
+
const state = new Array(index.size);
|
|
23
|
+
const mod = new Array(index.size);
|
|
24
|
+
const secondary = new Array(index.size);
|
|
25
|
+
dataTool.setDimension(dimension);
|
|
26
|
+
let idsAllTheSame = true;
|
|
27
|
+
let stateAllTheSame = true;
|
|
28
|
+
let modAllTheSame = true;
|
|
29
|
+
let secondaryAllTheSame = true;
|
|
30
|
+
let firstId = -1;
|
|
31
|
+
let firstState = -1;
|
|
32
|
+
let firstMod = -1;
|
|
33
|
+
let firstSecondary = -1;
|
|
34
|
+
for (const { x, y, z } of Traverse.FromToVec3(start, [end[0] - 1, end[1] - 1, end[2] - 1], 1)) {
|
|
35
|
+
if (!dataTool.loadInAt(x, y, z))
|
|
36
|
+
continue;
|
|
37
|
+
const vindex = index.getIndexXYZ(x - start[0], y - start[1], z - start[2]);
|
|
38
|
+
const raw = dataTool.getRaw();
|
|
39
|
+
const stringId = dataTool.getStringId();
|
|
40
|
+
const stateId = !statePalette.isRegistered(raw[2])
|
|
41
|
+
? statePalette.register(raw[2])
|
|
42
|
+
: statePalette.getId(raw[2]);
|
|
43
|
+
const modId = !modPalette.isRegistered(raw[4])
|
|
44
|
+
? modPalette.register(raw[4])
|
|
45
|
+
: modPalette.getId(raw[4]);
|
|
46
|
+
const voxelId = !idPalette.isRegistered(stringId)
|
|
47
|
+
? idPalette.register(stringId)
|
|
48
|
+
: idPalette.getNumberId(stringId);
|
|
49
|
+
let secondaryData = 0;
|
|
50
|
+
if (dataTool.canHaveSecondaryVoxel()) {
|
|
51
|
+
dataTool.setSecondary(true);
|
|
52
|
+
let secondaryId = dataTool.hasSecondaryVoxel()
|
|
53
|
+
? dataTool.getStringId()
|
|
54
|
+
: "dve_air";
|
|
55
|
+
dataTool.setSecondary(false);
|
|
56
|
+
secondaryData = !secondaryIdPalette.isRegistered(secondaryId)
|
|
57
|
+
? secondaryIdPalette.register(secondaryId)
|
|
58
|
+
: secondaryIdPalette.getNumberId(secondaryId);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
secondaryData = !secondaryStatePalette.isRegistered(raw[3])
|
|
62
|
+
? secondaryStatePalette.register(raw[3])
|
|
63
|
+
: secondaryStatePalette.getId(raw[3]);
|
|
64
|
+
}
|
|
65
|
+
if (firstId == -1)
|
|
66
|
+
firstId = voxelId;
|
|
67
|
+
if (firstState == -1)
|
|
68
|
+
firstState = stateId;
|
|
69
|
+
if (firstMod == -1)
|
|
70
|
+
firstMod = modId;
|
|
71
|
+
if (firstSecondary == -1)
|
|
72
|
+
firstSecondary = secondaryData;
|
|
73
|
+
ids[vindex] = voxelId;
|
|
74
|
+
mod[vindex] = modId;
|
|
75
|
+
state[vindex] = stateId;
|
|
76
|
+
secondary[vindex] = secondaryData;
|
|
77
|
+
if (firstId != voxelId)
|
|
78
|
+
idsAllTheSame = false;
|
|
79
|
+
if (firstState != stateId)
|
|
80
|
+
stateAllTheSame = false;
|
|
81
|
+
if (firstMod != modId)
|
|
82
|
+
modAllTheSame = false;
|
|
83
|
+
if (firstSecondary != secondaryData)
|
|
84
|
+
secondaryAllTheSame = false;
|
|
85
|
+
}
|
|
86
|
+
console.log("CREATE VOXEL TEMPLATE", { modPalette, mod });
|
|
87
|
+
return new VoxelTemplate({
|
|
88
|
+
templatorVersion: 0,
|
|
89
|
+
version: 0,
|
|
90
|
+
size: [sx, sy, sz],
|
|
91
|
+
palettes: {
|
|
92
|
+
id: idPalette._palette,
|
|
93
|
+
secondaryId: secondaryIdPalette._palette,
|
|
94
|
+
state: Uint16Array.from(statePalette._palette),
|
|
95
|
+
mod: Uint16Array.from(modPalette._palette),
|
|
96
|
+
secondaryState: Uint16Array.from(secondaryStatePalette._palette),
|
|
97
|
+
},
|
|
98
|
+
buffers: {
|
|
99
|
+
ids: !idsAllTheSame
|
|
100
|
+
? convertToPaletteBuffer(idPalette.size, Uint16Array.from(ids), true)
|
|
101
|
+
: ids[0],
|
|
102
|
+
mod: !modAllTheSame
|
|
103
|
+
? convertToPaletteBuffer(modPalette.size, Uint16Array.from(mod), true)
|
|
104
|
+
: mod[0],
|
|
105
|
+
state: !stateAllTheSame
|
|
106
|
+
? convertToPaletteBuffer(statePalette.size, Uint16Array.from(state), true)
|
|
107
|
+
: state[0],
|
|
108
|
+
secondary: !secondaryAllTheSame
|
|
109
|
+
? convertToPaletteBuffer(Math.max(secondaryIdPalette.size, secondaryStatePalette.size), Uint16Array.from(secondary), true)
|
|
110
|
+
: secondary[0],
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Flat3DIndex } from "@amodx/math";
|
|
2
|
+
const flipArray = ([sizeX, sizeY, sizeZ], array, direction, index) => {
|
|
3
|
+
const newArray = new Array(array.length);
|
|
4
|
+
for (let x = 0; x < sizeX; x++) {
|
|
5
|
+
for (let y = 0; y < sizeY; y++) {
|
|
6
|
+
for (let z = 0; z < sizeZ; z++) {
|
|
7
|
+
const oldIndex = index.getIndexXYZ(x, y, z);
|
|
8
|
+
let newCoords = [x, y, z];
|
|
9
|
+
if (direction === "x") {
|
|
10
|
+
newCoords[0] = sizeX - 1 - x;
|
|
11
|
+
}
|
|
12
|
+
else if (direction === "y") {
|
|
13
|
+
newCoords[1] = sizeY - 1 - y;
|
|
14
|
+
}
|
|
15
|
+
else if (direction === "z") {
|
|
16
|
+
newCoords[2] = sizeZ - 1 - z;
|
|
17
|
+
}
|
|
18
|
+
const newIndexFlat = index.getIndexXYZ(...newCoords);
|
|
19
|
+
newArray[newIndexFlat] = array[oldIndex];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
for (let i = 0; i < array.length; i++) {
|
|
24
|
+
array[i] = newArray[i];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export default function FlipTemplate(template, direction) {
|
|
28
|
+
const [sizeX, sizeY, sizeZ] = template.size;
|
|
29
|
+
const index = Flat3DIndex.GetXZYOrder();
|
|
30
|
+
index.setBounds(sizeX, sizeY, sizeZ);
|
|
31
|
+
if (typeof template.ids === "object") {
|
|
32
|
+
const ids = template.ids;
|
|
33
|
+
flipArray([sizeX, sizeY, sizeZ], ids, direction, index);
|
|
34
|
+
}
|
|
35
|
+
if (typeof template.state === "object") {
|
|
36
|
+
const state = template.state;
|
|
37
|
+
flipArray([sizeX, sizeY, sizeZ], state, direction, index);
|
|
38
|
+
}
|
|
39
|
+
if (typeof template.mod === "object") {
|
|
40
|
+
const mod = template.mod;
|
|
41
|
+
flipArray([sizeX, sizeY, sizeZ], mod, direction, index);
|
|
42
|
+
}
|
|
43
|
+
if (typeof template.secondary === "object") {
|
|
44
|
+
const secondary = template.secondary;
|
|
45
|
+
flipArray([sizeX, sizeY, sizeZ], secondary, direction, index);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VoxelTemplate } from "../VoxelTemplate";
|
|
2
|
+
export type TemplateRotationAxes = "x" | "y" | "z";
|
|
3
|
+
export type TemplateRotationAngles = 90 | 180 | 270 | -90 | -180 | -270;
|
|
4
|
+
export default function RotateTemplate(template: VoxelTemplate, angle: TemplateRotationAngles, axes?: TemplateRotationAxes): void;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Flat3DIndex } from "@amodx/math";
|
|
2
|
+
const rotateX = (angle, x, y, z, sizeX, sizeY, sizeZ) => {
|
|
3
|
+
switch (angle) {
|
|
4
|
+
case 90:
|
|
5
|
+
case -270:
|
|
6
|
+
return [x, z, sizeY - 1 - y];
|
|
7
|
+
case 180:
|
|
8
|
+
case -180:
|
|
9
|
+
return [x, sizeY - 1 - y, sizeZ - 1 - z];
|
|
10
|
+
case 270:
|
|
11
|
+
case -90:
|
|
12
|
+
return [x, sizeZ - 1 - z, y];
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const rotateY = (angle, x, y, z, sizeX, sizeY, sizeZ) => {
|
|
16
|
+
switch (angle) {
|
|
17
|
+
case 90:
|
|
18
|
+
case -270:
|
|
19
|
+
return [sizeZ - 1 - z, y, x];
|
|
20
|
+
case 180:
|
|
21
|
+
case -180:
|
|
22
|
+
return [sizeX - 1 - x, y, sizeZ - 1 - z];
|
|
23
|
+
case 270:
|
|
24
|
+
case -90:
|
|
25
|
+
return [z, y, sizeX - 1 - x];
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const rotateZ = (angle, x, y, z, sizeX, sizeY, sizeZ) => {
|
|
29
|
+
switch (angle) {
|
|
30
|
+
case 90:
|
|
31
|
+
case -270:
|
|
32
|
+
return [sizeY - 1 - y, x, z];
|
|
33
|
+
case 180:
|
|
34
|
+
case -180:
|
|
35
|
+
return [sizeX - 1 - x, sizeY - 1 - y, z];
|
|
36
|
+
case 270:
|
|
37
|
+
case -90:
|
|
38
|
+
return [y, sizeX - 1 - x, z];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const rotateArray = ([sizeX, sizeY, sizeZ], array, angle, axes, index, newIndex) => {
|
|
42
|
+
const newArray = new Array(array.length);
|
|
43
|
+
for (let x = 0; x < sizeX; x++) {
|
|
44
|
+
for (let y = 0; y < sizeY; y++) {
|
|
45
|
+
for (let z = 0; z < sizeZ; z++) {
|
|
46
|
+
const oldIndex = index.getIndexXYZ(x, y, z);
|
|
47
|
+
let newCoords;
|
|
48
|
+
switch (axes) {
|
|
49
|
+
case "x":
|
|
50
|
+
newCoords = rotateX(angle, x, y, z, sizeX, sizeY, sizeZ);
|
|
51
|
+
break;
|
|
52
|
+
case "y":
|
|
53
|
+
newCoords = rotateY(angle, x, y, z, sizeX, sizeY, sizeZ);
|
|
54
|
+
break;
|
|
55
|
+
case "z":
|
|
56
|
+
newCoords = rotateZ(angle, x, y, z, sizeX, sizeY, sizeZ);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
const newIndexFlat = newIndex.getIndexXYZ(...newCoords);
|
|
60
|
+
newArray[newIndexFlat] = array[oldIndex];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (let i = 0; i < array.length; i++) {
|
|
65
|
+
array[newIndex.getIndex(newIndex.getXYZ(i))] = newArray[i];
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export default function RotateTemplate(template, angle, axes = "y") {
|
|
69
|
+
const [sizeX, sizeY, sizeZ] = template.size;
|
|
70
|
+
const index = Flat3DIndex.GetXZYOrder();
|
|
71
|
+
index.setBounds(sizeX, sizeY, sizeZ);
|
|
72
|
+
let newSizeX = sizeX;
|
|
73
|
+
let newSizeY = sizeY;
|
|
74
|
+
let newSizeZ = sizeZ;
|
|
75
|
+
if (axes === "x") {
|
|
76
|
+
if (angle === 90 || angle === 270 || angle === -90 || angle === -270) {
|
|
77
|
+
[newSizeY, newSizeZ] = [sizeZ, sizeY];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (axes === "y") {
|
|
81
|
+
if (angle === 90 || angle === 270 || angle === -90 || angle === -270) {
|
|
82
|
+
[newSizeX, newSizeZ] = [sizeZ, sizeX];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (axes === "z") {
|
|
86
|
+
if (angle === 90 || angle === 270 || angle === -90 || angle === -270) {
|
|
87
|
+
[newSizeX, newSizeY] = [sizeY, sizeX];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const newIndex = Flat3DIndex.GetXZYOrder();
|
|
91
|
+
newIndex.setBounds(newSizeX, newSizeY, newSizeZ);
|
|
92
|
+
if (typeof template.ids === "object") {
|
|
93
|
+
const ids = template.ids;
|
|
94
|
+
rotateArray([sizeX, sizeY, sizeZ], ids, angle, axes, index, newIndex);
|
|
95
|
+
}
|
|
96
|
+
if (typeof template.state === "object") {
|
|
97
|
+
const state = template.state;
|
|
98
|
+
rotateArray([sizeX, sizeY, sizeZ], state, angle, axes, index, newIndex);
|
|
99
|
+
}
|
|
100
|
+
if (typeof template.mod === "object") {
|
|
101
|
+
const mod = template.mod;
|
|
102
|
+
rotateArray([sizeX, sizeY, sizeZ], mod, angle, axes, index, newIndex);
|
|
103
|
+
}
|
|
104
|
+
if (typeof template.secondary === "object") {
|
|
105
|
+
const secondary = template.secondary;
|
|
106
|
+
rotateArray([sizeX, sizeY, sizeZ], secondary, angle, axes, index, newIndex);
|
|
107
|
+
}
|
|
108
|
+
template.index = newIndex;
|
|
109
|
+
template.size = [newSizeX, newSizeY, newSizeZ];
|
|
110
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Flat3DIndex, Vec3Array } from "@amodx/math";
|
|
2
|
+
import { VoxelTemplateData } from "./VoxelTemplates.types";
|
|
3
|
+
import type { RawVoxelData } from "../Data/Types/VoxelData.types";
|
|
4
|
+
import { StringPalette } from "../Interfaces/Data/StringPalette";
|
|
5
|
+
import { NumberPalette } from "../Interfaces/Data/NumberPalette";
|
|
6
|
+
type TemplateCursor = {
|
|
7
|
+
position: Vec3Array;
|
|
8
|
+
raw: RawVoxelData;
|
|
9
|
+
};
|
|
10
|
+
export declare class VoxelTemplate {
|
|
11
|
+
index: Flat3DIndex;
|
|
12
|
+
size: Vec3Array;
|
|
13
|
+
ids: Uint8Array | Uint16Array | number;
|
|
14
|
+
state: Uint8Array | Uint16Array | number;
|
|
15
|
+
mod: Uint8Array | Uint16Array | number;
|
|
16
|
+
secondary: Uint8Array | Uint16Array | number;
|
|
17
|
+
idPalette: StringPalette;
|
|
18
|
+
secondaryIdPalette: StringPalette;
|
|
19
|
+
statePalette: NumberPalette;
|
|
20
|
+
modPalette: NumberPalette;
|
|
21
|
+
secondaryStatePalette: NumberPalette;
|
|
22
|
+
constructor(data: VoxelTemplateData);
|
|
23
|
+
getIndex(x: number, y: number, z: number): number;
|
|
24
|
+
getId(index: number): number;
|
|
25
|
+
getState(index: number): number;
|
|
26
|
+
getMod(index: number): number;
|
|
27
|
+
getSecondary(id: number, index: number): number;
|
|
28
|
+
traverse(): Generator<TemplateCursor>;
|
|
29
|
+
toJSON(): VoxelTemplateData;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Flat3DIndex, Traverse } from "@amodx/math";
|
|
2
|
+
import { StringPalette } from "../Interfaces/Data/StringPalette";
|
|
3
|
+
import { NumberPalette } from "../Interfaces/Data/NumberPalette";
|
|
4
|
+
import { VoxelPalette } from "../Data/Voxel/VoxelPalette";
|
|
5
|
+
import { VoxelStruct } from "../Data/Voxel/VoxelStruct";
|
|
6
|
+
import { VoxelTagIDs } from "../Data/Constants/VoxelTagIds";
|
|
7
|
+
import { getPaletteArray } from "../Archive/Functions/Palettes";
|
|
8
|
+
export class VoxelTemplate {
|
|
9
|
+
index = Flat3DIndex.GetXZYOrder();
|
|
10
|
+
size;
|
|
11
|
+
ids;
|
|
12
|
+
state;
|
|
13
|
+
mod;
|
|
14
|
+
secondary;
|
|
15
|
+
idPalette = new StringPalette();
|
|
16
|
+
secondaryIdPalette = new StringPalette();
|
|
17
|
+
statePalette = new NumberPalette();
|
|
18
|
+
modPalette = new NumberPalette();
|
|
19
|
+
secondaryStatePalette = new NumberPalette();
|
|
20
|
+
constructor(data) {
|
|
21
|
+
this.size = [...data.size];
|
|
22
|
+
this.index.setBounds(...data.size);
|
|
23
|
+
data.palettes.id.forEach((_) => this.idPalette.register(_));
|
|
24
|
+
data.palettes.state.forEach((_) => this.statePalette.register(_));
|
|
25
|
+
data.palettes.mod.forEach((_) => this.modPalette.register(_));
|
|
26
|
+
data.palettes.secondaryId.forEach((_) => this.secondaryIdPalette.register(_));
|
|
27
|
+
data.palettes.secondaryState.forEach((_) => this.secondaryStatePalette.register(_));
|
|
28
|
+
typeof data.buffers.ids == "object"
|
|
29
|
+
? (this.ids = getPaletteArray(data.palettes.id.length, data.buffers.ids))
|
|
30
|
+
: (this.ids = data.buffers.ids);
|
|
31
|
+
typeof data.buffers.state == "object"
|
|
32
|
+
? (this.state = getPaletteArray(data.palettes.state.length, data.buffers.state))
|
|
33
|
+
: (this.state = data.buffers.state);
|
|
34
|
+
typeof data.buffers.mod == "object"
|
|
35
|
+
? (this.mod = getPaletteArray(data.palettes.mod.length, data.buffers.mod))
|
|
36
|
+
: (this.mod = data.buffers.mod);
|
|
37
|
+
typeof data.buffers.secondary == "object"
|
|
38
|
+
? (this.secondary = getPaletteArray(Math.max(data.palettes.secondaryState.length, data.palettes.secondaryId.length), data.buffers.secondary))
|
|
39
|
+
: (this.secondary = data.buffers.secondary);
|
|
40
|
+
}
|
|
41
|
+
getIndex(x, y, z) {
|
|
42
|
+
return this.index.getIndexXYZ(x, y, z);
|
|
43
|
+
}
|
|
44
|
+
getId(index) {
|
|
45
|
+
const ids = this.ids;
|
|
46
|
+
return VoxelPalette.ids.getNumberId(this.idPalette.getStringId(typeof ids == "number" ? ids : ids[index]));
|
|
47
|
+
}
|
|
48
|
+
getState(index) {
|
|
49
|
+
const state = this.state;
|
|
50
|
+
return this.statePalette.getValue(typeof state == "number" ? state : state[index]);
|
|
51
|
+
}
|
|
52
|
+
getMod(index) {
|
|
53
|
+
const mod = this.mod;
|
|
54
|
+
return this.modPalette.getValue(typeof mod == "number" ? mod : mod[index]);
|
|
55
|
+
}
|
|
56
|
+
getSecondary(id, index) {
|
|
57
|
+
const secondary = this.secondary;
|
|
58
|
+
VoxelStruct.setVoxel(id);
|
|
59
|
+
if (VoxelStruct.instance[VoxelTagIDs.canHaveSecondary] == 1) {
|
|
60
|
+
return VoxelPalette.ids.getNumberId(this.secondaryIdPalette.getStringId(typeof secondary == "number" ? secondary : secondary[index]));
|
|
61
|
+
}
|
|
62
|
+
return this.secondaryStatePalette.getValue(typeof secondary == "number" ? secondary : secondary[index]);
|
|
63
|
+
}
|
|
64
|
+
*traverse() {
|
|
65
|
+
const end = this.size;
|
|
66
|
+
const raw = [0, 0, 0, 0, 0];
|
|
67
|
+
const curosr = {
|
|
68
|
+
position: [0, 0, 0],
|
|
69
|
+
raw,
|
|
70
|
+
};
|
|
71
|
+
for (const { x, y, z } of Traverse.FromToVec3([0, 0, 0], [end[0] - 1, end[1] - 1, end[2] - 1], 1)) {
|
|
72
|
+
const vindex = this.index.getIndexXYZ(x, y, z);
|
|
73
|
+
curosr.position[0] = x;
|
|
74
|
+
curosr.position[1] = y;
|
|
75
|
+
curosr.position[2] = z;
|
|
76
|
+
raw[0] = this.getId(vindex);
|
|
77
|
+
raw[1] = 0;
|
|
78
|
+
raw[2] = this.getState(vindex);
|
|
79
|
+
raw[3] = this.getSecondary(raw[0], vindex);
|
|
80
|
+
raw[4] = this.getMod(vindex);
|
|
81
|
+
if (raw[0] < 1 && raw[3] < 1)
|
|
82
|
+
continue;
|
|
83
|
+
yield curosr;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
toJSON() {
|
|
87
|
+
return {
|
|
88
|
+
templatorVersion: 0,
|
|
89
|
+
version: 0,
|
|
90
|
+
size: this.size,
|
|
91
|
+
palettes: {
|
|
92
|
+
id: this.idPalette._palette,
|
|
93
|
+
secondaryId: this.secondaryIdPalette._palette,
|
|
94
|
+
state: Uint16Array.from(this.statePalette._palette),
|
|
95
|
+
mod: Uint16Array.from(this.modPalette._palette),
|
|
96
|
+
secondaryState: Uint16Array.from(this.secondaryStatePalette._palette),
|
|
97
|
+
},
|
|
98
|
+
buffers: {
|
|
99
|
+
ids: this.ids instanceof Uint16Array ||
|
|
100
|
+
this.ids instanceof Uint8Array ||
|
|
101
|
+
typeof this.ids == "number"
|
|
102
|
+
? this.ids
|
|
103
|
+
: new Uint8Array(this.ids.buffer),
|
|
104
|
+
mod: this.mod instanceof Uint16Array ||
|
|
105
|
+
this.mod instanceof Uint8Array ||
|
|
106
|
+
typeof this.mod == "number"
|
|
107
|
+
? this.mod
|
|
108
|
+
: new Uint8Array(this.mod.buffer),
|
|
109
|
+
state: this.state instanceof Uint16Array ||
|
|
110
|
+
this.state instanceof Uint8Array ||
|
|
111
|
+
typeof this.state == "number"
|
|
112
|
+
? this.state
|
|
113
|
+
: new Uint8Array(this.state.buffer),
|
|
114
|
+
secondary: this.secondary instanceof Uint16Array ||
|
|
115
|
+
this.secondary instanceof Uint8Array ||
|
|
116
|
+
typeof this.secondary == "number"
|
|
117
|
+
? this.secondary
|
|
118
|
+
: new Uint8Array(this.secondary.buffer),
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Vec3Array } from "@amodx/math";
|
|
2
|
+
export interface VoxelTemplateBuffers {
|
|
3
|
+
ids: Uint16Array | Uint8Array | number;
|
|
4
|
+
state: Uint16Array | Uint8Array | number;
|
|
5
|
+
mod: Uint16Array | Uint8Array | number;
|
|
6
|
+
secondary: Uint16Array | Uint8Array | number;
|
|
7
|
+
}
|
|
8
|
+
export interface VoxelTemplatePaletteData {
|
|
9
|
+
id: string[];
|
|
10
|
+
secondaryId: string[];
|
|
11
|
+
state: Uint16Array;
|
|
12
|
+
mod: Uint16Array;
|
|
13
|
+
secondaryState: Uint16Array;
|
|
14
|
+
}
|
|
15
|
+
export interface VoxelTemplateData {
|
|
16
|
+
/** Number representing the version of the templator used. */
|
|
17
|
+
templatorVersion: number;
|
|
18
|
+
/** Number representing the version of the voxel data. */
|
|
19
|
+
version: number;
|
|
20
|
+
size: Vec3Array;
|
|
21
|
+
palettes: VoxelTemplatePaletteData;
|
|
22
|
+
buffers: VoxelTemplateBuffers;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Functions/CreateTemplate";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Functions/CreateTemplate";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type TextureTypes = string;
|
|
2
|
+
export type TextureTypeUVMap = Record<string, Record<string, Record<string, number>>>;
|
|
3
|
+
export type TextureAnimationData = {
|
|
4
|
+
/**# Frames
|
|
5
|
+
* If the texture has animation frames the number of frames must be set to the number
|
|
6
|
+
* texture animatoin images. This number must be greater than 1.
|
|
7
|
+
*
|
|
8
|
+
* The number will be used to locate all the associated frames.
|
|
9
|
+
*
|
|
10
|
+
* Example: If you specify 3 frames for a texture with the ID **dreamstone** the folder would look like this:
|
|
11
|
+
* - dreamstone/default-1.png
|
|
12
|
+
* - dreamstone/default-2.png
|
|
13
|
+
* - dreamstone/default-3.png
|
|
14
|
+
*/
|
|
15
|
+
frames: number;
|
|
16
|
+
/**# Anim Keys
|
|
17
|
+
* If the texture is animated you must supply the anim key frames which
|
|
18
|
+
* is just the order of the frames.
|
|
19
|
+
*/
|
|
20
|
+
animKeys?: number[];
|
|
21
|
+
/**# Global Frame Time
|
|
22
|
+
* ---
|
|
23
|
+
* Specifies how many frames every anim key should be display.
|
|
24
|
+
*/
|
|
25
|
+
globalFrameTime?: number;
|
|
26
|
+
/**# Anim Key Frame Time
|
|
27
|
+
* ---
|
|
28
|
+
* If set globalFrameTime will be ignored.
|
|
29
|
+
* Specifies how many frames every anim should be displayed.
|
|
30
|
+
* You must supply a number for every animKey.
|
|
31
|
+
*/
|
|
32
|
+
animKeyFrameTimes?: number[];
|
|
33
|
+
};
|
|
34
|
+
export type TextureDataBase = {
|
|
35
|
+
/**# rawData
|
|
36
|
+
* Provide a Uint8ClampedArray or an array of Uint8ClampedArray's instead of downloading
|
|
37
|
+
*/
|
|
38
|
+
rawData?: Uint8ClampedArray | Uint8ClampedArray[];
|
|
39
|
+
/**# base64
|
|
40
|
+
* Provide a base64 encoded string to use instead of downloading
|
|
41
|
+
*/
|
|
42
|
+
base64?: string | string[];
|
|
43
|
+
/**# includeInRawDataMap
|
|
44
|
+
* Will keep a Uint8ClampedArray of the loaded texture if set to true.
|
|
45
|
+
*/
|
|
46
|
+
includeInRawDataMap?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type TextureData = {
|
|
49
|
+
type: TextureTypes;
|
|
50
|
+
/**# ID
|
|
51
|
+
* The id of the texture.
|
|
52
|
+
* This will be used to locate the file.
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**# Path
|
|
56
|
+
* If the texture is not in the default path specify it here.
|
|
57
|
+
*/
|
|
58
|
+
path?: string;
|
|
59
|
+
/**# Segment
|
|
60
|
+
* Define the segmetn of the texutre. By default it is main.
|
|
61
|
+
*/
|
|
62
|
+
segment?: string;
|
|
63
|
+
/**# normalMap
|
|
64
|
+
* If the texture is an overlay specify it here.
|
|
65
|
+
*/
|
|
66
|
+
normalMap?: boolean;
|
|
67
|
+
/**# Varations
|
|
68
|
+
* The name of the texture must be default with the folder being its ID.
|
|
69
|
+
* Variations allow you to add variations to the same texture.
|
|
70
|
+
*
|
|
71
|
+
* If you add a variation of "grassy-up" you must you include in the
|
|
72
|
+
* folder of the texture one with the name 'grassy-up'.
|
|
73
|
+
*
|
|
74
|
+
* So the files in that folder would be for a texture with the ID **dreamstone**
|
|
75
|
+
* - dreamstone/default.png
|
|
76
|
+
* - dreamstone/grassy-up.png
|
|
77
|
+
*/
|
|
78
|
+
variations?: Record<string, TextureAnimationData & TextureDataBase>;
|
|
79
|
+
} & TextureAnimationData & TextureDataBase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|