UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

36 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Matrix3 = void 0; const tslib_1 = require("tslib"); const decorators_1 = require("../../data/decorators"); const THREE = require("./_internal"); /** * Serializable THREE.js Matrix3 */ let Matrix3 = class Matrix3 extends THREE.Matrix3 { /** * Create a matrix from array * @param {number[][]} array Array * @returns {Matrix3} Matrix3 */ static fromArray(array) { const matrix = new this(); matrix.fromArray([].concat(...array)); matrix.transpose(); return matrix; } clone() { return new this.constructor().fromArray(this.elements); } }; exports.Matrix3 = Matrix3; tslib_1.__decorate([ (0, decorators_1.SerializableArrayMember)(Number, { numberType: decorators_1.NumberType.DECIMAL, }), tslib_1.__metadata("design:type", Array) ], Matrix3.prototype, "elements", void 0); exports.Matrix3 = Matrix3 = tslib_1.__decorate([ (0, decorators_1.SerializableObject)() ], Matrix3); //# sourceMappingURL=Matrix3.js.map