@kitware/vtk.js 32.2.0 → 32.3.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.
@@ -135,6 +135,18 @@ export interface vtkImageSlice extends vtkProp3D {
135
135
  * @param {vtkImageProperty} property The vtkImageProperty instance.
136
136
  */
137
137
  setProperty(property: vtkImageProperty): boolean;
138
+
139
+ /**
140
+ *
141
+ * @param {boolean} forceOpaque If true, render during opaque pass even if opacity value is below 1.0.
142
+ */
143
+ setForceOpaque(forceOpaque: boolean): boolean;
144
+
145
+ /**
146
+ *
147
+ * @param {boolean} forceTranslucent If true, render during translucent pass even if opacity value is 1.0.
148
+ */
149
+ setForceTranslucent(forceTranslucent: boolean): boolean;
138
150
  }
139
151
 
140
152
  /**
@@ -157,6 +157,8 @@ function vtkImageSlice(publicAPI, model) {
157
157
  const DEFAULT_VALUES = {
158
158
  mapper: null,
159
159
  property: null,
160
+ forceOpaque: false,
161
+ forceTranslucent: false,
160
162
  bounds: [...vtkBoundingBox.INIT_BOUNDS]
161
163
  };
162
164
 
@@ -175,7 +177,7 @@ function extend(publicAPI, model) {
175
177
 
176
178
  // Build VTK API
177
179
  macro.set(publicAPI, model, ['property']);
178
- macro.setGet(publicAPI, model, ['mapper']);
180
+ macro.setGet(publicAPI, model, ['mapper', 'forceOpaque', 'forceTranslucent']);
179
181
  macro.getArray(publicAPI, model, ['bounds'], 6);
180
182
 
181
183
  // Object methods
@@ -489,6 +489,7 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
489
489
  // remember the main canvas original size, then resize it
490
490
  model._screenshot.originalSize = model.size;
491
491
  model.size = model._screenshot.size;
492
+ model.rootOpenGLRenderWindow?.resizeFromChildRenderWindows();
492
493
  model._screenshot.size = null;
493
494
 
494
495
  // process the resize
@@ -571,10 +572,10 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
571
572
  model.renderPasses[index].traverse(publicAPI, null);
572
573
  }
573
574
  }
575
+ publicAPI.copyParentContent();
574
576
  if (model.notifyStartCaptureImage) {
575
577
  getCanvasDataURL();
576
578
  }
577
- publicAPI.copyParentContent();
578
579
  const childrenRW = model.renderable.getChildRenderWindowsByReference();
579
580
  for (let i = 0; i < childrenRW.length; ++i) {
580
581
  publicAPI.getViewNodeFor(childrenRW[i])?.traverseAllPasses();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "32.2.0",
3
+ "version": "32.3.1",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",