@kitware/vtk.js 20.0.2 → 20.0.3

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.
@@ -12,7 +12,7 @@ import { i as identity, t as translate, j as transpose, g as invert, m as multip
12
12
  import { t as transformMat4, s as subtract } from '../../vendor/gl-matrix/esm/vec4.js';
13
13
 
14
14
  var SlicingMode = Constants.SlicingMode;
15
- var imgFragTemplate = "\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Image::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n //VTK::Image::Sample\n computedColor.g = computedColor.r;\n computedColor.b = computedColor.r;\n computedColor.a = 1.0;\n\n // var computedColor: vec4<f32> = vec4<f32>(1.0,0.7, 0.5, 1.0);\n\n//VTK::RenderEncoder::Impl\n\n return output;\n}\n"; // ----------------------------------------------------------------------------
15
+ var imgFragTemplate = "\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Image::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n //VTK::Image::Sample\n\n // var computedColor: vec4<f32> = vec4<f32>(1.0,0.7, 0.5, 1.0);\n\n//VTK::RenderEncoder::Impl\n\n return output;\n}\n"; // ----------------------------------------------------------------------------
16
16
  // helper methods
17
17
  // ----------------------------------------------------------------------------
18
18
 
@@ -223,10 +223,16 @@ function vtkWebGPUImageMapper(publicAPI, model) {
223
223
 
224
224
  {
225
225
  for (var _i = 0; _i < model.rowLength; _i++) {
226
- colorArray[c * model.rowLength * 8 + _i * 4] = 255.0 * tmpTable[_i * 3];
227
- colorArray[c * model.rowLength * 8 + _i * 4 + 1] = 255.0 * tmpTable[_i * 3 + 1];
228
- colorArray[c * model.rowLength * 8 + _i * 4 + 2] = 255.0 * tmpTable[_i * 3 + 2];
229
- colorArray[c * model.rowLength * 8 + _i * 4 + 3] = 255.0;
226
+ var _idx = c * model.rowLength * 8 + _i * 4;
227
+
228
+ colorArray[_idx] = 255.0 * tmpTable[_i * 3];
229
+ colorArray[_idx + 1] = 255.0 * tmpTable[_i * 3 + 1];
230
+ colorArray[_idx + 2] = 255.0 * tmpTable[_i * 3 + 2];
231
+ colorArray[_idx + 3] = 255.0;
232
+
233
+ for (var _j = 0; _j < 4; _j++) {
234
+ colorArray[_idx + model.rowLength * 4 + _j] = colorArray[_idx + _j];
235
+ }
230
236
  }
231
237
  }
232
238
  }
@@ -238,8 +244,8 @@ function vtkWebGPUImageMapper(publicAPI, model) {
238
244
  colorArray[_i2 * 4 + 2] = grey;
239
245
  colorArray[_i2 * 4 + 3] = 255.0;
240
246
 
241
- for (var _j = 0; _j < 4; _j++) {
242
- colorArray[_i2 * 4 + model.rowLength * 4 + _j] = colorArray[_i2 * 4 + _j];
247
+ for (var _j2 = 0; _j2 < 4; _j2++) {
248
+ colorArray[_i2 * 4 + model.rowLength * 4 + _j2] = colorArray[_i2 * 4 + _j2];
243
249
  }
244
250
  }
245
251
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "20.0.2",
3
+ "version": "20.0.3",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",