@kitware/vtk.js 21.2.0 → 21.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.
Files changed (26) hide show
  1. package/Filters/General/ImageCropFilter.js +3 -4
  2. package/IO/Geometry/STLReader.js +2 -2
  3. package/Rendering/Core/Actor2D.js +1 -3
  4. package/Rendering/Core/Mapper2D.d.ts +402 -0
  5. package/Rendering/Core/Mapper2D.js +213 -0
  6. package/Rendering/Core/Property2D/Constants.js +9 -0
  7. package/Rendering/Core/Property2D.js +30 -2
  8. package/Rendering/Core.js +2 -0
  9. package/Rendering/OpenGL/Actor2D.js +74 -30
  10. package/Rendering/OpenGL/ForwardPass.js +11 -0
  11. package/Rendering/OpenGL/PolyDataMapper.js +3 -2
  12. package/Rendering/OpenGL/PolyDataMapper2D.js +667 -0
  13. package/Rendering/OpenGL/Profiles/All.js +1 -0
  14. package/Rendering/OpenGL/Profiles/Geometry.js +1 -0
  15. package/Rendering/OpenGL/glsl/vtkPolyData2DFS.glsl.js +3 -0
  16. package/Rendering/OpenGL/glsl/vtkPolyData2DVS.glsl.js +3 -0
  17. package/Rendering/OpenGL.js +2 -0
  18. package/Rendering/Profiles/All.js +1 -0
  19. package/Rendering/Profiles/Geometry.js +1 -0
  20. package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createInlineWorkerFactory.js +17 -0
  21. package/_virtual/rollup-plugin-web-worker-loader__helper__funcToSource.js +18 -0
  22. package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +698 -2
  23. package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +274 -2
  24. package/macros.js +6 -2
  25. package/package.json +1 -1
  26. package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -31
@@ -0,0 +1,3 @@
1
+ var vtkPolyData2DVS = "//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyData2DVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\n// all variables that represent positions or directions have a suffix\n// indicating the coordinate system they are in. The possible values are\n// MC - Model Coordinates\n// WC - WC world coordinates\n// VC - View Coordinates\n// DC - Display Coordinates\n\nin vec4 vertexWC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\nuniform mat4 WCVCMatrix; // World to view matrix\n\nvoid main()\n{\n // Apple Bug\n //VTK::PrimID::Impl\n\n gl_Position = WCVCMatrix*vertexWC;\n\n //VTK::TCoord::Impl\n\n //VTK::Color::Impl\n\n //VTK::PositionVC::Impl\n}\n";
2
+
3
+ export { vtkPolyData2DVS as v };
@@ -13,6 +13,7 @@ import vtkImageMapper from './OpenGL/ImageMapper.js';
13
13
  import vtkImageSlice from './OpenGL/ImageSlice.js';
14
14
  import vtkPixelSpaceCallbackMapper from './OpenGL/PixelSpaceCallbackMapper.js';
15
15
  import vtkOpenGLPolyDataMapper from './OpenGL/PolyDataMapper.js';
16
+ import vtkPolyDataMapper2D from './OpenGL/PolyDataMapper2D.js';
16
17
  import vtkRenderer from './OpenGL/Renderer.js';
17
18
  import vtkRenderWindow from './OpenGL/RenderWindow.js';
18
19
  import vtkShader from './OpenGL/Shader.js';
@@ -44,6 +45,7 @@ var OpenGL = {
44
45
  vtkImageSlice: vtkImageSlice,
45
46
  vtkPixelSpaceCallbackMapper: vtkPixelSpaceCallbackMapper,
46
47
  vtkPolyDataMapper: vtkOpenGLPolyDataMapper,
48
+ vtkPolyDataMapper2D: vtkPolyDataMapper2D,
47
49
  vtkRenderer: vtkRenderer,
48
50
  vtkRenderWindow: vtkRenderWindow,
49
51
  vtkShader: vtkShader,
@@ -3,6 +3,7 @@ import '../OpenGL/Renderer.js';
3
3
  import '../OpenGL/Actor.js';
4
4
  import '../OpenGL/Actor2D.js';
5
5
  import '../OpenGL/PolyDataMapper.js';
6
+ import '../OpenGL/PolyDataMapper2D.js';
6
7
  import '../OpenGL/Skybox.js';
7
8
  import '../OpenGL/Texture.js';
8
9
  import '../OpenGL/Glyph3DMapper.js';
@@ -3,6 +3,7 @@ import '../OpenGL/Renderer.js';
3
3
  import '../OpenGL/Actor.js';
4
4
  import '../OpenGL/Actor2D.js';
5
5
  import '../OpenGL/PolyDataMapper.js';
6
+ import '../OpenGL/PolyDataMapper2D.js';
6
7
  import '../OpenGL/Skybox.js';
7
8
  import '../OpenGL/Texture.js';
8
9
  import '../OpenGL/PixelSpaceCallbackMapper.js';
@@ -0,0 +1,17 @@
1
+ import { f as funcToSource } from './rollup-plugin-web-worker-loader__helper__funcToSource.js';
2
+
3
+ function createURL(fn, sourcemapArg) {
4
+ var lines = funcToSource(fn, sourcemapArg);
5
+ var blob = new Blob(lines, { type: 'application/javascript' });
6
+ return URL.createObjectURL(blob);
7
+ }
8
+
9
+ function createInlineWorkerFactory(fn, sourcemapArg) {
10
+ var url;
11
+ return function WorkerFactory(options) {
12
+ url = url || createURL(fn, sourcemapArg);
13
+ return new Worker(url, options);
14
+ };
15
+ }
16
+
17
+ export { createInlineWorkerFactory as c };
@@ -0,0 +1,18 @@
1
+ function funcToSource(fn, sourcemapArg) {
2
+ var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;
3
+ var source = fn.toString();
4
+ var lines = source.split('\n');
5
+ lines.pop();
6
+ lines.shift();
7
+ var blankPrefixLength = lines[0].search(/\S/);
8
+ var regex = /(['"])__worker_loader_strict__(['"])/g;
9
+ for (var i = 0, n = lines.length; i < n; ++i) {
10
+ lines[i] = lines[i].substring(blankPrefixLength).replace(regex, '$1use strict$2') + '\n';
11
+ }
12
+ if (sourcemap) {
13
+ lines.push('\/\/# sourceMappingURL=' + sourcemap + '\n');
14
+ }
15
+ return lines;
16
+ }
17
+
18
+ export { funcToSource as f };