After an update of my node env to 22.14.0 and update of vtk.js to 26.8.0, and react-vtk-js to 1.18.0, my mesh crashes with the errors
Uncaught TypeError: this.polydata is null
, Uncaught TypeError: this.scalarBar is null
, Uncaught TypeError: this.selector is null
, Uncaught TypeError: this.renderWindow is null
.
Error persists after a successful downgrade to prev version.
const vtkdata = {
nids: [...],
vpts: [...],
vpolys: [...],
vfun:[...]
}
...
<View
id="0"
background={[0.75, 0.75, 0.75]}
pickingModes={['click']}
>
{/* Main Mesh */}
<GeometryRepresentation
mapper={{
interpolateScalarsBeforeMapping: true,
}}
colorDataRange={controlProps.colorDataRange}
actor={{ visibility: controlProps.clickedMeshVisibility }}
showScalarBar={true}
colorMapPreset={"Cool to Warm"}
onDataAvailable={(e) => { console.log("event update ", e) }}
>
{/* <RequestRenderer /> */}
<PolyData
points={vtkdata.vpts}
polys={vtkdata.vpolys}
>
<PointData >
{vtkdata.vfun.length > 0 && (
<DataArray registration="setScalars" values={vtkdata.vfun} />
)}
</PointData>
</PolyData>
</GeometryRepresentation>
</View>