@kitware/vtk.js 24.5.4 → 24.5.5

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 (54) hide show
  1. package/Common/Core/Math/index.js +1 -1
  2. package/Common/Core/Math.js +1 -1
  3. package/Common/DataModel/Triangle.js +1 -1
  4. package/Common/Transform/LandmarkTransform.js +1 -1
  5. package/Filters/Core/PolyDataNormals.js +1 -1
  6. package/Filters/General/OBBTree.js +1 -1
  7. package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
  8. package/Filters/Sources/CircleSource.js +1 -1
  9. package/Filters/Sources/PointSource.js +1 -1
  10. package/Filters/Texture/TextureMapToPlane.js +1 -1
  11. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
  12. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  13. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  14. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  15. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
  16. package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
  17. package/Proxy/Core/View2DProxy.js +1 -1
  18. package/Rendering/Core/ColorTransferFunction.js +1 -1
  19. package/Rendering/Core/Coordinate.js +1 -1
  20. package/Rendering/Core/CubeAxesActor.js +1 -1
  21. package/Rendering/Core/Glyph3DMapper.js +1 -1
  22. package/Rendering/Core/ImageMapper.js +1 -1
  23. package/Rendering/Core/Mapper.js +1 -1
  24. package/Rendering/Core/Prop3D.js +1 -1
  25. package/Rendering/Core/RenderWindowInteractor.js +1 -1
  26. package/Rendering/Core/Renderer.js +1 -1
  27. package/Rendering/Core/ScalarBarActor.js +1 -1
  28. package/Rendering/Core/VolumeMapper.js +1 -1
  29. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  30. package/Rendering/OpenGL/Texture.js +1 -1
  31. package/Rendering/WebGPU/BufferManager.js +83 -14
  32. package/Rendering/WebGPU/CellArrayMapper.js +6 -44
  33. package/Rendering/WebGPU/Device.js +97 -57
  34. package/Rendering/WebGPU/Glyph3DMapper.js +2 -0
  35. package/Rendering/WebGPU/ImageMapper.js +1 -5
  36. package/Rendering/WebGPU/SphereMapper.js +29 -31
  37. package/Rendering/WebGPU/StickMapper.js +38 -42
  38. package/Rendering/WebGPU/StorageBuffer.js +0 -1
  39. package/Rendering/WebGPU/Texture.js +0 -2
  40. package/Rendering/WebGPU/TextureManager.js +37 -7
  41. package/Rendering/WebGPU/UniformBuffer.js +0 -1
  42. package/Rendering/WebGPU/VolumePass.js +1 -3
  43. package/Rendering/WebGPU/VolumePassFSQ.js +1 -5
  44. package/Widgets/Manipulators/LineManipulator.js +1 -1
  45. package/Widgets/Representations/PolyLineRepresentation.js +1 -1
  46. package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
  47. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  48. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  49. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  50. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  51. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  52. package/Widgets/Widgets3D/ShapeWidget/behavior.js +1 -1
  53. package/index.d.ts +2 -2
  54. package/package.json +1 -1
@@ -2329,4 +2329,4 @@ var vtkMath$1 = /*#__PURE__*/Object.freeze({
2329
2329
  'default': vtkMath
2330
2330
  });
2331
2331
 
