sigma
Version:
A JavaScript library aimed at visualizing graphs of thousands of nodes and edges.
15 lines (14 loc) • 712 B
TypeScript
/**
* Sigma.js WebGL Matrices Helpers
* ================================
*
* Matrices-related helper functions used by sigma's WebGL renderer.
* @module
*/
import { Coordinates } from "../types";
export declare function identity(): Float32Array;
export declare function scale(m: Float32Array, x: number, y?: number): Float32Array;
export declare function rotate(m: Float32Array, r: number): Float32Array;
export declare function translate(m: Float32Array, x: number, y: number): Float32Array;
export declare function multiply<T extends number[] | Float32Array>(a: T, b: Float32Array | number[]): T;
export declare function multiplyVec2(a: Float32Array | number[], b: Coordinates, z?: number): Coordinates;