@kitware/vtk.js 25.4.0 → 25.7.0

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 (98) hide show
  1. package/Common/Core/CellArray.d.ts +20 -8
  2. package/Common/Core/CellArray.js +25 -6
  3. package/Common/Core/DataArray.d.ts +159 -15
  4. package/Common/Core/DataArray.js +181 -26
  5. package/Common/Core/Math/index.js +1 -1
  6. package/Common/Core/Math.js +1 -1
  7. package/Common/Core/Points.d.ts +6 -5
  8. package/Common/Core/Points.js +8 -4
  9. package/Common/DataModel/AbstractPointLocator.d.ts +54 -0
  10. package/Common/DataModel/AbstractPointLocator.js +40 -0
  11. package/Common/DataModel/DataSetAttributes/FieldData.d.ts +33 -22
  12. package/Common/DataModel/DataSetAttributes/FieldData.js +91 -9
  13. package/Common/DataModel/DataSetAttributes.d.ts +44 -0
  14. package/Common/DataModel/DataSetAttributes.js +11 -0
  15. package/Common/DataModel/IncrementalOctreeNode.d.ts +282 -0
  16. package/Common/DataModel/IncrementalOctreeNode.js +621 -0
  17. package/Common/DataModel/IncrementalOctreePointLocator.d.ts +61 -0
  18. package/Common/DataModel/IncrementalOctreePointLocator.js +342 -0
  19. package/Common/DataModel/Line.js +1 -1
  20. package/Common/DataModel/Locator.d.ts +43 -0
  21. package/Common/DataModel/Locator.js +37 -0
  22. package/Common/DataModel/Plane.js +1 -1
  23. package/Common/DataModel/Polygon/Constants.js +12 -0
  24. package/Common/DataModel/Polygon.d.ts +38 -4
  25. package/Common/DataModel/Polygon.js +210 -6
  26. package/Common/DataModel/Quad/Constants.js +9 -0
  27. package/Common/DataModel/Quad.d.ts +91 -0
  28. package/Common/DataModel/Quad.js +235 -0
  29. package/Common/DataModel/Triangle.d.ts +106 -81
  30. package/Common/DataModel/Triangle.js +1 -1
  31. package/Common/Transform/LandmarkTransform.js +1 -1
  32. package/Filters/Core/PolyDataNormals.js +1 -1
  33. package/Filters/General/ClipClosedSurface/Constants.js +10 -0
  34. package/Filters/General/ClipClosedSurface/ccsEdgeLocator.js +40 -0
  35. package/Filters/General/ClipClosedSurface.d.ts +95 -0
  36. package/Filters/General/ClipClosedSurface.js +970 -0
  37. package/Filters/General/ContourTriangulator/Constants.js +6 -0
  38. package/Filters/General/ContourTriangulator/helper.js +1951 -0
  39. package/Filters/General/ContourTriangulator.d.ts +122 -0
  40. package/Filters/General/ContourTriangulator.js +200 -0
  41. package/Filters/General/ImageMarchingCubes.js +1 -1
  42. package/Filters/General/MoleculeToRepresentation.js +1 -1
  43. package/Filters/General/OBBTree.js +1 -1
  44. package/Filters/General/TubeFilter.js +1 -1
  45. package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
  46. package/Filters/Sources/PlaneSource.js +1 -1
  47. package/Filters/Texture/TextureMapToPlane.js +1 -1
  48. package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +4 -8
  49. package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +6 -14
  50. package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +60 -57
  51. package/IO/Core/ZipMultiDataSetReader.js +19 -29
  52. package/IO/Core/ZipMultiDataSetWriter.js +7 -23
  53. package/IO/Misc/SkyboxReader.js +67 -75
  54. package/IO/XML/XMLReader.js +2 -2
  55. package/IO/XML/XMLWriter.js +2 -2
  56. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
  57. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
  58. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
  59. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  60. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  61. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  62. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
  63. package/Interaction/Style/InteractorStyleTrackballCamera.js +16 -0
  64. package/Proxy/Core/View2DProxy.js +1 -1
  65. package/Rendering/Core/Actor2D.d.ts +12 -6
  66. package/Rendering/Core/Camera.js +1 -1
  67. package/Rendering/Core/CellPicker.js +3 -2
  68. package/Rendering/Core/ColorTransferFunction/ColorMaps.d.ts +24 -0
  69. package/Rendering/Core/Light.js +1 -1
  70. package/Rendering/Core/Picker.js +1 -1
  71. package/Rendering/Core/Property2D.d.ts +1 -1
  72. package/Rendering/Core/VolumeProperty.d.ts +4 -4
  73. package/Rendering/Core/VolumeProperty.js +1 -1
  74. package/Rendering/OpenGL/PolyDataMapper.js +1 -1
  75. package/Rendering/OpenGL/RenderWindow/ContextProxy.js +65 -0
  76. package/Rendering/OpenGL/RenderWindow.js +3 -1
  77. package/Rendering/WebGPU/BufferManager.js +1 -1
  78. package/Rendering/WebGPU/ForwardPass.js +93 -15
  79. package/Rendering/WebGPU/OpaquePass.js +1 -1
  80. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -1
  81. package/Rendering/WebGPU/RenderEncoder.js +9 -5
  82. package/Rendering/WebGPU/RenderWindow.js +15 -13
  83. package/Rendering/WebGPU/TextureView.js +15 -2
  84. package/Rendering/WebGPU/VolumePass.js +1 -1
  85. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
  86. package/Widgets/Manipulators/LineManipulator.js +1 -1
  87. package/Widgets/Manipulators/TrackballManipulator.js +1 -1
  88. package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
  89. package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
  90. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  91. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  92. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  93. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  94. package/Widgets/Widgets3D/ShapeWidget/behavior.js +1 -1
  95. package/index.d.ts +8 -0
  96. package/index.js +0 -2
  97. package/package.json +3 -4
  98. package/ThirdParty/index.js +0 -9