2332
- export { binomial as $, clampValue as A, arrayRange as B, getMajorAxisIndex as C, isInf as D, rgb2hsv as E, rgb2lab as F, lab2rgb as G, floor as H, round as I, normalize2D as J, nearestPowerOfTwo as K, createUninitializedBounds as L, multiply3x3_vect3 as M, areBoundsInitialized as N, isPowerOfTwo as O, multiplyAccumulate as P, angleBetweenVectors as Q, signedAngleBetweenVectors as R, determinant2x2 as S, Pi as T, ceil as U, min as V, max as W, arrayMin as X, arrayMax as Y, ceilLog2 as Z, factorial as _, areMatricesEqual as a, beginCombination as a0, nextCombination as a1, randomSeed as a2, getSeed as a3, gaussian as a4, multiplyScalar2D as a5, multiplyAccumulate2D as a6, outer as a7, projectVector as a8, dot2D as a9, hex2float as aA, lab2xyz as aB, xyz2lab as aC, xyz2rgb as aD, rgb2xyz as aE, clampAndNormalizeValue as aF, getScalarTypeFittingRange as aG, getAdjustedScalarRange as aH, extentIsWithinOtherExtent as aI, boundsIsWithinOtherBounds as aJ, pointIsWithinBounds as aK, solve3PointCircle as aL, inf as aM, negInf as aN, isFinite as aO, isNaN as aP, floatToHex2 as aQ, floatRGB2HexCode as aR, float2CssRGBA as aS, projectVector2D as aa, gaussianAmplitude as ab, gaussianWeight as ac, outer2D as ad, norm2D as ae, LUFactor3x3 as af, LUSolve3x3 as ag, linearSolve3x3 as ah, multiply3x3_mat3 as ai, multiplyMatrix as aj, transpose3x3 as ak, invert3x3 as al, identity3x3 as am, quaternionToMatrix3x3 as an, roundNumber as ao, matrix3x3ToQuaternion as ap, multiplyQuaternion as aq, orthogonalize3x3 as ar, diagonalize3x3 as as, singularValueDecomposition3x3 as at, luFactorLinearSystem as au, luSolveLinearSystem as av, invertMatrix as aw, estimateMatrixCondition as ax, solveHomogeneousLeastSquares as ay, solveLeastSquares as az, roundVector as b, computeBoundsFromPoints as c, dot as d, clampVector as e, distance2BetweenPoints as f, subtract as g, hsv2rgb as h, isNan as i, cross as j, add as k, normalize as l, jacobiN as m, norm as n, vtkMath as o, perpendiculars as p, jacobi as q, radiansFromDegrees as r, solveLinearSystem as s, multiplyScalar as t, uninitializeBounds as u, vtkMath$1 as v, random as w, determinant3x3 as x, degreesFromRadians as y, areEquals as z };
2332
+ export { binomial as $, degreesFromRadians as A, areEquals as B, clampValue as C, arrayRange as D, getMajorAxisIndex as E, isInf as F, rgb2hsv as G, rgb2lab as H, lab2rgb as I, floor as J, round as K, normalize2D as L, nearestPowerOfTwo as M, createUninitializedBounds as N, multiply3x3_vect3 as O, areBoundsInitialized as P, isPowerOfTwo as Q, angleBetweenVectors as R, signedAngleBetweenVectors as S, Pi as T, ceil as U, min as V, max as W, arrayMin as X, arrayMax as Y, ceilLog2 as Z, factorial as _, areMatricesEqual as a, beginCombination as a0, nextCombination as a1, randomSeed as a2, getSeed as a3, gaussian as a4, multiplyScalar2D as a5, multiplyAccumulate2D as a6, outer as a7, projectVector as a8, dot2D as a9, hex2float as aA, lab2xyz as aB, xyz2lab as aC, xyz2rgb as aD, rgb2xyz as aE, clampAndNormalizeValue as aF, getScalarTypeFittingRange as aG, getAdjustedScalarRange as aH, extentIsWithinOtherExtent as aI, boundsIsWithinOtherBounds as aJ, pointIsWithinBounds as aK, solve3PointCircle as aL, inf as aM, negInf as aN, isFinite as aO, isNaN as aP, floatToHex2 as aQ, floatRGB2HexCode as aR, float2CssRGBA as aS, projectVector2D as aa, gaussianAmplitude as ab, gaussianWeight as ac, outer2D as ad, norm2D as ae, LUFactor3x3 as af, LUSolve3x3 as ag, linearSolve3x3 as ah, multiply3x3_mat3 as ai, multiplyMatrix as aj, transpose3x3 as ak, invert3x3 as al, identity3x3 as am, quaternionToMatrix3x3 as an, roundNumber as ao, matrix3x3ToQuaternion as ap, multiplyQuaternion as aq, orthogonalize3x3 as ar, diagonalize3x3 as as, singularValueDecomposition3x3 as at, luFactorLinearSystem as au, luSolveLinearSystem as av, invertMatrix as aw, estimateMatrixCondition as ax, solveHomogeneousLeastSquares as ay, solveLeastSquares as az, roundVector as b, computeBoundsFromPoints as c, dot as d, clampVector as e, distance2BetweenPoints as f, subtract as g, hsv2rgb as h, isNan as i, cross as j, add as k, normalize as l, multiplyAccumulate as m, norm as n, determinant2x2 as o, jacobiN as p, perpendiculars as q, radiansFromDegrees as r, solveLinearSystem as s, vtkMath as t, uninitializeBounds as u, vtkMath$1 as v, jacobi as w, multiplyScalar as x, random as y, determinant3x3 as z };
@@ -1,4 +1,4 @@
1
1
  import '@babel/runtime/helpers/slicedToArray';
2
2
  import 'seedrandom';
3
3
  import '../../macros.js';
