@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,264 @@
|
|
|
1
|
+
import { Quad } from "@amodx/meshing/Classes/Quad";
|
|
2
|
+
import { QuadVerticies } from "@amodx/meshing/Geometry.types";
|
|
3
|
+
import { Vector3Like } from "@amodx/math";
|
|
4
|
+
// Utility function to convert degrees to radians
|
|
5
|
+
function degreesToRadians(degrees) {
|
|
6
|
+
return (degrees * Math.PI) / 180;
|
|
7
|
+
}
|
|
8
|
+
export function TransformQuad(quad, transform) {
|
|
9
|
+
const p1 = { ...quad.positions.vertices[QuadVerticies.TopRight] };
|
|
10
|
+
const p2 = { ...quad.positions.vertices[QuadVerticies.TopLeft] };
|
|
11
|
+
const p3 = { ...quad.positions.vertices[QuadVerticies.BottomLeft] };
|
|
12
|
+
const p4 = { ...quad.positions.vertices[QuadVerticies.BottomRight] };
|
|
13
|
+
// Create an array of vertices
|
|
14
|
+
const vertices = [p1, p2, p3, p4];
|
|
15
|
+
// Compute the centroid of the quad
|
|
16
|
+
const centroid = {
|
|
17
|
+
x: (p1.x + p2.x + p3.x + p4.x) / 4,
|
|
18
|
+
y: (p1.y + p2.y + p3.y + p4.y) / 4,
|
|
19
|
+
z: (p1.z + p2.z + p3.z + p4.z) / 4,
|
|
20
|
+
};
|
|
21
|
+
// Initialize effective scales
|
|
22
|
+
let effectiveScaleX = 1;
|
|
23
|
+
let effectiveScaleY = 1;
|
|
24
|
+
let effectiveScaleZ = 1;
|
|
25
|
+
// Apply scale if specified
|
|
26
|
+
if (transform.scale) {
|
|
27
|
+
const [scaleX, scaleY, scaleZ] = transform.scale;
|
|
28
|
+
effectiveScaleX = scaleX;
|
|
29
|
+
effectiveScaleY = scaleY;
|
|
30
|
+
effectiveScaleZ = scaleZ;
|
|
31
|
+
}
|
|
32
|
+
// Apply flips by negating effective scales
|
|
33
|
+
if (transform.flip) {
|
|
34
|
+
const [flipX, flipY, flipZ] = transform.flip;
|
|
35
|
+
if (flipX)
|
|
36
|
+
effectiveScaleX *= -1;
|
|
37
|
+
if (flipY)
|
|
38
|
+
effectiveScaleY *= -1;
|
|
39
|
+
if (flipZ)
|
|
40
|
+
effectiveScaleZ *= -1;
|
|
41
|
+
}
|
|
42
|
+
// Compute determinant
|
|
43
|
+
const determinant = effectiveScaleX * effectiveScaleY * effectiveScaleZ;
|
|
44
|
+
// Apply scaling and flips
|
|
45
|
+
for (const vertex of vertices) {
|
|
46
|
+
vertex.x = centroid.x + (vertex.x - centroid.x) * effectiveScaleX;
|
|
47
|
+
vertex.y = centroid.y + (vertex.y - centroid.y) * effectiveScaleY;
|
|
48
|
+
vertex.z = centroid.z + (vertex.z - centroid.z) * effectiveScaleZ;
|
|
49
|
+
}
|
|
50
|
+
// Rotate vertices around the pivot point if rotation is specified
|
|
51
|
+
if (transform.rotation) {
|
|
52
|
+
const [rotXDeg, rotYDeg, rotZDeg] = transform.rotation;
|
|
53
|
+
const rotX = degreesToRadians(rotXDeg);
|
|
54
|
+
const rotY = degreesToRadians(rotYDeg);
|
|
55
|
+
const rotZ = degreesToRadians(rotZDeg);
|
|
56
|
+
const pivot = transform.rotationPivot
|
|
57
|
+
? {
|
|
58
|
+
x: transform.rotationPivot[0],
|
|
59
|
+
y: transform.rotationPivot[1],
|
|
60
|
+
z: transform.rotationPivot[2],
|
|
61
|
+
}
|
|
62
|
+
: centroid;
|
|
63
|
+
for (const vertex of vertices) {
|
|
64
|
+
// Translate vertex to pivot point
|
|
65
|
+
let x = vertex.x - pivot.x;
|
|
66
|
+
let y = vertex.y - pivot.y;
|
|
67
|
+
let z = vertex.z - pivot.z;
|
|
68
|
+
// Rotation around X-axis
|
|
69
|
+
if (rotX) {
|
|
70
|
+
const cosX = Math.cos(rotX);
|
|
71
|
+
const sinX = Math.sin(rotX);
|
|
72
|
+
const y1 = y * cosX - z * sinX;
|
|
73
|
+
const z1 = y * sinX + z * cosX;
|
|
74
|
+
y = y1;
|
|
75
|
+
z = z1;
|
|
76
|
+
}
|
|
77
|
+
// Rotation around Y-axis
|
|
78
|
+
if (rotY) {
|
|
79
|
+
const cosY = Math.cos(rotY);
|
|
80
|
+
const sinY = Math.sin(rotY);
|
|
81
|
+
const x1 = x * cosY + z * sinY;
|
|
82
|
+
const z1 = -x * sinY + z * cosY;
|
|
83
|
+
x = x1;
|
|
84
|
+
z = z1;
|
|
85
|
+
}
|
|
86
|
+
// Rotation around Z-axis
|
|
87
|
+
if (rotZ) {
|
|
88
|
+
const cosZ = Math.cos(rotZ);
|
|
89
|
+
const sinZ = Math.sin(rotZ);
|
|
90
|
+
const x1 = x * cosZ - y * sinZ;
|
|
91
|
+
const y1 = x * sinZ + y * cosZ;
|
|
92
|
+
x = x1;
|
|
93
|
+
y = y1;
|
|
94
|
+
}
|
|
95
|
+
// Translate vertex back from pivot point
|
|
96
|
+
vertex.x = x + pivot.x;
|
|
97
|
+
vertex.y = y + pivot.y;
|
|
98
|
+
vertex.z = z + pivot.z;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Translate vertices if position is specified
|
|
102
|
+
if (transform.position) {
|
|
103
|
+
const [dx, dy, dz] = transform.position;
|
|
104
|
+
for (const vertex of vertices) {
|
|
105
|
+
vertex.x += dx;
|
|
106
|
+
vertex.y += dy;
|
|
107
|
+
vertex.z += dz;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// If determinant is negative, reverse vertex order
|
|
111
|
+
if (determinant < 0) {
|
|
112
|
+
vertices.reverse();
|
|
113
|
+
}
|
|
114
|
+
// Create a new quad with the transformed vertices
|
|
115
|
+
const transformedQuad = Quad.Create(vertices.map((vertex) => Vector3Like.ToArray(vertex)));
|
|
116
|
+
return transformedQuad;
|
|
117
|
+
}
|
|
118
|
+
export function TransformBox(quads, transform) {
|
|
119
|
+
// Collect all unique vertices from the quads
|
|
120
|
+
const vertexMap = new Map();
|
|
121
|
+
for (const quad of quads) {
|
|
122
|
+
const vertices = [
|
|
123
|
+
quad.positions.vertices[QuadVerticies.TopRight],
|
|
124
|
+
quad.positions.vertices[QuadVerticies.TopLeft],
|
|
125
|
+
quad.positions.vertices[QuadVerticies.BottomLeft],
|
|
126
|
+
quad.positions.vertices[QuadVerticies.BottomRight],
|
|
127
|
+
];
|
|
128
|
+
for (const vertex of vertices) {
|
|
129
|
+
const key = `${vertex.x},${vertex.y},${vertex.z}`;
|
|
130
|
+
if (!vertexMap.has(key)) {
|
|
131
|
+
vertexMap.set(key, { ...vertex });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const uniqueVertices = Array.from(vertexMap.values());
|
|
136
|
+
// Compute the centroid of the box
|
|
137
|
+
const centroid = { x: 0, y: 0, z: 0 };
|
|
138
|
+
for (const vertex of uniqueVertices) {
|
|
139
|
+
centroid.x += vertex.x;
|
|
140
|
+
centroid.y += vertex.y;
|
|
141
|
+
centroid.z += vertex.z;
|
|
142
|
+
}
|
|
143
|
+
centroid.x /= uniqueVertices.length;
|
|
144
|
+
centroid.y /= uniqueVertices.length;
|
|
145
|
+
centroid.z /= uniqueVertices.length;
|
|
146
|
+
let scaled = false;
|
|
147
|
+
// Initialize effective scales
|
|
148
|
+
let effectiveScaleX = 1;
|
|
149
|
+
let effectiveScaleY = 1;
|
|
150
|
+
let effectiveScaleZ = 1;
|
|
151
|
+
// Apply scale if specified
|
|
152
|
+
if (transform.scale) {
|
|
153
|
+
const [scaleX, scaleY, scaleZ] = transform.scale;
|
|
154
|
+
effectiveScaleX = scaleX;
|
|
155
|
+
effectiveScaleY = scaleY;
|
|
156
|
+
effectiveScaleZ = scaleZ;
|
|
157
|
+
scaled = true;
|
|
158
|
+
}
|
|
159
|
+
// Apply flips by negating effective scales
|
|
160
|
+
if (transform.flip) {
|
|
161
|
+
const [flipX, flipY, flipZ] = transform.flip;
|
|
162
|
+
if (flipX)
|
|
163
|
+
effectiveScaleX *= -1;
|
|
164
|
+
if (flipY)
|
|
165
|
+
effectiveScaleY *= -1;
|
|
166
|
+
if (flipZ)
|
|
167
|
+
effectiveScaleZ *= -1;
|
|
168
|
+
scaled = true;
|
|
169
|
+
}
|
|
170
|
+
// Compute determinant
|
|
171
|
+
const determinant = effectiveScaleX * effectiveScaleY * effectiveScaleZ;
|
|
172
|
+
if (scaled) {
|
|
173
|
+
// Apply scaling and flips to each unique vertex
|
|
174
|
+
for (const vertex of uniqueVertices) {
|
|
175
|
+
vertex.x = centroid.x + (vertex.x - centroid.x) * effectiveScaleX;
|
|
176
|
+
vertex.y = centroid.y + (vertex.y - centroid.y) * effectiveScaleY;
|
|
177
|
+
vertex.z = centroid.z + (vertex.z - centroid.z) * effectiveScaleZ;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Rotate around a pivot point if specified
|
|
181
|
+
if (transform.rotation) {
|
|
182
|
+
const [rotXDeg, rotYDeg, rotZDeg] = transform.rotation;
|
|
183
|
+
const rotX = degreesToRadians(rotXDeg);
|
|
184
|
+
const rotY = degreesToRadians(rotYDeg);
|
|
185
|
+
const rotZ = degreesToRadians(rotZDeg);
|
|
186
|
+
const pivot = transform.rotationPivot
|
|
187
|
+
? {
|
|
188
|
+
x: transform.rotationPivot[0],
|
|
189
|
+
y: transform.rotationPivot[1],
|
|
190
|
+
z: transform.rotationPivot[2],
|
|
191
|
+
}
|
|
192
|
+
: centroid;
|
|
193
|
+
if (transform.rotationPivot) {
|
|
194
|
+
console.warn(pivot, transform.rotationPivot);
|
|
195
|
+
}
|
|
196
|
+
for (const vertex of uniqueVertices) {
|
|
197
|
+
// Translate vertex to pivot point
|
|
198
|
+
let x = vertex.x - pivot.x;
|
|
199
|
+
let y = vertex.y - pivot.y;
|
|
200
|
+
let z = vertex.z - pivot.z;
|
|
201
|
+
// Rotation around X-axis
|
|
202
|
+
if (rotX) {
|
|
203
|
+
const cosX = Math.cos(rotX);
|
|
204
|
+
const sinX = Math.sin(rotX);
|
|
205
|
+
const y1 = y * cosX - z * sinX;
|
|
206
|
+
const z1 = y * sinX + z * cosX;
|
|
207
|
+
y = y1;
|
|
208
|
+
z = z1;
|
|
209
|
+
}
|
|
210
|
+
// Rotation around Y-axis
|
|
211
|
+
if (rotY) {
|
|
212
|
+
const cosY = Math.cos(rotY);
|
|
213
|
+
const sinY = Math.sin(rotY);
|
|
214
|
+
const x1 = x * cosY + z * sinY;
|
|
215
|
+
const z1 = -x * sinY + z * cosY;
|
|
216
|
+
x = x1;
|
|
217
|
+
z = z1;
|
|
218
|
+
}
|
|
219
|
+
// Rotation around Z-axis
|
|
220
|
+
if (rotZ) {
|
|
221
|
+
const cosZ = Math.cos(rotZ);
|
|
222
|
+
const sinZ = Math.sin(rotZ);
|
|
223
|
+
const x1 = x * cosZ - y * sinZ;
|
|
224
|
+
const y1 = x * sinZ + y * cosZ;
|
|
225
|
+
x = x1;
|
|
226
|
+
y = y1;
|
|
227
|
+
}
|
|
228
|
+
// Translate vertex back from pivot point
|
|
229
|
+
vertex.x = x + pivot.x;
|
|
230
|
+
vertex.y = y + pivot.y;
|
|
231
|
+
vertex.z = z + pivot.z;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
// Translate vertices if position is specified
|
|
235
|
+
if (transform.position) {
|
|
236
|
+
const [dx, dy, dz] = transform.position;
|
|
237
|
+
for (const vertex of uniqueVertices) {
|
|
238
|
+
vertex.x += dx;
|
|
239
|
+
vertex.y += dy;
|
|
240
|
+
vertex.z += dz;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// Update the quads with transformed vertices
|
|
244
|
+
const transformedQuads = [];
|
|
245
|
+
for (const quad of quads) {
|
|
246
|
+
const originalVertices = [
|
|
247
|
+
quad.positions.vertices[QuadVerticies.TopRight],
|
|
248
|
+
quad.positions.vertices[QuadVerticies.TopLeft],
|
|
249
|
+
quad.positions.vertices[QuadVerticies.BottomLeft],
|
|
250
|
+
quad.positions.vertices[QuadVerticies.BottomRight],
|
|
251
|
+
];
|
|
252
|
+
const transformedVertices = originalVertices.map((vertex) => {
|
|
253
|
+
const key = `${vertex.x},${vertex.y},${vertex.z}`;
|
|
254
|
+
return vertexMap.get(key);
|
|
255
|
+
});
|
|
256
|
+
// If determinant is negative, reverse the vertex order
|
|
257
|
+
if (determinant < 0) {
|
|
258
|
+
transformedVertices.reverse();
|
|
259
|
+
}
|
|
260
|
+
const newQuad = Quad.Create(transformedVertices.map((v) => Vector3Like.ToArray(v)));
|
|
261
|
+
transformedQuads.push(newQuad);
|
|
262
|
+
}
|
|
263
|
+
return transformedQuads;
|
|
264
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LogicStatementReader } from "./LogicStatementReader";
|
|
2
|
+
import { StateSchema } from "./Schema/StateSchema";
|
|
3
|
+
import { StateLogicStatement } from "./State.types";
|
|
4
|
+
export declare class CondtionalTreeReader {
|
|
5
|
+
schema: StateSchema;
|
|
6
|
+
tree: any[];
|
|
7
|
+
statements: LogicStatementReader[];
|
|
8
|
+
constructor(schema: StateSchema, statements: StateLogicStatement[], tree: any[]);
|
|
9
|
+
getState(shapeState: number): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LogicStatementReader } from "./LogicStatementReader";
|
|
2
|
+
export class CondtionalTreeReader {
|
|
3
|
+
schema;
|
|
4
|
+
tree;
|
|
5
|
+
statements = [];
|
|
6
|
+
constructor(schema, statements, tree) {
|
|
7
|
+
this.schema = schema;
|
|
8
|
+
this.tree = tree;
|
|
9
|
+
for (const statement of statements) {
|
|
10
|
+
this.statements.push(new LogicStatementReader(schema, statement));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
getState(shapeState) {
|
|
14
|
+
if (!this.tree.length)
|
|
15
|
+
return -1;
|
|
16
|
+
let curretNode = this.tree;
|
|
17
|
+
for (let i = 0; i < this.statements.length; i++) {
|
|
18
|
+
curretNode = curretNode[this.statements[i].getValue(shapeState) ? 1 : 0];
|
|
19
|
+
}
|
|
20
|
+
return curretNode;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StateSchema } from "./Schema/StateSchema";
|
|
2
|
+
import { StateLogicStatement } from "./State.types";
|
|
3
|
+
export declare class LogicStatementReader {
|
|
4
|
+
schema: StateSchema;
|
|
5
|
+
statement: StateLogicStatement;
|
|
6
|
+
constructor(schema: StateSchema, statement: StateLogicStatement);
|
|
7
|
+
getValue(shapeState: number): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StateCompareOperations, StateLogiceOperations, } from "./State.types";
|
|
2
|
+
export class LogicStatementReader {
|
|
3
|
+
schema;
|
|
4
|
+
statement;
|
|
5
|
+
constructor(schema, statement) {
|
|
6
|
+
this.schema = schema;
|
|
7
|
+
this.statement = statement;
|
|
8
|
+
}
|
|
9
|
+
getValue(shapeState) {
|
|
10
|
+
let currentOperation = -1;
|
|
11
|
+
let returnVaue = false;
|
|
12
|
+
let currentValue = false;
|
|
13
|
+
for (let i = 0; i < this.statement.length; i++) {
|
|
14
|
+
const node = this.statement[i];
|
|
15
|
+
if (node == StateLogiceOperations.And ||
|
|
16
|
+
node == StateLogiceOperations.Or) {
|
|
17
|
+
currentOperation = node;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const value = this.schema.nodes[node[0]].getValue(shapeState);
|
|
21
|
+
switch (node[1]) {
|
|
22
|
+
case StateCompareOperations.Equals:
|
|
23
|
+
currentValue = value == node[2];
|
|
24
|
+
break;
|
|
25
|
+
case StateCompareOperations.NotEquals:
|
|
26
|
+
currentValue = value != node[2];
|
|
27
|
+
break;
|
|
28
|
+
case StateCompareOperations.GreaterThan:
|
|
29
|
+
currentValue = value >= node[2];
|
|
30
|
+
break;
|
|
31
|
+
case StateCompareOperations.LessThan:
|
|
32
|
+
currentValue = value <= node[2];
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
if (currentOperation == -1) {
|
|
36
|
+
returnVaue = currentValue;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
switch (currentOperation) {
|
|
40
|
+
case StateLogiceOperations.And:
|
|
41
|
+
returnVaue = returnVaue && currentValue;
|
|
42
|
+
break;
|
|
43
|
+
case StateLogiceOperations.Or:
|
|
44
|
+
returnVaue = returnVaue || currentValue;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return returnVaue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BinarySchemaNode } from "./BinarySchemaNode";
|
|
2
|
+
import { BinarySchemaNodeData } from "../State.types";
|
|
3
|
+
export declare class BinarySchema {
|
|
4
|
+
nodeMap: Map<string, BinarySchemaNode>;
|
|
5
|
+
nodes: BinarySchemaNode[];
|
|
6
|
+
constructor(schema: BinarySchemaNodeData[]);
|
|
7
|
+
private _value;
|
|
8
|
+
startEncoding(): this;
|
|
9
|
+
getNmber(id: string): number;
|
|
10
|
+
getValue(id: string): string;
|
|
11
|
+
setNumber(id: string, value: number): this;
|
|
12
|
+
setValue(id: string, value: string): this;
|
|
13
|
+
getEncoded(): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BinarySchemaNode } from "./BinarySchemaNode";
|
|
2
|
+
export class BinarySchema {
|
|
3
|
+
nodeMap = new Map();
|
|
4
|
+
nodes = [];
|
|
5
|
+
constructor(schema) {
|
|
6
|
+
for (const node of schema) {
|
|
7
|
+
if (node.type == "binary") {
|
|
8
|
+
const newNode = new BinarySchemaNode(node);
|
|
9
|
+
this.nodes.push(newNode);
|
|
10
|
+
this.nodeMap.set(node.id, newNode);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
_value = 0;
|
|
15
|
+
startEncoding() {
|
|
16
|
+
this._value = 0;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
getNmber(id) {
|
|
20
|
+
const node = this.nodeMap.get(id);
|
|
21
|
+
if (!node)
|
|
22
|
+
throw new Error(`Node with ${id} does not exist.`);
|
|
23
|
+
return node.getValue(this._value);
|
|
24
|
+
}
|
|
25
|
+
getValue(id) {
|
|
26
|
+
const node = this.nodeMap.get(id);
|
|
27
|
+
if (!node)
|
|
28
|
+
throw new Error(`Node with ${id} does not exist.`);
|
|
29
|
+
if (!node.valuePalette)
|
|
30
|
+
throw new Error(`Node with ${id} does not have a value palette.`);
|
|
31
|
+
return node.valuePalette.getStringId(node.getValue(this._value));
|
|
32
|
+
}
|
|
33
|
+
setNumber(id, value) {
|
|
34
|
+
const node = this.nodeMap.get(id);
|
|
35
|
+
if (!node)
|
|
36
|
+
throw new Error(`Node with ${id} does not exist.`);
|
|
37
|
+
this._value = node.setValue(this._value, value);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
setValue(id, value) {
|
|
41
|
+
const node = this.nodeMap.get(id);
|
|
42
|
+
if (!node)
|
|
43
|
+
throw new Error(`Node with ${id} does not exist.`);
|
|
44
|
+
if (!node.valuePalette)
|
|
45
|
+
throw new Error(`Node with ${id} does not have a value palette.`);
|
|
46
|
+
this._value = node.setValue(this._value, node.valuePalette.getNumberId(value));
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
getEncoded() {
|
|
50
|
+
return this._value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StringPalette } from "../../../Interfaces/Data/StringPalette";
|
|
2
|
+
import { BinarySchemaNodeData } from "../State.types";
|
|
3
|
+
export declare class BinarySchemaNode {
|
|
4
|
+
id: string;
|
|
5
|
+
valuePalette?: StringPalette;
|
|
6
|
+
bitIndex: number;
|
|
7
|
+
bitMask: number;
|
|
8
|
+
constructor(data: BinarySchemaNodeData);
|
|
9
|
+
getValue(data: number): number;
|
|
10
|
+
setValue(data: number, value: number): number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StringPalette } from "../../../Interfaces/Data/StringPalette";
|
|
2
|
+
export class BinarySchemaNode {
|
|
3
|
+
id;
|
|
4
|
+
valuePalette;
|
|
5
|
+
bitIndex = 0;
|
|
6
|
+
bitMask = 0;
|
|
7
|
+
constructor(data) {
|
|
8
|
+
this.id = data.id;
|
|
9
|
+
this.bitIndex = data.index;
|
|
10
|
+
this.bitMask = data.mask;
|
|
11
|
+
if (data.valuePalette)
|
|
12
|
+
this.valuePalette = new StringPalette(data.valuePalette);
|
|
13
|
+
}
|
|
14
|
+
getValue(data) {
|
|
15
|
+
return (data & (this.bitMask << this.bitIndex)) >> this.bitIndex;
|
|
16
|
+
}
|
|
17
|
+
setValue(data, value) {
|
|
18
|
+
return ((data & ~(this.bitMask << this.bitIndex)) |
|
|
19
|
+
((value & this.bitMask) << this.bitIndex));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SameVoxelRelationsConditionData } from "../../../VoxelModel.types";
|
|
2
|
+
import { ShapeStateSchemaRelationsCondition } from "./ShapeStateSchemaRelationsCondition";
|
|
3
|
+
import { StateSchema } from "../StateSchema";
|
|
4
|
+
export declare class SameVoxelCondition extends ShapeStateSchemaRelationsCondition {
|
|
5
|
+
data: SameVoxelRelationsConditionData;
|
|
6
|
+
constructor(schema: StateSchema, data: SameVoxelRelationsConditionData);
|
|
7
|
+
evulate(): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ShapeStateSchemaRelationsCondition } from "./ShapeStateSchemaRelationsCondition";
|
|
2
|
+
export class SameVoxelCondition extends ShapeStateSchemaRelationsCondition {
|
|
3
|
+
data;
|
|
4
|
+
constructor(schema, data) {
|
|
5
|
+
super(schema);
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
evulate() {
|
|
9
|
+
if (!this.schema.nVoxel.loadInAt(this.schema.voxel.x + this.data.direction[0], this.schema.voxel.y + this.data.direction[1], this.schema.voxel.z + this.data.direction[2]))
|
|
10
|
+
return false;
|
|
11
|
+
return this.schema.voxel.getId() == this.schema.nVoxel.getId();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VoxelRelationsScehmaNodeData } from "../State.types";
|
|
2
|
+
import { ShapeStateSchemaRelationsCondition } from "./Conditions/ShapeStateSchemaRelationsCondition";
|
|
3
|
+
import { StateSchema } from "./StateSchema";
|
|
4
|
+
export declare class ShapeStateRelationsNode {
|
|
5
|
+
schema: StateSchema;
|
|
6
|
+
id: string;
|
|
7
|
+
conditions: ShapeStateSchemaRelationsCondition[];
|
|
8
|
+
constructor(schema: StateSchema, data: VoxelRelationsScehmaNodeData);
|
|
9
|
+
getValue(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SameVoxelCondition } from "./Conditions/SameVoxelConditions";
|
|
2
|
+
export class ShapeStateRelationsNode {
|
|
3
|
+
schema;
|
|
4
|
+
id;
|
|
5
|
+
conditions = [];
|
|
6
|
+
constructor(schema, data) {
|
|
7
|
+
this.schema = schema;
|
|
8
|
+
this.id = data.id;
|
|
9
|
+
for (const cond of data.conditions) {
|
|
10
|
+
if (cond.type == "same-voxel") {
|
|
11
|
+
this.conditions.push(new SameVoxelCondition(schema, cond));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
getValue() {
|
|
16
|
+
let value = 1;
|
|
17
|
+
const conditionsLength = this.conditions.length;
|
|
18
|
+
for (let i = 0; i < conditionsLength; i++) {
|
|
19
|
+
if (!this.conditions[i].evulate()) {
|
|
20
|
+
value = 0;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShapeStateRelationsNode } from "./ShapeStateRelationsNode";
|
|
2
|
+
import { BinarySchemaNode } from "./BinarySchemaNode";
|
|
3
|
+
import { VoxelModelStateSchemaData } from "../State.types";
|
|
4
|
+
import { DataTool } from "../../../Tools/Data/DataTool";
|
|
5
|
+
export declare class StateSchema {
|
|
6
|
+
voxel: DataTool;
|
|
7
|
+
nVoxel: DataTool;
|
|
8
|
+
nodes: (BinarySchemaNode | ShapeStateRelationsNode)[];
|
|
9
|
+
constructor(schema: VoxelModelStateSchemaData[]);
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ShapeStateRelationsNode } from "./ShapeStateRelationsNode";
|
|
2
|
+
import { BinarySchemaNode } from "./BinarySchemaNode";
|
|
3
|
+
import { DataTool } from "../../../Tools/Data/DataTool";
|
|
4
|
+
export class StateSchema {
|
|
5
|
+
voxel = new DataTool();
|
|
6
|
+
nVoxel = new DataTool();
|
|
7
|
+
nodes = [];
|
|
8
|
+
constructor(schema) {
|
|
9
|
+
for (const node of schema) {
|
|
10
|
+
if (node.type == "binary") {
|
|
11
|
+
this.nodes.push(new BinarySchemaNode(node));
|
|
12
|
+
}
|
|
13
|
+
if (node.type == "relation") {
|
|
14
|
+
this.nodes.push(new ShapeStateRelationsNode(this, node));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BinarySchema } from "./Schema/BinarySchema";
|
|
2
|
+
import { BinarySchemaNodeData, VoxelModelStateSchemaData } from "./State.types";
|
|
3
|
+
export declare class SchemaRegister {
|
|
4
|
+
static modelStaeSchemaData: Map<string, BinarySchemaNodeData[]>;
|
|
5
|
+
static voxelModSchemaData: Map<string, BinarySchemaNodeData[]>;
|
|
6
|
+
static modelStaeSchemas: Map<string, BinarySchema>;
|
|
7
|
+
static voxelModSchemas: Map<string, BinarySchema>;
|
|
8
|
+
static voxelModelMap: Map<string, string>;
|
|
9
|
+
static getVoxelSchemas(id: string): {
|
|
10
|
+
modelSchema: BinarySchema;
|
|
11
|
+
voxelSchema: BinarySchema;
|
|
12
|
+
};
|
|
13
|
+
static registerModel(id: string, data: VoxelModelStateSchemaData[]): void;
|
|
14
|
+
static registerVoxel(id: string, modelId: string, data: VoxelModelStateSchemaData[]): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BinarySchema } from "./Schema/BinarySchema";
|
|
2
|
+
export class SchemaRegister {
|
|
3
|
+
static modelStaeSchemaData = new Map();
|
|
4
|
+
static voxelModSchemaData = new Map();
|
|
5
|
+
static modelStaeSchemas = new Map();
|
|
6
|
+
static voxelModSchemas = new Map();
|
|
7
|
+
static voxelModelMap = new Map();
|
|
8
|
+
static getVoxelSchemas(id) {
|
|
9
|
+
const modelId = this.voxelModelMap.get(id);
|
|
10
|
+
if (!modelId)
|
|
11
|
+
throw new Error(`Voxel with ${id} is not registered`);
|
|
12
|
+
let modelSchema = this.modelStaeSchemas.get(modelId);
|
|
13
|
+
if (!modelSchema) {
|
|
14
|
+
const schemaData = this.modelStaeSchemaData.get(modelId);
|
|
15
|
+
if (!schemaData)
|
|
16
|
+
throw new Error(`Model with ${modelId} is not registered`);
|
|
17
|
+
modelSchema = new BinarySchema(schemaData);
|
|
18
|
+
}
|
|
19
|
+
let voxelSchema = this.voxelModSchemas.get(modelId);
|
|
20
|
+
if (!voxelSchema) {
|
|
21
|
+
const schemaData = this.voxelModSchemaData.get(id);
|
|
22
|
+
if (!schemaData)
|
|
23
|
+
throw new Error(`Voxel with ${id} is not registered`);
|
|
24
|
+
voxelSchema = new BinarySchema(schemaData);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
modelSchema,
|
|
28
|
+
voxelSchema,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static registerModel(id, data) {
|
|
32
|
+
const binaryData = [];
|
|
33
|
+
for (const node of data) {
|
|
34
|
+
if (node.type == "binary") {
|
|
35
|
+
binaryData.push(node);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
this.modelStaeSchemaData.set(id, binaryData);
|
|
39
|
+
}
|
|
40
|
+
static registerVoxel(id, modelId, data) {
|
|
41
|
+
this.voxelModelMap.set(id, modelId);
|
|
42
|
+
const binaryData = [];
|
|
43
|
+
for (const node of data) {
|
|
44
|
+
if (node.type == "binary") {
|
|
45
|
+
binaryData.push(node);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
this.voxelModSchemaData.set(id, binaryData);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VoxelModelRelationsConditionData } from "../VoxelModel.types";
|
|
2
|
+
export type BinarySchemaNodeData = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: "binary";
|
|
5
|
+
valuePalette?: string[];
|
|
6
|
+
index: number;
|
|
7
|
+
mask: number;
|
|
8
|
+
};
|
|
9
|
+
export type VoxelRelationsScehmaNodeData = {
|
|
10
|
+
id: string;
|
|
11
|
+
type: "relation";
|
|
12
|
+
conditions: VoxelModelRelationsConditionData[];
|
|
13
|
+
};
|
|
14
|
+
export type VoxelModelStateSchemaData = BinarySchemaNodeData | VoxelRelationsScehmaNodeData;
|
|
15
|
+
export declare enum StateCompareOperations {
|
|
16
|
+
Equals = 0,
|
|
17
|
+
NotEquals = 1,
|
|
18
|
+
GreaterThan = 2,
|
|
19
|
+
LessThan = 3
|
|
20
|
+
}
|
|
21
|
+
export declare enum StateLogiceOperations {
|
|
22
|
+
And = 0,
|
|
23
|
+
Or = 1
|
|
24
|
+
}
|
|
25
|
+
export declare const StateCompareOperationsMap: Record<string, StateCompareOperations>;
|
|
26
|
+
export declare const StateLogicOperationsMap: Record<string, StateLogiceOperations>;
|
|
27
|
+
export type StateLogicNode = [
|
|
28
|
+
schemaId: number,
|
|
29
|
+
operation: StateCompareOperations,
|
|
30
|
+
value: number
|
|
31
|
+
];
|
|
32
|
+
export type StateLogicStatement = (StateLogicNode | StateLogiceOperations)[];
|