@kitware/vtk.js 29.3.0 → 29.3.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.
@@ -627,7 +627,6 @@ function vtkTubeFilter(publicAPI, model) {
627
627
  numberOfComponents: oldArray.getNumberOfComponents(),
628
628
  size: numNewPts * oldArray.getNumberOfComponents()
629
629
  });
630
- output.getPointData().removeArrayByIndex(0); // remove oldArray from beginning
631
630
  output.getPointData().addArray(newArray); // concat newArray to end
632
631
  }
633
632
 
@@ -645,7 +644,6 @@ function vtkTubeFilter(publicAPI, model) {
645
644
  numberOfComponents: oldArray.getNumberOfComponents(),
646
645
  size: numNewCells * oldArray.getNumberOfComponents()
647
646
  });
648
- output.getCellData().removeArrayByIndex(0); // remove oldArray from beginning
649
647
  output.getCellData().addArray(newArray); // concat newArray to end
650
648
  }
651
649
 
@@ -43,7 +43,7 @@ function vtkFollower(publicAPI, model) {
43
43
  // compute a vpn
44
44
  const vpn = new Float64Array(3);
45
45
  if (model.camera.getParallelProjection()) {
46
- vec3.set(vpn, model.camera.getViewPlaneNormal());
46
+ vec3.set(vpn, ...model.camera.getViewPlaneNormal());
47
47
  } else {
48
48
  vec3.set(vpn, ...model.position);
49
49
  vec3.subtract(vpn, model.camera.getPosition(), vpn);
@@ -13,7 +13,12 @@ function projectDisplayToLine(x, y, lineOrigin, lineDirection, renderer, glRende
13
13
  const numerator = dot([near[0] - lineOrigin[0], near[1] - lineOrigin[1], near[2] - lineOrigin[2]], normal);
14
14
  const denominator = dot(normal, lineDirection);
15
15
  const result = lineDirection.slice();
16
- multiplyScalar(result, numerator / denominator);
16
+ if (denominator === 0) {
17
+ // no change is allowed
18
+ multiplyScalar(result, 0);
19
+ } else {
20
+ multiplyScalar(result, numerator / denominator);
21
+ }
17
22
  add(lineOrigin, result, result);
18
23
  return result;
19
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "29.3.0",
3
+ "version": "29.3.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",