4
- export { af as LUFactor3x3, ag as LUSolve3x3, T as Pi, k as add, Q as angleBetweenVectors, N as areBoundsInitialized, z as areEquals, a as areMatricesEqual, Y as arrayMax, X as arrayMin, B as arrayRange, a0 as beginCombination, $ as binomial, aJ as boundsIsWithinOtherBounds, U as ceil, Z as ceilLog2, aF as clampAndNormalizeValue, A as clampValue, e as clampVector, c as computeBoundsFromPoints, L as createUninitializedBounds, j as cross, o as default, y as degreesFromRadians, S as determinant2x2, x as determinant3x3, as as diagonalize3x3, f as distance2BetweenPoints, d as dot, a9 as dot2D, ax as estimateMatrixCondition, aI as extentIsWithinOtherExtent, _ as factorial, aS as float2CssRGBA, aR as floatRGB2HexCode, aQ as floatToHex2, H as floor, a4 as gaussian, ab as gaussianAmplitude, ac as gaussianWeight, aH as getAdjustedScalarRange, C as getMajorAxisIndex, aG as getScalarTypeFittingRange, a3 as getSeed, aA as hex2float, h as hsv2rgb, am as identity3x3, aM as inf, al as invert3x3, aw as invertMatrix, aO as isFinite, D as isInf, aP as isNaN, i as isNan, O as isPowerOfTwo, q as jacobi, m as jacobiN, G as lab2rgb, aB as lab2xyz, ah as linearSolve3x3, au as luFactorLinearSystem, av as luSolveLinearSystem, ap as matrix3x3ToQuaternion, W as max, V as min, ai as multiply3x3_mat3, M as multiply3x3_vect3, P as multiplyAccumulate, a6 as multiplyAccumulate2D, aj as multiplyMatrix, aq as multiplyQuaternion, t as multiplyScalar, a5 as multiplyScalar2D, K as nearestPowerOfTwo, aN as negInf, a1 as nextCombination, n as norm, ae as norm2D, l as normalize, J as normalize2D, ar as orthogonalize3x3, a7 as outer, ad as outer2D, p as perpendiculars, aK as pointIsWithinBounds, a8 as projectVector, aa as projectVector2D, an as quaternionToMatrix3x3, r as radiansFromDegrees, w as random, a2 as randomSeed, E as rgb2hsv, F as rgb2lab, aE as rgb2xyz, I as round, ao as roundNumber, b as roundVector, R as signedAngleBetweenVectors, at as singularValueDecomposition3x3, aL as solve3PointCircle, ay as solveHomogeneousLeastSquares, az as solveLeastSquares, s as solveLinearSystem, g as subtract, ak as transpose3x3, u as uninitializeBounds, aC as xyz2lab, aD as xyz2rgb } from './Math/index.js';
4
+ export { af as LUFactor3x3, ag as LUSolve3x3, T as Pi, k as add, R as angleBetweenVectors, P as areBoundsInitialized, B as areEquals, a as areMatricesEqual, Y as arrayMax, X as arrayMin, D as arrayRange, a0 as beginCombination, $ as binomial, aJ as boundsIsWithinOtherBounds, U as ceil, Z as ceilLog2, aF as clampAndNormalizeValue, C as clampValue, e as clampVector, c as computeBoundsFromPoints, N as createUninitializedBounds, j as cross, t as default, A as degreesFromRadians, o as determinant2x2, z as determinant3x3, as as diagonalize3x3, f as distance2BetweenPoints, d as dot, a9 as dot2D, ax as estimateMatrixCondition, aI as extentIsWithinOtherExtent, _ as factorial, aS as float2CssRGBA, aR as floatRGB2HexCode, aQ as floatToHex2, J as floor, a4 as gaussian, ab as gaussianAmplitude, ac as gaussianWeight, aH as getAdjustedScalarRange, E as getMajorAxisIndex, aG as getScalarTypeFittingRange, a3 as getSeed, aA as hex2float, h as hsv2rgb, am as identity3x3, aM as inf, al as invert3x3, aw as invertMatrix, aO as isFinite, F as isInf, aP as isNaN, i as isNan, Q as isPowerOfTwo, w as jacobi, p as jacobiN, I as lab2rgb, aB as lab2xyz, ah as linearSolve3x3, au as luFactorLinearSystem, av as luSolveLinearSystem, ap as matrix3x3ToQuaternion, W as max, V as min, ai as multiply3x3_mat3, O as multiply3x3_vect3, m as multiplyAccumulate, a6 as multiplyAccumulate2D, aj as multiplyMatrix, aq as multiplyQuaternion, x as multiplyScalar, a5 as multiplyScalar2D, M as nearestPowerOfTwo, aN as negInf, a1 as nextCombination, n as norm, ae as norm2D, l as normalize, L as normalize2D, ar as orthogonalize3x3, a7 as outer, ad as outer2D, q as perpendiculars, aK as pointIsWithinBounds, a8 as projectVector, aa as projectVector2D, an as quaternionToMatrix3x3, r as radiansFromDegrees, y as random, a2 as randomSeed, G as rgb2hsv, H as rgb2lab, aE as rgb2xyz, K as round, ao as roundNumber, b as roundVector, S as signedAngleBetweenVectors, at as singularValueDecomposition3x3, aL as solve3PointCircle, ay as solveHomogeneousLeastSquares, az as solveLeastSquares, s as solveLinearSystem, g as subtract, ak as transpose3x3, u as uninitializeBounds, aC as xyz2lab, aD as xyz2rgb } from './Math/index.js';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import vtkCell from './Cell.js';
4
- import { d as dot, j as cross, l as normalize, P as multiplyAccumulate, f as distance2BetweenPoints, S as determinant2x2 } from '../Core/Math/index.js';
4
+ import { d as dot, j as cross, l as normalize, m as multiplyAccumulate, f as distance2BetweenPoints, o as determinant2x2 } from '../Core/Math/index.js';
5
5
  import vtkLine from './Line.js';
