@kitware/vtk.js 28.12.3 → 28.12.4

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 (2) hide show
  1. package/macros2.js +5 -0
  2. package/package.json +1 -1
package/macros2.js CHANGED
@@ -154,6 +154,9 @@ function safeArrays(model) {
154
154
  }
155
155
  });
156
156
  }
157
+ function isTypedArray(value) {
158
+ return Object.values(TYPED_ARRAYS).some(ctor => value instanceof ctor);
159
+ }
157
160
 
158
161
  // ----------------------------------------------------------------------------
159
162
  // shallow equals
@@ -346,6 +349,8 @@ function obj() {
346
349
  jsonArchive[keyName] = jsonArchive[keyName].getState();
347
350
  } else if (Array.isArray(jsonArchive[keyName])) {
348
351
  jsonArchive[keyName] = jsonArchive[keyName].map(getStateArrayMapFunc);
352
+ } else if (isTypedArray(jsonArchive[keyName])) {
353
+ jsonArchive[keyName] = Array.from(jsonArchive[keyName]);
349
354
  }
350
355
  });
351
356
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "28.12.3",
3
+ "version": "28.12.4",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",