Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@math.gl/core

Package Overview
Dependencies
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/core - npm Package Compare versions

Comparing version 3.4.2 to 3.5.0-alpha.1

18

dist/es5/classes/base/math-array.js

@@ -8,3 +8,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -27,3 +27,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -33,3 +33,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var MathArray = function (_Array) {
(0, _inherits2["default"])(MathArray, _Array);
(0, _inherits2.default)(MathArray, _Array);

@@ -39,7 +39,7 @@ var _super = _createSuper(MathArray);

function MathArray() {
(0, _classCallCheck2["default"])(this, MathArray);
(0, _classCallCheck2.default)(this, MathArray);
return _super.apply(this, arguments);
}
(0, _createClass2["default"])(MathArray, [{
(0, _createClass2.default)(MathArray, [{
key: "clone",

@@ -320,3 +320,3 @@ value: function clone() {

get: function get() {
(0, _assert["default"])(false);
(0, _assert.default)(false);
return 0;

@@ -327,3 +327,3 @@ }

get: function get() {
(0, _assert["default"])(false);
(0, _assert.default)(false);
return 0;

@@ -338,5 +338,5 @@ }

return MathArray;
}((0, _wrapNativeSuper2["default"])(Array));
}((0, _wrapNativeSuper2.default)(Array));
exports["default"] = MathArray;
exports.default = MathArray;
//# sourceMappingURL=math-array.js.map

@@ -8,3 +8,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -27,3 +27,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -33,3 +33,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Matrix = function (_MathArray) {
(0, _inherits2["default"])(Matrix, _MathArray);
(0, _inherits2.default)(Matrix, _MathArray);

@@ -39,7 +39,7 @@ var _super = _createSuper(Matrix);

function Matrix() {
(0, _classCallCheck2["default"])(this, Matrix);
(0, _classCallCheck2.default)(this, Matrix);
return _super.apply(this, arguments);
}
(0, _createClass2["default"])(Matrix, [{
(0, _createClass2.default)(Matrix, [{
key: "toString",

@@ -109,5 +109,5 @@ value: function toString() {

return Matrix;
}(_mathArray["default"]);
}(_mathArray.default);
exports["default"] = Matrix;
exports.default = Matrix;
//# sourceMappingURL=matrix.js.map

@@ -8,3 +8,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -27,3 +27,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -33,3 +33,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Vector = function (_MathArray) {
(0, _inherits2["default"])(Vector, _MathArray);
(0, _inherits2.default)(Vector, _MathArray);

@@ -39,10 +39,10 @@ var _super = _createSuper(Vector);

function Vector() {
(0, _classCallCheck2["default"])(this, Vector);
(0, _classCallCheck2.default)(this, Vector);
return _super.apply(this, arguments);
}
(0, _createClass2["default"])(Vector, [{
(0, _createClass2.default)(Vector, [{
key: "copy",
value: function copy(vector) {
(0, _assert["default"])(false);
(0, _assert.default)(false);
return this;

@@ -169,3 +169,3 @@ }

value: function getComponent(i) {
(0, _assert["default"])(i >= 0 && i < this.ELEMENTS, 'index is out of range');
(0, _assert.default)(i >= 0 && i < this.ELEMENTS, 'index is out of range');
return (0, _validators.checkNumber)(this[i]);

@@ -176,3 +176,3 @@ }

value: function setComponent(i, value) {
(0, _assert["default"])(i >= 0 && i < this.ELEMENTS, 'index is out of range');
(0, _assert.default)(i >= 0 && i < this.ELEMENTS, 'index is out of range');
this[i] = value;

@@ -219,5 +219,5 @@ return this.check();

return Vector;
}(_mathArray["default"]);
}(_mathArray.default);
exports["default"] = Vector;
exports.default = Vector;
//# sourceMappingURL=vector.js.map

@@ -8,3 +8,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -31,3 +31,3 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -52,7 +52,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Euler = function (_MathArray) {
(0, _inherits2["default"])(Euler, _MathArray);
(0, _inherits2.default)(Euler, _MathArray);
var _super = _createSuper(Euler);
(0, _createClass2["default"])(Euler, [{
(0, _createClass2.default)(Euler, [{
key: "ELEMENTS",

@@ -121,3 +121,3 @@ get: function get() {

var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Euler.DefaultOrder;
(0, _classCallCheck2["default"])(this, Euler);
(0, _classCallCheck2.default)(this, Euler);
_this = _super.call(this, -0, -0, -0, -0);

@@ -136,6 +136,6 @@

(0, _createClass2["default"])(Euler, [{
(0, _createClass2.default)(Euler, [{
key: "fromQuaternion",
value: function fromQuaternion(quaternion) {
var _quaternion = (0, _slicedToArray2["default"])(quaternion, 4),
var _quaternion = (0, _slicedToArray2.default)(quaternion, 4),
x = _quaternion[0],

@@ -257,3 +257,3 @@ y = _quaternion[1],

value: function getQuaternion() {
var q = new _quaternion2["default"]();
var q = new _quaternion2.default();

@@ -537,3 +537,3 @@ switch (this[4]) {

var z = sy * cr * cp - cy * sr * sp;
return new _quaternion2["default"](x, y, z, w);
return new _quaternion2.default(x, y, z, w);
}

@@ -646,5 +646,5 @@ }, {

return Euler;
}(_mathArray["default"]);
}(_mathArray.default);
exports["default"] = Euler;
exports.default = Euler;
//# sourceMappingURL=euler.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -35,3 +35,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Matrix3 = function (_Matrix) {
(0, _inherits2["default"])(Matrix3, _Matrix);
(0, _inherits2.default)(Matrix3, _Matrix);
var _super = _createSuper(Matrix3);
(0, _createClass2["default"])(Matrix3, [{
(0, _createClass2.default)(Matrix3, [{
key: "ELEMENTS",

@@ -93,3 +93,3 @@ get: function get() {

(0, _classCallCheck2["default"])(this, Matrix3);
(0, _classCallCheck2.default)(this, Matrix3);
_this = _super.call(this, -0, -0, -0, -0, -0, -0, -0, -0, -0);

@@ -106,3 +106,3 @@

(0, _createClass2["default"])(Matrix3, [{
(0, _createClass2.default)(Matrix3, [{
key: "copy",

@@ -255,5 +255,5 @@ value: function copy(array) {

return Matrix3;
}(_matrix["default"]);
}(_matrix.default);
exports["default"] = Matrix3;
exports.default = Matrix3;
//# sourceMappingURL=matrix3.js.map

@@ -113,8 +113,12 @@ import Matrix from './base/matrix';

// The scales are the "lengths" of the column vectors in the upper-left 3x3 matrix.
getScale(result?: number[]): Matrix4;
getScale(): number[];
getScale<T extends number[]>(result: T): T;
// Gets the translation portion, assuming the matrix is a affine transformation matrix.
getTranslation(result?: number[]): Matrix4;
getTranslation(): number[];
getTranslation<T extends number[]>(result: T): T;
// Gets upper left 3x3 pure rotation matrix (non-scaling), assume affine transformation matrix
getRotation(result?: number[], scaleResult?: number[]);
getRotationMatrix3(result?: number[], scaleResult?: number[]);
getRotation(): number[];
getRotation<T extends number[]>(result: T, scaleResult?: number[]): T;
getRotationMatrix3(): number[];
getRotationMatrix3<T extends number[]>(result: T, scaleResult?: number[]): T;

@@ -121,0 +125,0 @@ // Modifiers

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -39,3 +39,3 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -67,7 +67,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Matrix4 = function (_Matrix) {
(0, _inherits2["default"])(Matrix4, _Matrix);
(0, _inherits2.default)(Matrix4, _Matrix);
var _super = _createSuper(Matrix4);
(0, _createClass2["default"])(Matrix4, [{
(0, _createClass2.default)(Matrix4, [{
key: "INDICES",

@@ -104,3 +104,3 @@ get: function get() {

(0, _classCallCheck2["default"])(this, Matrix4);
(0, _classCallCheck2.default)(this, Matrix4);
_this = _super.call(this, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);

@@ -117,3 +117,3 @@

(0, _createClass2["default"])(Matrix4, [{
(0, _createClass2.default)(Matrix4, [{
key: "copy",

@@ -429,3 +429,3 @@ value: function copy(array) {

value: function rotateXYZ(_ref5) {
var _ref6 = (0, _slicedToArray2["default"])(_ref5, 3),
var _ref6 = (0, _slicedToArray2.default)(_ref5, 3),
rx = _ref6[0],

@@ -569,5 +569,5 @@ ry = _ref6[1],

return Matrix4;
}(_matrix["default"]);
}(_matrix.default);
exports["default"] = Matrix4;
exports.default = Matrix4;
//# sourceMappingURL=matrix4.js.map

@@ -8,3 +8,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -41,18 +41,18 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

(0, _classCallCheck2["default"])(this, Pose);
(0, _classCallCheck2.default)(this, Pose);
if (Array.isArray(position) && position.length === 3) {
this.position = new _vector["default"](position);
this.position = new _vector.default(position);
} else {
this.position = new _vector["default"](x, y, z);
this.position = new _vector.default(x, y, z);
}
if (Array.isArray(orientation) && orientation.length === 4) {
this.orientation = new _euler["default"](orientation, orientation[3]);
this.orientation = new _euler.default(orientation, orientation[3]);
} else {
this.orientation = new _euler["default"](roll, pitch, yaw, _euler["default"].RollPitchYaw);
this.orientation = new _euler.default(roll, pitch, yaw, _euler.default.RollPitchYaw);
}
}
(0, _createClass2["default"])(Pose, [{
(0, _createClass2.default)(Pose, [{
key: "getPosition",

@@ -94,3 +94,3 @@ value: function getPosition() {

var cw = Math.cos(this.yaw);
var matrix = new _matrix["default"]().setRowMajor(cw * cp, -sw * cr + cw * sp * sr, sw * sr + cw * sp * cr, this.x, sw * cp, cw * cr + sw * sp * sr, -cw * sr + sw * sp * cr, this.y, -sp, cp * sr, cp * cr, this.z, 0, 0, 0, 1);
var matrix = new _matrix.default().setRowMajor(cw * cp, -sw * cr + cw * sp * sr, sw * sr + cw * sp * cr, this.x, sw * cp, cw * cr + sw * sp * sr, -cw * sr + sw * sp * cr, this.y, -sp, cp * sr, cp * cr, this.z, 0, 0, 0, 1);
return matrix;

@@ -101,3 +101,3 @@ }

value: function getTransformationMatrixFromPose(pose) {
return new _matrix["default"]().multiplyRight(this.getTransformationMatrix()).multiplyRight(pose.getTransformationMatrix().invert());
return new _matrix.default().multiplyRight(this.getTransformationMatrix()).multiplyRight(pose.getTransformationMatrix().invert());
}

@@ -107,3 +107,3 @@ }, {

value: function getTransformationMatrixToPose(pose) {
return new _matrix["default"]().multiplyRight(pose.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert());
return new _matrix.default().multiplyRight(pose.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert());
}

@@ -162,3 +162,3 @@ }, {

exports["default"] = Pose;
exports.default = Pose;
//# sourceMappingURL=pose.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -33,3 +33,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -41,3 +41,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Quaternion = function (_MathArray) {
(0, _inherits2["default"])(Quaternion, _MathArray);
(0, _inherits2.default)(Quaternion, _MathArray);

@@ -53,3 +53,3 @@ var _super = _createSuper(Quaternion);

var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
(0, _classCallCheck2["default"])(this, Quaternion);
(0, _classCallCheck2.default)(this, Quaternion);
_this = _super.call(this, -0, -0, -0, -0);

@@ -66,3 +66,3 @@

(0, _createClass2["default"])(Quaternion, [{
(0, _createClass2.default)(Quaternion, [{
key: "copy",

@@ -170,3 +170,3 @@ value: function copy(array) {

value: function multiplyRight(a, b) {
(0, _assert["default"])(!b);
(0, _assert.default)(!b);
quat.multiply(this, this, a);

@@ -178,3 +178,3 @@ return this.check();

value: function multiplyLeft(a, b) {
(0, _assert["default"])(!b);
(0, _assert.default)(!b);
quat.multiply(this, a, this);

@@ -315,5 +315,5 @@ return this.check();

return Quaternion;
}(_mathArray["default"]);
}(_mathArray.default);
exports["default"] = Quaternion;
exports.default = Quaternion;
//# sourceMappingURL=quaternion.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -46,3 +46,3 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

(0, _classCallCheck2["default"])(this, SphericalCoordinates);
(0, _classCallCheck2.default)(this, SphericalCoordinates);
this.phi = phi;

@@ -64,3 +64,3 @@ this.theta = theta;

(0, _createClass2["default"])(SphericalCoordinates, [{
(0, _createClass2.default)(SphericalCoordinates, [{
key: "toString",

@@ -112,3 +112,3 @@ value: function toString() {

value: function fromLngLatZ(_ref3) {
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 3),
var _ref4 = (0, _slicedToArray2.default)(_ref3, 3),
lng = _ref4[0],

@@ -137,3 +137,3 @@ lat = _ref4[1],

value: function toVector3() {
return new _vector["default"](0, 0, this.radius).rotateX({
return new _vector.default(0, 0, this.radius).rotateX({
radians: this.theta

@@ -204,3 +204,3 @@ }).rotateZ({

exports["default"] = SphericalCoordinates;
exports.default = SphericalCoordinates;
//# sourceMappingURL=spherical-coordinates.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -33,3 +33,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -39,3 +39,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Vector2 = function (_Vector) {
(0, _inherits2["default"])(Vector2, _Vector);
(0, _inherits2.default)(Vector2, _Vector);

@@ -49,3 +49,3 @@ var _super = _createSuper(Vector2);

var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
(0, _classCallCheck2["default"])(this, Vector2);
(0, _classCallCheck2.default)(this, Vector2);
_this = _super.call(this, 2);

@@ -68,3 +68,3 @@

(0, _createClass2["default"])(Vector2, [{
(0, _createClass2.default)(Vector2, [{
key: "set",

@@ -154,5 +154,5 @@ value: function set(x, y) {

return Vector2;
}(_vector["default"]);
}(_vector.default);
exports["default"] = Vector2;
exports.default = Vector2;
//# sourceMappingURL=vector2.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -33,3 +33,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -42,7 +42,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Vector3 = function (_Vector) {
(0, _inherits2["default"])(Vector3, _Vector);
(0, _inherits2.default)(Vector3, _Vector);
var _super = _createSuper(Vector3);
(0, _createClass2["default"])(Vector3, null, [{
(0, _createClass2.default)(Vector3, null, [{
key: "ZERO",

@@ -60,3 +60,3 @@ get: function get() {

var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
(0, _classCallCheck2["default"])(this, Vector3);
(0, _classCallCheck2.default)(this, Vector3);
_this = _super.call(this, -0, -0, -0);

@@ -81,3 +81,3 @@

(0, _createClass2["default"])(Vector3, [{
(0, _createClass2.default)(Vector3, [{
key: "set",

@@ -208,5 +208,5 @@ value: function set(x, y, z) {

return Vector3;
}(_vector["default"]);
}(_vector.default);
exports["default"] = Vector3;
exports.default = Vector3;
//# sourceMappingURL=vector3.js.map

@@ -10,3 +10,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;

@@ -33,3 +33,3 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }

@@ -41,7 +41,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var Vector4 = function (_Vector) {
(0, _inherits2["default"])(Vector4, _Vector);
(0, _inherits2.default)(Vector4, _Vector);
var _super = _createSuper(Vector4);
(0, _createClass2["default"])(Vector4, null, [{
(0, _createClass2.default)(Vector4, null, [{
key: "ZERO",

@@ -60,3 +60,3 @@ get: function get() {

var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
(0, _classCallCheck2["default"])(this, Vector4);
(0, _classCallCheck2.default)(this, Vector4);
_this = _super.call(this, -0, -0, -0, -0);

@@ -83,3 +83,3 @@

(0, _createClass2["default"])(Vector4, [{
(0, _createClass2.default)(Vector4, [{
key: "set",

@@ -180,5 +180,5 @@ value: function set(x, y, z, w) {

return Vector4;
}(_vector["default"]);
}(_vector.default);
exports["default"] = Vector4;
exports.default = Vector4;
//# sourceMappingURL=vector4.js.map

@@ -131,3 +131,3 @@ "use strict";

get: function get() {
return _vector["default"];
return _vector.default;
}

@@ -138,3 +138,3 @@ });

get: function get() {
return _vector2["default"];
return _vector2.default;
}

@@ -145,3 +145,3 @@ });

get: function get() {
return _vector3["default"];
return _vector3.default;
}

@@ -152,3 +152,3 @@ });

get: function get() {
return _matrix["default"];
return _matrix.default;
}

@@ -159,3 +159,3 @@ });

get: function get() {
return _matrix2["default"];
return _matrix2.default;
}

@@ -166,3 +166,3 @@ });

get: function get() {
return _quaternion["default"];
return _quaternion.default;
}

@@ -179,3 +179,3 @@ });

get: function get() {
return _mathUtils["default"];
return _mathUtils.default;
}

@@ -186,3 +186,3 @@ });

get: function get() {
return _sphericalCoordinates["default"];
return _sphericalCoordinates.default;
}

@@ -193,3 +193,3 @@ });

get: function get() {
return _sphericalCoordinates["default"];
return _sphericalCoordinates.default;
}

@@ -200,3 +200,3 @@ });

get: function get() {
return _pose["default"];
return _pose.default;
}

@@ -207,3 +207,3 @@ });

get: function get() {
return _pose["default"];
return _pose.default;
}

@@ -214,3 +214,3 @@ });

get: function get() {
return _euler["default"];
return _euler.default;
}

@@ -221,3 +221,3 @@ });

get: function get() {
return _euler["default"];
return _euler.default;
}

@@ -228,3 +228,3 @@ });

get: function get() {
return _assert["default"];
return _assert.default;
}

@@ -231,0 +231,0 @@ });

@@ -6,3 +6,3 @@ "use strict";

});
exports["default"] = assert;
exports.default = assert;

@@ -9,0 +9,0 @@ function assert(condition, message) {

@@ -52,3 +52,3 @@ "use strict";

for (var key in options) {
(0, _assert["default"])(key in config);
(0, _assert.default)(key in config);
config[key] = options[key];

@@ -82,3 +82,3 @@ }

function clone(array) {
return array.clone ? array.clone() : (0, _construct2["default"])(Array, (0, _toConsumableArray2["default"])(array));
return array.clone ? array.clone() : (0, _construct2.default)(Array, (0, _toConsumableArray2.default)(array));
}

@@ -221,3 +221,3 @@

if (a && (0, _typeof2["default"])(a) === 'object' && b && (0, _typeof2["default"])(b) === 'object') {
if (a && (0, _typeof2.default)(a) === 'object' && b && (0, _typeof2.default)(b) === 'object') {
if (a.constructor !== b.constructor) {

@@ -224,0 +224,0 @@ return false;

@@ -6,3 +6,3 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;
var _default = {

@@ -34,3 +34,3 @@ EPSILON1: 1e-1,

};
exports["default"] = _default;
exports.default = _default;
//# sourceMappingURL=math-utils.js.map

@@ -113,8 +113,12 @@ import Matrix from './base/matrix';

// The scales are the "lengths" of the column vectors in the upper-left 3x3 matrix.
getScale(result?: number[]): Matrix4;
getScale(): number[];
getScale<T extends number[]>(result: T): T;
// Gets the translation portion, assuming the matrix is a affine transformation matrix.
getTranslation(result?: number[]): Matrix4;
getTranslation(): number[];
getTranslation<T extends number[]>(result: T): T;
// Gets upper left 3x3 pure rotation matrix (non-scaling), assume affine transformation matrix
getRotation(result?: number[], scaleResult?: number[]);
getRotationMatrix3(result?: number[], scaleResult?: number[]);
getRotation(): number[];
getRotation<T extends number[]>(result: T, scaleResult?: number[]): T;
getRotationMatrix3(): number[];
getRotationMatrix3<T extends number[]>(result: T, scaleResult?: number[]): T;

@@ -121,0 +125,0 @@ // Modifiers

@@ -8,3 +8,3 @@ {

},
"version": "3.4.2",
"version": "3.5.0-alpha.1",
"keywords": [

@@ -33,3 +33,2 @@ "webgl",

"module": "dist/esm/index.js",
"esnext": "dist/es6/index.js",
"files": [

@@ -46,3 +45,3 @@ "dist",

},
"gitHead": "29b92300bea8fc1b5c3fcca61302324c0bd578c7"
"gitHead": "d40d72a2b16a54129c9608f2ca326b812903d856"
}

@@ -113,8 +113,12 @@ import Matrix from './base/matrix';

// The scales are the "lengths" of the column vectors in the upper-left 3x3 matrix.
getScale(result?: number[]): Matrix4;
getScale(): number[];
getScale<T extends number[]>(result: T): T;
// Gets the translation portion, assuming the matrix is a affine transformation matrix.
getTranslation(result?: number[]): Matrix4;
getTranslation(): number[];
getTranslation<T extends number[]>(result: T): T;
// Gets upper left 3x3 pure rotation matrix (non-scaling), assume affine transformation matrix
getRotation(result?: number[], scaleResult?: number[]);
getRotationMatrix3(result?: number[], scaleResult?: number[]);
getRotation(): number[];
getRotation<T extends number[]>(result: T, scaleResult?: number[]): T;
getRotationMatrix3(): number[];
getRotationMatrix3<T extends number[]>(result: T, scaleResult?: number[]): T;

@@ -121,0 +125,0 @@ // Modifiers

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc