@kitware/vtk.js 32.1.1 → 32.2.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.
@@ -43,7 +43,7 @@ function vtkCalculator(publicAPI, model) {
43
43
  return {
44
44
  getArrays: inData => ({
45
45
  // don't augment input data array in case of structured input dataset
46
- input: inData[0].isA('vtkImageData') ? arrNames.map(x => ({
46
+ input: inData[0]?.isA('vtkImageData') ? arrNames.map(x => ({
47
47
  location: locn,
48
48
  name: x
49
49
  })) : publicAPI.augmentInputArrays(locn, arrNames.map(x => ({
@@ -133,7 +133,7 @@ function vtkLineIntegralConvolution2D(publicAPI, model) {
133
133
  }
134
134
  const gl = model.context;
135
135
  let fb = model.framebuffer;
136
- const fbSize = fb.getSize();
136
+ const fbSize = fb?.getSize();
137
137
  if (!fb || !fbSize || size[0] !== fbSize || size[1] !== fbSize) {
138
138
  fb = vtkOpenGLFramebuffer.newInstance();
139
139
  fb.setOpenGLRenderWindow(model._openGLRenderWindow);
@@ -1,8 +1,8 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import Constants from './RenderWindowHelper/Constants.js';
3
- import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
4
- import vtkLineSource from '@kitware/vtk.js/Filters/Sources/LineSource';
5
- import vtkMapper from '@kitware/vtk.js/Rendering/Core/Mapper';
3
+ import vtkActor from '../Core/Actor.js';
4
+ import vtkLineSource from '../../Filters/Sources/LineSource.js';
5
+ import vtkMapper from '../Core/Mapper.js';
6
6
  import { GET_UNDERLYING_CONTEXT } from '../OpenGL/RenderWindow/ContextProxy.js';
7
7
  import { vec3 } from 'gl-matrix';
8
8
 
@@ -289,9 +289,10 @@ const newInstance = macro.newInstance(extend, 'vtkWebXRRenderWindowHelper');
289
289
 
290
290
  // ----------------------------------------------------------------------------
291
291
 
292
- var index = {
292
+ var vtkRenderWindowHelper = {
293
293
  newInstance,
294
- extend
294
+ extend,
295
+ ...Constants
295
296
  };
296
297
 
297
- export { index as default, extend, newInstance };
298
+ export { vtkRenderWindowHelper as default, extend, newInstance };
@@ -0,0 +1,7 @@
1
+ import vtkRenderWindowHelper from './WebXR/RenderWindowHelper.js';
2
+
3
+ var WebXR = {
4
+ vtkRenderWindowHelper
5
+ };
6
+
7
+ export { WebXR as default };
@@ -3,13 +3,15 @@ import Misc from './Misc.js';
3
3
  import OpenGL from './OpenGL.js';
4
4
  import SceneGraph from './SceneGraph.js';
5
5
  import WebGPU from './WebGPU.js';
6
+ import WebXR from './WebXR.js';
6
7
 
7
8
  var Rendering = {
8
9
  Core,
9
10
  Misc,
10
11
  OpenGL,
11
12
  SceneGraph,
12
- WebGPU
13
+ WebGPU,
14
+ WebXR
13
15
  };
14
16
 
15
17
  export { Rendering as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "32.1.1",
3
+ "version": "32.2.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",