-
-
Notifications
You must be signed in to change notification settings - Fork 401
Description
We're trying to integrate vtk.js into an existing react app (create-react-app). We ejected the app and made the changes to webpack per the documentation and got it building and running. However when we try to render anything we get the following error at runtime:
TypeError: Cannot read property 'isUniformUsed' of null publicAPI.setMapperShaderParameters node_modules/vtk.js/Sources/Rendering/OpenGL/PolyDataMapper/index.js:1113
Code
We're just trying to get a simple example rendering using the following code from various samples. All we're trying to do is render a simple cone.
const coneSource = vtkConeSource.newInstance({ height: 1.0 });
const mapper = vtkMapper.newInstance();
mapper.setInputConnection(coneSource.getOutputPort());
const actor = vtkActor.newInstance();
actor.setMapper(mapper);
this.renderer.addActor(actor);
this.renderer.resetCamera();If we exclude the this.renderer.addActor(actor); line that actually adds the actor, we do not see this error - simply the blank black window.
Screenshots
Here's a partial stack trace from the error:

vtk.js version:
"vtk.js": "^17.2.2",