6
6
  import vtkPlane from './Plane.js';
7
7
 
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { mat4, mat3 } from 'gl-matrix';
3
3
  import Constants from './LandmarkTransform/Constants.js';
4
4
  import macro from '../../macros.js';
5
- import { m as jacobiN, p as perpendiculars } from '../Core/Math/index.js';
5
+ import { p as jacobiN, q as perpendiculars } from '../Core/Math/index.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; }
8
8
 
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import vtkDataArray from '../../Common/Core/DataArray.js';
4
- import { o as vtkMath } from '../../Common/Core/Math/index.js';
4
+ import { t as vtkMath } from '../../Common/Core/Math/index.js';
5
5
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
6
6
  import vtkTriangle from '../../Common/DataModel/Triangle.js';
7
7
 
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import macro from '../../macros.js';
3
3
  import vtkCellArray from '../../Common/Core/CellArray.js';
4
4
  import vtkLine from '../../Common/DataModel/Line.js';
5
- import { d as dot, j as cross, n as norm, q as jacobi, l as normalize, k as add } from '../../Common/Core/Math/index.js';
5
+ import { d as dot, j as cross, n as norm, w as jacobi, l as normalize, k as add } from '../../Common/Core/Math/index.js';
6
6
  import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
7
7
  import vtkOBBNode from './OBBTree/OBBNode.js';
8
8
  import vtkPoints from '../../Common/Core/Points.js';
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import macro from '../../macros.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
- import { o as vtkMath } from '../../Common/Core/Math/index.js';
5
+ import { t as vtkMath } from '../../Common/Core/Math/index.js';
6
6
  import { AttributeTypes } from '../../Common/DataModel/DataSetAttributes/Constants.js';
7
7
  import vtkPoints from '../../Common/Core/Points.js';
8
8
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
@@ -3,7 +3,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import macro from '../../macros.js';
4
4
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
5
5
  import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
6
- import { t as multiplyScalar } from '../../Common/Core/Math/index.js';
6
+ import { x as multiplyScalar } from '../../Common/Core/Math/index.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; }
9
9
 
@@ -1,5 +1,5 @@
1
1
  import macro from '../../macros.js';
2
- import { w as random } from '../../Common/Core/Math/index.js';
2
+ import { y as random } from '../../Common/Core/Math/index.js';
3
3
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
4
4
 
5
5
  // vtkPointSource methods
@@ -1,6 +1,6 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkDataArray from '../../Common/Core/DataArray.js';
3
- import { l as normalize, d as dot, j as cross, f as distance2BetweenPoints, x as determinant3x3 } from '../../Common/Core/Math/index.js';
3
+ import { l as normalize, d as dot, j as cross, f as distance2BetweenPoints, z as determinant3x3 } from '../../Common/Core/Math/index.js';
4
4
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
5
5
 
