Closed laurennlam closed 3 years ago
Here is what I tried without success:
this.renderWindow = vtkRenderWindow.newInstance();
this.renderer = vtkRenderer.newInstance();
this.renderWindow.addRenderer(this.renderer);
this.openglRenderWindow = this.renderWindow.newAPISpecificView();
Looks like some sort of babel issue @jourdain will likely know more. Maybe babel needs another package (although my tests all work fine locally) etc.
Here are the packages I used in my project:
"devDependencies": {
"@babel/core": "7.9.6",
"autoprefixer": "9.8.0",
"babel-loader": "8.1.0",
"blueimp-md5": "2.16.0",
"gl-matrix": "3.1.0",
"jquery": "^3.6.0",
"jszip": "3.4.0",
"kw-web-suite": "10.0.0",
"mobile-detect": "^1.4.5",
"seedrandom": "3.0.5",
"shader-loader": "^1.3.1",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1",
"webvr-polyfill": "0.10.12",
"worker-loader": "^2.0.0"
}
With the latest vtk.js you should not need kw-web-suite
anymore. By having it up, you may trigger some module resolution conflict.
(I'm not saying that is the issue, but at least you should not have it anymore)
Also all your build dependencies are getting old and therefore don't really support async/await.
You can see that vtk.js is using Webpack 5.x while you are still on version 2.x.
In case you don't want to deal with vtk.js transpiler rules and so on, you can use the esm build of vtk.js under @kitware/vtk.js
.
Thanks. I'll tested it and let you know if it fixes the issue.
If this is still an issue, please re-open.
I didn't manage to fix it for now. But probably because of my webpack config. I'll reopen if I still have the issue. Thanks !
Describe the bug
I updated my code from a master commit dated from last week to master(303a53380f30ff0a28323d064e7299e2ecf4726f), and my code is now broken. My guess is that it's link to this MR. Maybe I have to updated my code but I need some help.
Code
Screenshots
Platform:
Device:
Browsers Affected:
vtk.js version: https://github.com/laurennlam/vtk-js/tree/add-obbtree rebase on master (last commit 303a53380f30ff0a28323d064e7299e2ecf4726f)
@martinken @jourdain