@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,157 @@
|
|
|
1
|
+
import { Vector3 } from "./Vector3.js";
|
|
2
|
+
export class SimpleBoundingBox {
|
|
3
|
+
origin;
|
|
4
|
+
dimensions;
|
|
5
|
+
bounds = {
|
|
6
|
+
minX: Infinity,
|
|
7
|
+
maxX: -Infinity,
|
|
8
|
+
minZ: Infinity,
|
|
9
|
+
maxZ: -Infinity,
|
|
10
|
+
minY: Infinity,
|
|
11
|
+
maxY: -Infinity,
|
|
12
|
+
};
|
|
13
|
+
checkBounds = {
|
|
14
|
+
minX: Infinity,
|
|
15
|
+
maxX: -Infinity,
|
|
16
|
+
minZ: Infinity,
|
|
17
|
+
maxZ: -Infinity,
|
|
18
|
+
minY: Infinity,
|
|
19
|
+
maxY: -Infinity,
|
|
20
|
+
};
|
|
21
|
+
checkOrigin = new Vector3(0, 0, 0);
|
|
22
|
+
_voxelCheckMap = {};
|
|
23
|
+
_voxelCheckPoints = [];
|
|
24
|
+
_voxelBottomCheckPoints = [];
|
|
25
|
+
_voxelOriginPoints = [];
|
|
26
|
+
constructor(origin, dimensions) {
|
|
27
|
+
this.origin = origin;
|
|
28
|
+
this.dimensions = dimensions;
|
|
29
|
+
const ov = origin;
|
|
30
|
+
this.checkOrigin.set(ov.x, ov.y, ov.z);
|
|
31
|
+
this._updateBounds();
|
|
32
|
+
this._updateCheckBounds();
|
|
33
|
+
}
|
|
34
|
+
_updateBounds() {
|
|
35
|
+
const ov = this.origin;
|
|
36
|
+
this.bounds.minX = ov.x - this.dimensions.w / 2;
|
|
37
|
+
this.bounds.maxX = ov.x + this.dimensions.w / 2;
|
|
38
|
+
this.bounds.minZ = ov.z - this.dimensions.d / 2;
|
|
39
|
+
this.bounds.maxZ = ov.z + this.dimensions.d / 2;
|
|
40
|
+
this.bounds.minY = ov.y - this.dimensions.h / 2;
|
|
41
|
+
this.bounds.maxY = ov.y + this.dimensions.h / 2;
|
|
42
|
+
}
|
|
43
|
+
_updateCheckBounds() {
|
|
44
|
+
const cv = this.checkOrigin;
|
|
45
|
+
this.checkBounds.minX = cv.x - this.dimensions.w / 2;
|
|
46
|
+
this.checkBounds.maxX = cv.x + this.dimensions.w / 2;
|
|
47
|
+
this.checkBounds.minZ = cv.z - this.dimensions.d / 2;
|
|
48
|
+
this.checkBounds.maxZ = cv.z + this.dimensions.d / 2;
|
|
49
|
+
this.checkBounds.minY = cv.y - this.dimensions.h / 2;
|
|
50
|
+
this.checkBounds.maxY = cv.y + this.dimensions.h / 2;
|
|
51
|
+
}
|
|
52
|
+
updateOrigin(x, y, z) {
|
|
53
|
+
this.origin.set(x, y, z);
|
|
54
|
+
this.origin.roundVector(2);
|
|
55
|
+
this._updateBounds();
|
|
56
|
+
}
|
|
57
|
+
setOriginToCheckOrigin() {
|
|
58
|
+
const cv = this.checkOrigin;
|
|
59
|
+
this.origin.set(cv.x, cv.y, cv.z);
|
|
60
|
+
this.bounds.minX = this.checkBounds.minX;
|
|
61
|
+
this.bounds.maxX = this.checkBounds.maxX;
|
|
62
|
+
this.bounds.minZ = this.checkBounds.minZ;
|
|
63
|
+
this.bounds.maxZ = this.checkBounds.maxZ;
|
|
64
|
+
this.bounds.minY = this.checkBounds.minY;
|
|
65
|
+
this.bounds.maxY = this.checkBounds.maxY;
|
|
66
|
+
}
|
|
67
|
+
setCheckOrigin(x, y, z) {
|
|
68
|
+
this.checkOrigin.set(x, y, z);
|
|
69
|
+
this._updateCheckBounds();
|
|
70
|
+
}
|
|
71
|
+
getCurrentOriginPoints() {
|
|
72
|
+
this._voxelOriginPoints = [];
|
|
73
|
+
const mx = this.bounds.minX;
|
|
74
|
+
const my = this.bounds.minY;
|
|
75
|
+
const mz = this.bounds.minZ;
|
|
76
|
+
for (let y = my; y <= this.bounds.maxY; y++) {
|
|
77
|
+
for (let x = mx - 1; x <= this.bounds.maxX + 1; x++) {
|
|
78
|
+
for (let z = mz - 1; z <= this.bounds.maxZ + 1; z++) {
|
|
79
|
+
const key = this._getPositionKey(x, y, z);
|
|
80
|
+
if (!this._voxelCheckMap[key]) {
|
|
81
|
+
this._voxelOriginPoints.push([x, y, z]);
|
|
82
|
+
this._voxelCheckMap[key] = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
this._voxelCheckMap = {};
|
|
88
|
+
return this._voxelOriginPoints;
|
|
89
|
+
}
|
|
90
|
+
getVoxelCheckPoints() {
|
|
91
|
+
this._voxelCheckPoints = [];
|
|
92
|
+
const mx = this.checkBounds.minX;
|
|
93
|
+
const my = this.checkBounds.minY;
|
|
94
|
+
const mz = this.checkBounds.minZ;
|
|
95
|
+
for (let y = my; y <= this.checkBounds.maxY; y++) {
|
|
96
|
+
for (let x = mx; x <= this.checkBounds.maxX + 1; x++) {
|
|
97
|
+
for (let z = mz; z <= this.checkBounds.maxZ + 1; z++) {
|
|
98
|
+
const key = this._getPositionKey(x, y, z);
|
|
99
|
+
if (!this._voxelCheckMap[key]) {
|
|
100
|
+
this._voxelCheckPoints.push([
|
|
101
|
+
Math.floor(x),
|
|
102
|
+
Math.floor(y),
|
|
103
|
+
Math.floor(z),
|
|
104
|
+
]);
|
|
105
|
+
this._voxelCheckMap[key] = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
this._voxelCheckMap = {};
|
|
111
|
+
return this._voxelCheckPoints;
|
|
112
|
+
}
|
|
113
|
+
getVoxelBottomCheckPoints() {
|
|
114
|
+
this._voxelBottomCheckPoints = [];
|
|
115
|
+
const mx = this.checkBounds.minX;
|
|
116
|
+
const my = this.checkBounds.minY;
|
|
117
|
+
const mz = this.checkBounds.minZ;
|
|
118
|
+
for (let y = my - 1; y <= my; y++) {
|
|
119
|
+
for (let x = mx; x <= this.checkBounds.maxX + 1; x++) {
|
|
120
|
+
for (let z = mz; z <= this.checkBounds.maxZ + 1; z++) {
|
|
121
|
+
const key = this._getPositionKey(x, y, z);
|
|
122
|
+
if (!this._voxelCheckMap[key]) {
|
|
123
|
+
this._voxelBottomCheckPoints.push([
|
|
124
|
+
Math.floor(x),
|
|
125
|
+
Math.floor(y),
|
|
126
|
+
Math.floor(z),
|
|
127
|
+
]);
|
|
128
|
+
this._voxelCheckMap[key] = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
this._voxelCheckMap = {};
|
|
134
|
+
return this._voxelBottomCheckPoints;
|
|
135
|
+
}
|
|
136
|
+
_getPositionKey(x, y, z) {
|
|
137
|
+
return `${x}-${y}-${z}`;
|
|
138
|
+
}
|
|
139
|
+
isPointInsideBox(point) {
|
|
140
|
+
const box = this.bounds;
|
|
141
|
+
return (point.x >= box.minX &&
|
|
142
|
+
point.x <= box.maxX &&
|
|
143
|
+
point.y >= box.minY &&
|
|
144
|
+
point.y <= box.maxY &&
|
|
145
|
+
point.z >= box.minZ &&
|
|
146
|
+
point.z <= box.maxZ);
|
|
147
|
+
}
|
|
148
|
+
doesBoxIntersect(testBox) {
|
|
149
|
+
const box = this.bounds;
|
|
150
|
+
return (box.minX <= testBox.maxX &&
|
|
151
|
+
box.maxX >= testBox.minX &&
|
|
152
|
+
box.minY <= testBox.maxY &&
|
|
153
|
+
box.maxY >= testBox.minY &&
|
|
154
|
+
box.minZ <= testBox.maxZ &&
|
|
155
|
+
box.maxZ >= testBox.minZ);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Vector3Like, Vec3Array } from "@amodx/math";
|
|
2
|
+
declare class V3 {
|
|
3
|
+
_data: Vec3Array;
|
|
4
|
+
get x(): number;
|
|
5
|
+
set x(x: number);
|
|
6
|
+
get y(): number;
|
|
7
|
+
set y(y: number);
|
|
8
|
+
get z(): number;
|
|
9
|
+
set z(z: number);
|
|
10
|
+
}
|
|
11
|
+
export declare class Vector3 extends V3 {
|
|
12
|
+
static Zero: Vector3;
|
|
13
|
+
static Up: Vector3;
|
|
14
|
+
static Down: Vector3;
|
|
15
|
+
static East: Vector3;
|
|
16
|
+
static West: Vector3;
|
|
17
|
+
static North: Vector3;
|
|
18
|
+
static South: Vector3;
|
|
19
|
+
_tv3: V3;
|
|
20
|
+
static NaNRestore(vec3: Vector3Like): void;
|
|
21
|
+
constructor(x?: number, y?: number, z?: number);
|
|
22
|
+
updateFromArray(array: number[] | Float32Array | Float64Array, startIndex?: number): this;
|
|
23
|
+
set(x: number, y: number, z: number): this;
|
|
24
|
+
setAll(value: number): this;
|
|
25
|
+
updateFromVec3(vector: Vector3): this;
|
|
26
|
+
roundVector(deciamlPoints?: number): this;
|
|
27
|
+
translate(x: number, y: number, z: number): this;
|
|
28
|
+
getTranslated(x: number, y: number, z: number): V3;
|
|
29
|
+
scaleXYZ(scaler: number): this;
|
|
30
|
+
scale(xScale: number, yScale: number, zScale: number): this;
|
|
31
|
+
getScaledXYZ(scaler: number): V3;
|
|
32
|
+
getScaled(xScale: number, yScale: number, zScale: number): V3;
|
|
33
|
+
add(x: number, y: number, z: number): this;
|
|
34
|
+
addXYZ(add: number): this;
|
|
35
|
+
addFromVec3(vector: Vector3): this;
|
|
36
|
+
isZero(): boolean;
|
|
37
|
+
subtractXYZ(subtract: number): this;
|
|
38
|
+
subtractFromObj(vector: Vector3): this;
|
|
39
|
+
getAddXYZ(add: number): V3;
|
|
40
|
+
getSubtractXYZ(subtract: number): V3;
|
|
41
|
+
addVector(vector3: Vector3): this;
|
|
42
|
+
getAddedVector(vector3: Vector3): V3;
|
|
43
|
+
subtractVector(vector3: Vector3): this;
|
|
44
|
+
getSubtractedVector(vector3: Vector3): V3;
|
|
45
|
+
scaleVector(vector3: Vector3): this;
|
|
46
|
+
getScaledVector(vector3: Vector3): V3;
|
|
47
|
+
getLength(): number;
|
|
48
|
+
divide(scalar: number): this;
|
|
49
|
+
getDivided(scalar: number): V3;
|
|
50
|
+
normalize(): this;
|
|
51
|
+
isEqual(vector3: Vector3): boolean;
|
|
52
|
+
isNotEqual(vector3: Vector3): boolean;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
class V3 {
|
|
2
|
+
_data = [0, 0, 0];
|
|
3
|
+
get x() {
|
|
4
|
+
return this._data[0];
|
|
5
|
+
}
|
|
6
|
+
set x(x) {
|
|
7
|
+
this._data[0] = x;
|
|
8
|
+
}
|
|
9
|
+
get y() {
|
|
10
|
+
return this._data[1];
|
|
11
|
+
}
|
|
12
|
+
set y(y) {
|
|
13
|
+
this._data[1] = y;
|
|
14
|
+
}
|
|
15
|
+
get z() {
|
|
16
|
+
return this._data[2];
|
|
17
|
+
}
|
|
18
|
+
set z(z) {
|
|
19
|
+
this._data[2] = z;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class Vector3 extends V3 {
|
|
23
|
+
static Zero = new Vector3(0, 0, 0);
|
|
24
|
+
static Up = new Vector3(0, 1, 0);
|
|
25
|
+
static Down = new Vector3(0, -1, 0);
|
|
26
|
+
static East = new Vector3(1, 0, 0);
|
|
27
|
+
static West = new Vector3(-1, 0, 0);
|
|
28
|
+
static North = new Vector3(0, 0, 1);
|
|
29
|
+
static South = new Vector3(0, 0, -1);
|
|
30
|
+
_tv3 = new V3();
|
|
31
|
+
static NaNRestore(vec3) {
|
|
32
|
+
if (Number.isNaN(vec3.x))
|
|
33
|
+
vec3.x = 0;
|
|
34
|
+
if (Number.isNaN(vec3.y))
|
|
35
|
+
vec3.y = 0;
|
|
36
|
+
if (Number.isNaN(vec3.z))
|
|
37
|
+
vec3.z = 0;
|
|
38
|
+
}
|
|
39
|
+
constructor(x = 0, y = 0, z = 0) {
|
|
40
|
+
super();
|
|
41
|
+
this.x = x;
|
|
42
|
+
this.y = y;
|
|
43
|
+
this.z = z;
|
|
44
|
+
}
|
|
45
|
+
updateFromArray(array, startIndex = 0) {
|
|
46
|
+
this.x = array[startIndex];
|
|
47
|
+
this.y = array[startIndex + 1];
|
|
48
|
+
this.z = array[startIndex + 2];
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
set(x, y, z) {
|
|
52
|
+
this.x = x;
|
|
53
|
+
this.y = y;
|
|
54
|
+
this.z = z;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
setAll(value) {
|
|
58
|
+
this.x = value;
|
|
59
|
+
this.y = value;
|
|
60
|
+
this.z = value;
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
updateFromVec3(vector) {
|
|
64
|
+
this.x = vector.x;
|
|
65
|
+
this.y = vector.y;
|
|
66
|
+
this.z = vector.z;
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
roundVector(deciamlPoints = 2) {
|
|
70
|
+
this.x = Number(this.x.toFixed(deciamlPoints));
|
|
71
|
+
this.y = Number(this.y.toFixed(deciamlPoints));
|
|
72
|
+
this.z = Number(this.z.toFixed(deciamlPoints));
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
translate(x, y, z) {
|
|
76
|
+
this.x = this.x + x;
|
|
77
|
+
this.y = this.y + y;
|
|
78
|
+
this.z = this.z + z;
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
getTranslated(x, y, z) {
|
|
82
|
+
this._tv3.x = this.x + x;
|
|
83
|
+
this._tv3.y = this.y + y;
|
|
84
|
+
this._tv3.z = this.z + z;
|
|
85
|
+
return this._tv3;
|
|
86
|
+
}
|
|
87
|
+
scaleXYZ(scaler) {
|
|
88
|
+
this.x = this.x * scaler;
|
|
89
|
+
this.y = this.y * scaler;
|
|
90
|
+
this.z = this.z * scaler;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
scale(xScale, yScale, zScale) {
|
|
94
|
+
this.x = this.x * xScale;
|
|
95
|
+
this.y = this.y * yScale;
|
|
96
|
+
this.z = this.z * zScale;
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
getScaledXYZ(scaler) {
|
|
100
|
+
this._tv3.x = this.x * scaler;
|
|
101
|
+
this._tv3.y = this.y * scaler;
|
|
102
|
+
this._tv3.z = this.z * scaler;
|
|
103
|
+
return this._tv3;
|
|
104
|
+
}
|
|
105
|
+
getScaled(xScale, yScale, zScale) {
|
|
106
|
+
this._tv3.x = this.x * xScale;
|
|
107
|
+
this._tv3.y = this.y * yScale;
|
|
108
|
+
this._tv3.z = this.z * zScale;
|
|
109
|
+
return this._tv3;
|
|
110
|
+
}
|
|
111
|
+
add(x, y, z) {
|
|
112
|
+
this.x += x;
|
|
113
|
+
this.y += y;
|
|
114
|
+
this.z += z;
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
addXYZ(add) {
|
|
118
|
+
this.x = this.x + add;
|
|
119
|
+
this.y = this.y + add;
|
|
120
|
+
this.z = this.z + add;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
addFromVec3(vector) {
|
|
124
|
+
this.x += vector.x;
|
|
125
|
+
this.y += vector.y;
|
|
126
|
+
this.z += vector.z;
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
isZero() {
|
|
130
|
+
return !this.x && !this.y && !this.z;
|
|
131
|
+
}
|
|
132
|
+
subtractXYZ(subtract) {
|
|
133
|
+
this.x = this.x - subtract;
|
|
134
|
+
this.y = this.y - subtract;
|
|
135
|
+
this.z = this.z - subtract;
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
subtractFromObj(vector) {
|
|
139
|
+
this.x = this.x - vector.x;
|
|
140
|
+
this.y = this.y - vector.y;
|
|
141
|
+
this.z = this.z - vector.z;
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
getAddXYZ(add) {
|
|
145
|
+
this._tv3.x = this.x + add;
|
|
146
|
+
this._tv3.y = this.y + add;
|
|
147
|
+
this._tv3.z = this.z + add;
|
|
148
|
+
return this._tv3;
|
|
149
|
+
}
|
|
150
|
+
getSubtractXYZ(subtract) {
|
|
151
|
+
this._tv3.x = this.x - subtract;
|
|
152
|
+
this._tv3.y = this.y - subtract;
|
|
153
|
+
this._tv3.z = this.z - subtract;
|
|
154
|
+
return this._tv3;
|
|
155
|
+
}
|
|
156
|
+
addVector(vector3) {
|
|
157
|
+
this.x = vector3.x + this.x;
|
|
158
|
+
this.y = vector3.y + this.y;
|
|
159
|
+
this.z = vector3.z + this.z;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
getAddedVector(vector3) {
|
|
163
|
+
this._tv3.x = vector3.x + this.x;
|
|
164
|
+
this._tv3.y = vector3.y + this.y;
|
|
165
|
+
this._tv3.z = vector3.z + this.z;
|
|
166
|
+
return this._tv3;
|
|
167
|
+
}
|
|
168
|
+
subtractVector(vector3) {
|
|
169
|
+
this.x = this.x - vector3.x;
|
|
170
|
+
this.y = this.y - vector3.y;
|
|
171
|
+
this.z = this.z - vector3.z;
|
|
172
|
+
return this;
|
|
173
|
+
}
|
|
174
|
+
getSubtractedVector(vector3) {
|
|
175
|
+
this._tv3.x = this.x - vector3.x;
|
|
176
|
+
this._tv3.y = this.y - vector3.y;
|
|
177
|
+
this._tv3.z = this.z - vector3.z;
|
|
178
|
+
return this._tv3;
|
|
179
|
+
}
|
|
180
|
+
scaleVector(vector3) {
|
|
181
|
+
this.x = this.x * vector3.x;
|
|
182
|
+
this.y = this.y * vector3.y;
|
|
183
|
+
this.z = this.z * vector3.z;
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
getScaledVector(vector3) {
|
|
187
|
+
this._tv3.x = this.x * vector3.x;
|
|
188
|
+
this._tv3.y = this.y * vector3.y;
|
|
189
|
+
this._tv3.z = this.z * vector3.z;
|
|
190
|
+
return this._tv3;
|
|
191
|
+
}
|
|
192
|
+
getLength() {
|
|
193
|
+
return Math.sqrt(this.x ** 2 + this.y ** 2 + this.z ** 2);
|
|
194
|
+
}
|
|
195
|
+
divide(scalar) {
|
|
196
|
+
this.x = this.x / scalar;
|
|
197
|
+
this.y = this.y / scalar;
|
|
198
|
+
this.z = this.z / scalar;
|
|
199
|
+
Vector3.NaNRestore(this);
|
|
200
|
+
return this;
|
|
201
|
+
}
|
|
202
|
+
getDivided(scalar) {
|
|
203
|
+
this._tv3.x = this.x / scalar;
|
|
204
|
+
this._tv3.y = this.y / scalar;
|
|
205
|
+
this._tv3.z = this.z / scalar;
|
|
206
|
+
Vector3.NaNRestore(this._tv3);
|
|
207
|
+
return this._tv3;
|
|
208
|
+
}
|
|
209
|
+
normalize() {
|
|
210
|
+
return this.divide(this.getLength());
|
|
211
|
+
}
|
|
212
|
+
isEqual(vector3) {
|
|
213
|
+
if (this.x != vector3.x) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
if (this.y != vector3.y) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
if (this.z != vector3.z) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
isNotEqual(vector3) {
|
|
225
|
+
if (this.x != vector3.x) {
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
if (this.y != vector3.y) {
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
if (this.z != vector3.z) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const $3dMooreNeighborhood = [];
|
|
2
|
+
export const $2dMooreNeighborhood = [
|
|
3
|
+
[0, 0],
|
|
4
|
+
[1, 0],
|
|
5
|
+
[0, 1],
|
|
6
|
+
[1, 1],
|
|
7
|
+
[-1, 0],
|
|
8
|
+
[0, -1],
|
|
9
|
+
[-1, -1],
|
|
10
|
+
[1, -1],
|
|
11
|
+
[-1, 1],
|
|
12
|
+
];
|
|
13
|
+
export const $3dCardinalNeighbors = [
|
|
14
|
+
[0, 1, 0],
|
|
15
|
+
[0, -1, 0],
|
|
16
|
+
[1, 0, 0],
|
|
17
|
+
[-1, 0, 0],
|
|
18
|
+
[0, 0, -1],
|
|
19
|
+
[0, 0, 1],
|
|
20
|
+
];
|
|
21
|
+
for (let y = -1; y < 2; y++) {
|
|
22
|
+
for (const n of $2dMooreNeighborhood) {
|
|
23
|
+
$3dMooreNeighborhood.push([n[0], y, n[1]]);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DirectionNames } from "Types/Util.types";
|
|
2
|
+
import type { CompassDirectionNames } from "Math/Math.types";
|
|
3
|
+
export declare const FaceMap: DirectionNames[];
|
|
4
|
+
export declare const FaceRecord: Record<DirectionNames, number>;
|
|
5
|
+
export declare const FaceNormals: Record<DirectionNames | CompassDirectionNames, number[]>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const FaceMap = [
|
|
2
|
+
"up",
|
|
3
|
+
"down",
|
|
4
|
+
"east",
|
|
5
|
+
"west",
|
|
6
|
+
"south",
|
|
7
|
+
"north",
|
|
8
|
+
];
|
|
9
|
+
export const FaceRecord = {
|
|
10
|
+
up: 0,
|
|
11
|
+
down: 1,
|
|
12
|
+
east: 2,
|
|
13
|
+
west: 3,
|
|
14
|
+
south: 4,
|
|
15
|
+
north: 5,
|
|
16
|
+
};
|
|
17
|
+
export const FaceNormals = {
|
|
18
|
+
up: [0, 1, 0],
|
|
19
|
+
down: [0, -1, 0],
|
|
20
|
+
east: [1, 0, 0],
|
|
21
|
+
west: [-1, 0, 0],
|
|
22
|
+
north: [0, 0, 1],
|
|
23
|
+
south: [0, 0, -1],
|
|
24
|
+
"north-east": [1, 0, 1],
|
|
25
|
+
"north-west": [-1, 0, 1],
|
|
26
|
+
"south-east": [1, 0, -1],
|
|
27
|
+
"south-west": [-1, 0, -1],
|
|
28
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CompassDirections, Vec3Array } from "@amodx/math";
|
|
2
|
+
export type VoxelFaceNames = "up" | "down" | "north" | "south" | "east" | "west";
|
|
3
|
+
export declare const VoxelFaceNameArray: VoxelFaceNames[];
|
|
4
|
+
export declare const VoxelFaceNameOppoisteRecord: Record<VoxelFaceNames, VoxelFaceNames>;
|
|
5
|
+
export declare const VoxelFaceNameDirectionsRecord: Record<VoxelFaceNames, Vec3Array>;
|
|
6
|
+
export declare enum VoxelFaces {
|
|
7
|
+
Up = 0,
|
|
8
|
+
Down = 1,
|
|
9
|
+
North = 2,
|
|
10
|
+
South = 3,
|
|
11
|
+
East = 4,
|
|
12
|
+
West = 5
|
|
13
|
+
}
|
|
14
|
+
export declare const VoxelFacesArray: readonly VoxelFaces[];
|
|
15
|
+
export declare const VoxelFaceDirections: Readonly<Record<VoxelFaces, Vec3Array>>;
|
|
16
|
+
export declare const VoxelFaceOpositeDirectionMap: Record<VoxelFaces, VoxelFaces>;
|
|
17
|
+
export declare const VoxelFaceCompassDirectionMap: Record<VoxelFaces, CompassDirections>;
|
|
18
|
+
export declare const CompassDirectionVoxelFaceMap: Record<CompassDirections, VoxelFaces>;
|
|
19
|
+
export declare const VoxelFaceNameRecord: Record<VoxelFaceNames, VoxelFaces>;
|
|
20
|
+
export declare const VoxelFaceNameMap: Record<VoxelFaces, VoxelFaceNames>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CompassDirections } from "@amodx/math";
|
|
2
|
+
export const VoxelFaceNameArray = [
|
|
3
|
+
"up",
|
|
4
|
+
"down",
|
|
5
|
+
"north",
|
|
6
|
+
"south",
|
|
7
|
+
"east",
|
|
8
|
+
"west",
|
|
9
|
+
];
|
|
10
|
+
export const VoxelFaceNameOppoisteRecord = {
|
|
11
|
+
up: "down",
|
|
12
|
+
down: "up",
|
|
13
|
+
north: "south",
|
|
14
|
+
south: "north",
|
|
15
|
+
east: "west",
|
|
16
|
+
west: "east",
|
|
17
|
+
};
|
|
18
|
+
export const VoxelFaceNameDirectionsRecord = {
|
|
19
|
+
up: [0, 1, 0],
|
|
20
|
+
down: [0, -1, 0],
|
|
21
|
+
north: [0, 0, 1],
|
|
22
|
+
south: [0, 0, -1],
|
|
23
|
+
east: [1, 0, 0],
|
|
24
|
+
west: [-1, 0, 0],
|
|
25
|
+
};
|
|
26
|
+
export var VoxelFaces;
|
|
27
|
+
(function (VoxelFaces) {
|
|
28
|
+
VoxelFaces[VoxelFaces["Up"] = 0] = "Up";
|
|
29
|
+
VoxelFaces[VoxelFaces["Down"] = 1] = "Down";
|
|
30
|
+
VoxelFaces[VoxelFaces["North"] = 2] = "North";
|
|
31
|
+
VoxelFaces[VoxelFaces["South"] = 3] = "South";
|
|
32
|
+
VoxelFaces[VoxelFaces["East"] = 4] = "East";
|
|
33
|
+
VoxelFaces[VoxelFaces["West"] = 5] = "West";
|
|
34
|
+
})(VoxelFaces || (VoxelFaces = {}));
|
|
35
|
+
export const VoxelFacesArray = Object.freeze([
|
|
36
|
+
VoxelFaces.Up,
|
|
37
|
+
VoxelFaces.Down,
|
|
38
|
+
VoxelFaces.North,
|
|
39
|
+
VoxelFaces.South,
|
|
40
|
+
VoxelFaces.East,
|
|
41
|
+
VoxelFaces.West,
|
|
42
|
+
]);
|
|
43
|
+
export const VoxelFaceDirections = Object.freeze({
|
|
44
|
+
[VoxelFaces.Up]: [0, 1, 0],
|
|
45
|
+
[VoxelFaces.Down]: [0, -1, 0],
|
|
46
|
+
[VoxelFaces.North]: [0, 0, 1],
|
|
47
|
+
[VoxelFaces.South]: [0, 0, -1],
|
|
48
|
+
[VoxelFaces.East]: [1, 0, 0],
|
|
49
|
+
[VoxelFaces.West]: [-1, 0, 0],
|
|
50
|
+
});
|
|
51
|
+
export const VoxelFaceOpositeDirectionMap = {
|
|
52
|
+
[VoxelFaces.Up]: VoxelFaces.Down,
|
|
53
|
+
[VoxelFaces.Down]: VoxelFaces.Up,
|
|
54
|
+
[VoxelFaces.North]: VoxelFaces.South,
|
|
55
|
+
[VoxelFaces.South]: VoxelFaces.North,
|
|
56
|
+
[VoxelFaces.East]: VoxelFaces.West,
|
|
57
|
+
[VoxelFaces.West]: VoxelFaces.East,
|
|
58
|
+
};
|
|
59
|
+
export const VoxelFaceCompassDirectionMap = {
|
|
60
|
+
[VoxelFaces.Up]: CompassDirections.North,
|
|
61
|
+
[VoxelFaces.Down]: CompassDirections.South,
|
|
62
|
+
[VoxelFaces.North]: CompassDirections.North,
|
|
63
|
+
[VoxelFaces.South]: CompassDirections.South,
|
|
64
|
+
[VoxelFaces.East]: CompassDirections.East,
|
|
65
|
+
[VoxelFaces.West]: CompassDirections.West,
|
|
66
|
+
};
|
|
67
|
+
export const CompassDirectionVoxelFaceMap = {
|
|
68
|
+
[CompassDirections.North]: VoxelFaces.North,
|
|
69
|
+
[CompassDirections.South]: VoxelFaces.South,
|
|
70
|
+
[CompassDirections.West]: VoxelFaces.West,
|
|
71
|
+
[CompassDirections.East]: VoxelFaces.East,
|
|
72
|
+
[CompassDirections.NorthEast]: VoxelFaces.Up,
|
|
73
|
+
[CompassDirections.NorthWest]: VoxelFaces.Up,
|
|
74
|
+
[CompassDirections.SouthEast]: VoxelFaces.Up,
|
|
75
|
+
[CompassDirections.SouthWest]: VoxelFaces.Up,
|
|
76
|
+
};
|
|
77
|
+
export const VoxelFaceNameRecord = {
|
|
78
|
+
up: VoxelFaces.Up,
|
|
79
|
+
down: VoxelFaces.Down,
|
|
80
|
+
north: VoxelFaces.North,
|
|
81
|
+
south: VoxelFaces.South,
|
|
82
|
+
east: VoxelFaces.East,
|
|
83
|
+
west: VoxelFaces.West,
|
|
84
|
+
};
|
|
85
|
+
export const VoxelFaceNameMap = {
|
|
86
|
+
[VoxelFaces.Up]: "up",
|
|
87
|
+
[VoxelFaces.Down]: "down",
|
|
88
|
+
[VoxelFaces.North]: "north",
|
|
89
|
+
[VoxelFaces.South]: "south",
|
|
90
|
+
[VoxelFaces.East]: "east",
|
|
91
|
+
[VoxelFaces.West]: "west",
|
|
92
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type BoundsObject = {
|
|
2
|
+
minX: number;
|
|
3
|
+
maxX: number;
|
|
4
|
+
minZ: number;
|
|
5
|
+
maxZ: number;
|
|
6
|
+
minY: number;
|
|
7
|
+
maxY: number;
|
|
8
|
+
};
|
|
9
|
+
export type Size2D = {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export type Size3D = {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
depth: number;
|
|
17
|
+
};
|
|
18
|
+
export type VolumeDimensions = {
|
|
19
|
+
w: number;
|
|
20
|
+
h: number;
|
|
21
|
+
d: number;
|
|
22
|
+
};
|
|
23
|
+
export type Dimension2DArray = [width: number, height: number];
|
|
24
|
+
export type Dimension3DArray = [width: number, height: number, depth: number];
|
|
25
|
+
export type CompassDirectionNames = "north" | "south" | "east" | "west" | "north-west" | "north-east" | "south-west" | "south-east";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CompassDirectionNames } from "Math/Math.types";
|
|
2
|
+
/**# Compass Directions
|
|
3
|
+
* ---
|
|
4
|
+
* Converts a 2D noramlized vector into a compass direction.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CompassDirections: {
|
|
7
|
+
_map: CompassDirectionNames[];
|
|
8
|
+
getDirection(x: number, z: number): CompassDirectionNames;
|
|
9
|
+
};
|