@kitware/vtk.js 25.13.1 → 25.13.2

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.
@@ -594,8 +594,14 @@ function vtkOpenGLTexture(publicAPI, model) {
594
594
  // then the data array must be u16
595
595
 
596
596
 
597
- var halfFloatExt = model.context.getExtension('OES_texture_half_float');
598
- var halfFloat = model._openGLRenderWindow.getWebgl2() ? model.openGLDataType === model.context.HALF_FLOAT : halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
597
+ var halfFloat = false;
598
+
599
+ if (model._openGLRenderWindow.getWebgl2()) {
600
+ halfFloat = model.openGLDataType === model.context.HALF_FLOAT;
601
+ } else {
602
+ var halfFloatExt = model.context.getExtension('OES_texture_half_float');
603
+ halfFloat = halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
604
+ }
599
605
 
600
606
  if (halfFloat) {
601
607
  for (var _idx2 = 0; _idx2 < data.length; _idx2++) {
@@ -996,8 +1002,14 @@ function vtkOpenGLTexture(publicAPI, model) {
996
1002
  function checkUseHalfFloat(dataType, offset, scale, preferSizeOverAccuracy) {
997
1003
  var useHalfFloatType = true;
998
1004
  publicAPI.getOpenGLDataType(dataType, useHalfFloatType);
999
- var halfFloatExt = model.context.getExtension('OES_texture_half_float');
1000
- var useHalfFloat = model._openGLRenderWindow.getWebgl2() ? model.openGLDataType === model.context.HALF_FLOAT : halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
1005
+ var useHalfFloat = false;
1006
+
1007
+ if (model._openGLRenderWindow.getWebgl2()) {
1008
+ useHalfFloat = model.openGLDataType === model.context.HALF_FLOAT;
1009
+ } else {
1010
+ var halfFloatExt = model.context.getExtension('OES_texture_half_float');
1011
+ useHalfFloat = halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
1012
+ }
1001
1013
 
1002
1014
  if (!useHalfFloat) {
1003
1015
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "25.13.1",
3
+ "version": "25.13.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",