// Force DataAccessHelper to have access to various data source import'@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper'; import'@kitware/vtk.js/IO/Core/DataAccessHelper/HttpDataAccessHelper'; import'@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper';
// ---------------------------------------------------------------------------- // Example code // ---------------------------------------------------------------------------- // create a filter on the fly, sort of cool, this is a random scalars // filter we create inline, for a simple cone you would not need // this // ----------------------------------------------------------------------------
vrbutton.addEventListener('click', (e) => { if (vrbutton.textContent === 'Send To VR') { XRHelper.startXR(XrSessionTypes.HmdVR); vrbutton.textContent = 'Return From VR'; } else { XRHelper.stopXR(); vrbutton.textContent = 'Send To VR'; } });
// ----------------------------------------------------------- // Make some variables global so that you can inspect and // modify objects in your browser's developer console: // -----------------------------------------------------------