@pirireis/webglobeplugins 0.15.5-alpha → 0.15.6-alpha

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/Math/vec3.js +5 -1
  2. package/package.json +1 -1
package/Math/vec3.js CHANGED
@@ -60,7 +60,11 @@ function length(a) {
60
60
  function normalize(outVec, inVec) {
61
61
  const len = length(inVec);
62
62
  if (len === 0) {
63
- throw new Error('Cannot normalize a zero vector');
63
+ console.warn('Cannot normalize a zero vector');
64
+ outVec[0] = 0;
65
+ outVec[1] = 0;
66
+ outVec[2] = 0;
67
+ return;
64
68
  }
65
69
  outVec[0] = inVec[0] / len;
66
70
  outVec[1] = inVec[1] / len;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.15.5-alpha",
3
+ "version": "0.15.6-alpha",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",