import '@kitware/vtk.js/favicon';
import '@kitware/vtk.js/Rendering/Profiles/Geometry';
import vtkFullScreenRenderWindow from '@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow'; import vtkInteractorStyleManipulator from '@kitware/vtk.js/Interaction/Style/InteractorStyleManipulator';
import Manipulators from '@kitware/vtk.js/Interaction/Manipulators';
const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); const renderWindow = fullScreenRenderer.getRenderWindow();
const boxSelector = Manipulators.vtkMouseBoxSelectorManipulator.newInstance({ button: 1, }); boxSelector.onBoxSelectChange(({ selection }) => { console.log('Apply selection:', selection.join(', ')); });
const iStyle = vtkInteractorStyleManipulator.newInstance(); iStyle.addMouseManipulator(boxSelector); renderWindow.getInteractor().setInteractorStyle(iStyle);
|