Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.24k stars 373 forks source link

can I load local .vtp file #530

Closed tomhaitao closed 6 years ago

jourdain commented 6 years ago

Yes, you can look at the example / application here which does exactly that: https://kitware.github.io/vtk-js/examples/GeometryViewer.html

doczoidberg commented 6 years ago

nice to see development on the file formats. no time steps are supported yet? Would it be difficult to implement?

jourdain commented 6 years ago

That can be managed at the application level.

doczoidberg commented 6 years ago

can you give a code hint?

jourdain commented 6 years ago

https://github.com/Kitware/arctic-viewer/blob/master/lib/types/VTKGeometry.js

load the data structure that the following script generate

https://github.com/Kitware/arctic-viewer/blob/master/scripts/examples/paraview/samples/VTKGeometry-can.py

And the inside time handling is done here

https://github.com/Kitware/paraviewweb/blob/master/src/Rendering/Geometry/VTKGeometryBuilder/index.js