6
6
  var vtkErrorMacro = macro.vtkErrorMacro; // ----------------------------------------------------------------------------
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import macro from '../../macros.js';
3
3
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
4
4
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
- import { r as radiansFromDegrees, y as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
+ import { r as radiansFromDegrees, A as degreesFromRadians } from '../../Common/Core/Math/index.js';
6
6
 
7
7
  // vtkMouseCameraTrackballRollManipulator methods
8
8
  // ----------------------------------------------------------------------------
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import macro from '../../macros.js';
3
3
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
4
4
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
- import { t as multiplyScalar, d as dot, k as add, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
5
+ import { x as multiplyScalar, d as dot, k as add, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
6
6
 
7
7
  // vtkMouseCameraTrackballRotateManipulator methods
8
8
  // ----------------------------------------------------------------------------
@@ -5,7 +5,7 @@ import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
5
  import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
6
6
  import vtkMouseCameraUnicamRotateManipulator from './MouseCameraUnicamRotateManipulator.js';
7
7
  import macro from '../../macros.js';
8
- import { g as subtract, t as multiplyScalar, l as normalize, d as dot, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
8
+ import { g as subtract, x as multiplyScalar, l as normalize, d as dot, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
9
9
 
10
10
  var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
11
11
  // vtkMouseCameraUnicamManipulator methods
@@ -10,7 +10,7 @@ import vtkSphereSource from '../../Filters/Sources/SphereSource.js';
10
10
  import { FieldAssociations } from '../../Common/DataModel/DataSet/Constants.js';
11
11
  import { mat4, vec3 } from 'gl-matrix';
12
12
  import macro from '../../macros.js';
13
- import { z as areEquals, l as normalize, d as dot, A as clampValue, g as subtract, j as cross, t as multiplyScalar, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
13
+ import { B as areEquals, l as normalize, d as dot, C as clampValue, g as subtract, j as cross, x as multiplyScalar, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
14
14
 
15
15
  var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
16
16
  // vtkMouseCameraUnicamRotateManipulator methods
@@ -1,7 +1,7 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkInteractorStyle from '../../Rendering/Core/InteractorStyle.js';
3
3
  import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
4
- import { y as degreesFromRadians } from '../../Common/Core/Math/index.js';
4
+ import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
5
  import { Device, Input } from '../../Rendering/Core/RenderWindowInteractor/Constants.js';
6
6
 
7
7
  var States = vtkInteractorStyleConstants.States;
@@ -2,7 +2,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
4
  import macro from '../../macros.js';
5
- import { B as arrayRange } from '../../Common/Core/Math/index.js';
5
+ import { D as arrayRange } from '../../Common/Core/Math/index.js';
6
6
  import WebworkerPromise from 'webworker-promise';
7
7
  import { W as WorkerFactory } from '../../_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js';
8
8
 
@@ -1,7 +1,7 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkMouseRangeManipulator from '../../Interaction/Manipulators/MouseRangeManipulator.js';
3
3
  import vtkViewProxy from './ViewProxy.js';
4
- import { j as cross, C as getMajorAxisIndex } from '../../Common/Core/Math/index.js';
4
+ import { j as cross, E as getMajorAxisIndex } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  var DEFAULT_STEP_WIDTH = 512;
7
7
 
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { h as hsv2rgb, i as isNan, D as isInf, E as rgb2hsv, F as rgb2lab, G as lab2rgb, H as floor } from '../../Common/Core/Math/index.js';
3
+ import { h as hsv2rgb, i as isNan, F as isInf, G as rgb2hsv, H as rgb2lab, I as lab2rgb, J as floor } from '../../Common/Core/Math/index.js';
4
4
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
5
5
  import Constants from './ColorTransferFunction/Constants.js';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import Constants from './Coordinate/Constants.js';
4
- import { I as round, H as floor } from '../../Common/Core/Math/index.js';
4
+ import { K as round, J as floor } from '../../Common/Core/Math/index.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; }
7
7
 
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import { vec3, mat4 } from 'gl-matrix';
4
4
  import * as d3 from 'd3-scale';
5
- import { J as normalize2D, K as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
5
+ import { L as normalize2D, M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
6
  import macro from '../../macros.js';
7
7
  import vtkActor from './Actor.js';
8
8
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
@@ -4,7 +4,7 @@ import { mat4, vec3, mat3 } from 'gl-matrix';
4
4
  import Constants from './Glyph3DMapper/Constants.js';
5
5
  import macro from '../../macros.js';
6
6
  import vtkMapper from './Mapper.js';
7
- import { L as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
7
+ import { N as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
8
8
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
9
9
 
10
10
  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; }
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import Constants from './ImageMapper/Constants.js';
3
3
  import macro from '../../macros.js';
4
4
  import vtkAbstractMapper from './AbstractMapper.js';
5
- import { A as clampValue, M as multiply3x3_vect3, L as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { C as clampValue, O as multiply3x3_vect3, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
6
6
  import vtkPlane from '../../Common/DataModel/Plane.js';
7
7
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
8
8
  import { vec3 } from 'gl-matrix';
@@ -4,7 +4,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
5
  import vtkImageData from '../../Common/DataModel/ImageData.js';
6
6
  import vtkLookupTable from '../../Common/Core/LookupTable.js';
7
- import { L as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
7
+ import { N as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
8
8
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
9
9
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
10
10
  import Constants from './Mapper/Constants.js';
@@ -1,7 +1,7 @@
1
1
  import { mat4, quat } from 'gl-matrix';
2
2
  import macro from '../../macros.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { y as degreesFromRadians, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
4
+ import { A as degreesFromRadians, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import vtkProp from './Prop.js';
6
6
 
7
7
  // vtkProp3D methods
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { y as degreesFromRadians } from '../../Common/Core/Math/index.js';
3
+ import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
4
4
  import Constants from './RenderWindowInteractor/Constants.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; }
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, moveToProtected, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
3
3
  import vtkCamera from './Camera.js';
4
4
  import vtkLight from './Light.js';
5
- import { N as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, L as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { P as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
6
6
  import vtkViewport from './Viewport.js';
7
7
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
8
8
 
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import { vec3, mat4 } from 'gl-matrix';
4
4
  import * as d3 from 'd3-scale';
5
- import { K as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
5
+ import { M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
6
  import macro from '../../macros.js';
7
7
  import vtkActor from './Actor.js';
8
8
  import vtkDataArray from '../../Common/Core/DataArray.js';
@@ -1,5 +1,5 @@
1
1
  import macro from '../../macros.js';
2
- import { L as createUninitializedBounds } from '../../Common/Core/Math/index.js';
2
+ import { N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
3
3
  import Constants from './VolumeMapper/Constants.js';
4
4
  import vtkAbstractMapper from './AbstractMapper.js';
5
5
 
@@ -8,7 +8,7 @@ import { v as vtkPolyData2DVS } from './glsl/vtkPolyData2DVS.glsl.js';
8
8
  import vtkReplacementShaderMapper from './ReplacementShaderMapper.js';
9
9
  import vtkShaderProgram from './ShaderProgram.js';
10
10
  import vtkViewNode from '../SceneGraph/ViewNode.js';
11
- import { I as round } from '../../Common/Core/Math/index.js';
11
+ import { K as round } from '../../Common/Core/Math/index.js';
12
12
  import { DisplayLocation } from '../Core/Property2D/Constants.js';
13
13
  import { registerOverride } from './ViewNodeFactory.js';
14
14
 
@@ -3,7 +3,7 @@ import Constants from './Texture/Constants.js';
3
3
  import HalfFloat from '../../Common/Core/HalfFloat.js';
4
4
  import { newInstance as newInstance$1, obj, set, setGet, get, newTypedArray, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
5
5
  import vtkDataArray from '../../Common/Core/DataArray.js';
6
- import { O as isPowerOfTwo, K as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
+ import { Q as isPowerOfTwo, M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
7
7
  import vtkViewNode from '../SceneGraph/ViewNode.js';
8
8
  import { registerOverride } from './ViewNodeFactory.js';
9
9
 
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import { newInstance as newInstance$1, obj, setGet, newTypedArray, vtkDebugMacro as vtkDebugMacro$1 } from '../../macros.js';
2
+ import { newInstance as newInstance$1, obj, setGet, vtkErrorMacro as vtkErrorMacro$1, newTypedArray, vtkDebugMacro as vtkDebugMacro$1 } from '../../macros.js';
3
3
  import { j as cross, l as normalize } from '../../Common/Core/Math/index.js';
4
+ import vtkDataArray from '../../Common/Core/DataArray.js';
4
5
  import vtkWebGPUBuffer from './Buffer.js';
5
6
  import vtkWebGPUTypes from './Types.js';
6
7
  import vtkProperty from '../Core/Property.js';
@@ -12,7 +13,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
12
13
  var BufferUsage = Constants.BufferUsage,
13
14
  PrimitiveTypes = Constants.PrimitiveTypes;
14
15
  var Representation = vtkProperty.Representation;
15
- var vtkDebugMacro = vtkDebugMacro$1; // the webgpu constants all show up as undefined
16
+ var vtkDebugMacro = vtkDebugMacro$1,
17
+ vtkErrorMacro = vtkErrorMacro$1;
18
+ var VtkDataTypes = vtkDataArray.VtkDataTypes; // the webgpu constants all show up as undefined
16
19
 
17
20
  /* eslint-disable no-undef */
18
21
  // ----------------------------------------------------------------------------
@@ -62,6 +65,65 @@ var cellCounters = {
62
65
  }
63
66
  };
64
67
 
68
+ function _getFormatForDataArray(dataArray) {
69
+ var format;
70
+
71
+ switch (dataArray.getDataType()) {
72
+ case VtkDataTypes.UNSIGNED_CHAR:
73
+ format = 'uint8';
74
+ break;
75
+
76
+ case VtkDataTypes.FLOAT:
77
+ format = 'float32';
78
+ break;
79
+
80
+ case VtkDataTypes.UNSIGNED_INT:
81
+ format = 'uint32';
82
+ break;
83
+
84
+ case VtkDataTypes.INT:
85
+ format = 'sint32';
86
+ break;
87
+
88
+ case VtkDataTypes.DOUBLE:
89
+ format = 'float32';
90
+ break;
91
+
92
+ case VtkDataTypes.UNSIGNED_SHORT:
93
+ format = 'uint16';
94
+ break;
95
+
96
+ case VtkDataTypes.SHORT:
97
+ format = 'sin16';
98
+ break;
99
+
100
+ default:
101
+ format = 'float32';
102
+ break;
103
+ }
104
+
105
+ switch (dataArray.getNumberOfComponents()) {
106
+ case 2:
107
+ format += 'x2';
108
+ break;
109
+
110
+ case 3:
111
+ // only 32bit types support x3
112
+ if (!format.contains('32')) {
113
+ vtkErrorMacro("unsupported x3 type for ".concat(format));
114
+ }
115
+
116
+ format += 'x3';
117
+ break;
118
+
119
+ case 4:
120
+ format += 'x4';
121
+ break;
122
+ }
123
+
124
+ return format;
125
+ }
126
+
65
127
  function getPrimitiveName(primType) {
66
128
  switch (primType) {
67
129
  case PrimitiveTypes.Points:
@@ -443,27 +505,34 @@ function vtkWebGPUBufferManager(publicAPI, model) {
443
505
  } // is the buffer already present?
444
506
 
445
507
 
446
- publicAPI.hasBuffer = function (req) {
447
- if (req.owner) {
448
- // if a matching buffer already exists then return true
449
- var hash = req.time + req.format + req.usage + req.hash;
450
- return model.device.hasCachedObject(req.owner, hash);
451
- }
452
-
453
- return false;
508
+ publicAPI.hasBuffer = function (hash) {
509
+ return model.device.hasCachedObject(hash);
454
510
  };
455
511
 
456
512
  publicAPI.getBuffer = function (req) {
457
513
  // if we have a source the get/create/cache the buffer
458
- if (req.owner) {
459
- // if a matching buffer already exists then return it
460
- var hash = req.time + req.format + req.usage + req.hash;
461
- return model.device.getCachedObject(req.owner, hash, _createBuffer, req);
514
+ if (req.hash) {
515
+ return model.device.getCachedObject(req.hash, _createBuffer, req);
462
516
  }
463
517
 
464
518
  return _createBuffer(req);
465
519
  };
466
520
 
521
+ publicAPI.getBufferForPointArray = function (dataArray, cells, primitiveType, representation) {
522
+ var format = _getFormatForDataArray(dataArray);
523
+
524
+ var buffRequest = {
525
+ hash: "PA".concat(representation, "P").concat(primitiveType, "D").concat(dataArray.getMTime(), "C").concat(cells.getMTime()).concat(format),
526
+ usage: BufferUsage.PointArray,
527
+ format: format,
528
+ dataArray: dataArray,
529
+ cells: cells,
530
+ primitiveType: primitiveType,
531
+ representation: representation
532
+ };
533
+ return publicAPI.getBuffer(buffRequest);
534
+ };
535
+
467
536
  publicAPI.getFullScreenQuadBuffer = function () {
468
537
  if (model.fullScreenQuadBuffer) {
469
538
  return model.fullScreenQuadBuffer;
@@ -294,11 +294,9 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
294
294
  if (points) {
295
295
  var shift = model.WebGPUActor.getBufferShift(model.WebGPURenderer);
296
296
  var buffRequest = {
297
- owner: points,
297
+ hash: "".concat(hash).concat(points.getMTime()).concat(cells.getMTime()).concat(shift.join(), "float32x4"),
298
298
  usage: BufferUsage.PointArray,
299
299
  format: 'float32x4',
300
- time: Math.max(points.getMTime(), cells.getMTime(), model.WebGPUActor.getKeyMatricesTime().getMTime()),
301
- hash: hash,
302
300
  dataArray: points,
303
301
  cells: cells,
304
302
  primitiveType: primType,
@@ -319,7 +317,6 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
319
317
  var normals = pd.getPointData().getNormals();
320
318
  var _buffRequest = {
321
319
  format: 'snorm8x4',
322
- hash: hash,
323
320
  cells: cells,
324
321
  representation: representation,
325
322
  primitiveType: primType,
@@ -329,18 +326,16 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
329
326
  };
330
327
 
331
328
  if (normals) {
332
- _buffRequest.owner = normals;
329
+ _buffRequest.hash = "".concat(hash).concat(normals.getMTime()).concat(cells.getMTime(), "snorm8x4");
333
330
  _buffRequest.dataArray = normals;
334
- _buffRequest.time = Math.max(normals.getMTime(), cells.getMTime());
335
331
  _buffRequest.usage = BufferUsage.PointArray;
336
332
 
337
333
  var _buff = device.getBufferManager().getBuffer(_buffRequest);
338
334
 
339
335
  vertexInput.addBuffer(_buff, ['normalMC']);
340
336
  } else if (primType === PrimitiveTypes.Triangles) {
341
- _buffRequest.owner = points;
337
+ _buffRequest.hash = "".concat(hash).concat(points.getMTime()).concat(cells.getMTime(), "snorm8x4");
342
338
  _buffRequest.dataArray = points;
343
- _buffRequest.time = Math.max(points.getMTime(), cells.getMTime());
344
339
  _buffRequest.usage = BufferUsage.NormalsFromPoints;
345
340
 
346
341
  var _buff2 = device.getBufferManager().getBuffer(_buffRequest);
@@ -368,11 +363,9 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
368
363
  }
369
364
 
370
365
  var _buffRequest2 = {
371
- owner: c,
372
366
  usage: BufferUsage.PointArray,
373
367
  format: 'unorm8x4',
374
- time: Math.max(c.getMTime(), cells.getMTime(), points.getMTime()),
375
- hash: hash + haveCellScalars,
368
+ hash: "".concat(hash).concat(haveCellScalars).concat(c.getMTime()).concat(cells.getMTime(), "unorm8x4"),
376
369
  dataArray: c,
377
370
  cells: cells,
378
371
  primitiveType: primType,
@@ -401,20 +394,7 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
401
394
  }
402
395
 
403
396
  if (tcoords && !edges) {
404
- // console.log(`tcoords ${tcoords.getMTime()}`);
405
- var _buffRequest3 = {
406
- owner: tcoords,
407
- usage: BufferUsage.PointArray,
408
- format: 'float32x2',
409
- time: Math.max(tcoords.getMTime(), cells.getMTime()),
410
- hash: hash,
411
- dataArray: tcoords,
412
- cells: cells,
413
- primitiveType: primType,
414
- representation: representation
415
- };
416
-
417
- var _buff4 = device.getBufferManager().getBuffer(_buffRequest3);
397
+ var _buff4 = device.getBufferManager().getBufferForPointArray(tcoords, cells, primType, representation);
418
398
 
419
399
  vertexInput.addBuffer(_buff4, ['tcoord']);
420
400
  } else {
@@ -459,25 +439,7 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
459
439
 
460
440
  for (var _i = 0; _i < newTextures.length; _i++) {
461
441
  var srcTexture = newTextures[_i];
462
- var treq = {
463
- time: srcTexture.getMTime()
464
- };
465
-
466
- if (srcTexture.getInputData()) {
467
- treq.imageData = srcTexture.getInputData();
468
- treq.owner = treq.imageData.getPointData().getScalars();
469
- } else if (srcTexture.getImage()) {
470
- treq.image = srcTexture.getImage();
471
- treq.owner = treq.image;
472
- } else if (srcTexture.getJsImageData()) {
473
- treq.jsImageData = srcTexture.getJsImageData();
474
- treq.owner = treq.jsImageData;
475
- } else if (srcTexture.getCanvas()) {
476
- treq.canvas = srcTexture.getCanvas();
477
- treq.owner = treq.canvas;
478
- }
479
-
480
- var newTex = model.device.getTextureManager().getTexture(treq);
442
+ var newTex = model.device.getTextureManager().getTextureForVTKTexture(srcTexture);
481
443
 
482
444
  if (newTex.getReady()) {
483
445
  // is this a new texture