@kitware/vtk.js 29.1.1 → 29.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -514,6 +514,9 @@ function extend(publicAPI, model) {
514
514
  // Object methods
515
515
  obj(publicAPI, model);
516
516
  set(publicAPI, model, ['name', 'numberOfComponents']);
517
+ if (model.size % model.numberOfComponents !== 0) {
518
+ throw new RangeError('model.size is not a multiple of model.numberOfComponents');
519
+ }
517
520
 
518
521
  // Object specific methods
519
522
  vtkDataArray(publicAPI, model);
@@ -241,7 +241,7 @@ function convertItkToVtkPolyData(itkPolyData) {
241
241
  vtkClass: 'vtkPoints',
242
242
  name: '_points',
243
243
  numberOfComponents: 3,
244
- size: itkPolyData.numberOfPoints,
244
+ size: itkPolyData.points.length,
245
245
  dataType: 'Float32Array',
246
246
  buffer: itkPolyData.points.buffer,
247
247
  values: itkPolyData.points
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "29.1.1",
3
+ "version": "29.1.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",