bg2e-js 2.2.0 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bg2e-js",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "a graphics engine for productivity applications",
5
5
  "main": "./dist/bg2e-js.js",
6
6
  "types": "./src/index.ts",
@@ -117,6 +117,10 @@ export const vectorTypeLoader: TypeLoader = {
117
117
  else if (obj.length >= 2 && obj.length <= 4) {
118
118
  return new Vec(obj);
119
119
  }
120
+ // Retrocompatibility with v1.4
121
+ else if (obj._v && obj._v.length >= 2 && obj._v.length <= 4) {
122
+ return new Vec(obj._v);
123
+ }
120
124
  else {
121
125
  throw new Error(`Invalid parameter found in material deserialization. The required parameter type is array with 2, 3 or 4 elements`);
122
126
  }