p5
Version:
[](https://www.npmjs.com/package/p5)
16 lines (15 loc) • 555 B
JavaScript
//#region src/math/Matrices/MatrixInterface.js
let GLMAT_ARRAY_TYPE = Array;
let isMatrixArray = (x) => Array.isArray(x);
if (typeof Float32Array !== "undefined") {
GLMAT_ARRAY_TYPE = Float32Array;
isMatrixArray = (x) => Array.isArray(x) || x instanceof Float32Array;
}
var MatrixInterface = class MatrixInterface {
#matrix = null;
constructor(...args) {
if (this.constructor === MatrixInterface) throw new Error("Class is of abstract type and can't be instantiated");
}
};
//#endregion
export { GLMAT_ARRAY_TYPE, MatrixInterface, isMatrixArray };