import { SigmaLibrary, Captor, Edge, Node, Keyed } from "../../../interfaces"; import Graph from "../../classes/Graph"; import Camera from "../../classes/Camera"; import { Settings } from "../../classes/Configurable"; declare const _default: (sigma: SigmaLibrary) => { new (graph: Graph, camera: Camera, settings: Settings, options: any): { id: string; previousRenderCameraMatrix: number[]; jobs: Keyed; conradId: number; contexts: { [key: string]: CanvasRenderingContext2D | WebGLRenderingContext; labels: CanvasRenderingContext2D; scene: WebGLRenderingContext; nodes: WebGLRenderingContext; edges: WebGLRenderingContext; }; domElements: Keyed; container: HTMLElement; captors: Captor[]; width: number; height: number; nodePrograms: Keyed; edgePrograms: Keyed; nodeFloatArrays: { [key: string]: { nodes: Node[]; array: Float32Array; }; }; edgeFloatArrays: { [key: string]: { edges: Edge[]; array: Float32Array; }; }; edgeIndicesArrays: Keyed; graph: Graph; camera: Camera; settings: Settings; options: any; /** * This method will generate the nodes and edges float arrays. This step is * separated from the "render" method, because to keep WebGL efficient, since * all the camera and middlewares are modelised as matrices and they do not * require the float arrays to be regenerated. * * Basically, when the user moves the camera or applies some specific linear * transformations, this process step will be skipped, and the "render" * method will efficiently refresh the rendering. * * And when the user modifies the graph colors or positions (applying a new * layout or filtering the colors, for instance), this "process" step will be * required to regenerate the float arrays. * * @return {WebGLRenderer} Returns the instance itself. */ process(params: any): any; clearJobs(): void; /** * This method renders the graph. It basically calls each program (and * generate them if they do not exist yet) to render nodes and edges, batched * per renderer. * * As in the canvas renderer, it is possible to display edges, nodes and / or * labels in batches, to make the whole thing way more scalable. * * @param {?object} params Eventually an object of options. * @return {WebGLRenderer} Returns the instance itself. */ render(params?: any): any; drawEdges(cameraMatrix: number[], options: any): void; drawEdgesBatched(cameraMatrix: number[], options: any): void; drawEdgesUnbatched(cameraMatrix: number[], options: any): void; drawNodes(cameraMatrix: number[], options: any): void; drawLabels(nodesInView: Node[], options: any): void; /** * This method creates a DOM element of the specified type, switches its * position to "absolute", references it to the domElements attribute, and * finally appends it to the container. * * @param {string} tag The label tag. * @param {string} id The id of the element (to store it in * "domElements"). * @param {?boolean} webgl Will init the WebGL context if true. */ initDOM(tag: string, elementId: string, webgl?: boolean | undefined): void; /** * This method resizes each DOM elements in the container and stores the new * dimensions. Then, it renders the graph. * * @param {?number} width The new width of the container. * @param {?number} height The new height of the container. * @return {WebGLRenderer} Returns the instance itself. */ resize(w?: number | undefined, h?: number | undefined): any; /** * This method clears each canvas. * * @return {WebGLRenderer} Returns the instance itself. */ clear(): any; /** * This method kills contexts and other attributes. */ kill(): void; handlers: Keyed; bind(events: string | string[] | Keyed, handler?: Function | undefined): any; unbind(events?: string | string[] | undefined, handler?: Function | undefined): any; dispatchEvent(events: string | string[], data?: any): any; getEvent: (event: string, data?: any) => { type: string; data: any; target: any; }; }; extend(target: any): void; }; export default _default;