@@ -1,5 +1,5 @@
1
1
  import macro from '../../../macros.js';
2
- import { l as normalize, j as cross } from '../../../Common/Core/Math/index.js';
2
+ import { m as normalize, k as cross } from '../../../Common/Core/Math/index.js';
3
3
 
4
4
  function eq(v1, v2) {
5
5
  return v1.length === 3 && v2.length === 3 && v1[0] === v2[0] && v1[1] === v2[1] && v1[2] === v2[2];
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { s as subtract, j as cross, d as dot, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
3
+ import { s as subtract, k as cross, d as dot, x as multiplyScalar, l as add } from '../../Common/Core/Math/index.js';
4
4
  import vtkAbstractManipulator from './AbstractManipulator.js';
5
5
 
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { mat4, vec3 } from 'gl-matrix';
3
3
  import macro from '../../macros.js';
4
- import { j as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
4
+ import { k as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import vtkAbstractManipulator from './AbstractManipulator.js';
6
6
 
7
7
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import macro from '../../macros.js';
4
- import { s as subtract, m as multiplyAccumulate, l as normalize, j as cross } from '../../Common/Core/Math/index.js';
4
+ import { s as subtract, o as multiplyAccumulate, m as normalize, k as cross } from '../../Common/Core/Math/index.js';
5
5
  import vtkActor from '../../Rendering/Core/Actor.js';
6
6
  import vtkCylinderSource from '../../Filters/Sources/CylinderSource.js';
7
7
  import vtkMapper from '../../Rendering/Core/Mapper.js';
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import Constants from './Constants.js';
4
4
  import macro from '../../../macros.js';
5
- import { s as subtract, k as add, l as normalize } from '../../../Common/Core/Math/index.js';
5
+ import { s as subtract, l as add, m as normalize } from '../../../Common/Core/Math/index.js';
6
6
  import { getNumberOfPlacedHandles, isHandlePlaced, calculateTextPosition, updateTextPosition, getPoint } from './helpers.js';
7
7
 
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -1,4 +1,4 @@
1
- import { s as subtract, x as multiplyScalar, k as add, C as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { s as subtract, x as multiplyScalar, l as add, C as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  function calculateTextPosition(model) {
4
4
  var vector = [0, 0, 0];
@@ -3,7 +3,7 @@ import macro from '../../../macros.js';
3
3
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
4
4
  import vtkLine from '../../../Common/DataModel/Line.js';
5
5
  import vtkPlanePointManipulator from '../../Manipulators/PlaneManipulator.js';
6
- import { s as subtract, l as normalize, d as dot, j as cross, m as multiplyAccumulate, x as multiplyScalar, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
+ import { s as subtract, m as normalize, d as dot, k as cross, o as multiplyAccumulate, x as multiplyScalar, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
7
7
  import { updateState, getAssociatedLinesName, boundPointOnPlane, rotateVector } from './helpers.js';
8
8
  import { InteractionMethodsName, ScrollingMethods } from './Constants.js';
9
9
 
@@ -3,7 +3,7 @@ import vtkBoundingBox, { STATIC } from '../../../Common/DataModel/BoundingBox.js
3
3
  import vtkCubeSource from '../../../Filters/Sources/CubeSource.js';
4
4
  import vtkCutter from '../../../Filters/Core/Cutter.js';
5
5
  import vtkPlane from '../../../Common/DataModel/Plane.js';
6
- import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
+ import { s as subtract, m as normalize, k as cross, x as multiplyScalar, o as multiplyAccumulate, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
7
7
  import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
8
8
  import { ViewTypes } from '../../Core/WidgetManager/Constants.js';
9
9
 
@@ -5,7 +5,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
5
5
  import vtkPlane from '../../Common/DataModel/Plane.js';
6
6
  import vtkPlaneSource from '../../Filters/Sources/PlaneSource.js';
7
7
  import vtkResliceCursorContextRepresentation from '../Representations/ResliceCursorContextRepresentation.js';
8
- import { f as distance2BetweenPoints, m as multiplyAccumulate, s as subtract, l as normalize, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
8
+ import { f as distance2BetweenPoints, o as multiplyAccumulate, s as subtract, m as normalize, x as multiplyScalar, l as add } from '../../Common/Core/Math/index.js';
9
9
  import widgetBehavior from './ResliceCursorWidget/behavior.js';
10
10
  import generateState from './ResliceCursorWidget/state.js';
11
11
  import { updateState, transformPlane, boundPlane } from './ResliceCursorWidget/helpers.js';
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import macro from '../../../macros.js';
4
- import { t as vtkMath } from '../../../Common/Core/Math/index.js';
4
+ import { g as vtkMath } from '../../../Common/Core/Math/index.js';
5
5
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
6
6
  import vtkPlane from '../../../Common/DataModel/Plane.js';
7
7
  import { ShapeBehavior, BehaviorCategory, TextPosition } from './Constants.js';
package/index.d.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  /// <reference path="./Common/Core/StringArray.d.ts" />
17
17
  /// <reference path="./Common/Core/URLExtract.d.ts" />
18
18
  /// <reference path="./Common/Core/VariantArray.d.ts" />
19
+ /// <reference path="./Common/DataModel/AbstractPointLocator.d.ts" />
19
20
  /// <reference path="./Common/DataModel/Box.d.ts" />
20
21
  /// <reference path="./Common/DataModel/CardinalSpline1D.d.ts" />
21
22
  /// <reference path="./Common/DataModel/Cell.d.ts" />
@@ -27,8 +28,11 @@
27
28
  /// <reference path="./Common/DataModel/DataSetAttributes.d.ts" />
28
29
  /// <reference path="./Common/DataModel/ITKHelper.d.ts" />
29
30
  /// <reference path="./Common/DataModel/ImageData.d.ts" />
31
+ /// <reference path="./Common/DataModel/IncrementalOctreeNode.d.ts" />
32
+ /// <reference path="./Common/DataModel/IncrementalOctreePointLocator.d.ts" />
30
33
  /// <reference path="./Common/DataModel/KochanekSpline1D.d.ts" />
31
34
  /// <reference path="./Common/DataModel/Line.d.ts" />
35
+ /// <reference path="./Common/DataModel/Locator.d.ts" />
32
36
  /// <reference path="./Common/DataModel/PiecewiseFunction.d.ts" />
33
37
  /// <reference path="./Common/DataModel/Plane.d.ts" />
34
38
  /// <reference path="./Common/DataModel/PointSet.d.ts" />
@@ -36,6 +40,7 @@
36
40
  /// <reference path="./Common/DataModel/PolyData.d.ts" />
37
41
  /// <reference path="./Common/DataModel/PolyLine.d.ts" />
38
42
  /// <reference path="./Common/DataModel/Polygon.d.ts" />
43
+ /// <reference path="./Common/DataModel/Quad.d.ts" />
39
44
  /// <reference path="./Common/DataModel/SelectionNode.d.ts" />
40
45
  /// <reference path="./Common/DataModel/Sphere.d.ts" />
41
46
  /// <reference path="./Common/DataModel/Spline1D.d.ts" />
@@ -44,6 +49,8 @@
44
49
  /// <reference path="./Common/DataModel/Triangle.d.ts" />
45
50
  /// <reference path="./Common/Transform/LandmarkTransform.d.ts" />
46
51
  /// <reference path="./Filters/General/AppendPolyData.d.ts" />
52
+ /// <reference path="./Filters/General/ClipClosedSurface.d.ts" />
53
+ /// <reference path="./Filters/General/ContourTriangulator.d.ts" />
47
54
  /// <reference path="./Filters/General/ImageCropFilter.d.ts" />
48
55
  /// <reference path="./Filters/General/ImageOutlineFilter.d.ts" />
49
56
  /// <reference path="./Filters/General/ImageSliceFilter.d.ts" />
@@ -103,6 +110,7 @@
103
110
  /// <reference path="./Rendering/Core/AxesActor.d.ts" />
104
111
  /// <reference path="./Rendering/Core/Camera.d.ts" />
105
112
  /// <reference path="./Rendering/Core/CellPicker.d.ts" />
113
+ /// <reference path="./Rendering/Core/ColorTransferFunction/ColorMaps.d.ts" />
106
114
  /// <reference path="./Rendering/Core/ColorTransferFunction/Constants.d.ts" />
107
115
  /// <reference path="./Rendering/Core/ColorTransferFunction.d.ts" />
108
116
  /// <reference path="./Rendering/Core/Coordinate/Constants.d.ts" />
package/index.js CHANGED
@@ -5,7 +5,6 @@ import Interaction from './Interaction/index.js';
5
5
  import IO from './IO/index.js';
6
6
  import Rendering from './Rendering/index.js';
7
7
  import VTKProxy from './Proxy/index.js';
8
- import { T as ThirdParty } from './ThirdParty/index.js';
9
8
  import Widgets from './Widgets/index.js';
10
9
  import macro from './macros.js';
11
10
  import vtk from './vtk.js';
@@ -17,7 +16,6 @@ vtk.Interaction = Interaction;
17
16
  vtk.IO = IO;
18
17
  vtk.Proxy = VTKProxy;
19
18
  vtk.Rendering = Rendering;
20
- vtk.ThirdParty = ThirdParty;
21
19
  vtk.Widgets = Widgets;
22
20
  vtk.mtime = macro.getCurrentGlobalMTime;
23
21
  vtk.macro = macro; // Expose vtk to global scope without exporting it so nested namespace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "25.4.0",
3
+ "version": "25.7.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",
@@ -33,14 +33,13 @@
33
33
  "@babel/runtime": "7.17.9",
34
34
  "commander": "9.2.0",
35
35
  "d3-scale": "4.0.2",
36
+ "fflate": "0.7.3",
36
37
  "gl-matrix": "3.4.3",
37
38
  "globalthis": "1.0.3",
38
- "jszip": "3.9.1",
39
- "pako": "2.0.4",
40
39
  "seedrandom": "3.0.5",
41
40
  "shader-loader": "1.3.1",
42
41
  "shelljs": "0.8.5",
43
- "spark-md5": "^3.0.2",
42
+ "spark-md5": "3.0.2",
44
43
  "stream-browserify": "3.0.0",
45
44
  "webworker-promise": "0.5.0",
46
45
  "worker-loader": "3.0.8",
@@ -1,9 +0,0 @@
1
- import JSZip from 'jszip';
2
- import pako from 'pako';
3
-
4
- var ThirdParty = {
5
- JSZip: JSZip,
6
- pako: pako
7
- };
8
-
9
- export { ThirdParty as T };