UNPKG

modern-canvas

Version:

A JavaScript WebGL rendering engine. only the ESM.

26 lines (25 loc) 1.02 kB
import { Observable } from 'modern-idoc'; import { Vector } from './Vector'; export type MatrixLike = number | number[] | Matrix; export type MatrixOperateOutput = number[] | Matrix | Vector; export declare abstract class Matrix extends Observable { readonly rows: number; readonly cols: number; protected _array: number[]; dirtyId: number; get length(): number; constructor(rows: number, cols: number, array?: number[]); operate(operator: string, target: MatrixLike | Vector, output?: MatrixOperateOutput): any; identity(): this; set(value: MatrixLike): this; copy(value: MatrixLike): this; clone(): this; multiply<T extends Vector>(value: T): T; multiply(value: MatrixLike): this; multiply<T extends MatrixOperateOutput>(value: MatrixLike, output: T): T; protected _onUpdate(_array: number[]): void; toArray(transpose?: boolean): number[]; toFloat32Array(transpose?: boolean): Float32Array<ArrayBuffer>; toName(): string; toJSON(): number[]; }