UNPKG

sigma

Version:

A JavaScript library dedicated to graph drawing.

20 lines (19 loc) 803 B
/** * Sigma.js WebGL Renderer Node Program * ===================================== * * Simple program rendering nodes as discs, shaped by triangles using the * `gl.TRIANGLES` display mode. So, to draw one node, it will need to store * three times the center of the node, with the color, the size and an angle * indicating which "corner" of the triangle to draw. * @module */ import { NodeAttributes } from "../../../types"; import { AbstractNodeProgram, RenderNodeParams } from "./common/node"; export default class NodeProgram extends AbstractNodeProgram { angleLocation: GLint; resolutionLocation: WebGLUniformLocation; constructor(gl: WebGLRenderingContext); process(data: NodeAttributes, hidden: boolean, offset: number): void; render(params: RenderNodeParams): void; }