@kitware/vtk.js 26.5.6 → 26.6.1

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.
@@ -60,6 +60,7 @@ export interface IRenderWindowInteractorInitialValues {
60
60
  moveTimeoutID?: number;
61
61
  preventDefaultOnPointerDown?: boolean;
62
62
  preventDefaultOnPointerUp?: boolean;
63
+ mouseScrollDebounceByPass?: boolean;
63
64
  }
64
65
 
65
66
  interface IPosition {
@@ -164,6 +165,11 @@ export interface vtkRenderWindowInteractor extends vtkObject {
164
165
  */
165
166
  getPreventDefaultOnPointerUp(): boolean;
166
167
 
168
+ /**
169
+ * @default false
170
+ */
171
+ getMouseScrollDebounceByPass(): boolean;
172
+
167
173
  /**
168
174
  *
169
175
  * @param {IRenderWindowInteractorEvent} callData
@@ -849,6 +855,13 @@ export interface vtkRenderWindowInteractor extends vtkObject {
849
855
  */
850
856
  setPreventDefaultOnPointerUp(preventDefault: boolean): boolean;
851
857
 
858
+ /**
859
+ * Allow system to bypass scrolling debounce. This function must be called to allow the debounce to be bypassed
860
+ * @param mouseScrollDebounceByPass
861
+ */
862
+
863
+ setMouseScrollDebounceByPass(mouseScrollDebounceByPass:boolean): boolean;
864
+
852
865
  /**
853
866
  *
854
867
  * @param recognizeGestures
@@ -630,14 +630,20 @@ function vtkRenderWindowInteractor(publicAPI, model) {
630
630
  } else {
631
631
  publicAPI.mouseWheelEvent(callData);
632
632
  clearTimeout(model.wheelTimeoutID);
633
- } // start a timer to keep us animating while we get wheel events
634
-
633
+ }
635
634
 
636
- model.wheelTimeoutID = setTimeout(function () {
635
+ if (model.mouseScrollDebounceByPass) {
637
636
  publicAPI.extendAnimation(600);
638
637
  publicAPI.endMouseWheelEvent();
639
638
  model.wheelTimeoutID = 0;
640
- }, 200);
639
+ } else {
640
+ // start a timer to keep us animating while we get wheel events
641
+ model.wheelTimeoutID = setTimeout(function () {
642
+ publicAPI.extendAnimation(600);
643
+ publicAPI.endMouseWheelEvent();
644
+ model.wheelTimeoutID = 0;
645
+ }, 200);
646
+ }
641
647
  };
642
648
 
643
649
  publicAPI.handleMouseUp = function (event) {
@@ -1086,7 +1092,8 @@ var DEFAULT_VALUES = {
1086
1092
  moveTimeoutID: 0,
1087
1093
  lastGamepadValues: {},
1088
1094
  preventDefaultOnPointerDown: false,
1089
- preventDefaultOnPointerUp: false
1095
+ preventDefaultOnPointerUp: false,
1096
+ mouseScrollDebounceByPass: false
1090
1097
  }; // ----------------------------------------------------------------------------
1091
1098
 
1092
1099
  function extend(publicAPI, model) {
@@ -1103,7 +1110,7 @@ function extend(publicAPI, model) {
1103
1110
 
1104
1111
  macro.get(publicAPI, model, ['initialized', 'container', 'interactorStyle', 'lastFrameTime', 'recentAnimationFrameRate', '_view']); // Create get-set macros
1105
1112
 
1106
- macro.setGet(publicAPI, model, ['lightFollowCamera', 'enabled', 'enableRender', 'recognizeGestures', 'desiredUpdateRate', 'stillUpdateRate', 'picker', 'preventDefaultOnPointerDown', 'preventDefaultOnPointerUp']);
1113
+ macro.setGet(publicAPI, model, ['lightFollowCamera', 'enabled', 'enableRender', 'recognizeGestures', 'desiredUpdateRate', 'stillUpdateRate', 'picker', 'preventDefaultOnPointerDown', 'preventDefaultOnPointerUp', 'mouseScrollDebounceByPass']);
1107
1114
  macro.moveToProtected(publicAPI, model, ['view']); // For more macro methods, see "Sources/macros.js"
1108
1115
  // Object specific methods
1109
1116
 
@@ -305,8 +305,6 @@ function vtkOpenGLHardwareSelector(publicAPI, model) {
305
305
 
306
306
  model._openGLRenderWindow.traverseAllPasses();
307
307
 
308
- model._renderer.setPreserveDepthBuffer(true);
309
-
310
308
  if (originalBlending) {
311
309
  gl.enable(gl.BLEND);
312
310
  }
@@ -320,8 +318,6 @@ function vtkOpenGLHardwareSelector(publicAPI, model) {
320
318
  model._openGLRenderer.setSelector(null);
321
319
 
322
320
  model.framebuffer.restorePreviousBindingsAndBuffers();
323
-
324
- model._renderer.setPreserveDepthBuffer(false);
325
321
  };
326
322
 
327
323
  publicAPI.preCapturePass = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "26.5.6",
3
+ "version": "26.6.1",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",