-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating to latest vtk.js version #108
Comments
vtkPaintWidget changed API slightly. You should no longer need the method |
As floryst was suggesting, would it be sufficient to just update the |
I get this error when I try to import this library:
is this because I'm using vtk.js 15? |
vtk.js v15 updates to webpack 5, and with it |
@manjebrinkhuis +1 for this. Would be appreciated to see this accepted as it's causing us some grief right now. If you don't have time at the moment however I can take it on myself. |
@Punzo @floryst or @JamesAPetts just wondering if there was any word on getting the PR approved. If there are any issues just let me know and I'll address them as best as I can. |
Hi @tamaynard, sorry I didn't manage to do create the PR for this. Thanks for that! |
Additionally to the changes mentioned on this thread, the rendering profile must be included since v18.0.0 |
Please accept change, this issue open too long |
First of all, great work, so far everything works very well. I'm toying with creating a sample viewer that consumes the react-vtkjs-viewport directly (which works now).
My only concern is that updating to the latest vtk.js version isn't currently possible (and how to handle such cases in the future).
When using the latest vtk.js (14.11.4 currently) there is one breaking change that creates an error when using together with this library: in View2D.js Ln 77:
handle.rotateFromDirections(handle.getDirection(), normal);
Apparently the api has changed and rotateFromDirections is now in vtkMatrixBuilder.
Unfortunately I also have a problem using the new api, replacing with:
vtkMatrixBuilder.buildfromDegree().matrix.rotateFromDirections(handle.getDirection(), normal);
and including the vtkMatrixBuilder:
import vtkMatrixBuilder from 'vtk.js/Sources/Common/Core/MatrixBuilder';
compiles but I get scope issues with webpack later running the example:
Uncaught TypeError: vtk_js_Sources_Common_Core_MatrixBuilder__WEBPACK_IMPORTED_MODULE_19__.default.buildfromDegree is not a function
Here is my fork with the changes: https://github.com/knopkem/react-vtkjs-viewport
Thanks
The text was updated successfully, but these errors were encountered: