@kitware/vtk.js 34.11.0 → 34.11.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.
Files changed (72) hide show
  1. package/Common/Core/DataArray.js +2 -1
  2. package/Common/Core/Points.d.ts +11 -1
  3. package/Common/Core/Points.js +33 -18
  4. package/Common/DataModel/BoundingBox.d.ts +18 -4
  5. package/Common/DataModel/BoundingBox.js +10 -3
  6. package/Common/DataModel/Cell.js +4 -34
  7. package/Common/DataModel/DataSet.d.ts +7 -0
  8. package/Common/DataModel/DataSet.js +6 -0
  9. package/Common/DataModel/DataSetAttributes/FieldData.d.ts +6 -2
  10. package/Common/DataModel/DataSetAttributes.d.ts +2 -1
  11. package/Common/DataModel/ImageData.d.ts +8 -0
  12. package/Common/DataModel/ImageData.js +14 -1
  13. package/Common/DataModel/PointSet.d.ts +6 -0
  14. package/Common/DataModel/PointSet.js +10 -0
  15. package/Common/DataModel/PolyData.d.ts +6 -0
  16. package/Common/DataModel/PolyData.js +7 -0
  17. package/Filters/Core/Cutter.js +1 -1
  18. package/Filters/Core/PolyDataNormals.js +1 -1
  19. package/Filters/Core/ThresholdPoints.js +1 -2
  20. package/Filters/General/AppendPolyData.js +1 -1
  21. package/Filters/General/Calculator.js +1 -1
  22. package/Filters/General/ClipClosedSurface.js +2 -2
  23. package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -1
  24. package/Filters/General/ContourLoopExtraction.js +2 -4
  25. package/Filters/General/ContourTriangulator.js +1 -2
  26. package/Filters/General/ImageCropFilter.js +7 -10
  27. package/Filters/General/ImageMarchingCubes.js +1 -1
  28. package/Filters/General/ImageMarchingSquares.js +1 -1
  29. package/Filters/General/ImageOutlineFilter.js +2 -1
  30. package/Filters/General/ImageSliceFilter.js +2 -1
  31. package/Filters/General/ImageStreamline.js +1 -1
  32. package/Filters/General/LineFilter.js +1 -1
  33. package/Filters/General/MoleculeToRepresentation.js +2 -2
  34. package/Filters/General/OutlineFilter.js +1 -1
  35. package/Filters/General/ScalarToRGBA.js +2 -1
  36. package/Filters/General/ShrinkPolyData.js +1 -1
  37. package/Filters/General/TransformPolyDataFilter.js +1 -1
  38. package/Filters/General/TriangleFilter.js +1 -1
  39. package/Filters/General/TubeFilter.js +1 -2
  40. package/Filters/General/WarpScalar.js +1 -1
  41. package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
  42. package/Filters/Sources/ArcSource.js +1 -1
  43. package/Filters/Sources/Arrow2DSource.js +6 -9
  44. package/Filters/Sources/ArrowSource.js +2 -8
  45. package/Filters/Sources/CircleSource.js +3 -10
  46. package/Filters/Sources/ConcentricCylinderSource.js +5 -8
  47. package/Filters/Sources/ConeSource.js +3 -10
  48. package/Filters/Sources/CubeSource.js +3 -9
  49. package/Filters/Sources/Cursor3D.js +1 -4
  50. package/Filters/Sources/CylinderSource.js +3 -10
  51. package/Filters/Sources/DiskSource.js +1 -5
  52. package/Filters/Sources/EllipseArcSource.js +1 -1
  53. package/Filters/Sources/ImageGridSource.js +0 -3
  54. package/Filters/Sources/LineSource.js +1 -4
  55. package/Filters/Sources/PlaneSource.js +1 -4
  56. package/Filters/Sources/PlatonicSolidSource.js +1 -1
  57. package/Filters/Sources/PointSource.js +1 -4
  58. package/Filters/Sources/RTAnalyticSource.js +0 -3
  59. package/Filters/Sources/SLICSource.js +1 -4
  60. package/Filters/Sources/SphereSource.js +1 -4
  61. package/Filters/Sources/ViewFinderSource.js +1 -1
  62. package/Filters/Texture/TextureMapToPlane.js +1 -4
  63. package/Filters/Texture/TextureMapToSphere.js +1 -4
  64. package/Imaging/Core/ImageReslice.js +1 -1
  65. package/Imaging/Hybrid/SampleFunction.js +1 -1
  66. package/Rendering/Core/VectorText.js +4 -3
  67. package/Rendering/Core/Viewport.d.ts +8 -3
  68. package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -1
  69. package/Widgets/Representations/RectangleContextRepresentation.js +0 -3
  70. package/Widgets/Representations/SplineContextRepresentation.js +1 -5
  71. package/macros2.js +1 -1
  72. package/package.json +2 -2
@@ -221,7 +221,7 @@ function vtkImplicitPlaneRepresentation(publicAPI, model) {
221
221
  // --------------------------------
222
222
 
223
223
  vtkWidgetRepresentation.applyStyles(model._pipelines, model.representationStyle, state.getActive() && state.getActiveHandle());
224
- const output = vtkPolyData.newInstance();
224
+ const output = outData[0]?.initialize() || vtkPolyData.newInstance();
225
225
  output.shallowCopy(model._pipelines.plane.filter.getOutputData());
226
226
  outData[0] = output;
227
227
  };
@@ -39,9 +39,6 @@ function vtkRectangleContextRepresentation(publicAPI, model) {
39
39
  // --------------------------------------------------------------------------
40
40
 
41
41
  publicAPI.requestData = (inData, outData) => {
42
- if (model.deleted) {
43
- return;
44
- }
45
42
  const list = publicAPI.getRepresentationStates(inData[0]);
46
43
  // FIXME: support list > 1.
47
44
  const state = list[0];
@@ -58,15 +58,12 @@ function vtkSplineContextRepresentation(publicAPI, model) {
58
58
  return superGetRepresentationStates(input).filter(state => state.getOrigin?.() && state.isVisible?.());
59
59
  };
60
60
  publicAPI.requestData = (inData, outData) => {
61
- if (model.deleted) {
62
- return;
63
- }
64
61
  const widgetState = inData[0];
62
+ outData[0] = model.internalPolyData;
65
63
  const closed = widgetState.getSplineClosed();
66
64
  const list = publicAPI.getRepresentationStates(widgetState);
67
65
  const inPoints = list.map(state => state.getOrigin());
68
66
  if (inPoints.length <= 1) {
69
- outData[0] = model.internalPolyData;
70
67
  return;
71
68
  }
72
69
  let numVertices = inPoints.length;
@@ -114,7 +111,6 @@ function vtkSplineContextRepresentation(publicAPI, model) {
114
111
  }
115
112
  model.internalPolyData.getLines().setData(model.outputBorder ? outCells : []);
116
113
  model.internalPolyData.modified();
117
- outData[0] = model.internalPolyData;
118
114
  model._pipelines.area.filter.update();
119
115
  model._pipelines.border.actor.getProperty().setColor(...(inPoints.length <= 3 || model._pipelines.area.filter.getErrorCount() === 0 ? model.borderColor : model.errorBorderColor));
120
116
  };
package/macros2.js CHANGED
@@ -816,7 +816,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
816
816
  count++;
817
817
  }
818
818
  }
819
- if (publicAPI.requestData && publicAPI.shouldUpdate()) {
819
+ if (publicAPI.requestData && !publicAPI.isDeleted() && publicAPI.shouldUpdate()) {
820
820
  publicAPI.requestData(ins, model.output);
821
821
  }
822
822
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "34.11.0",
3
+ "version": "34.11.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",
@@ -123,7 +123,7 @@
123
123
  "typescript": "^5.8.3",
124
124
  "webpack": "5.97.1",
125
125
  "webpack-bundle-analyzer": "4.5.0",
126
- "webpack-cli": "4.9.2",
126
+ "webpack-cli": "5.1.4",
127
127
  "webpack-dashboard": "3.3.7",
128
128
  "webpack-dev-server": "^5.2.2",
129
129
  "webpack-merge": "5.8.0",