@divinevoxel/vlox 0.0.75 → 0.0.77
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/Builder/RayProvider.d.ts +6 -0
- package/Builder/Tools/Brush/BrushTool.d.ts +55 -0
- package/Builder/Tools/Brush/BrushTool.js +352 -0
- package/Builder/Tools/BuilderToolBase.d.ts +39 -0
- package/Builder/Tools/BuilderToolBase.js +42 -0
- package/Builder/Tools/Hand/HandTool.d.ts +24 -0
- package/Builder/Tools/Hand/HandTool.js +73 -0
- package/Builder/Tools/Path/PahtTool.d.ts +34 -0
- package/Builder/Tools/Path/PahtTool.js +128 -0
- package/Builder/Tools/Sculpt/SculptTool.d.ts +34 -0
- package/Builder/Tools/Sculpt/SculptTool.js +102 -0
- package/Builder/Tools/Shape/ShapeTool.d.ts +32 -0
- package/Builder/Tools/Shape/ShapeTool.js +78 -0
- package/Builder/Tools/Template/TemplateTool.d.ts +35 -0
- package/Builder/Tools/Template/TemplateTool.js +73 -0
- package/Builder/Tools/Wand/WandTool.d.ts +30 -0
- package/Builder/Tools/Wand/WandTool.js +90 -0
- package/Builder/Tools/Wrench/WrenchTool.d.ts +47 -0
- package/Builder/Tools/Wrench/WrenchTool.js +184 -0
- package/Builder/Util/FreeBoxSelection.d.ts +12 -0
- package/Builder/Util/FreeBoxSelection.js +21 -0
- package/Builder/Util/FreePointSelection.d.ts +14 -0
- package/Builder/Util/FreePointSelection.js +39 -0
- package/Builder/Util/SurfaceBoxSelection.d.ts +12 -0
- package/Builder/Util/SurfaceBoxSelection.js +25 -0
- package/Builder/VoxelBuildSpace.d.ts +73 -0
- package/Builder/VoxelBuildSpace.js +224 -0
- package/Builder/World/InitTasks.d.ts +1 -0
- package/Builder/World/InitTasks.js +129 -0
- package/Builder/World/VoxelBuildSpaceWorld.d.ts +4 -0
- package/Builder/World/VoxelBuildSpaceWorld.js +10 -0
- package/Contexts/Render/DivineVoxelEngineRender.d.ts +5 -5
- package/Contexts/World/DivineVoxelEngineWorld.d.ts +5 -5
- package/Mesher/Geomtry/Proto/ProtoMesh.d.ts +18 -0
- package/Mesher/Geomtry/Proto/ProtoMesh.js +73 -0
- package/Mesher/Geomtry/{VoxelMeshBuffers.d.ts → Proto/ProtoMeshBuffer.d.ts} +2 -2
- package/Mesher/Geomtry/{VoxelMeshBuffers.js → Proto/ProtoMeshBuffer.js} +2 -2
- package/Mesher/Geomtry/Shapes/Box.d.ts +2 -9
- package/Mesher/Geomtry/Shapes/Box.js +7 -12
- package/Mesher/Geomtry/Transform/TransformBox.js +5 -2
- package/Mesher/InitMesher.js +4 -4
- package/Mesher/InitTask.js +2 -2
- package/Mesher/Items/Base/CompactItemMesh.d.ts +3 -0
- package/Mesher/Items/Base/CompactItemMesh.js +20 -0
- package/Mesher/Items/Geomtry/ItemGeometryBuilder.d.ts +5 -0
- package/Mesher/Items/Geomtry/ItemGeometryBuilder.js +131 -0
- package/Mesher/Items/Geomtry/ItemMeshVertexStructCursor.d.ts +48 -0
- package/Mesher/Items/Geomtry/ItemMeshVertexStructCursor.js +114 -0
- package/Mesher/Items/MeshTexture.d.ts +1 -0
- package/Mesher/Items/MeshTexture.js +214 -0
- package/Mesher/Items/MeshTextureO.js +277 -0
- package/Mesher/Items/Models/ItemModelBuilder.d.ts +27 -0
- package/Mesher/Items/Models/ItemModelBuilder.js +64 -0
- package/Mesher/Types/ItemMesh.types.d.ts +5 -0
- package/Mesher/Types/ItemMesh.types.js +12 -0
- package/Mesher/Types/Mesher.types.d.ts +15 -9
- package/Mesher/Types/Mesher.types.js +14 -0
- package/Mesher/Types/VoxelMesh.types.js +7 -6
- package/Mesher/Voxels/Base/CompactTemplateMesh.d.ts +3 -0
- package/Mesher/{Functions/CompactVoxelMesh.js → Voxels/Base/CompactTemplateMesh.js} +4 -40
- package/Mesher/{Functions → Voxels/Base}/CompactVoxelSectionMesh.d.ts +2 -2
- package/Mesher/{Functions → Voxels}/Base/MeshSectionBase.d.ts +1 -1
- package/Mesher/{Functions → Voxels}/Base/MeshSectionBase.js +11 -7
- package/Mesher/{Geomtry → Voxels/Geomtry}/CompactedSectionVoxelMesh.d.ts +1 -1
- package/Mesher/{Geomtry → Voxels/Geomtry}/CompactedSectionVoxelMesh.js +1 -1
- package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelGeometryBuilder.d.ts +2 -2
- package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelGeometryBuilder.js +1 -1
- package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshBVHBuilder.d.ts +3 -3
- package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshBVHBuilder.js +2 -2
- package/Mesher/Voxels/MeshTemplate.d.ts +3 -0
- package/Mesher/Voxels/MeshTemplate.js +81 -0
- package/Mesher/{Functions → Voxels}/MeshVoxel.d.ts +1 -1
- package/Mesher/{Functions → Voxels}/MeshVoxel.js +6 -4
- package/Mesher/{Models → Voxels/Models}/Common/Calc/CalcConstants.d.ts +3 -3
- package/Mesher/{Models → Voxels/Models}/Common/Calc/CalcConstants.js +4 -4
- package/Mesher/{Models → Voxels/Models}/Common/Calc/FaceDataCalc.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/Common/Calc/FaceDataCalc.js +2 -2
- package/Mesher/{Models → Voxels/Models}/Common/Faces/CullRulledFace.js +1 -1
- package/Mesher/{Models → Voxels/Models}/Common/Faces/ShadeRulelessFace.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/Common/Faces/ShadeRulledFace.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/Common/Faces/ShadeRulledFace.js +1 -1
- package/Mesher/{Models → Voxels/Models}/Common/GetTexture.d.ts +3 -3
- package/Mesher/{Models → Voxels/Models}/Nodes/Custom/Liquid/FlowGradient.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/Nodes/Custom/Liquid/FlowGradient.js +1 -1
- package/Mesher/{Models → Voxels/Models}/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +3 -3
- package/Mesher/{Models → Voxels/Models}/Nodes/Custom/Liquid/LiquidGeomtryNode.js +14 -16
- package/Mesher/{Models → Voxels/Models}/Nodes/Default/QuadVoxelGeometryNode.d.ts +2 -2
- package/Mesher/{Models → Voxels/Models}/Nodes/Default/QuadVoxelGeometryNode.js +1 -1
- package/Mesher/{Models → Voxels/Models}/Nodes/Default/TriangleVoxelGeometryNode.d.ts +2 -2
- package/Mesher/{Models → Voxels/Models}/Nodes/Default/TriangleVoxelGeometryNode.js +1 -1
- package/Mesher/{Models → Voxels/Models}/Nodes/Types/QuadVoxelGometryNodeTypes.d.ts +2 -2
- package/Mesher/{Models → Voxels/Models}/Nodes/Types/TriangleVoxelGometryNodeTypes.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/Nodes/VoxelGeometryConstructor.d.ts +2 -2
- package/Mesher/Voxels/Models/Procedures/Default/ConsistentRotationTextureProcedure.d.ts +24 -0
- package/Mesher/{Models → Voxels/Models}/Procedures/Default/ConsistentRotationTextureProcedure.js +2 -2
- package/Mesher/{Models → Voxels/Models}/Procedures/Default/OutlinedTextureProcedure.d.ts +4 -5
- package/Mesher/Voxels/Models/Procedures/Default/OutlinedTextureProcedure.js +205 -0
- package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.d.ts +28 -0
- package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.js +109 -0
- package/Mesher/{Models → Voxels/Models}/Procedures/TextureProcedure.d.ts +3 -3
- package/Mesher/{Models → Voxels/Models}/Procedures/TextureProcedureRegister.js +2 -0
- package/Mesher/{Models → Voxels/Models}/VoxelConstructor.d.ts +4 -4
- package/Mesher/{Models → Voxels/Models}/VoxelConstructor.js +3 -3
- package/Mesher/{Models → Voxels/Models}/VoxelGeometryBuilderCacheSpace.d.ts +2 -2
- package/Mesher/{Models → Voxels/Models}/VoxelGeometryBuilderCacheSpace.js +2 -2
- package/Mesher/{Models → Voxels/Models}/VoxelModelBuilder.d.ts +7 -7
- package/Mesher/{Models → Voxels/Models}/VoxelModelBuilder.js +6 -5
- package/Mesher/{Models → Voxels/Models}/VoxelModelConstructorRegister.d.ts +4 -4
- package/Mesher/{Models → Voxels/Models}/VoxelModelConstructorRegister.js +2 -2
- package/Mesher/{Models → Voxels/Models}/VoxelModelEffect.d.ts +1 -1
- package/Mesher/{Models → Voxels/Models}/VoxelModelEffect.js +1 -1
- package/Renderer/Classes/DVESectionMeshes.d.ts +1 -1
- package/Renderer/MeshManager.js +1 -1
- package/Settings/EngineSettings.types.d.ts +2 -1
- package/Settings/EngineSettings.types.js +3 -1
- package/Tasks/Paint/Common.js +14 -9
- package/Tasks/Paint/Erase/EraseVoxel.js +1 -1
- package/Tasks/Paint/Erase/EraseVoxelSelection.d.ts +4 -0
- package/Tasks/Paint/Erase/EraseVoxelSelection.js +33 -0
- package/Tasks/Paint/Erase/EraseVoxelTemplate.js +1 -2
- package/Tasks/Paint/Paint/PaintVoxelTemplate.js +1 -1
- package/Tasks/Propagation/Illumanation/RGBUpdate.js +1 -1
- package/Tasks/Tasks.types.d.ts +2 -0
- package/Tasks/TasksIds.d.ts +1 -0
- package/Tasks/TasksIds.js +1 -0
- package/Tasks/WorldGeneration/InitTasks.js +3 -1
- package/Templates/Archive/ArchivedVoxelTemplate.d.ts +6 -5
- package/Templates/Archive/ArchivedVoxelTemplate.js +56 -49
- package/Templates/Archive/Functions/CreateArchivedTemplate.js +4 -4
- package/Templates/Archive/Functions/ExportArchiedTemplateJSON.js +0 -1
- package/Templates/Archive/Functions/ImportArchivedTemplateJSON.js +0 -2
- package/Templates/Cursor/TemplateCursor.d.ts +6 -1
- package/Templates/Cursor/TemplateCursor.js +16 -3
- package/Templates/Cursor/TemplateProxy.d.ts +1 -0
- package/Templates/Cursor/TemplateProxy.js +9 -0
- package/Templates/Cursor/TemplateVoxelCursor.d.ts +1 -0
- package/Templates/Cursor/TemplateVoxelCursor.js +6 -0
- package/Templates/Full/FullVoxelTemplate.d.ts +5 -4
- package/Templates/Full/FullVoxelTemplate.js +32 -17
- package/Templates/Functions/ExtrudeSelection.d.ts +5 -0
- package/Templates/Functions/ExtrudeSelection.js +44 -0
- package/Templates/Functions/FillSelection.d.ts +4 -0
- package/Templates/Functions/FillSelection.js +20 -0
- package/Templates/Functions/FlipTemplate.d.ts +2 -2
- package/Templates/Functions/FlipTemplate.js +8 -8
- package/Templates/Functions/RotateTemplate.d.ts +2 -2
- package/Templates/Path/VoxelPath.d.ts +4 -0
- package/Templates/Path/VoxelPath.js +18 -0
- package/Templates/Path/VoxelPath.types.d.ts +1 -0
- package/Templates/Selection/VoxelBFSSelection.d.ts +6 -6
- package/Templates/Selection/VoxelBFSSelection.js +29 -22
- package/Templates/Selection/VoxelBoundsSelection.d.ts +20 -0
- package/Templates/Selection/{VoxelBoxSelection.js → VoxelBoundsSelection.js} +38 -20
- package/Templates/Selection/VoxelPointSelection.d.ts +19 -0
- package/Templates/Selection/VoxelPointSelection.js +49 -0
- package/Templates/Selection/VoxelSelection.d.ts +18 -0
- package/Templates/Selection/VoxelSelection.js +1 -0
- package/Templates/Selection/VoxelSurfaceSelection.d.ts +8 -12
- package/Templates/Selection/VoxelSurfaceSelection.js +88 -84
- package/Templates/Selection/VoxelTemplateSelection.d.ts +13 -4
- package/Templates/Selection/VoxelTemplateSelection.js +27 -9
- package/Templates/Shapes/Selections/BoxVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/BoxVoxelShapeSelection.js +77 -0
- package/Templates/Shapes/Selections/ConeVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/ConeVoxelShapeSelection.js +77 -0
- package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/CylinderVoxelShapeSelection.js +77 -0
- package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/EllipsoidVoxelShapeSelection.js +92 -0
- package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/OctahedronVoxelShapeSelection.js +76 -0
- package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.d.ts +37 -0
- package/Templates/Shapes/Selections/PyramidVoxelShapeSelection.js +137 -0
- package/Templates/Shapes/Selections/SphereVoxelShapeSelection.d.ts +20 -0
- package/Templates/Shapes/Selections/SphereVoxelShapeSelection.js +61 -0
- package/Templates/Shapes/Selections/TorusVoxelShapeSelection.d.ts +28 -0
- package/Templates/Shapes/Selections/TorusVoxelShapeSelection.js +76 -0
- package/Templates/Shapes/Selections/VoxelShapeSelection.d.ts +5 -0
- package/Templates/Shapes/Selections/VoxelShapeSelection.js +1 -0
- package/Templates/Shapes/VoxelShape.types.d.ts +2 -0
- package/Templates/Shapes/VoxelShape.types.js +8 -0
- package/Templates/Shapes/VoxelShapeTemplate.d.ts +37 -0
- package/Templates/Shapes/{BasicVoxelShapeTemplate.js → VoxelShapeTemplate.js} +43 -37
- package/Templates/Shapes/VoxelShapeTemplate.types.d.ts +5 -12
- package/Templates/Shapes/VoxelShapeTemplate.types.js +5 -1
- package/Templates/{VoxelTempateRegister.d.ts → VoxelTemplateRegister.d.ts} +4 -0
- package/Templates/VoxelTemplateRegister.js +60 -0
- package/Templates/VoxelTemplates.types.d.ts +3 -3
- package/Textures/Classes/CompiledTexture.d.ts +2 -0
- package/Textures/Classes/CompiledTexture.js +19 -1
- package/Textures/Classes/TextureAnimationTexture.d.ts +1 -1
- package/Textures/Functions/BuildTextureData.js +13 -0
- package/Textures/TextureManager.d.ts +1 -0
- package/Textures/TextureManager.js +11 -5
- package/Tools/Brush/Brush.d.ts +2 -0
- package/Tools/Brush/Brush.js +19 -0
- package/Tools/Tasks/TasksTool.d.ts +2 -1
- package/Tools/Tasks/TasksTool.js +2 -0
- package/Util/BinaryBuffer/Functions/BinaryBufferConvert.d.ts +1 -1
- package/Util/BinaryBuffer/Functions/BinaryBufferToTypedArray.d.ts +1 -1
- package/Util/LocationData.d.ts +1 -1
- package/Voxels/Cursor/DataCursor.interface.d.ts +4 -0
- package/Voxels/Cursor/VoxelCursor.interface.d.ts +2 -0
- package/Voxels/Cursor/VoxelCursor.interface.js +2 -0
- package/Voxels/Cursor/VoxelLightData.js +2 -2
- package/Voxels/Functions/BuildTagData.js +1 -1
- package/Voxels/Indexes/VoxelIndex.d.ts +1 -0
- package/Voxels/Indexes/VoxelIndex.js +11 -13
- package/Voxels/InitVoxelData.js +5 -14
- package/Voxels/Interaction/Functions/PickVoxel.d.ts +0 -5
- package/Voxels/Interaction/Functions/PickVoxel.js +64 -85
- package/Voxels/Interaction/Functions/PickVoxelWorld.js +21 -46
- package/Voxels/Interaction/VoxelPickResult.d.ts +1 -0
- package/Voxels/Interaction/VoxelPickResult.js +3 -0
- package/Voxels/Models/CompiledVoxelModel.types.d.ts +1 -1
- package/Voxels/Models/Defaults/CubeVoxelGeometry.js +11 -0
- package/Voxels/Models/Defaults/CubeVoxelModels.js +44 -99
- package/Voxels/Models/Defaults/PanelVoxelGeometry.d.ts +1 -3
- package/Voxels/Models/Defaults/PanelVoxelGeometry.js +2 -226
- package/Voxels/Models/Defaults/PanelVoxelModels.d.ts +1 -0
- package/Voxels/Models/Defaults/PanelVoxelModels.js +100 -258
- package/Voxels/Models/Defaults/StairVoxelModel.js +2 -2
- package/Voxels/Models/Rules/Classes/GeomtryInput.d.ts +4 -1
- package/Voxels/Models/Rules/Classes/GeomtryInput.js +26 -5
- package/Voxels/Models/Rules/Classes/VoxelRulesGeometry.d.ts +1 -1
- package/Voxels/Models/Rules/Functions/BuildFinalInputs.js +23 -8
- package/Voxels/Models/Rules/Functions/Compile/CompileGeomtryNodes.d.ts +1 -1
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileBoxGeometryNode.d.ts +1 -1
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.d.ts +1 -1
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileQuadGeometryNode.js +1 -1
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.d.ts +1 -1
- package/Voxels/Models/Rules/Functions/Compile/Nodes/CompileTriangleGeometryNode.js +1 -1
- package/Voxels/Models/VoxelModel.types.d.ts +6 -1
- package/Voxels/State/Schema/BinarySchemaNode.d.ts +2 -1
- package/Voxels/State/Schema/BinarySchemaNode.js +5 -2
- package/Voxels/State/Schema/Conditions/SameVoxelConditions.js +2 -0
- package/Voxels/Types/PaintVoxelData.d.ts +13 -1
- package/Voxels/Types/PaintVoxelData.js +151 -14
- package/World/Archive/Functions/Shared/LightSegments.d.ts +1 -1
- package/World/Cursor/SectionCursor.d.ts +4 -0
- package/World/Cursor/SectionCursor.js +13 -16
- package/World/Cursor/SectorCursor.d.ts +4 -0
- package/World/Cursor/SectorCursor.js +13 -16
- package/World/Cursor/WorldCursor.d.ts +4 -0
- package/World/Cursor/WorldCursor.js +8 -0
- package/World/Sector/Sector.d.ts +1 -1
- package/World/Sector/SectorHeightMap.d.ts +6 -0
- package/World/Sector/SectorHeightMap.js +6 -0
- package/World/SnapShot/SectionSnapShotCursor.d.ts +3 -0
- package/World/SnapShot/SectionSnapShotCursor.js +6 -0
- package/World/WorldSpaces.js +3 -3
- package/WorldSimulation/Dimensions/DimensionSimulation.d.ts +5 -1
- package/WorldSimulation/Dimensions/DimensionSimulation.js +12 -0
- package/WorldSimulation/Dimensions/Generator.d.ts +1 -0
- package/WorldSimulation/Dimensions/Generator.js +1 -0
- package/WorldSimulation/Dimensions/SimulationSector.d.ts +4 -1
- package/WorldSimulation/Dimensions/SimulationSector.js +71 -41
- package/WorldSimulation/Internal/WorldSimulationTasks.js +5 -2
- package/WorldSimulation/Procedures/BuildOnly.d.ts +10 -0
- package/WorldSimulation/Procedures/BuildOnly.js +55 -0
- package/WorldSimulation/Procedures/InitalLoad.js +3 -0
- package/WorldSimulation/Tasks/SimulationTaskBase.d.ts +2 -0
- package/WorldSimulation/Tasks/SimulationTaskBase.js +11 -3
- package/WorldSimulation/Tasks/TaskSegment.d.ts +2 -1
- package/WorldSimulation/Tasks/TaskSegment.js +3 -1
- package/WorldSimulation/Tick/TickQueue.d.ts +2 -0
- package/WorldSimulation/Tick/TickQueue.js +26 -0
- package/WorldSimulation/Tools/SimulationBrush.d.ts +3 -0
- package/WorldSimulation/Tools/SimulationBrush.js +52 -0
- package/WorldSimulation/Voxels/Behaviors/Types/DefaultVoxelBehavior.js +3 -0
- package/WorldSimulation/Voxels/Behaviors/Types/LiquidVoxelBehavior.js +21 -1
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviors.d.ts +2 -0
- package/WorldSimulation/Voxels/Behaviors/VoxelBehaviors.js +6 -0
- package/WorldSimulation/Voxels/Ticks/Types/LiquidVoxelUpdate.js +39 -14
- package/WorldSimulation/WorldSimulation.d.ts +10 -0
- package/WorldSimulation/WorldSimulation.js +41 -1
- package/package.json +1 -30
- package/Mesher/Functions/CompactVoxelMesh.d.ts +0 -3
- package/Mesher/Functions/MeshTexture.js +0 -278
- package/Mesher/Geomtry/VoxelMesh.d.ts +0 -12
- package/Mesher/Geomtry/VoxelMesh.js +0 -25
- package/Mesher/Models/Procedures/Default/ConsistentRotationTextureProcedure.d.ts +0 -25
- package/Mesher/Models/Procedures/Default/OutlinedTextureProcedure.js +0 -162
- package/Templates/Selection/VoxelBoxSelection.d.ts +0 -14
- package/Templates/Selection/VoxelSelecton.d.ts +0 -6
- package/Templates/Shapes/BasicVoxelShapeTemplate.d.ts +0 -35
- package/Templates/Shapes/BoxVoxelTemplate.d.ts +0 -22
- package/Templates/Shapes/BoxVoxelTemplate.js +0 -75
- package/Templates/Shapes/ConeVoxelTemplate.d.ts +0 -22
- package/Templates/Shapes/ConeVoxelTemplate.js +0 -69
- package/Templates/Shapes/CylinderVoxelTemplate.d.ts +0 -22
- package/Templates/Shapes/CylinderVoxelTemplate.js +0 -69
- package/Templates/Shapes/OctahedronVoxelTemplate.d.ts +0 -22
- package/Templates/Shapes/OctahedronVoxelTemplate.js +0 -69
- package/Templates/Shapes/PyramidVoxelTemplate.d.ts +0 -30
- package/Templates/Shapes/PyramidVoxelTemplate.js +0 -140
- package/Templates/Shapes/SphereVoxelTemplate.d.ts +0 -24
- package/Templates/Shapes/SphereVoxelTemplate.js +0 -97
- package/Templates/Shapes/TorusVoxelTemplate.d.ts +0 -22
- package/Templates/Shapes/TorusVoxelTemplate.js +0 -69
- package/Templates/VoxelTempateRegister.js +0 -30
- /package/{Mesher/Models/Nodes/Types/GeomtryNode.types.js → Builder/RayProvider.js} +0 -0
- /package/Mesher/{Functions/MeshTexture.d.ts → Items/MeshTextureO.d.ts} +0 -0
- /package/Mesher/{Functions → Voxels/Base}/CompactVoxelSectionMesh.js +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshBVHStructCursor.d.ts +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshBVHStructCursor.js +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshVertexStructCursor.d.ts +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelMeshVertexStructCursor.js +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelShaderData.d.ts +0 -0
- /package/Mesher/{Geomtry → Voxels/Geomtry}/VoxelShaderData.js +0 -0
- /package/Mesher/{Functions → Voxels}/MeshSection.d.ts +0 -0
- /package/Mesher/{Functions → Voxels}/MeshSection.js +0 -0
- /package/Mesher/{Functions → Voxels}/MeshSectionSnapShot.d.ts +0 -0
- /package/Mesher/{Functions → Voxels}/MeshSectionSnapShot.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Common/Faces/CullRulledFace.d.ts +0 -0
- /package/Mesher/{Models → Voxels/Models}/Common/Faces/ShadeRulelessFace.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Common/GetTexture.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/Custom/index.d.ts +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/Custom/index.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/GeometryNode.d.ts +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/GeometryNode.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/Types/GeomtryNode.types.d.ts +0 -0
- /package/{Templates/Selection/VoxelSelecton.js → Mesher/Voxels/Models/Nodes/Types/GeomtryNode.types.js} +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/Types/QuadVoxelGometryNodeTypes.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/Types/TriangleVoxelGometryNodeTypes.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Nodes/VoxelGeometryConstructor.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Procedures/TextureProcedure.js +0 -0
- /package/Mesher/{Models → Voxels/Models}/Procedures/TextureProcedureRegister.d.ts +0 -0
- /package/Mesher/{Models → Voxels/Models}/RenderedMaterials.d.ts +0 -0
- /package/Mesher/{Models → Voxels/Models}/RenderedMaterials.js +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { TextureProcedure } from "../TextureProcedure";
|
|
2
|
-
import { VoxelFaces } from "../../../../Math/index.js";
|
|
3
|
-
const textureMap = [
|
|
4
|
-
"top",
|
|
5
|
-
"corner-top-right",
|
|
6
|
-
"corner-top-left",
|
|
7
|
-
"corner-top-left-top-right",
|
|
8
|
-
"bottom",
|
|
9
|
-
"corner-bottom-right",
|
|
10
|
-
"corner-bottom-left",
|
|
11
|
-
"corner-bottom-left-bottom-right",
|
|
12
|
-
"right",
|
|
13
|
-
"left",
|
|
14
|
-
];
|
|
15
|
-
/*
|
|
16
|
-
0 -> normal direction
|
|
17
|
-
1 -> top right
|
|
18
|
-
2 -> top left
|
|
19
|
-
*/
|
|
20
|
-
const uvsSets = {
|
|
21
|
-
//top bottom faces
|
|
22
|
-
north: {
|
|
23
|
-
0b0: 0,
|
|
24
|
-
0b101: 1,
|
|
25
|
-
0b011: 2,
|
|
26
|
-
0b001: 3,
|
|
27
|
-
},
|
|
28
|
-
south: {
|
|
29
|
-
0b0: 4,
|
|
30
|
-
0b101: 5,
|
|
31
|
-
0b011: 6,
|
|
32
|
-
0b001: 7,
|
|
33
|
-
},
|
|
34
|
-
east: {
|
|
35
|
-
0b0: 8,
|
|
36
|
-
},
|
|
37
|
-
west: {
|
|
38
|
-
0b0: 9,
|
|
39
|
-
},
|
|
40
|
-
//side faces
|
|
41
|
-
top: {
|
|
42
|
-
0b0: 0,
|
|
43
|
-
0b101: 1,
|
|
44
|
-
0b011: 2,
|
|
45
|
-
0b001: 3,
|
|
46
|
-
},
|
|
47
|
-
bottom: {
|
|
48
|
-
0b0: 4,
|
|
49
|
-
0b101: 5,
|
|
50
|
-
0b011: 6,
|
|
51
|
-
0b001: 7,
|
|
52
|
-
},
|
|
53
|
-
right: {
|
|
54
|
-
0b0: 8,
|
|
55
|
-
},
|
|
56
|
-
left: {
|
|
57
|
-
0b0: 9,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
const topAndDown = {
|
|
61
|
-
north: [
|
|
62
|
-
[0, 0, 1],
|
|
63
|
-
[1, 0, 1],
|
|
64
|
-
[-1, 0, 1],
|
|
65
|
-
],
|
|
66
|
-
south: [
|
|
67
|
-
[0, 0, -1],
|
|
68
|
-
[1, 0, -1],
|
|
69
|
-
[-1, 0, -1],
|
|
70
|
-
],
|
|
71
|
-
east: [[1, 0, 0]],
|
|
72
|
-
west: [[-1, 0, 0]],
|
|
73
|
-
};
|
|
74
|
-
const eastAndWest = {
|
|
75
|
-
top: [
|
|
76
|
-
[0, 1, 0],
|
|
77
|
-
[0, 1, 1],
|
|
78
|
-
[0, 1, -1],
|
|
79
|
-
],
|
|
80
|
-
bottom: [
|
|
81
|
-
[0, -1, 0],
|
|
82
|
-
[0, -1, 1],
|
|
83
|
-
[0, -1, -1],
|
|
84
|
-
],
|
|
85
|
-
right: [[0, 0, 1]],
|
|
86
|
-
left: [[0, 0, -1]],
|
|
87
|
-
};
|
|
88
|
-
const northAndSouth = {
|
|
89
|
-
top: [
|
|
90
|
-
[0, 1, 0],
|
|
91
|
-
[1, 1, 0],
|
|
92
|
-
[-1, 1, 0],
|
|
93
|
-
],
|
|
94
|
-
bottom: [
|
|
95
|
-
[0, -1, 0],
|
|
96
|
-
[1, -1, 0],
|
|
97
|
-
[-1, -1, 0],
|
|
98
|
-
],
|
|
99
|
-
right: [[1, 0, 0]],
|
|
100
|
-
left: [[-1, 0, 0]],
|
|
101
|
-
};
|
|
102
|
-
const CheckSets = {
|
|
103
|
-
[VoxelFaces.Up]: topAndDown,
|
|
104
|
-
[VoxelFaces.Down]: topAndDown,
|
|
105
|
-
[VoxelFaces.North]: northAndSouth,
|
|
106
|
-
[VoxelFaces.South]: northAndSouth,
|
|
107
|
-
[VoxelFaces.East]: eastAndWest,
|
|
108
|
-
[VoxelFaces.West]: eastAndWest,
|
|
109
|
-
};
|
|
110
|
-
const generateCheck = (direction, tool, normal, sets) => {
|
|
111
|
-
const { x, y, z } = tool.position;
|
|
112
|
-
let key = 0b0;
|
|
113
|
-
for (let i = 0; i < sets.length; i++) {
|
|
114
|
-
const set = sets[i];
|
|
115
|
-
const cx = x + set[0];
|
|
116
|
-
const cy = y + set[1];
|
|
117
|
-
const cz = z + set[2];
|
|
118
|
-
const sameLevelCheck = tool.nVoxel
|
|
119
|
-
.getVoxel(cx, cy, cz)
|
|
120
|
-
?.isSameVoxel(tool.voxel);
|
|
121
|
-
let normalCheck = true;
|
|
122
|
-
const nVoxel = tool.nVoxel.getVoxel(cx + normal[0], cy + normal[1], cz + normal[2]);
|
|
123
|
-
if (nVoxel && nVoxel.isRenderable() && nVoxel.isOpaque()) {
|
|
124
|
-
normalCheck = false;
|
|
125
|
-
}
|
|
126
|
-
if (sameLevelCheck && normalCheck) {
|
|
127
|
-
key |= 0b1 << i;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
key |= 0b0 << i;
|
|
131
|
-
if (i == 0)
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (uvsSets[direction][key] == undefined)
|
|
136
|
-
return 0;
|
|
137
|
-
const index = uvsSets[direction][key];
|
|
138
|
-
return textureMap[index];
|
|
139
|
-
};
|
|
140
|
-
const normal = [0, 0, 0];
|
|
141
|
-
export class OutlinedTextureProcedure extends TextureProcedure {
|
|
142
|
-
getTexture(builder, data, closestFace, primitive) {
|
|
143
|
-
return data.texture;
|
|
144
|
-
}
|
|
145
|
-
getOverlayTexture(builder, data, closestFace, primitive, ref) {
|
|
146
|
-
const set = CheckSets[closestFace];
|
|
147
|
-
const x = generateCheck("north", builder, normal, set.north);
|
|
148
|
-
if (x)
|
|
149
|
-
ref.x = data.textureRecrod[x];
|
|
150
|
-
const y = generateCheck("south", builder, normal, set.south);
|
|
151
|
-
if (y)
|
|
152
|
-
ref.y = data.textureRecrod[y];
|
|
153
|
-
const z = generateCheck("east", builder, normal, set.east);
|
|
154
|
-
if (z)
|
|
155
|
-
ref.z = data.textureRecrod[z];
|
|
156
|
-
const w = generateCheck("west", builder, normal, set.west);
|
|
157
|
-
if (w)
|
|
158
|
-
ref.w = data.textureRecrod[w];
|
|
159
|
-
return ref;
|
|
160
|
-
}
|
|
161
|
-
transformUVs(builder, data, closestFace, primitive) { }
|
|
162
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Vector3Like } from "@amodx/math";
|
|
2
|
-
import { IVoxelSelection } from "./VoxelSelecton";
|
|
3
|
-
import { BoxVoxelTemplate } from "../Shapes/BoxVoxelTemplate";
|
|
4
|
-
import { IVoxelshapeTemplateBaseData } from "../Shapes/VoxelShapeTemplate.types";
|
|
5
|
-
import { DataCursorInterface } from "../../Voxels/Cursor/DataCursor.interface";
|
|
6
|
-
export declare class VoxelBoxSelection implements IVoxelSelection {
|
|
7
|
-
origin: Vector3Like;
|
|
8
|
-
end: Vector3Like;
|
|
9
|
-
size: Vector3Like;
|
|
10
|
-
isSelected(x: number, y: number, z: number): boolean;
|
|
11
|
-
reConstruct(startPosition: Vector3Like, startNormal: Vector3Like, endPosition: Vector3Like, endNormal: Vector3Like, offset?: number): void;
|
|
12
|
-
toTemplate(data?: Partial<IVoxelshapeTemplateBaseData>): BoxVoxelTemplate;
|
|
13
|
-
toExtrudedTemplate(cursor: DataCursorInterface, normal: Vector3Like): void;
|
|
14
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Flat3DIndex, Vector3Like } from "@amodx/math";
|
|
2
|
-
import { PaintVoxelData, RawVoxelData } from "../../Voxels";
|
|
3
|
-
import { IVoxelShapeTemplate, IVoxelShapeTemplateData, VoxelShapeTemplateFillModes, IVoxelShapeTemplateEvents } from "./VoxelShapeTemplate.types";
|
|
4
|
-
import { TypedEventTarget } from "../../Util/TypedEventTarget";
|
|
5
|
-
import { BoundingBox } from "@amodx/math/Geomtry/Bounds/BoundingBox";
|
|
6
|
-
export declare abstract class BasicVoxelShapeTemplate<Type extends string, Data extends IVoxelShapeTemplateData<any>, Events extends IVoxelShapeTemplateEvents = IVoxelShapeTemplateEvents> extends TypedEventTarget<Events> implements IVoxelShapeTemplate<Type, Data, Events> {
|
|
7
|
-
static CreateBaseData<Type extends string>(type: Type, data: Partial<IVoxelShapeTemplateData<Type>>): IVoxelShapeTemplateData<Type>;
|
|
8
|
-
position: Vector3Like;
|
|
9
|
-
index: Flat3DIndex;
|
|
10
|
-
bounds: BoundingBox;
|
|
11
|
-
type: string;
|
|
12
|
-
fillMode: VoxelShapeTemplateFillModes;
|
|
13
|
-
fillVoxel: PaintVoxelData;
|
|
14
|
-
faceVoxel: PaintVoxelData;
|
|
15
|
-
edgeVoxel: PaintVoxelData;
|
|
16
|
-
pointVoxel: PaintVoxelData;
|
|
17
|
-
_fillVoxel: RawVoxelData;
|
|
18
|
-
_faceVoxel: RawVoxelData;
|
|
19
|
-
_edgeVoxel: RawVoxelData;
|
|
20
|
-
_pointVoxel: RawVoxelData;
|
|
21
|
-
constructor(data: Data);
|
|
22
|
-
setVoxels(fill: PaintVoxelData, face?: PaintVoxelData, edge?: PaintVoxelData, point?: PaintVoxelData): void;
|
|
23
|
-
getIndex(x: number, y: number, z: number): number;
|
|
24
|
-
setPosition(x: number, y: number, z: number): void;
|
|
25
|
-
abstract isIncluded(index: number): boolean;
|
|
26
|
-
isAir(index: number): boolean;
|
|
27
|
-
getId(index: number): number;
|
|
28
|
-
getLight(index: number): number;
|
|
29
|
-
getLevel(index: number): number;
|
|
30
|
-
getSecondary(index: number): number;
|
|
31
|
-
getRaw(index: number, rawRef?: RawVoxelData): RawVoxelData;
|
|
32
|
-
protected _updateBounds(): void;
|
|
33
|
-
abstract toJSON(): Data;
|
|
34
|
-
protected getBaseJSON(): IVoxelShapeTemplateData<any>;
|
|
35
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IVoxelShapeTemplateData } from "./VoxelShapeTemplate.types";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export interface BoxVoxelTemplateData extends IVoxelShapeTemplateData<"box-shape"> {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class BoxVoxelTemplate extends BasicVoxelShapeTemplate<"box-shape", BoxVoxelTemplateData> {
|
|
9
|
-
static CreateNew(data: Partial<BoxVoxelTemplateData>): BoxVoxelTemplateData;
|
|
10
|
-
private _width;
|
|
11
|
-
get width(): number;
|
|
12
|
-
set width(width: number);
|
|
13
|
-
private _height;
|
|
14
|
-
get height(): number;
|
|
15
|
-
set height(height: number);
|
|
16
|
-
private _depth;
|
|
17
|
-
get depth(): number;
|
|
18
|
-
set depth(depth: number);
|
|
19
|
-
constructor(data: BoxVoxelTemplateData);
|
|
20
|
-
isIncluded(index: number): boolean;
|
|
21
|
-
toJSON(): BoxVoxelTemplateData;
|
|
22
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { PaintVoxelData } from "../../Voxels";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export class BoxVoxelTemplate extends BasicVoxelShapeTemplate {
|
|
4
|
-
static CreateNew(data) {
|
|
5
|
-
return {
|
|
6
|
-
...BasicVoxelShapeTemplate.CreateBaseData("box-shape", {
|
|
7
|
-
bounds: { x: data.width || 1, y: data.height || 1, z: data.depth || 1 },
|
|
8
|
-
fillVoxel: data.fillVoxel || PaintVoxelData.Create(),
|
|
9
|
-
pointVoxel: data.pointVoxel || PaintVoxelData.Create(),
|
|
10
|
-
faceVoxel: data.faceVoxel || PaintVoxelData.Create(),
|
|
11
|
-
edgeVoxel: data.edgeVoxel || PaintVoxelData.Create(),
|
|
12
|
-
fillMode: data.fillMode || "full",
|
|
13
|
-
}),
|
|
14
|
-
width: data.width || 1,
|
|
15
|
-
height: data.height || 1,
|
|
16
|
-
depth: data.depth || 1,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
_width = 0;
|
|
20
|
-
get width() {
|
|
21
|
-
return this._width;
|
|
22
|
-
}
|
|
23
|
-
set width(width) {
|
|
24
|
-
const oldWidth = this._width;
|
|
25
|
-
this._width = width;
|
|
26
|
-
if (oldWidth != width) {
|
|
27
|
-
this.bounds.size.x = width;
|
|
28
|
-
this._updateBounds();
|
|
29
|
-
this.dispatch("updated", null);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
_height = 0;
|
|
33
|
-
get height() {
|
|
34
|
-
return this._height;
|
|
35
|
-
}
|
|
36
|
-
set height(height) {
|
|
37
|
-
const oldWidth = this._height;
|
|
38
|
-
this._height = height;
|
|
39
|
-
if (oldWidth != height) {
|
|
40
|
-
this.bounds.size.y = height;
|
|
41
|
-
this._updateBounds();
|
|
42
|
-
this.dispatch("updated", null);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
_depth = 0;
|
|
46
|
-
get depth() {
|
|
47
|
-
return this._depth;
|
|
48
|
-
}
|
|
49
|
-
set depth(depth) {
|
|
50
|
-
const oldWidth = this._depth;
|
|
51
|
-
this._depth = depth;
|
|
52
|
-
if (oldWidth != depth) {
|
|
53
|
-
this.bounds.size.z = depth;
|
|
54
|
-
this._updateBounds();
|
|
55
|
-
this.dispatch("updated", null);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
constructor(data) {
|
|
59
|
-
super(data);
|
|
60
|
-
this._width = data.width;
|
|
61
|
-
this._height = data.height;
|
|
62
|
-
this._depth = data.depth;
|
|
63
|
-
}
|
|
64
|
-
isIncluded(index) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
toJSON() {
|
|
68
|
-
return {
|
|
69
|
-
width: this.width,
|
|
70
|
-
height: this.height,
|
|
71
|
-
depth: this.depth,
|
|
72
|
-
...this.getBaseJSON(),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IVoxelShapeTemplateData } from "./VoxelShapeTemplate.types";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export interface ConeVoxelTemplateData extends IVoxelShapeTemplateData<"cone-shape"> {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class ConeVoxelTemplate extends BasicVoxelShapeTemplate<"cone-shape", ConeVoxelTemplateData> {
|
|
9
|
-
static CreateNew(data: Partial<ConeVoxelTemplateData>): ConeVoxelTemplateData;
|
|
10
|
-
private _width;
|
|
11
|
-
get width(): number;
|
|
12
|
-
set width(width: number);
|
|
13
|
-
private _height;
|
|
14
|
-
get height(): number;
|
|
15
|
-
set height(height: number);
|
|
16
|
-
private _depth;
|
|
17
|
-
get depth(): number;
|
|
18
|
-
set depth(depth: number);
|
|
19
|
-
constructor(data: ConeVoxelTemplateData);
|
|
20
|
-
isIncluded(index: number): boolean;
|
|
21
|
-
toJSON(): ConeVoxelTemplateData;
|
|
22
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
2
|
-
export class ConeVoxelTemplate extends BasicVoxelShapeTemplate {
|
|
3
|
-
static CreateNew(data) {
|
|
4
|
-
return {
|
|
5
|
-
...BasicVoxelShapeTemplate.CreateBaseData("cone-shape", {
|
|
6
|
-
bounds: { x: data.width || 1, y: data.height || 1, z: data.depth || 1 },
|
|
7
|
-
}),
|
|
8
|
-
width: data.width || 1,
|
|
9
|
-
height: data.height || 1,
|
|
10
|
-
depth: data.depth || 1,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
_width = 0;
|
|
14
|
-
get width() {
|
|
15
|
-
return this._width;
|
|
16
|
-
}
|
|
17
|
-
set width(width) {
|
|
18
|
-
const oldWidth = this._width;
|
|
19
|
-
this._width = width;
|
|
20
|
-
if (oldWidth != width) {
|
|
21
|
-
this.bounds.size.x = width;
|
|
22
|
-
this._updateBounds();
|
|
23
|
-
this.dispatch("updated", null);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
_height = 0;
|
|
27
|
-
get height() {
|
|
28
|
-
return this._height;
|
|
29
|
-
}
|
|
30
|
-
set height(height) {
|
|
31
|
-
const oldWidth = this._height;
|
|
32
|
-
this._height = height;
|
|
33
|
-
if (oldWidth != height) {
|
|
34
|
-
this.bounds.size.y = height;
|
|
35
|
-
this._updateBounds();
|
|
36
|
-
this.dispatch("updated", null);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
_depth = 0;
|
|
40
|
-
get depth() {
|
|
41
|
-
return this._depth;
|
|
42
|
-
}
|
|
43
|
-
set depth(depth) {
|
|
44
|
-
const oldWidth = this._depth;
|
|
45
|
-
this._depth = depth;
|
|
46
|
-
if (oldWidth != depth) {
|
|
47
|
-
this.bounds.size.z = depth;
|
|
48
|
-
this._updateBounds();
|
|
49
|
-
this.dispatch("updated", null);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
constructor(data) {
|
|
53
|
-
super(data);
|
|
54
|
-
this._width = data.width;
|
|
55
|
-
this._height = data.height;
|
|
56
|
-
this._depth = data.depth;
|
|
57
|
-
}
|
|
58
|
-
isIncluded(index) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
toJSON() {
|
|
62
|
-
return {
|
|
63
|
-
width: this.width,
|
|
64
|
-
height: this.height,
|
|
65
|
-
depth: this.depth,
|
|
66
|
-
...this.getBaseJSON(),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IVoxelShapeTemplateData } from "./VoxelShapeTemplate.types";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export interface CylinderVoxelTemplateData extends IVoxelShapeTemplateData<"cylinder-shape"> {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class CylinderVoxelTemplate extends BasicVoxelShapeTemplate<"cylinder-shape", CylinderVoxelTemplateData> {
|
|
9
|
-
static CreateNew(data: Partial<CylinderVoxelTemplateData>): CylinderVoxelTemplateData;
|
|
10
|
-
private _width;
|
|
11
|
-
get width(): number;
|
|
12
|
-
set width(width: number);
|
|
13
|
-
private _height;
|
|
14
|
-
get height(): number;
|
|
15
|
-
set height(height: number);
|
|
16
|
-
private _depth;
|
|
17
|
-
get depth(): number;
|
|
18
|
-
set depth(depth: number);
|
|
19
|
-
constructor(data: CylinderVoxelTemplateData);
|
|
20
|
-
isIncluded(index: number): boolean;
|
|
21
|
-
toJSON(): CylinderVoxelTemplateData;
|
|
22
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
2
|
-
export class CylinderVoxelTemplate extends BasicVoxelShapeTemplate {
|
|
3
|
-
static CreateNew(data) {
|
|
4
|
-
return {
|
|
5
|
-
...BasicVoxelShapeTemplate.CreateBaseData("cylinder-shape", {
|
|
6
|
-
bounds: { x: data.width || 1, y: data.height || 1, z: data.depth || 1 },
|
|
7
|
-
}),
|
|
8
|
-
width: data.width || 1,
|
|
9
|
-
height: data.height || 1,
|
|
10
|
-
depth: data.depth || 1,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
_width = 0;
|
|
14
|
-
get width() {
|
|
15
|
-
return this._width;
|
|
16
|
-
}
|
|
17
|
-
set width(width) {
|
|
18
|
-
const oldWidth = this._width;
|
|
19
|
-
this._width = width;
|
|
20
|
-
if (oldWidth != width) {
|
|
21
|
-
this.bounds.size.x = width;
|
|
22
|
-
this._updateBounds();
|
|
23
|
-
this.dispatch("updated", null);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
_height = 0;
|
|
27
|
-
get height() {
|
|
28
|
-
return this._height;
|
|
29
|
-
}
|
|
30
|
-
set height(height) {
|
|
31
|
-
const oldWidth = this._height;
|
|
32
|
-
this._height = height;
|
|
33
|
-
if (oldWidth != height) {
|
|
34
|
-
this.bounds.size.y = height;
|
|
35
|
-
this._updateBounds();
|
|
36
|
-
this.dispatch("updated", null);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
_depth = 0;
|
|
40
|
-
get depth() {
|
|
41
|
-
return this._depth;
|
|
42
|
-
}
|
|
43
|
-
set depth(depth) {
|
|
44
|
-
const oldWidth = this._depth;
|
|
45
|
-
this._depth = depth;
|
|
46
|
-
if (oldWidth != depth) {
|
|
47
|
-
this.bounds.size.z = depth;
|
|
48
|
-
this._updateBounds();
|
|
49
|
-
this.dispatch("updated", null);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
constructor(data) {
|
|
53
|
-
super(data);
|
|
54
|
-
this._width = data.width;
|
|
55
|
-
this._height = data.height;
|
|
56
|
-
this._depth = data.depth;
|
|
57
|
-
}
|
|
58
|
-
isIncluded(index) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
toJSON() {
|
|
62
|
-
return {
|
|
63
|
-
width: this.width,
|
|
64
|
-
height: this.height,
|
|
65
|
-
depth: this.depth,
|
|
66
|
-
...this.getBaseJSON(),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IVoxelShapeTemplateData } from "./VoxelShapeTemplate.types";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export interface OctahedronVoxelTemplateData extends IVoxelShapeTemplateData<"octahedron-shape"> {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class OctahedronVoxelTemplate extends BasicVoxelShapeTemplate<"octahedron-shape", OctahedronVoxelTemplateData> {
|
|
9
|
-
static CreateNew(data: Partial<OctahedronVoxelTemplateData>): OctahedronVoxelTemplateData;
|
|
10
|
-
private _width;
|
|
11
|
-
get width(): number;
|
|
12
|
-
set width(width: number);
|
|
13
|
-
private _height;
|
|
14
|
-
get height(): number;
|
|
15
|
-
set height(height: number);
|
|
16
|
-
private _depth;
|
|
17
|
-
get depth(): number;
|
|
18
|
-
set depth(depth: number);
|
|
19
|
-
constructor(data: OctahedronVoxelTemplateData);
|
|
20
|
-
isIncluded(index: number): boolean;
|
|
21
|
-
toJSON(): OctahedronVoxelTemplateData;
|
|
22
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
2
|
-
export class OctahedronVoxelTemplate extends BasicVoxelShapeTemplate {
|
|
3
|
-
static CreateNew(data) {
|
|
4
|
-
return {
|
|
5
|
-
...BasicVoxelShapeTemplate.CreateBaseData("octahedron-shape", {
|
|
6
|
-
bounds: { x: data.width || 1, y: data.height || 1, z: data.depth || 1 },
|
|
7
|
-
}),
|
|
8
|
-
width: data.width || 1,
|
|
9
|
-
height: data.height || 1,
|
|
10
|
-
depth: data.depth || 1,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
_width = 0;
|
|
14
|
-
get width() {
|
|
15
|
-
return this._width;
|
|
16
|
-
}
|
|
17
|
-
set width(width) {
|
|
18
|
-
const oldWidth = this._width;
|
|
19
|
-
this._width = width;
|
|
20
|
-
if (oldWidth != width) {
|
|
21
|
-
this.bounds.size.x = width;
|
|
22
|
-
this._updateBounds();
|
|
23
|
-
this.dispatch("updated", null);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
_height = 0;
|
|
27
|
-
get height() {
|
|
28
|
-
return this._height;
|
|
29
|
-
}
|
|
30
|
-
set height(height) {
|
|
31
|
-
const oldWidth = this._height;
|
|
32
|
-
this._height = height;
|
|
33
|
-
if (oldWidth != height) {
|
|
34
|
-
this.bounds.size.y = height;
|
|
35
|
-
this._updateBounds();
|
|
36
|
-
this.dispatch("updated", null);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
_depth = 0;
|
|
40
|
-
get depth() {
|
|
41
|
-
return this._depth;
|
|
42
|
-
}
|
|
43
|
-
set depth(depth) {
|
|
44
|
-
const oldWidth = this._depth;
|
|
45
|
-
this._depth = depth;
|
|
46
|
-
if (oldWidth != depth) {
|
|
47
|
-
this.bounds.size.z = depth;
|
|
48
|
-
this._updateBounds();
|
|
49
|
-
this.dispatch("updated", null);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
constructor(data) {
|
|
53
|
-
super(data);
|
|
54
|
-
this._width = data.width;
|
|
55
|
-
this._height = data.height;
|
|
56
|
-
this._depth = data.depth;
|
|
57
|
-
}
|
|
58
|
-
isIncluded(index) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
toJSON() {
|
|
62
|
-
return {
|
|
63
|
-
width: this.width,
|
|
64
|
-
height: this.height,
|
|
65
|
-
depth: this.depth,
|
|
66
|
-
...this.getBaseJSON(),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { IVoxelShapeTemplateData, VoxelShapeTemplateShapeDirections } from "./VoxelShapeTemplate.types";
|
|
2
|
-
import { BasicVoxelShapeTemplate } from "./BasicVoxelShapeTemplate";
|
|
3
|
-
export interface PyramidVoxelTemplateData extends IVoxelShapeTemplateData<"pyramid-shape"> {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
direction: VoxelShapeTemplateShapeDirections;
|
|
8
|
-
fallOff: number;
|
|
9
|
-
}
|
|
10
|
-
export declare class PyramidVoxelTemplate extends BasicVoxelShapeTemplate<"pyramid-shape", PyramidVoxelTemplateData> {
|
|
11
|
-
static CreateNew(data: Partial<PyramidVoxelTemplateData>): PyramidVoxelTemplateData;
|
|
12
|
-
private _fallOff;
|
|
13
|
-
get fallOff(): number;
|
|
14
|
-
set fallOff(fallOFf: number);
|
|
15
|
-
private _direction;
|
|
16
|
-
get direction(): VoxelShapeTemplateShapeDirections;
|
|
17
|
-
set direction(direction: VoxelShapeTemplateShapeDirections);
|
|
18
|
-
private _width;
|
|
19
|
-
get width(): number;
|
|
20
|
-
set width(width: number);
|
|
21
|
-
private _height;
|
|
22
|
-
get height(): number;
|
|
23
|
-
set height(height: number);
|
|
24
|
-
private _depth;
|
|
25
|
-
get depth(): number;
|
|
26
|
-
set depth(depth: number);
|
|
27
|
-
constructor(data: PyramidVoxelTemplateData);
|
|
28
|
-
isIncluded(index: number): boolean;
|
|
29
|
-
toJSON(): PyramidVoxelTemplateData;
|
|
30
|
-
}
|