@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,492 @@
|
|
|
1
|
+
import { Vector3Like } from "@amodx/math";
|
|
2
|
+
import { Quad } from "@amodx/meshing/Classes/Quad";
|
|
3
|
+
export class OcclusionFace {
|
|
4
|
+
parentId;
|
|
5
|
+
nodeId;
|
|
6
|
+
vertexCount;
|
|
7
|
+
faceCount;
|
|
8
|
+
points;
|
|
9
|
+
normal;
|
|
10
|
+
offset = [0, 0, 0];
|
|
11
|
+
}
|
|
12
|
+
export class OcclusionFlatQuadFace extends OcclusionFace {
|
|
13
|
+
parentId;
|
|
14
|
+
nodeId;
|
|
15
|
+
direction;
|
|
16
|
+
vertexCount;
|
|
17
|
+
faceCount;
|
|
18
|
+
_start;
|
|
19
|
+
_end;
|
|
20
|
+
start = Vector3Like.Create();
|
|
21
|
+
end = Vector3Like.Create();
|
|
22
|
+
normal;
|
|
23
|
+
points;
|
|
24
|
+
constructor(parentId, nodeId, direction, vertexCount, faceCount, _start, _end) {
|
|
25
|
+
super();
|
|
26
|
+
this.parentId = parentId;
|
|
27
|
+
this.nodeId = nodeId;
|
|
28
|
+
this.direction = direction;
|
|
29
|
+
this.vertexCount = vertexCount;
|
|
30
|
+
this.faceCount = faceCount;
|
|
31
|
+
this._start = _start;
|
|
32
|
+
this._end = _end;
|
|
33
|
+
Vector3Like.CopyFromArray(this.start, _start);
|
|
34
|
+
Vector3Like.CopyFromArray(this.end, _end);
|
|
35
|
+
this.points = [
|
|
36
|
+
[0, 0, 0],
|
|
37
|
+
[0, 0, 0],
|
|
38
|
+
[0, 0, 0],
|
|
39
|
+
[0, 0, 0],
|
|
40
|
+
];
|
|
41
|
+
this.updatePoints();
|
|
42
|
+
switch (this.direction) {
|
|
43
|
+
case "up":
|
|
44
|
+
this.normal = [0, 1, 0];
|
|
45
|
+
break;
|
|
46
|
+
case "down":
|
|
47
|
+
this.normal = [0, -1, 0];
|
|
48
|
+
break;
|
|
49
|
+
case "north":
|
|
50
|
+
this.normal = [0, 0, 1];
|
|
51
|
+
break;
|
|
52
|
+
case "south":
|
|
53
|
+
this.normal = [0, 0, -1];
|
|
54
|
+
break;
|
|
55
|
+
case "east":
|
|
56
|
+
this.normal = [1, 0, 0];
|
|
57
|
+
break;
|
|
58
|
+
case "west":
|
|
59
|
+
this.normal = [-1, 0, 0];
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
this.normal = [0, 0, 0];
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
setOffset(x, y, z) {
|
|
67
|
+
this.offset[0] = x;
|
|
68
|
+
this.offset[1] = y;
|
|
69
|
+
this.offset[2] = z;
|
|
70
|
+
this.start.x = this._start[0] + x;
|
|
71
|
+
this.start.y = this._start[1] + y;
|
|
72
|
+
this.start.z = this._start[2] + z;
|
|
73
|
+
this.end.x = this._end[0] + x;
|
|
74
|
+
this.end.y = this._end[1] + y;
|
|
75
|
+
this.end.z = this._end[2] + z;
|
|
76
|
+
this.updatePoints();
|
|
77
|
+
}
|
|
78
|
+
updatePoints() {
|
|
79
|
+
const { start, end } = this;
|
|
80
|
+
switch (this.direction) {
|
|
81
|
+
case "up":
|
|
82
|
+
this.points[0][0] = end.x;
|
|
83
|
+
this.points[0][1] = end.y;
|
|
84
|
+
this.points[0][2] = end.z;
|
|
85
|
+
this.points[1][0] = start.x;
|
|
86
|
+
this.points[1][1] = end.y;
|
|
87
|
+
this.points[1][2] = end.z;
|
|
88
|
+
this.points[2][0] = start.x;
|
|
89
|
+
this.points[2][1] = end.y;
|
|
90
|
+
this.points[2][2] = start.z;
|
|
91
|
+
this.points[3][0] = end.x;
|
|
92
|
+
this.points[3][1] = end.y;
|
|
93
|
+
this.points[3][2] = start.z;
|
|
94
|
+
break;
|
|
95
|
+
case "down":
|
|
96
|
+
this.points[0][0] = start.x;
|
|
97
|
+
this.points[0][1] = start.y;
|
|
98
|
+
this.points[0][2] = end.z;
|
|
99
|
+
this.points[1][0] = end.x;
|
|
100
|
+
this.points[1][1] = start.y;
|
|
101
|
+
this.points[1][2] = end.z;
|
|
102
|
+
this.points[2][0] = end.x;
|
|
103
|
+
this.points[2][1] = start.y;
|
|
104
|
+
this.points[2][2] = start.z;
|
|
105
|
+
this.points[3][0] = start.x;
|
|
106
|
+
this.points[3][1] = start.y;
|
|
107
|
+
this.points[3][2] = start.z;
|
|
108
|
+
break;
|
|
109
|
+
case "north":
|
|
110
|
+
this.points[0][0] = start.x;
|
|
111
|
+
this.points[0][1] = end.y;
|
|
112
|
+
this.points[0][2] = end.z;
|
|
113
|
+
this.points[1][0] = end.x;
|
|
114
|
+
this.points[1][1] = end.y;
|
|
115
|
+
this.points[1][2] = end.z;
|
|
116
|
+
this.points[2][0] = end.x;
|
|
117
|
+
this.points[2][1] = start.y;
|
|
118
|
+
this.points[2][2] = end.z;
|
|
119
|
+
this.points[3][0] = start.x;
|
|
120
|
+
this.points[3][1] = start.y;
|
|
121
|
+
this.points[3][2] = end.z;
|
|
122
|
+
break;
|
|
123
|
+
case "south":
|
|
124
|
+
this.points[0][0] = end.x;
|
|
125
|
+
this.points[0][1] = end.y;
|
|
126
|
+
this.points[0][2] = start.z;
|
|
127
|
+
this.points[1][0] = start.x;
|
|
128
|
+
this.points[1][1] = end.y;
|
|
129
|
+
this.points[1][2] = start.z;
|
|
130
|
+
this.points[2][0] = start.x;
|
|
131
|
+
this.points[2][1] = start.y;
|
|
132
|
+
this.points[2][2] = start.z;
|
|
133
|
+
this.points[3][0] = end.x;
|
|
134
|
+
this.points[3][1] = start.y;
|
|
135
|
+
this.points[3][2] = start.z;
|
|
136
|
+
break;
|
|
137
|
+
case "east":
|
|
138
|
+
this.points[0][0] = end.x;
|
|
139
|
+
this.points[0][1] = end.y;
|
|
140
|
+
this.points[0][2] = end.z;
|
|
141
|
+
this.points[1][0] = end.x;
|
|
142
|
+
this.points[1][1] = end.y;
|
|
143
|
+
this.points[1][2] = start.z;
|
|
144
|
+
this.points[2][0] = end.x;
|
|
145
|
+
this.points[2][1] = start.y;
|
|
146
|
+
this.points[2][2] = start.z;
|
|
147
|
+
this.points[3][0] = end.x;
|
|
148
|
+
this.points[3][1] = start.y;
|
|
149
|
+
this.points[3][2] = end.z;
|
|
150
|
+
break;
|
|
151
|
+
case "west":
|
|
152
|
+
this.points[0][0] = start.x;
|
|
153
|
+
this.points[0][1] = end.y;
|
|
154
|
+
this.points[0][2] = start.z;
|
|
155
|
+
this.points[1][0] = start.x;
|
|
156
|
+
this.points[1][1] = end.y;
|
|
157
|
+
this.points[1][2] = end.z;
|
|
158
|
+
this.points[2][0] = start.x;
|
|
159
|
+
this.points[2][1] = start.y;
|
|
160
|
+
this.points[2][2] = end.z;
|
|
161
|
+
this.points[3][0] = start.x;
|
|
162
|
+
this.points[3][1] = start.y;
|
|
163
|
+
this.points[3][2] = start.z;
|
|
164
|
+
break;
|
|
165
|
+
default:
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
clone() {
|
|
170
|
+
return new OcclusionFlatQuadFace(this.parentId, this.nodeId, this.direction, this.vertexCount, this.faceCount, [...this._start], [...this._end]);
|
|
171
|
+
}
|
|
172
|
+
isPointInBounds(point) {
|
|
173
|
+
const [x, y, z] = point;
|
|
174
|
+
switch (this.direction) {
|
|
175
|
+
case "up":
|
|
176
|
+
case "down":
|
|
177
|
+
// For the up and down faces, check X and Z bounds since Y is constant
|
|
178
|
+
return (x >= this.start.x &&
|
|
179
|
+
x <= this.end.x &&
|
|
180
|
+
z >= this.start.z &&
|
|
181
|
+
z <= this.end.z);
|
|
182
|
+
case "north":
|
|
183
|
+
case "south":
|
|
184
|
+
// For north and south faces, check X and Y bounds since Z is constant
|
|
185
|
+
return (x >= this.start.x &&
|
|
186
|
+
x <= this.end.x &&
|
|
187
|
+
y >= this.start.y &&
|
|
188
|
+
y <= this.end.y);
|
|
189
|
+
case "east":
|
|
190
|
+
case "west":
|
|
191
|
+
// For east and west faces, check Y and Z bounds since X is constant
|
|
192
|
+
return (y >= this.start.y &&
|
|
193
|
+
y <= this.end.y &&
|
|
194
|
+
z >= this.start.z &&
|
|
195
|
+
z <= this.end.z);
|
|
196
|
+
default:
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
doesCoverFace(face) {
|
|
201
|
+
if (face instanceof OcclusionFlatQuadFace) {
|
|
202
|
+
// Existing logic for OcclusionFlatQuadFace
|
|
203
|
+
switch (this.direction) {
|
|
204
|
+
case "up":
|
|
205
|
+
if (face.direction === "down" && this.start.y === face.end.y) {
|
|
206
|
+
return this.totallyCoversInXAndZ(face);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "down":
|
|
210
|
+
if (face.direction === "up" && this.end.y === face.start.y) {
|
|
211
|
+
return this.totallyCoversInXAndZ(face);
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "north":
|
|
215
|
+
if (face.direction === "south" && this.end.z === face.start.z) {
|
|
216
|
+
return this.totallyCoversInXAndY(face);
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "south":
|
|
220
|
+
if (face.direction === "north" && this.start.z === face.end.z) {
|
|
221
|
+
return this.totallyCoversInXAndY(face);
|
|
222
|
+
}
|
|
223
|
+
break;
|
|
224
|
+
case "east":
|
|
225
|
+
if (face.direction === "west" && this.start.x === face.end.x) {
|
|
226
|
+
return this.totallyCoversInYAndZ(face);
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
case "west":
|
|
230
|
+
if (face.direction === "east" && this.end.x === face.start.x) {
|
|
231
|
+
return this.totallyCoversInYAndZ(face);
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
default:
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (face instanceof OcclusionQuadFace) {
|
|
239
|
+
// New logic for OcclusionQuadFace
|
|
240
|
+
const epsilon = 1e-6;
|
|
241
|
+
// Check if normals are opposite (since we are checking occlusion)
|
|
242
|
+
const dotProduct = this.normal[0] * face.normal[0] +
|
|
243
|
+
this.normal[1] * face.normal[1] +
|
|
244
|
+
this.normal[2] * face.normal[2];
|
|
245
|
+
if (dotProduct >= -epsilon) {
|
|
246
|
+
// Normals are not opposite or parallel
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
// Determine the plane coordinate based on the face direction
|
|
250
|
+
let planeCoordinate;
|
|
251
|
+
let coordIndex;
|
|
252
|
+
switch (this.direction) {
|
|
253
|
+
case "up":
|
|
254
|
+
case "down":
|
|
255
|
+
planeCoordinate = this.start.y;
|
|
256
|
+
coordIndex = 1; // Y-axis
|
|
257
|
+
break;
|
|
258
|
+
case "north":
|
|
259
|
+
case "south":
|
|
260
|
+
planeCoordinate = this.start.z;
|
|
261
|
+
coordIndex = 2; // Z-axis
|
|
262
|
+
break;
|
|
263
|
+
case "east":
|
|
264
|
+
case "west":
|
|
265
|
+
planeCoordinate = this.start.x;
|
|
266
|
+
coordIndex = 0; // X-axis
|
|
267
|
+
break;
|
|
268
|
+
default:
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
// Check if all points of face lie on the plane of this face
|
|
272
|
+
for (const point of face.points) {
|
|
273
|
+
if (Math.abs(point[coordIndex] - planeCoordinate) > epsilon) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// Check if all points of face are within the bounds of this face
|
|
278
|
+
for (const point of face.points) {
|
|
279
|
+
if (!this.isPointInBounds(point)) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// All checks passed, this face covers the other face
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
totallyCoversInXAndZ(plane) {
|
|
289
|
+
return (this.start.x <= plane.start.x &&
|
|
290
|
+
this.end.x >= plane.end.x &&
|
|
291
|
+
this.start.z <= plane.start.z &&
|
|
292
|
+
this.end.z >= plane.end.z);
|
|
293
|
+
}
|
|
294
|
+
totallyCoversInXAndY(plane) {
|
|
295
|
+
return (this.start.x <= plane.start.x &&
|
|
296
|
+
this.end.x >= plane.end.x &&
|
|
297
|
+
this.start.y <= plane.start.y &&
|
|
298
|
+
this.end.y >= plane.end.y);
|
|
299
|
+
}
|
|
300
|
+
totallyCoversInYAndZ(plane) {
|
|
301
|
+
return (this.start.y <= plane.start.y &&
|
|
302
|
+
this.end.y >= plane.end.y &&
|
|
303
|
+
this.start.z <= plane.start.z &&
|
|
304
|
+
this.end.z >= plane.end.z);
|
|
305
|
+
}
|
|
306
|
+
isPointOnFace(x, y, z) {
|
|
307
|
+
const epsilon = 1e-6;
|
|
308
|
+
switch (this.direction) {
|
|
309
|
+
case "up":
|
|
310
|
+
case "down":
|
|
311
|
+
return (Math.abs(y - this.start.y) < epsilon &&
|
|
312
|
+
x >= this.start.x &&
|
|
313
|
+
x <= this.end.x &&
|
|
314
|
+
z >= this.start.z &&
|
|
315
|
+
z <= this.end.z);
|
|
316
|
+
case "north":
|
|
317
|
+
case "south":
|
|
318
|
+
return (Math.abs(z - this.start.z) < epsilon &&
|
|
319
|
+
x >= this.start.x &&
|
|
320
|
+
x <= this.end.x &&
|
|
321
|
+
y >= this.start.y &&
|
|
322
|
+
y <= this.end.y);
|
|
323
|
+
case "east":
|
|
324
|
+
case "west":
|
|
325
|
+
return (Math.abs(x - this.start.x) < epsilon &&
|
|
326
|
+
y >= this.start.y &&
|
|
327
|
+
y <= this.end.y &&
|
|
328
|
+
z >= this.start.z &&
|
|
329
|
+
z <= this.end.z);
|
|
330
|
+
default:
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
export class OcclusionQuadFace extends OcclusionFace {
|
|
336
|
+
parentId;
|
|
337
|
+
nodeId;
|
|
338
|
+
vertexCount;
|
|
339
|
+
faceCount;
|
|
340
|
+
_points;
|
|
341
|
+
normal;
|
|
342
|
+
normals;
|
|
343
|
+
points;
|
|
344
|
+
constructor(parentId, nodeId, vertexCount, faceCount, _points) {
|
|
345
|
+
super();
|
|
346
|
+
this.parentId = parentId;
|
|
347
|
+
this.nodeId = nodeId;
|
|
348
|
+
this.vertexCount = vertexCount;
|
|
349
|
+
this.faceCount = faceCount;
|
|
350
|
+
this._points = _points;
|
|
351
|
+
this.normals = Quad.GetQuadNormal(_points[0], _points[1], _points[2], _points[3]);
|
|
352
|
+
const averageNormal = [0, 0, 0];
|
|
353
|
+
for (let i = 0; i < this.normals.length; i++) {
|
|
354
|
+
averageNormal[0] += this.normals[i][0];
|
|
355
|
+
averageNormal[1] += this.normals[i][1];
|
|
356
|
+
averageNormal[2] += this.normals[i][2];
|
|
357
|
+
}
|
|
358
|
+
averageNormal[0] /= this.normals.length;
|
|
359
|
+
averageNormal[1] /= this.normals.length;
|
|
360
|
+
averageNormal[2] /= this.normals.length;
|
|
361
|
+
// Normalize the average normal
|
|
362
|
+
const magnitude = Math.sqrt(averageNormal[0] * averageNormal[0] +
|
|
363
|
+
averageNormal[1] * averageNormal[1] +
|
|
364
|
+
averageNormal[2] * averageNormal[2]);
|
|
365
|
+
if (magnitude !== 0) {
|
|
366
|
+
averageNormal[0] /= magnitude;
|
|
367
|
+
averageNormal[1] /= magnitude;
|
|
368
|
+
averageNormal[2] /= magnitude;
|
|
369
|
+
}
|
|
370
|
+
this.normal = averageNormal;
|
|
371
|
+
this.points = [
|
|
372
|
+
[0, 0, 0],
|
|
373
|
+
[0, 0, 0],
|
|
374
|
+
[0, 0, 0],
|
|
375
|
+
[0, 0, 0],
|
|
376
|
+
];
|
|
377
|
+
this.updatePoints();
|
|
378
|
+
}
|
|
379
|
+
setOffset(x, y, z) {
|
|
380
|
+
this.offset[0] = x;
|
|
381
|
+
this.offset[1] = y;
|
|
382
|
+
this.offset[2] = z;
|
|
383
|
+
this.updatePoints();
|
|
384
|
+
}
|
|
385
|
+
updatePoints() {
|
|
386
|
+
for (let i = 0; i < 4; i++) {
|
|
387
|
+
this.points[i][0] = this._points[i][0] + this.offset[0];
|
|
388
|
+
this.points[i][1] = this._points[i][1] + this.offset[1];
|
|
389
|
+
this.points[i][2] = this._points[i][2] + this.offset[2];
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
clone() {
|
|
393
|
+
return new OcclusionQuadFace(this.parentId, this.nodeId, this.vertexCount, this.faceCount, structuredClone(this._points));
|
|
394
|
+
}
|
|
395
|
+
isPointInTriangle(p, a, b, c) {
|
|
396
|
+
// Compute vectors
|
|
397
|
+
const v0 = [c[0] - a[0], c[1] - a[1], c[2] - a[2]];
|
|
398
|
+
const v1 = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
|
|
399
|
+
const v2 = [p[0] - a[0], p[1] - a[1], p[2] - a[2]];
|
|
400
|
+
// Compute dot products
|
|
401
|
+
const dot00 = Vector3Like.DotArray(v0, v0);
|
|
402
|
+
const dot01 = Vector3Like.DotArray(v0, v1);
|
|
403
|
+
const dot02 = Vector3Like.DotArray(v0, v2);
|
|
404
|
+
const dot11 = Vector3Like.DotArray(v1, v1);
|
|
405
|
+
const dot12 = Vector3Like.DotArray(v1, v2);
|
|
406
|
+
// Compute barycentric coordinates
|
|
407
|
+
const denom = dot00 * dot11 - dot01 * dot01;
|
|
408
|
+
if (denom === 0) {
|
|
409
|
+
return false; // Degenerate triangle
|
|
410
|
+
}
|
|
411
|
+
const u = (dot11 * dot02 - dot01 * dot12) / denom;
|
|
412
|
+
const v = (dot00 * dot12 - dot01 * dot02) / denom;
|
|
413
|
+
// Check if point is in triangle
|
|
414
|
+
return u >= 0 && v >= 0 && u + v <= 1;
|
|
415
|
+
}
|
|
416
|
+
isPointInBounds(point) {
|
|
417
|
+
return (this.isPointInTriangle(point, this.points[0], this.points[1], this.points[2]) ||
|
|
418
|
+
this.isPointInTriangle(point, this.points[0], this.points[2], this.points[3]));
|
|
419
|
+
}
|
|
420
|
+
isPointOnFace(x, y, z) {
|
|
421
|
+
// First, check if point is on the plane
|
|
422
|
+
const p0 = this.points[0];
|
|
423
|
+
const v = [x - p0[0], y - p0[1], z - p0[2]];
|
|
424
|
+
const d = Vector3Like.DotArray(this.normal, v);
|
|
425
|
+
const epsilon = 1e-6;
|
|
426
|
+
if (Math.abs(d) > epsilon) {
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
// Point is on plane, now check if it's inside the face
|
|
430
|
+
const p = [x, y, z];
|
|
431
|
+
return this.isPointInBounds(p);
|
|
432
|
+
}
|
|
433
|
+
doesCoverFace(face) {
|
|
434
|
+
const epsilon = 1e-6;
|
|
435
|
+
// Normalize normals
|
|
436
|
+
const n1 = this.normal;
|
|
437
|
+
const n2 = face.normal;
|
|
438
|
+
const n1Mag = Math.sqrt(n1[0] * n1[0] + n1[1] * n1[1] + n1[2] * n1[2]);
|
|
439
|
+
const n2Mag = Math.sqrt(n2[0] * n2[0] + n2[1] * n2[1] + n2[2] * n2[2]);
|
|
440
|
+
const n1Norm = [n1[0] / n1Mag, n1[1] / n1Mag, n1[2] / n1Mag];
|
|
441
|
+
const n2Norm = [n2[0] / n2Mag, n2[1] / n2Mag, n2[2] / n2Mag];
|
|
442
|
+
// Compute dot product of normals
|
|
443
|
+
const dotNormals = Vector3Like.DotArray(n1Norm, n2Norm);
|
|
444
|
+
if (Math.abs(Math.abs(dotNormals) - 1) > epsilon) {
|
|
445
|
+
// Normals are not parallel
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
// Check if a point from face lies on the plane of this face
|
|
449
|
+
const p0 = this.points[0];
|
|
450
|
+
const v = [
|
|
451
|
+
face.points[0][0] - p0[0],
|
|
452
|
+
face.points[0][1] - p0[1],
|
|
453
|
+
face.points[0][2] - p0[2],
|
|
454
|
+
];
|
|
455
|
+
const d = Vector3Like.DotArray(this.normal, v);
|
|
456
|
+
if (Math.abs(d) > epsilon) {
|
|
457
|
+
// Faces are not coplanar
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
// Check if all points of face are within this face
|
|
461
|
+
for (const point of face.points) {
|
|
462
|
+
if (!this.isPointInBounds(point)) {
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return true;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
export class OcclusionFaceContainer {
|
|
470
|
+
faces = [];
|
|
471
|
+
offset = [0, 0, 0];
|
|
472
|
+
constructor() { }
|
|
473
|
+
setOffset(x, y, z) {
|
|
474
|
+
this.offset[0] = x;
|
|
475
|
+
this.offset[1] = y;
|
|
476
|
+
this.offset[2] = z;
|
|
477
|
+
for (const plane of this.faces) {
|
|
478
|
+
plane.setOffset(x, y, z);
|
|
479
|
+
plane.updatePoints();
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
addFace(face) {
|
|
483
|
+
this.faces[face.faceCount] = face;
|
|
484
|
+
}
|
|
485
|
+
clone() {
|
|
486
|
+
const container = new OcclusionFaceContainer();
|
|
487
|
+
for (const face of this.faces) {
|
|
488
|
+
container.faces[face.faceCount] = face.clone();
|
|
489
|
+
}
|
|
490
|
+
return container;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Vec3Array } from "@amodx/math";
|
|
2
|
+
import { OcclusionFaceContainer } from "./OcclusionFace";
|
|
3
|
+
import { BuildGeomtryInputs } from "../Functions/BuildGeomtryInputs";
|
|
4
|
+
import { BuildStateData } from "../Functions/BuildStateData";
|
|
5
|
+
import { PrcoessedVoxelGeometryData } from "../../VoxelModelRules.types";
|
|
6
|
+
export declare class VoxelRuleGeometry {
|
|
7
|
+
id: string;
|
|
8
|
+
data: PrcoessedVoxelGeometryData;
|
|
9
|
+
position?: Vec3Array | undefined;
|
|
10
|
+
scale?: Vec3Array | undefined;
|
|
11
|
+
rotation?: Vec3Array | undefined;
|
|
12
|
+
occlusionPlane: OcclusionFaceContainer;
|
|
13
|
+
faceCount: number;
|
|
14
|
+
vertexCount: number;
|
|
15
|
+
state: ReturnType<typeof BuildStateData>;
|
|
16
|
+
inputs: ReturnType<typeof BuildGeomtryInputs>;
|
|
17
|
+
constructor(id: string, data: PrcoessedVoxelGeometryData, position?: Vec3Array | undefined, scale?: Vec3Array | undefined, rotation?: Vec3Array | undefined);
|
|
18
|
+
clone(): VoxelRuleGeometry;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GetOcclusionFaces } from "../Functions/GetOcclusionFaces";
|
|
2
|
+
import { BuildGeomtryInputs } from "../Functions/BuildGeomtryInputs";
|
|
3
|
+
export class VoxelRuleGeometry {
|
|
4
|
+
id;
|
|
5
|
+
data;
|
|
6
|
+
position;
|
|
7
|
+
scale;
|
|
8
|
+
rotation;
|
|
9
|
+
occlusionPlane;
|
|
10
|
+
faceCount = 0;
|
|
11
|
+
vertexCount = 0;
|
|
12
|
+
state;
|
|
13
|
+
inputs;
|
|
14
|
+
constructor(id, data, position, scale, rotation) {
|
|
15
|
+
this.id = id;
|
|
16
|
+
this.data = data;
|
|
17
|
+
this.position = position;
|
|
18
|
+
this.scale = scale;
|
|
19
|
+
this.rotation = rotation;
|
|
20
|
+
if (data.ogData.doNotBuildRules !== true) {
|
|
21
|
+
this.occlusionPlane = GetOcclusionFaces(this.id, this, data.nodes);
|
|
22
|
+
}
|
|
23
|
+
this.inputs = BuildGeomtryInputs(this);
|
|
24
|
+
}
|
|
25
|
+
clone() {
|
|
26
|
+
const newVoxel = new VoxelRuleGeometry(this.id, this.data, this.position, this.scale, this.rotation);
|
|
27
|
+
newVoxel.vertexCount = this.vertexCount;
|
|
28
|
+
newVoxel.faceCount = this.faceCount;
|
|
29
|
+
newVoxel.occlusionPlane = this.occlusionPlane.clone();
|
|
30
|
+
return newVoxel;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VoxelModelConstructorData, VoxelModelData } from "../../VoxelModel.types";
|
|
2
|
+
import { BuildStateData } from "../Functions/BuildStateData";
|
|
3
|
+
export declare class VoxelRulesModoel {
|
|
4
|
+
data: VoxelModelData;
|
|
5
|
+
shapeStates: Map<string, string[]>;
|
|
6
|
+
conditionalNodes: Map<string, string[]>;
|
|
7
|
+
stateData: ReturnType<typeof BuildStateData>;
|
|
8
|
+
voxels: Map<string, VoxelModelConstructorData>;
|
|
9
|
+
voxelModData: Map<string, {
|
|
10
|
+
modSchema: any[];
|
|
11
|
+
modStateTree: any[];
|
|
12
|
+
modPalette: any[];
|
|
13
|
+
modRecord: Record<string, any>;
|
|
14
|
+
}>;
|
|
15
|
+
constructor(data: VoxelModelData);
|
|
16
|
+
registerShapeState(id: string, geomtryId: string): void;
|
|
17
|
+
registerCondiotnalNode(id: string, geomtryId: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class VoxelRulesModoel {
|
|
2
|
+
data;
|
|
3
|
+
shapeStates = new Map();
|
|
4
|
+
conditionalNodes = new Map();
|
|
5
|
+
stateData;
|
|
6
|
+
voxels = new Map();
|
|
7
|
+
voxelModData = new Map();
|
|
8
|
+
constructor(data) {
|
|
9
|
+
this.data = data;
|
|
10
|
+
}
|
|
11
|
+
registerShapeState(id, geomtryId) {
|
|
12
|
+
let stateArray = this.shapeStates.get(id);
|
|
13
|
+
if (!stateArray) {
|
|
14
|
+
stateArray = [];
|
|
15
|
+
this.shapeStates.set(id, stateArray);
|
|
16
|
+
}
|
|
17
|
+
if (!stateArray.find((_) => _ == geomtryId))
|
|
18
|
+
stateArray.push(geomtryId);
|
|
19
|
+
}
|
|
20
|
+
registerCondiotnalNode(id, geomtryId) {
|
|
21
|
+
let stateArray = this.conditionalNodes.get(id);
|
|
22
|
+
if (!stateArray) {
|
|
23
|
+
stateArray = [];
|
|
24
|
+
this.conditionalNodes.set(id, stateArray);
|
|
25
|
+
}
|
|
26
|
+
if (!stateArray.find((_) => _ == geomtryId))
|
|
27
|
+
stateArray.push(geomtryId);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VoxelFaceTransparentResultsIndex } from "../../Indexing/VoxelFaceTransparentResultsIndex";
|
|
2
|
+
import { VoxelRulesModoel } from "../Classes/VoxelRulesModel";
|
|
3
|
+
export declare function BuildFinalInputs(model: VoxelRulesModoel): {
|
|
4
|
+
shapeStateVoxelInputs: Record<string, any[]>;
|
|
5
|
+
transparentVoxelFaceIndexes: Record<string, VoxelFaceTransparentResultsIndex>;
|
|
6
|
+
conditionalShapeStateVoxelInputs: Record<string, any[]>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { VoxelFaceTransparentResultsIndex } from "../../Indexing/VoxelFaceTransparentResultsIndex";
|
|
2
|
+
import { VoxelModelManager } from "../VoxelModelManager";
|
|
3
|
+
const isArgString = (data) => {
|
|
4
|
+
if (typeof data !== "string")
|
|
5
|
+
return;
|
|
6
|
+
return data[0] == "@";
|
|
7
|
+
};
|
|
8
|
+
export function BuildFinalInputs(model) {
|
|
9
|
+
const shapeStateVoxelInputs = {};
|
|
10
|
+
const transparentVoxelFaceIndexes = {};
|
|
11
|
+
const conditionalShapeStateVoxelInputs = {};
|
|
12
|
+
for (const [voxelId, voxel] of model.voxels) {
|
|
13
|
+
const transparentIndex = new VoxelFaceTransparentResultsIndex({
|
|
14
|
+
buffer: new SharedArrayBuffer(model.stateData.relativeByteCount * Object.keys(voxel.inputs).length),
|
|
15
|
+
resultsSize: model.stateData.relativeByteCount,
|
|
16
|
+
});
|
|
17
|
+
transparentVoxelFaceIndexes[voxelId] = transparentIndex;
|
|
18
|
+
const voxelModData = model.voxelModData.get(voxelId);
|
|
19
|
+
for (const modVoxelInputKey in voxel.inputs) {
|
|
20
|
+
const modVoxelInput = voxel.inputs[modVoxelInputKey];
|
|
21
|
+
const modIndex = voxelModData.modRecord[modVoxelInputKey];
|
|
22
|
+
const baseStates = [];
|
|
23
|
+
for (const state in model.data.shapeStatesNodes) {
|
|
24
|
+
const geoNodes = [];
|
|
25
|
+
const shapeStateNodes = model.data.shapeStatesNodes[state];
|
|
26
|
+
for (const node of shapeStateNodes) {
|
|
27
|
+
const geo = VoxelModelManager.getGeomtryFromLink(node);
|
|
28
|
+
if (!geo)
|
|
29
|
+
throw new Error(`Geometry does not exist`);
|
|
30
|
+
geo.inputs.resetDefaults();
|
|
31
|
+
for (const geoArg in node.inputs) {
|
|
32
|
+
const constructorArg = node.inputs[geoArg];
|
|
33
|
+
if (isArgString(constructorArg)) {
|
|
34
|
+
geo.inputs[geoArg] = modVoxelInput[constructorArg];
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
geo.inputs[geoArg] = constructorArg;
|
|
38
|
+
}
|
|
39
|
+
geoNodes[model.stateData.geometryLinkPalette[node.id]] =
|
|
40
|
+
geo.inputs.cloneArgs();
|
|
41
|
+
const byteIndex = model.stateData.relativeGeometryByteIndexMap[model.stateData.shapeStateRelativeGeometryMap[model.stateData.shapeStateRecord[state]][VoxelModelManager.geometryPalette.getNumberId(VoxelModelManager.getGeometryLinkId(node))]];
|
|
42
|
+
if (geo.data.ogData.doNotBuildRules !== true) {
|
|
43
|
+
for (let i = 0; i < geo.inputs.faceTransparentIndex.length; i++) {
|
|
44
|
+
transparentIndex.setValue(modIndex, byteIndex, i, geo.inputs.faceTransparentIndex[i] ? 1 : 0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
baseStates[model.stateData.shapeStateRecord[state]] = geoNodes;
|
|
49
|
+
}
|
|
50
|
+
shapeStateVoxelInputs[voxelId] ??= [];
|
|
51
|
+
shapeStateVoxelInputs[voxelId][voxelModData.modRecord[modVoxelInputKey]] =
|
|
52
|
+
baseStates;
|
|
53
|
+
const condiotnalStates = [];
|
|
54
|
+
for (const state in model.data.shapeStatesConditonalNodes) {
|
|
55
|
+
const geoNodes = [];
|
|
56
|
+
const shapeStateNodes = model.data.shapeStatesConditonalNodes[state];
|
|
57
|
+
for (let i = 0; i < shapeStateNodes.length; i++) {
|
|
58
|
+
const node = shapeStateNodes[i];
|
|
59
|
+
const geo = VoxelModelManager.getGeomtryFromLink(node);
|
|
60
|
+
if (!geo)
|
|
61
|
+
throw new Error(`Geometry does not exist`);
|
|
62
|
+
// geo.inputs.resetDefaults();
|
|
63
|
+
for (const geoArg in node.inputs) {
|
|
64
|
+
const constructorArg = node.inputs[geoArg];
|
|
65
|
+
if (isArgString(constructorArg)) {
|
|
66
|
+
geo.inputs[geoArg] = modVoxelInput[constructorArg];
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
geo.inputs[geoArg] = constructorArg;
|
|
70
|
+
}
|
|
71
|
+
geoNodes[i] = geo.inputs.cloneArgs();
|
|
72
|
+
const byteIndex = model.stateData.relativeGeometryByteIndexMap[model.stateData.condiotnalShapeStateRelativeGeometryMap[model.stateData.condiotnalShapeStateRecord[state]][VoxelModelManager.geometryPalette.getNumberId(VoxelModelManager.getGeometryLinkId(node))]];
|
|
73
|
+
if (geo.data.ogData.doNotBuildRules !== true) {
|
|
74
|
+
for (let i = 0; i < geo.inputs.faceTransparentIndex.length; i++) {
|
|
75
|
+
transparentIndex.setValue(modIndex, byteIndex, i, geo.inputs.faceTransparentIndex[i] ? 1 : 0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
condiotnalStates[model.stateData.condiotnalShapeStateRecord[state]] =
|
|
80
|
+
geoNodes;
|
|
81
|
+
}
|
|
82
|
+
conditionalShapeStateVoxelInputs[voxelId] ??= [];
|
|
83
|
+
conditionalShapeStateVoxelInputs[voxelId][voxelModData.modRecord[modVoxelInputKey]] = condiotnalStates;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
shapeStateVoxelInputs,
|
|
88
|
+
transparentVoxelFaceIndexes,
|
|
89
|
+
conditionalShapeStateVoxelInputs,
|
|
90
|
+
};
|
|
91
|
+
}
|