@kitware/vtk.js 29.3.1 → 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.
@@ -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.1",
3
+ "version": "29.3.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",