Comparing version 1.0.0-alpha.6 to 1.0.0-alpha.7
@@ -6,4 +6,7 @@ /* eslint-disable no-shadow */ | ||
config.debug = true; | ||
config.precision = 4; | ||
config.printTypes = false; | ||
config.printDegrees = false; | ||
config.printRowMajor = true; | ||
config.precision = 4; | ||
export { config }; | ||
@@ -28,8 +31,27 @@ | ||
function round(value) { | ||
return Math.round(value / config.EPSILON) * config.EPSILON; | ||
} | ||
export function formatValue(value) { | ||
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.precision || 4; | ||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref$precision = _ref.precision, | ||
precision = _ref$precision === undefined ? config.precision || 4 : _ref$precision; | ||
value = round(value); | ||
return parseFloat(value.toPrecision(precision)); | ||
} | ||
export function formatAngle(value) { | ||
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref2$precision = _ref2.precision, | ||
precision = _ref2$precision === undefined ? config.precision || 4 : _ref2$precision, | ||
_ref2$printDegrees = _ref2.printDegrees, | ||
printDegrees = _ref2$printDegrees === undefined ? config.printAngles : _ref2$printDegrees; | ||
value = printDegrees ? degrees(value) : value; | ||
value = round(value); | ||
return '' + parseFloat(value.toPrecision(precision)) + (printDegrees ? '°' : ''); | ||
} | ||
// Returns true if value is either an array or a typed array | ||
@@ -142,2 +164,2 @@ // Note: does not return true for ArrayBuffers and DataViews | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24uanMiXSwibmFtZXMiOlsiY29uZmlnIiwiRVBTSUxPTiIsImRlYnVnIiwicHJpbnRSb3dNYWpvciIsInByZWNpc2lvbiIsImNvbmZpZ3VyZSIsIm9wdGlvbnMiLCJlcHNpbG9uIiwiY2hlY2tOdW1iZXIiLCJ2YWx1ZSIsIk51bWJlciIsImlzRmluaXRlIiwiRXJyb3IiLCJmb3JtYXRWY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AgfVxuICAgIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhLmxlbmd0aDsgKytpKSB7XG4gICAgICBpZiAoIWVxdWFscyhhW2ldLCBiW2ldKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG4gIHJldHVybiBNYXRoLmFicyhhIC0gYikgPD0gY29uZmlnLkVQU0lMT04gKiBNYXRoLm1heCgxLjAsIE1hdGguYWJzKGEpLCBNYXRoLmFicyhiKSk7XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24uanMiXSwibmFtZXMiOlsiY29uZmlnIiwiRVBTSUxPTiIsImRlYnVnIiwicHJlY2lzaW9uIiwicHJpbnRUeXBlcyIsInByaW50RGVncmVlcyIsInByaW50Um93TWFqb3IiLCJjb25maWd1cmUiLCJvcHRpb25zIiwiZXBzaWxvbiIsImNoZWNrTnVtYmVyIiwidmFsdWUiLCJOdW1iZXIiLCJpc0Zpbml0ZSIsIkVycm9yIiwicm91bmQiLCJNYXRoIiwiZm9ybWF0VmFsdWUiLCJwYXJzZUZsb2F0IiwidG9QcmVjaXNpb24iLCJmb3JtYXRBbmdsZSIsInByaW50QW5nbGVzIiwiZGVncmVlcyIsImlzQXJyYXkiLCJBcnJheSIsIkFycmF5QnVmZmVyIiwiaXNWaWV3IiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiY2xvbmUiLCJhcnJheSIsIm1hcCIsImZ1bmMiLCJyZXN1bHQiLCJpIiwicmFkaWFucyIsIlBJIiwic2luIiwiYW5nbGUiLCJjb3MiLCJ0YW4iLCJhc2luIiwiYWNvcyIsImF0YW4iLCJjbGFtcCIsIm1pbiIsIm1heCIsImVx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iAgICBpZiAoYSA9PT0gYikge1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhLmxlbmd0aDsgKytpKSB7XG4gICAgICBpZiAoIWVxdWFscyhhW2ldLCBiW2ldKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG4gIHJldHVybiBNYXRoLmFicyhhIC0gYikgPD0gY29uZmlnLkVQU0lMT04gKiBNYXRoLm1heCgxLjAsIE1hdGguYWJzKGEpLCBNYXRoLmFicyhiKSk7XG59XG4iXX0= |
@@ -89,7 +89,12 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
value: function toString() { | ||
return this.formatString(config); | ||
} | ||
}, { | ||
key: 'formatString', | ||
value: function formatString(opts) { | ||
var string = ''; | ||
for (var i = 0; i < this.ELEMENTS; ++i) { | ||
string += (i > 0 ? ', ' : '') + formatValue(this[i]); | ||
string += (i > 0 ? ', ' : '') + formatValue(this[i], opts); | ||
} | ||
return this.constructor.name + '(' + string + ')'; | ||
return (opts.printTypes ? this.constructor.name : '') + '[' + string + ']'; | ||
} | ||
@@ -157,2 +162,3 @@ }, { | ||
} | ||
return this; | ||
} | ||
@@ -177,2 +183,2 @@ }, { | ||
export default MathArray; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3N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igpO1xuICAgIGlmIChsZW5ndGggIT09IDApIHtcbiAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5FTEVNRU5UUzsgKytpKSB7XG4gICAgICAgIHRoaXNbaV0gLz0gbGVuZ3RoO1xuICAgICAgfVxuICAgIH1cbiAgICB0aGlzLmNoZWNrKCk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cbn1cbiJdfQ== |
@@ -45,2 +45,4 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
var tempVector4 = [0, 0, 0, 0]; | ||
var Matrix4 = function (_MathArray) { | ||
@@ -419,2 +421,58 @@ _inherits(Matrix4, _MathArray); | ||
}, { | ||
key: 'transformDirection', | ||
value: function transformDirection(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
vec4_transformMat4(tempVector4, [vector[0], vector[1], 0, 0], this); | ||
out = out || new Vector2(); | ||
out[0] = tempVector4[0]; | ||
out[1] = tempVector4[1]; | ||
break; | ||
case 3: | ||
vec4_transformMat4(tempVector4, [vector[0], vector[1], vector[2], 0], this); | ||
out = out || new Vector3(); | ||
out[0] = tempVector4[0]; | ||
out[1] = tempVector4[1]; | ||
out[2] = tempVector4[2]; | ||
break; | ||
case 4: | ||
assert(vector[3] === 0); | ||
out = out || new Vector4(); | ||
vec4_transformMat4(out, vector, this); | ||
break; | ||
default: | ||
throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
}, { | ||
key: 'transformPoint', | ||
value: function transformPoint(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
out = out || new Vector2(); | ||
vec4_transformMat4(out, [vector[0], vector[1], 0, 1], this); | ||
out.length = 2; | ||
assert(validateVector2(out)); | ||
break; | ||
case 3: | ||
out = out || new Vector3(); | ||
vec4_transformMat4(out, [vector[0], vector[1], vector[2], 1], this); | ||
out.length = 3; | ||
assert(validateVector3(out)); | ||
break; | ||
case 4: | ||
assert(vector[3] !== 0); | ||
out = out || new Vector4(); | ||
vec4_transformMat4(out, vector, this); | ||
assert(validateVector4(out)); | ||
break; | ||
default: | ||
throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
}, { | ||
key: 'ELEMENTS', | ||
@@ -558,2 +616,2 @@ get: function get() { | ||
export default Matrix4; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYXRyaXg0LmpzIl0sIm5hbWVzIjpbIk1hdGhBcnJheSIsImNoZWNrTnVtYmVyIiwiVmVjdG9yMiIsInZhbGlkYXRlVmVjdG9yMiIsIlZlY3RvcjMiLCJ2YWxpZGF0ZVZlY3RvcjMiLCJWZWN0b3I0IiwidmFsaWRhdGVWZWN0b3I0IiwiYXNzZXJ0IiwibWF0NF9kZXRlcm1pbmFudCIsIm1hdDRfZnJvbVF1YXQiLCJtYXQ0X2ZydXN0dW0iLCJtYXQ0X2xvb2tBdCIsIm1hdDRfb3J0aG8iLCJtYXQ0X3BlcnNwZWN0aXZlIiwibWF0NF90cmFuc3Bvc2UiLCJtYXQ0X2ludmVydCIsIm1hdDRfbXVsdGlwbHkiLCJtYXQ0X3JvdGF0ZVgiLCJtYXQ0X3JvdGF0ZVkiLCJtYXQ0X3JvdGF0ZVoiLCJtYXQ0X3JvdGF0ZSIsIm1hdDRfc2NhbGUiLCJtYXQ0X3RyYW5zbGF0ZSIsInZlYzJfdHJhbnNmb3JtTWF0NCIsInZlYzNfdHJhbnNmb3JtTWF0NC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iBvdXQ7XG4gIH1cbn1cbiJdfQ== |
@@ -8,2 +8,3 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
// Adaptation of THREE.js Spherical class, under MIT license | ||
import { formatValue, equals as _equals, config } from './common'; | ||
import { degrees, radians, clamp } from './common'; | ||
@@ -68,5 +69,24 @@ import Vector3 from './vector3'; | ||
value: function toString() { | ||
return '[rho:' + this.radius + ',theta:' + this.theta + ',phi:' + this.phi + ']'; | ||
return this.formatString(config); | ||
} | ||
}, { | ||
key: 'formatString', | ||
value: function formatString(_ref2) { | ||
var printTypes = _ref2.printTypes, | ||
printDegrees = _ref2.printDegrees; | ||
var f = formatValue; | ||
return (printTypes ? 'Spherical' : '') + '[rho:' + f(this.radius) + ',theta:' + f(this.theta) + ',phi:' + f(this.phi) + ']'; | ||
} | ||
}, { | ||
key: 'equals', | ||
value: function equals(other) { | ||
return _equals(this.radius, other.radius) && _equals(this.theta, other.theta) && _equals(this.phi, other.phi); | ||
} | ||
}, { | ||
key: 'exactEquals', | ||
value: function exactEquals(other) { | ||
return this.radius === other.radius && this.theta === other.theta && this.phi === other.phi; | ||
} | ||
/* eslint-disable brace-style */ | ||
@@ -101,7 +121,7 @@ // Cartographic (bearing 0 north, pitch 0 look from above) | ||
key: 'fromLngLatZ', | ||
value: function fromLngLatZ(_ref2) { | ||
var _ref3 = _slicedToArray(_ref2, 3), | ||
lng = _ref3[0], | ||
lat = _ref3[1], | ||
z = _ref3[2]; | ||
value: function fromLngLatZ(_ref3) { | ||
var _ref4 = _slicedToArray(_ref3, 3), | ||
lng = _ref4[0], | ||
lat = _ref4[1], | ||
z = _ref4[2]; | ||
@@ -128,3 +148,3 @@ this.radius = 1 + z / this.radiusScale; | ||
value: function toVector3() { | ||
return new Vector3(0, 0, this.radius).rotateX({ radians: -this.theta }).rotateZ({ radians: -this.phi }); | ||
return new Vector3(0, 0, this.radius).rotateX({ radians: this.theta }).rotateZ({ radians: this.phi }); | ||
} | ||
@@ -199,2 +219,2 @@ | ||
export default SphericalCoordinates; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zcGhlcmljYWwtY29vcmRpbmF0ZXMuanMiXSwibmFtZXMiOlsiZGVncmVlcyIsInJhZGlhbnMiLCJjbGFtcCIsIlZlY3RvcjMiLCJ2ZWMzX2xlbmd0aCIsImFzc2VydCIsIkVQU0lMT04iLCJFQVJUSF9SQURJVVNfTUVURVJTIiwiU3BoZXJpY2FsQ29vcmRpbmF0ZXMiLCJwaGkiLCJ0aGV0YSIsInJhZGl1cyIsImJlYXJpbmciLCJwaXRjaCIsImFsdGl0dWRlIiwicmFkaXVzU2NhbGUiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJOdW1iZXIiLCJpc0Zpbml0ZSIsImNoZWNrIiwiY29uc3RydWN0b3IiLCJjb3B5Iiwib3RoZXIiLCJsbmciLCJsYXQiLCJ6IiwidiIsIk1hdGgiLCJhdGFuMiIsImFjb3MiLCJyb3RhdGVYIiwicm90YXRlWiIsIm1heCIsIm1pbiIsIlBJIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTtBQUNBLFNBQVFBLE9BQVIsRUFBaUJDLE9BQWpCLEVBQTBCQyxLQUExQixRQUFzQyxVQUF0QztBQUNBLE9BQU9DLE9BQVAsTUFBb0IsV0FBcEI7O0FBRUE7QUFDQSxPQUFPQyxXQUFQLE1BQXdCLGdCQUF4Qjt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C8vIHBvbGFyIGFuZ2xlXG4gICAgfVxuICAgIHJldHVybiB0aGlzLmNoZWNrKCk7XG4gIH1cblxuICB0b1ZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIG5ldyBWZWN0b3IzKDAsIDAsIHRoaXMucmFkaXVzKVxuICAgICAgLnJvdGF0ZVgoe3JhZGlhbnM6IHRoaXMudGhldGF9KVxuICAgICAgLnJvdGF0ZVooe3JhZGlhbnM6IHRoaXMucGhpfSk7XG4gIH1cblxuICAvLyByZXN0cmljdCBwaGkgdG8gYmUgYmV0d2VlIEVQUyBhbmQgUEktRVBTXG4gIG1ha2VTYWZlKCkge1xuICAgIHRoaXMucGhpID0gTWF0aC5tYXgoRVBTSUxPTiwgTWF0aC5taW4oTWF0aC5QSSAtIEVQU0lMT04sIHRoaXMucGhpKSk7XG4gIH1cblxuICBjaGVjaygpIHtcbiAgICAvLyB0aGlzLm1ha2VTYWZlKCk7XG4gICAgYXNzZXJ0KE51bWJlci5pc0Zpbml0ZSh0aGlzLnBoaSkgJiYgTnVtYmVyLmlzRmluaXRlKHRoaXMudGhldGEpICYmIHRoaXMucmFkaXVzID4gMCk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cbn1cbiJdfQ== |
@@ -72,4 +72,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
vec3_set(this, x, y, z); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -138,4 +137,3 @@ | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -174,4 +172,3 @@ }, { | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -210,41 +207,5 @@ }, { | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'divide', | ||
value: function divide() { | ||
for (var _len4 = arguments.length, vectors = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
vectors[_key4] = arguments[_key4]; | ||
} | ||
var _iteratorNormalCompletion4 = true; | ||
var _didIteratorError4 = false; | ||
var _iteratorError4 = undefined; | ||
try { | ||
for (var _iterator4 = vectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { | ||
var vector = _step4.value; | ||
vec3_divide(this, this, vector); | ||
} | ||
} catch (err) { | ||
_didIteratorError4 = true; | ||
_iteratorError4 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion4 && _iterator4.return) { | ||
_iterator4.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError4) { | ||
throw _iteratorError4; | ||
} | ||
} | ||
} | ||
this.check(); | ||
return this; | ||
} | ||
}, { | ||
key: 'scale', | ||
@@ -255,20 +216,11 @@ value: function scale(_scale) { | ||
} else { | ||
vec3_dot(this, this, _scale); | ||
vec3_multiply(this, this, _scale); | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'scaleAndAdd', | ||
value: function scaleAndAdd(vector, scale) { | ||
vec3_scaleAndAdd(this, this, vector, scale); | ||
this.check(); | ||
return this; | ||
} | ||
}, { | ||
key: 'negate', | ||
value: function negate() { | ||
vec3_negate(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -279,4 +231,3 @@ }, { | ||
vec3_inverse(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -287,4 +238,3 @@ }, { | ||
vec3_normalize(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -295,4 +245,3 @@ }, { | ||
vec3_cross(this, this, vector); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -303,4 +252,3 @@ }, { | ||
vec3_lerp(this, this, vector, coeff); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -315,4 +263,3 @@ }, { | ||
vec3_rotateX(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -327,4 +274,3 @@ }, { | ||
vec3_rotateY(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -339,4 +285,3 @@ }, { | ||
vec3_rotateZ(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -346,11 +291,53 @@ }, { | ||
value: function operation(_operation) { | ||
for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { | ||
args[_key5 - 1] = arguments[_key5]; | ||
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { | ||
args[_key4 - 1] = arguments[_key4]; | ||
} | ||
_operation.apply(undefined, [this, this].concat(args)); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
// TBD - do we really need these? | ||
}, { | ||
key: 'divide', | ||
value: function divide() { | ||
for (var _len5 = arguments.length, vectors = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
vectors[_key5] = arguments[_key5]; | ||
} | ||
var _iteratorNormalCompletion4 = true; | ||
var _didIteratorError4 = false; | ||
var _iteratorError4 = undefined; | ||
try { | ||
for (var _iterator4 = vectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { | ||
var vector = _step4.value; | ||
vec3_divide(this, this, vector); | ||
} | ||
} catch (err) { | ||
_didIteratorError4 = true; | ||
_iteratorError4 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion4 && _iterator4.return) { | ||
_iterator4.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError4) { | ||
throw _iteratorError4; | ||
} | ||
} | ||
} | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'scaleAndAdd', | ||
value: function scaleAndAdd(vector, scale) { | ||
vec3_scaleAndAdd(this, this, vector, scale); | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'ELEMENTS', | ||
@@ -390,2 +377,2 @@ get: function get() { | ||
export default Vector3; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92ZWN0b3IzLmpzIl0sIm5hbWVzIjpbIk1hdGhBcnJheSIsImNoZWNrTnVtYmVyIiwidmVjM19zZXQiLCJ2ZWMzX2xlbmd0aCIsInZlYzNfZGlzdGFuY2UiLCJ2ZWMzX2FuZ2xlIiwidmVjM19hZGQiLCJ2ZWMzX3N1YnRyYWN0IiwidmVjM19tdWx0aXBseSIsInZlYzNfZGl2aWRlIiwidmVjM19zY2FsZSIsInZlYzNfc2NhbGVBbmRBZGQiLCJ2ZWMzX25lZ2F0ZSIsInZlYzNfaW52ZXJzZSIsInZlYzNfbm9ybWFsaXplIiwidmVjM19kb3QiLCJ2ZWMzX2Nyb3NzIiwidmVjM19sZXJwIiwidmVjM19yb3RhdGVYIiwidmVjM19yb3RhdGVZIiwidmVjM19yb3RhdGVaIiwiT1JJR0lOIiwidmFsaWRhdGVWZWN0b3IzIiwidiIsImxlbmd0aCIsIk51bWJlciIsImlzRmluaXRlIiwiVmVjdG9yMyIsIngiLCJ5IiwieiIsIkFycmF5IiwiaXNBcnJheSIsImFyZ3VtZW50cyIsImNvcHkiLCJzZXQiLCJjaGVjayIsInZlY3RvciIsInZlY3RvcnMiLCJzY2FsZSIsImNvZWZmIiwicmFkaWFucyIsIm9yaWdpbiIsIm9wZXJhdGlvbiIsImFyZ3MiLCJ2YWx1ZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxPQUFPQSxTQUFQLE1BQXNCLGNBQXR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ldHVybiB0aGlzLmNoZWNrKCk7XG4gIH1cbn1cbiJdfQ== |
@@ -9,2 +9,3 @@ 'use strict'; | ||
exports.formatValue = formatValue; | ||
exports.formatAngle = formatAngle; | ||
exports.isArray = isArray; | ||
@@ -27,4 +28,7 @@ exports.clone = clone; | ||
config.debug = true; | ||
config.precision = 4; | ||
config.printTypes = false; | ||
config.printDegrees = false; | ||
config.printRowMajor = true; | ||
config.precision = 4; | ||
exports.config = config; | ||
@@ -48,8 +52,27 @@ function configure(options) { | ||
function round(value) { | ||
return Math.round(value / config.EPSILON) * config.EPSILON; | ||
} | ||
function formatValue(value) { | ||
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.precision || 4; | ||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref$precision = _ref.precision, | ||
precision = _ref$precision === undefined ? config.precision || 4 : _ref$precision; | ||
value = round(value); | ||
return parseFloat(value.toPrecision(precision)); | ||
} | ||
function formatAngle(value) { | ||
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref2$precision = _ref2.precision, | ||
precision = _ref2$precision === undefined ? config.precision || 4 : _ref2$precision, | ||
_ref2$printDegrees = _ref2.printDegrees, | ||
printDegrees = _ref2$printDegrees === undefined ? config.printAngles : _ref2$printDegrees; | ||
value = printDegrees ? degrees(value) : value; | ||
value = round(value); | ||
return '' + parseFloat(value.toPrecision(precision)) + (printDegrees ? '°' : ''); | ||
} | ||
// Returns true if value is either an array or a typed array | ||
@@ -162,2 +185,2 @@ // Note: does not return true for ArrayBuffers and DataViews | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24uanMiXSwibmFtZXMiOlsiY29uZmlndXJlIiwiY2hlY2tOdW1iZXIiLCJmb3JtYXRWYWx1ZSIsImlzQXJyYXkiLCJjbG9uZSIsInJhZGlhbnMiLCJkZWdy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ocmFkaWFucykge1xuICByZXR1cm4gbWFwKHJhZGlhbnMsIGFuZ2xlID0+IE1hdGguYXRhbihhbmdsZSkpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY2xhbXAodmFsdWUsIG1pbiwgbWF4KSB7XG4gIHJldHVybiBtYXAodmFsdWUsIHZhbHVlID0+IE1hdGgubWF4KG1pbiwgTWF0aC5taW4obWF4LCB2YWx1ZSkpKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGVxdWFscyhhLCBiKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGEpICYmIEFycmF5LmlzQXJyYXkoYikpIHtcbiAgICBpZiAoYSA9PT0gYikge1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhLmxlbmd0aDsgKytpKSB7XG4gICAgICBpZiAoIWVxdWFscyhhW2ldLCBiW2ldKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG4gIHJldHVybiBNYXRoLmFicyhhIC0gYikgPD0gY29uZmlnLkVQU0lMT04gKiBNYXRoLm1heCgxLjAsIE1hdGguYWJzKGEpLCBNYXRoLmFicyhiKSk7XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24uanMiXSwibmFtZXMiOlsiY29uZmlndXJlIiwiY2hlY2tOdW1iZXIiLCJmb3JtYXRWYWx1ZSIsImZvcm1hdEFuZ2xlIiwiaXNBcnJheSIsImNsb25lIiwicmFkaWFucyIsImRlZ3JlZXMiLCJzaW4iLCJjb3MiLCJ0YW4iLCJhc2luIiwiYWNvcyIsImF0YW4iLCJjbGFtcCIsImVxdWF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EuMCwgTWF0aC5hYnMoYSksIE1hdGguYWJzKGIpKTtcbn1cbiJdfQ== |
@@ -95,7 +95,12 @@ 'use strict'; | ||
value: function toString() { | ||
return this.formatString(_common.config); | ||
} | ||
}, { | ||
key: 'formatString', | ||
value: function formatString(opts) { | ||
var string = ''; | ||
for (var i = 0; i < this.ELEMENTS; ++i) { | ||
string += (i > 0 ? ', ' : '') + (0, _common.formatValue)(this[i]); | ||
string += (i > 0 ? ', ' : '') + (0, _common.formatValue)(this[i], opts); | ||
} | ||
return this.constructor.name + '(' + string + ')'; | ||
return (opts.printTypes ? this.constructor.name : '') + '[' + string + ']'; | ||
} | ||
@@ -163,2 +168,3 @@ }, { | ||
} | ||
return this; | ||
} | ||
@@ -183,2 +189,2 @@ }, { | ||
exports.default = MathArray; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYXRoLWFycmF5LmpzIl0sIm5hbWVzIjpbIk1hdGhBcnJheSIsIlN1YmNsYXNzIiwiY29uc3RydWN0b3IiLCJjbG9uZSIsImNvcHkiLCJjaGVjayIsImFycmF5IiwiaSIsIkVMRU1FTlRTIiwiYXJncyIsIm9mZnNldCIsInN0cmluZyIsIm5hbWUiLCJGbG9hdDMyQXJyYXkiLCJsZW5ndGgiLCJ2YWxpZCIsIk51bWJlciIsImlzRmluaXRlIiwiZGVidWciLCJ2YWxpZGF0ZSIsIkVycm9yIiwibGVuIiwiQXJyYXkiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQUVxQkEsUzs7Ozs7Ozs7Ozs7NEJBRVg7QUFDTixVQUFNQyxXQUFXLEtBQUtDLFdBQXRCO0FBQ0EsVUFBTUMsUUFBUSxJQUFJRixRQUFKLEdBQWVHLElBQWYsQ0FBb0IsSUFBcEIsQ0FBZDtBQUNBRCxZQUF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0dXJuIHRydWU7XG4gIH1cblxuICB2YWxpZGF0ZShhcnJheSA9IHRoaXMpIHtcbiAgICBsZXQgdmFsaWQgPSBhcnJheSAmJiBhcnJheS5sZW5ndGggPT09IHRoaXMuRUxFTUVOVFM7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLkVMRU1FTlRTOyArK2kpIHtcbiAgICAgIHZhbGlkID0gdmFsaWQgJiYgTnVtYmVyLmlzRmluaXRlKGFycmF5W2ldKTtcbiAgICB9XG4gICAgcmV0dXJuIHZhbGlkO1xuICB9XG5cbiAgY2hlY2soYXJyYXkgPSB0aGlzKSB7XG4gICAgaWYgKGNvbmZpZy5kZWJ1ZyAmJiAhdGhpcy52YWxpZGF0ZShhcnJheSkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCAke3RoaXMuY29uc3RydWN0b3IubmFtZX1gKTtcbiAgICB9XG4gIH1cblxuICBub3JtYWxpemUoKSB7XG4gICAgY29uc3QgbGVuZ3RoID0gdGhpcy5sZW4oKTtcbiAgICBpZiAobGVuZ3RoICE9PSAwKSB7XG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuRUxFTUVOVFM7ICsraSkge1xuICAgICAgICB0aGlzW2ldIC89IGxlbmd0aDtcbiAgICAgIH1cbiAgICB9XG4gICAgdGhpcy5jaGVjaygpO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYXRoLWFycmF5LmpzIl0sIm5hbWVzIjpbIk1hdGhBcnJheSIsIlN1YmNsYXNzIiwiY29uc3RydWN0b3IiLCJjbG9uZSIsImNvcHkiLCJjaGVjayIsImFycmF5IiwiaSIsIkVMRU1FTlRTIiwiYXJncyIsIm9mZnNldCIsImZvcm1hdFN0cmluZyIsIm9wdHMiLCJzdHJpbmciLCJwcmludFR5cGV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xpZGF0ZShhcnJheSkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCAke3RoaXMuY29uc3RydWN0b3IubmFtZX1gKTtcbiAgICB9XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cblxuICBub3JtYWxpemUoKSB7XG4gICAgY29uc3QgbGVuZ3RoID0gdGhpcy5sZW4oKTtcbiAgICBpZiAobGVuZ3RoICE9PSAwKSB7XG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuRUxFTUVOVFM7ICsraSkge1xuICAgICAgICB0aGlzW2ldIC89IGxlbmd0aDtcbiAgICAgIH1cbiAgICB9XG4gICAgdGhpcy5jaGVjaygpO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG59XG4iXX0= |
@@ -121,2 +121,4 @@ 'use strict'; | ||
var tempVector4 = [0, 0, 0, 0]; | ||
var Matrix4 = function (_MathArray) { | ||
@@ -495,2 +497,58 @@ _inherits(Matrix4, _MathArray); | ||
}, { | ||
key: 'transformDirection', | ||
value: function transformDirection(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
(0, _transformMat6.default)(tempVector4, [vector[0], vector[1], 0, 0], this); | ||
out = out || new _vector2.default(); | ||
out[0] = tempVector4[0]; | ||
out[1] = tempVector4[1]; | ||
break; | ||
case 3: | ||
(0, _transformMat6.default)(tempVector4, [vector[0], vector[1], vector[2], 0], this); | ||
out = out || new _vector4.default(); | ||
out[0] = tempVector4[0]; | ||
out[1] = tempVector4[1]; | ||
out[2] = tempVector4[2]; | ||
break; | ||
case 4: | ||
(0, _assert2.default)(vector[3] === 0); | ||
out = out || new _vector6.default(); | ||
(0, _transformMat6.default)(out, vector, this); | ||
break; | ||
default: | ||
throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
}, { | ||
key: 'transformPoint', | ||
value: function transformPoint(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
out = out || new _vector2.default(); | ||
(0, _transformMat6.default)(out, [vector[0], vector[1], 0, 1], this); | ||
out.length = 2; | ||
(0, _assert2.default)((0, _vector.validateVector2)(out)); | ||
break; | ||
case 3: | ||
out = out || new _vector4.default(); | ||
(0, _transformMat6.default)(out, [vector[0], vector[1], vector[2], 1], this); | ||
out.length = 3; | ||
(0, _assert2.default)((0, _vector3.validateVector3)(out)); | ||
break; | ||
case 4: | ||
(0, _assert2.default)(vector[3] !== 0); | ||
out = out || new _vector6.default(); | ||
(0, _transformMat6.default)(out, vector, this); | ||
(0, _assert2.default)((0, _vector5.validateVector4)(out)); | ||
break; | ||
default: | ||
throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
}, { | ||
key: 'ELEMENTS', | ||
@@ -634,2 +692,2 @@ get: function get() { | ||
exports.default = Matrix4; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYXRyaXg0LmpzIl0sIm5hbWVzIjpbInZhbGlkYXRlTWF0cml4NCIsIklERU5USVRZIiwibSIsImxlbmd0aCIsIk51bWJlciIsImlzRmluaXRlIiwiTWF0cml4NCIsImFyZ3MiLCJBcnJheSIsImlzQXJyYXkiLCJhcmd1bWVudHMiLCJjb3B5IiwiaWRlbnRpdHkiLCJtMDAiLCJtMTAiLCJtMjAiLCJtMzAiLCJtMDEiLCJtMTEiLCJtMjEiLCJtMzEiLCJtMDIiLCJtMTIiLCJtMjIiLCJtMzIiLCJtMDMiLCJtMTMiLCJtMjMiLCJtMzMiLCJzZXQiLCJjaGVjayIsImkiLCJxIiwibGVmdCIsInJpZ2h0IiwiYm90dG9tIiwidG9wIiwibmVhciIsImZhciIsImV5ZSIsImNlbnRlciIsInVwIiwiZm92IiwiTWF0aCIsIlBJIiwiYXNwZWN0IiwiRXJyb3IiLCJhIiwicmFkaWFucyIsInJ4IiwicnkiLCJyeiIsInJvdGF0ZVgiLCJyb3RhdGVZIiwicm90YXRlWiIsImF4aXMiLCJ2ZWMiLCJ2ZWN0b3Ii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nJvcignSWxsZWdhbCB2ZWN0b3InKTtcbiAgICB9XG4gICAgcmV0dXJuIG91dDtcbiAgfVxufVxuIl19 |
@@ -85,5 +85,24 @@ 'use strict'; | ||
value: function toString() { | ||
return '[rho:' + this.radius + ',theta:' + this.theta + ',phi:' + this.phi + ']'; | ||
return this.formatString(_common.config); | ||
} | ||
}, { | ||
key: 'formatString', | ||
value: function formatString(_ref2) { | ||
var printTypes = _ref2.printTypes, | ||
printDegrees = _ref2.printDegrees; | ||
var f = _common.formatValue; | ||
return (printTypes ? 'Spherical' : '') + '[rho:' + f(this.radius) + ',theta:' + f(this.theta) + ',phi:' + f(this.phi) + ']'; | ||
} | ||
}, { | ||
key: 'equals', | ||
value: function equals(other) { | ||
return (0, _common.equals)(this.radius, other.radius) && (0, _common.equals)(this.theta, other.theta) && (0, _common.equals)(this.phi, other.phi); | ||
} | ||
}, { | ||
key: 'exactEquals', | ||
value: function exactEquals(other) { | ||
return this.radius === other.radius && this.theta === other.theta && this.phi === other.phi; | ||
} | ||
/* eslint-disable brace-style */ | ||
@@ -118,7 +137,7 @@ // Cartographic (bearing 0 north, pitch 0 look from above) | ||
key: 'fromLngLatZ', | ||
value: function fromLngLatZ(_ref2) { | ||
var _ref3 = _slicedToArray(_ref2, 3), | ||
lng = _ref3[0], | ||
lat = _ref3[1], | ||
z = _ref3[2]; | ||
value: function fromLngLatZ(_ref3) { | ||
var _ref4 = _slicedToArray(_ref3, 3), | ||
lng = _ref4[0], | ||
lat = _ref4[1], | ||
z = _ref4[2]; | ||
@@ -145,3 +164,3 @@ this.radius = 1 + z / this.radiusScale; | ||
value: function toVector3() { | ||
return new _vector2.default(0, 0, this.radius).rotateX({ radians: -this.theta }).rotateZ({ radians: -this.phi }); | ||
return new _vector2.default(0, 0, this.radius).rotateX({ radians: this.theta }).rotateZ({ radians: this.phi }); | ||
} | ||
@@ -216,2 +235,2 @@ | ||
exports.default = SphericalCoordinates; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,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SBhcm91bmQgeS11cCBheGlzXG4gICAgICB0aGlzLnBoaSA9IE1hdGguYWNvcyhjbGFtcCh2WzJdIC8gdGhpcy5yYWRpdXMsIC0xLCAxKSk7IC8vIHBvbGFyIGFuZ2xlXG4gICAgfVxuICAgIHJldHVybiB0aGlzLmNoZWNrKCk7XG4gIH1cblxuICB0b1ZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIG5ldyBWZWN0b3IzKDAsIDAsIHRoaXMucmFkaXVzKVxuICAgICAgLnJvdGF0ZVgoe3JhZGlhbnM6IHRoaXMudGhldGF9KVxuICAgICAgLnJvdGF0ZVooe3JhZGlhbnM6IHRoaXMucGhpfSk7XG4gIH1cblxuICAvLyByZXN0cmljdCBwaGkgdG8gYmUgYmV0d2VlIEVQUyBhbmQgUEktRVBTXG4gIG1ha2VTYWZlKCkge1xuICAgIHRoaXMucGhpID0gTWF0aC5tYXgoRVBTSUxPTiwgTWF0aC5taW4oTWF0aC5QSSAtIEVQU0lMT04sIHRoaXMucGhpKSk7XG4gIH1cblxuICBjaGVjaygpIHtcbiAgICAvLyB0aGlzLm1ha2VTYWZlKCk7XG4gICAgYXNzZXJ0KE51bWJlci5pc0Zpbml0ZSh0aGlzLnBoaSkgJiYgTnVtYmVyLmlzRmluaXRlKHRoaXMudGhldGEpICYmIHRoaXMucmFkaXVzID4gMCk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cbn1cbiJdfQ== |
@@ -143,4 +143,3 @@ 'use strict'; | ||
(0, _set2.default)(this, x, y, z); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -209,4 +208,3 @@ | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -245,4 +243,3 @@ }, { | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -281,41 +278,5 @@ }, { | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'divide', | ||
value: function divide() { | ||
for (var _len4 = arguments.length, vectors = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
vectors[_key4] = arguments[_key4]; | ||
} | ||
var _iteratorNormalCompletion4 = true; | ||
var _didIteratorError4 = false; | ||
var _iteratorError4 = undefined; | ||
try { | ||
for (var _iterator4 = vectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { | ||
var vector = _step4.value; | ||
(0, _divide2.default)(this, this, vector); | ||
} | ||
} catch (err) { | ||
_didIteratorError4 = true; | ||
_iteratorError4 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion4 && _iterator4.return) { | ||
_iterator4.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError4) { | ||
throw _iteratorError4; | ||
} | ||
} | ||
} | ||
this.check(); | ||
return this; | ||
} | ||
}, { | ||
key: 'scale', | ||
@@ -326,20 +287,11 @@ value: function scale(_scale) { | ||
} else { | ||
(0, _dot2.default)(this, this, _scale); | ||
(0, _multiply2.default)(this, this, _scale); | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'scaleAndAdd', | ||
value: function scaleAndAdd(vector, scale) { | ||
(0, _scaleAndAdd2.default)(this, this, vector, scale); | ||
this.check(); | ||
return this; | ||
} | ||
}, { | ||
key: 'negate', | ||
value: function negate() { | ||
(0, _negate2.default)(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -350,4 +302,3 @@ }, { | ||
(0, _inverse2.default)(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -358,4 +309,3 @@ }, { | ||
(0, _normalize2.default)(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -366,4 +316,3 @@ }, { | ||
(0, _cross2.default)(this, this, vector); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -374,4 +323,3 @@ }, { | ||
(0, _lerp2.default)(this, this, vector, coeff); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -386,4 +334,3 @@ }, { | ||
(0, _rotateX2.default)(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -398,4 +345,3 @@ }, { | ||
(0, _rotateY2.default)(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -410,4 +356,3 @@ }, { | ||
(0, _rotateZ2.default)(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -417,11 +362,53 @@ }, { | ||
value: function operation(_operation) { | ||
for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { | ||
args[_key5 - 1] = arguments[_key5]; | ||
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { | ||
args[_key4 - 1] = arguments[_key4]; | ||
} | ||
_operation.apply(undefined, [this, this].concat(args)); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
// TBD - do we really need these? | ||
}, { | ||
key: 'divide', | ||
value: function divide() { | ||
for (var _len5 = arguments.length, vectors = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
vectors[_key5] = arguments[_key5]; | ||
} | ||
var _iteratorNormalCompletion4 = true; | ||
var _didIteratorError4 = false; | ||
var _iteratorError4 = undefined; | ||
try { | ||
for (var _iterator4 = vectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { | ||
var vector = _step4.value; | ||
(0, _divide2.default)(this, this, vector); | ||
} | ||
} catch (err) { | ||
_didIteratorError4 = true; | ||
_iteratorError4 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion4 && _iterator4.return) { | ||
_iterator4.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError4) { | ||
throw _iteratorError4; | ||
} | ||
} | ||
} | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'scaleAndAdd', | ||
value: function scaleAndAdd(vector, scale) { | ||
(0, _scaleAndAdd2.default)(this, this, vector, scale); | ||
return this.check(); | ||
} | ||
}, { | ||
key: 'ELEMENTS', | ||
@@ -461,2 +448,2 @@ get: function get() { | ||
exports.default = Vector3; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92ZWN0b3IzLmpzIl0sIm5hbWVzIjpbInZhbGlkYXRlVmVjdG9yMyIsIk9SSUdJTiIsInYiLCJsZW5ndGgiLCJOdW1iZXIiLCJpc0Zpbml0ZSIsIlZlY3RvcjMiLCJ4IiwieSIsInoiLCJBcnJheSIsImlzQXJyYXkiLCJhcmd1bWVudHMiLCJjb3B5Iiwic2V0IiwiY2hlY2siLCJ2ZWN0b3IiLCJ2ZWN0b3JzIiwic2NhbGUiLCJjb2VmZiIsInJhZGlhbnMiLCJvcmlnaW4iLCJvcGVyYXRpb24iLCJhcmdzIiwidmFsdWUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O1FBMkJnQkEsZSxHQUFBQSxlOztBQTNCaEI7Ozs7QUFDQTs7QUFJQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7Ozs7Ozs7O0FBcEJBO0FBQ0E7OztBQXFCQSxJQUFNQyxTQUFTLENBQUMsQ0FBRCxFQUFJLENBQUosRUFBTyxDQUFQLENBQWY7O0FBRU8sU0FBU0QsZUFBVCxDQUF5QkUsQ0FBekIsRUFBNEI7QUFDakMsU0FBT0EsRUFBRUMsTUFBRixLQUFhLENBQWIsSU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lY3Rvciwgc2NhbGUpO1xuICAgIHJldHVybiB0aGlzLmNoZWNrKCk7XG4gIH1cbn1cbiJdfQ== |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0-alpha.6", | ||
"version": "1.0.0-alpha.7", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "webgl", |
@@ -6,4 +6,7 @@ /* eslint-disable no-shadow */ | ||
config.debug = true; | ||
config.precision = 4; | ||
config.printTypes = false; | ||
config.printDegrees = false; | ||
config.printRowMajor = true; | ||
config.precision = 4; | ||
export {config}; | ||
@@ -28,6 +31,22 @@ | ||
export function formatValue(value, precision = config.precision || 4) { | ||
function round(value) { | ||
return Math.round(value / config.EPSILON) * config.EPSILON; | ||
} | ||
export function formatValue(value, { | ||
precision = config.precision || 4 | ||
} = {}) { | ||
value = round(value); | ||
return parseFloat(value.toPrecision(precision)); | ||
} | ||
export function formatAngle(value, { | ||
precision = config.precision || 4, | ||
printDegrees = config.printAngles | ||
} = {}) { | ||
value = printDegrees ? degrees(value) : value; | ||
value = round(value); | ||
return `${parseFloat(value.toPrecision(precision))}${printDegrees ? '°' : ''}`; | ||
} | ||
// Returns true if value is either an array or a typed array | ||
@@ -34,0 +53,0 @@ // Note: does not return true for ArrayBuffers and DataViews |
@@ -37,7 +37,11 @@ import {formatValue, equals, config} from './common'; | ||
toString() { | ||
return this.formatString(config); | ||
} | ||
formatString(opts) { | ||
let string = ''; | ||
for (let i = 0; i < this.ELEMENTS; ++i) { | ||
string += (i > 0 ? ', ' : '') + formatValue(this[i]); | ||
string += (i > 0 ? ', ' : '') + formatValue(this[i], opts); | ||
} | ||
return `${this.constructor.name}(${string})`; | ||
return `${opts.printTypes ? this.constructor.name : ''}[${string}]`; | ||
} | ||
@@ -92,2 +96,3 @@ | ||
} | ||
return this; | ||
} | ||
@@ -94,0 +99,0 @@ |
@@ -43,2 +43,4 @@ import MathArray from './math-array'; | ||
const tempVector4 = [0, 0, 0, 0]; | ||
export default class Matrix4 extends MathArray { | ||
@@ -339,2 +341,50 @@ constructor(...args) { | ||
} | ||
transformDirection(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
vec4_transformMat4(tempVector4, [vector[0], vector[1], 0, 0], this); | ||
out = out || new Vector2(); | ||
[out[0], out[1]] = tempVector4; | ||
break; | ||
case 3: | ||
vec4_transformMat4(tempVector4, [vector[0], vector[1], vector[2], 0], this); | ||
out = out || new Vector3(); | ||
[out[0], out[1], out[2]] = tempVector4; | ||
break; | ||
case 4: | ||
assert(vector[3] === 0); | ||
out = out || new Vector4(); | ||
vec4_transformMat4(out, vector, this); | ||
break; | ||
default: throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
transformPoint(vector, out) { | ||
switch (vector.length) { | ||
case 2: | ||
out = out || new Vector2(); | ||
vec4_transformMat4(out, [vector[0], vector[1], 0, 1], this); | ||
out.length = 2; | ||
assert(validateVector2(out)); | ||
break; | ||
case 3: | ||
out = out || new Vector3(); | ||
vec4_transformMat4(out, [vector[0], vector[1], vector[2], 1], this); | ||
out.length = 3; | ||
assert(validateVector3(out)); | ||
break; | ||
case 4: | ||
assert(vector[3] !== 0); | ||
out = out || new Vector4(); | ||
vec4_transformMat4(out, vector, this); | ||
assert(validateVector4(out)); | ||
break; | ||
default: | ||
throw new Error('Illegal vector'); | ||
} | ||
return out; | ||
} | ||
} |
// Adaptation of THREE.js Spherical class, under MIT license | ||
import {formatValue, equals, config} from './common'; | ||
import {degrees, radians, clamp} from './common'; | ||
@@ -50,5 +51,23 @@ import Vector3 from './vector3'; | ||
toString() { | ||
return `[rho:${this.radius},theta:${this.theta},phi:${this.phi}]`; | ||
return this.formatString(config); | ||
} | ||
formatString({printTypes, printDegrees}) { | ||
const f = formatValue; | ||
return `${printTypes ? 'Spherical' : ''}\ | ||
[rho:${f(this.radius)},theta:${f(this.theta)},phi:${f(this.phi)}]`; | ||
} | ||
equals(other) { | ||
return equals(this.radius, other.radius) && | ||
equals(this.theta, other.theta) && | ||
equals(this.phi, other.phi); | ||
} | ||
exactEquals(other) { | ||
return this.radius === other.radius && | ||
this.theta === other.theta && | ||
this.phi === other.phi; | ||
} | ||
/* eslint-disable brace-style */ | ||
@@ -110,4 +129,4 @@ // Cartographic (bearing 0 north, pitch 0 look from above) | ||
return new Vector3(0, 0, this.radius) | ||
.rotateX({radians: -this.theta}) | ||
.rotateZ({radians: -this.phi}); | ||
.rotateX({radians: this.theta}) | ||
.rotateZ({radians: this.phi}); | ||
} | ||
@@ -114,0 +133,0 @@ |
@@ -53,4 +53,3 @@ import MathArray from './math-array'; | ||
vec3_set(this, x, y, z); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -91,4 +90,3 @@ | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -100,4 +98,3 @@ | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -109,14 +106,5 @@ | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
divide(...vectors) { | ||
for (const vector of vectors) { | ||
vec3_divide(this, this, vector); | ||
} | ||
this.check(); | ||
return this; | ||
} | ||
scale(scale) { | ||
@@ -126,18 +114,10 @@ if (Number.isFinite(scale)) { | ||
} else { | ||
vec3_dot(this, this, scale); | ||
vec3_multiply(this, this, scale); | ||
} | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
scaleAndAdd(vector, scale) { | ||
vec3_scaleAndAdd(this, this, vector, scale); | ||
this.check(); | ||
return this; | ||
} | ||
negate() { | ||
vec3_negate(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -147,4 +127,3 @@ | ||
vec3_inverse(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -154,4 +133,3 @@ | ||
vec3_normalize(this, this); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -161,4 +139,3 @@ | ||
vec3_cross(this, this, vector); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -168,4 +145,3 @@ | ||
vec3_lerp(this, this, vector, coeff); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -175,4 +151,3 @@ | ||
vec3_rotateX(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -182,4 +157,3 @@ | ||
vec3_rotateY(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -189,4 +163,3 @@ | ||
vec3_rotateZ(this, this, origin, radians); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
@@ -196,5 +169,17 @@ | ||
operation(this, this, ...args); | ||
this.check(); | ||
return this; | ||
return this.check(); | ||
} | ||
// TBD - do we really need these? | ||
divide(...vectors) { | ||
for (const vector of vectors) { | ||
vec3_divide(this, this, vector); | ||
} | ||
return this.check(); | ||
} | ||
scaleAndAdd(vector, scale) { | ||
vec3_scaleAndAdd(this, this, vector, scale); | ||
return this.check(); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
610137
8563