Comparing version 3.0.0-beta.19 to 3.0.0-beta.20
@@ -6,3 +6,2 @@ export { NodeProgram, AbstractNodeProgram, createNodeCompoundProgram } from "./node.js"; | ||
export { Program, AbstractProgram } from "./program.js"; | ||
export type { ProgramInfo, ProgramDefinition } from "./program.js"; | ||
export type { EdgeLabelDrawingFunction } from "./edge-labels.js"; | ||
@@ -9,0 +8,0 @@ export { drawStraightEdgeLabel } from "./edge-labels.js"; |
import { Attributes } from "graphology-types"; | ||
import type Sigma from "../sigma.js"; | ||
import type { RenderParams } from "../types.js"; | ||
export interface ProgramInfo<Uniform extends string = string> { | ||
name: string; | ||
isPicking: boolean; | ||
program: WebGLProgram; | ||
gl: WebGLRenderingContext | WebGL2RenderingContext; | ||
frameBuffer: WebGLFramebuffer | null; | ||
buffer: WebGLBuffer; | ||
constantBuffer: WebGLBuffer; | ||
uniformLocations: Record<Uniform, WebGLUniformLocation>; | ||
attributeLocations: Record<string, GLint>; | ||
} | ||
export interface ProgramAttributeSpecification { | ||
name: string; | ||
size: number; | ||
type: number; | ||
normalized?: boolean; | ||
} | ||
export interface ProgramDefinition<Uniform extends string = string> { | ||
VERTICES: number; | ||
VERTEX_SHADER_SOURCE: string; | ||
FRAGMENT_SHADER_SOURCE: string; | ||
UNIFORMS: ReadonlyArray<Uniform>; | ||
ATTRIBUTES: Array<ProgramAttributeSpecification>; | ||
METHOD: GLenum; | ||
} | ||
export interface InstancedProgramDefinition<Uniform extends string = string> extends ProgramDefinition<Uniform> { | ||
CONSTANT_ATTRIBUTES: Array<ProgramAttributeSpecification>; | ||
CONSTANT_DATA: number[][]; | ||
} | ||
import { InstancedProgramDefinition, ProgramAttributeSpecification, ProgramDefinition, ProgramInfo } from "./utils.js"; | ||
export declare abstract class AbstractProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> { | ||
@@ -60,3 +32,3 @@ constructor(_gl: WebGLRenderingContext, _pickGl: WebGLRenderingContext, _renderer: Sigma<N, E, G>); | ||
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, pickingBuffer: WebGLFramebuffer | null, renderer: Sigma<N, E, G>); | ||
abstract kill(): void; | ||
kill(): void; | ||
protected getProgramInfo(name: "normal" | "pick", gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string, frameBuffer: WebGLFramebuffer | null): ProgramInfo; | ||
@@ -63,0 +35,0 @@ protected bindProgram(program: ProgramInfo): void; |
import { Attributes } from "graphology-types"; | ||
import { EdgeDisplayData, NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { EdgeProgram } from "../../edge.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness"]; | ||
@@ -6,0 +6,0 @@ export default class EdgeArrowHeadProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends EdgeProgram<(typeof UNIFORMS)[number], N, E, G> { |
import { Attributes } from "graphology-types"; | ||
import { EdgeDisplayData, NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { EdgeProgram } from "../../edge.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_matrix"]; | ||
@@ -6,0 +6,0 @@ export default class EdgeLineProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends EdgeProgram<(typeof UNIFORMS)[number], N, E, G> { |
import { Attributes } from "graphology-types"; | ||
import { EdgeDisplayData, NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { EdgeProgram } from "../../edge.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness"]; | ||
@@ -6,0 +6,0 @@ export default class EdgeRectangleProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends EdgeProgram<(typeof UNIFORMS)[number], N, E, G> { |
import { Attributes } from "graphology-types"; | ||
import { EdgeDisplayData, NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { EdgeProgram } from "../../edge.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness"]; | ||
@@ -6,0 +6,0 @@ export default class EdgeTriangleProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends EdgeProgram<(typeof UNIFORMS)[number], N, E, G> { |
import { Attributes } from "graphology-types"; | ||
import { NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { NodeProgram } from "../../node.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_sizeRatio", "u_correctionRatio", "u_matrix"]; | ||
@@ -6,0 +6,0 @@ export default class NodeCircleProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends NodeProgram<(typeof UNIFORMS)[number], N, E, G> { |
import { Attributes } from "graphology-types"; | ||
import { NodeDisplayData, RenderParams } from "../../../types.js"; | ||
import { NodeProgram } from "../../node.js"; | ||
import { ProgramInfo } from "../../program.js"; | ||
import { ProgramInfo } from "../../utils.js"; | ||
declare const UNIFORMS: readonly ["u_sizeRatio", "u_pixelRatio", "u_matrix"]; | ||
@@ -6,0 +6,0 @@ export default class NodePointProgram<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends NodeProgram<(typeof UNIFORMS)[number], N, E, G> { |
@@ -0,4 +1,38 @@ | ||
export declare function getAttributeItemsCount(attr: ProgramAttributeSpecification): number; | ||
export declare function getAttributesItemsCount(attrs: ProgramAttributeSpecification[]): number; | ||
export interface ProgramInfo<Uniform extends string = string> { | ||
name: string; | ||
isPicking: boolean; | ||
program: WebGLProgram; | ||
gl: WebGLRenderingContext | WebGL2RenderingContext; | ||
frameBuffer: WebGLFramebuffer | null; | ||
buffer: WebGLBuffer; | ||
constantBuffer: WebGLBuffer; | ||
uniformLocations: Record<Uniform, WebGLUniformLocation>; | ||
attributeLocations: Record<string, GLint>; | ||
vertexShader: WebGLShader; | ||
fragmentShader: WebGLShader; | ||
} | ||
export interface ProgramAttributeSpecification { | ||
name: string; | ||
size: number; | ||
type: number; | ||
normalized?: boolean; | ||
} | ||
export interface ProgramDefinition<Uniform extends string = string> { | ||
VERTICES: number; | ||
VERTEX_SHADER_SOURCE: string; | ||
FRAGMENT_SHADER_SOURCE: string; | ||
UNIFORMS: ReadonlyArray<Uniform>; | ||
ATTRIBUTES: Array<ProgramAttributeSpecification>; | ||
METHOD: GLenum; | ||
} | ||
export interface InstancedProgramDefinition<Uniform extends string = string> extends ProgramDefinition<Uniform> { | ||
CONSTANT_ATTRIBUTES: Array<ProgramAttributeSpecification>; | ||
CONSTANT_DATA: number[][]; | ||
} | ||
export declare function loadVertexShader(gl: WebGLRenderingContext, source: string): WebGLShader; | ||
export declare function loadFragmentShader(gl: WebGLRenderingContext, source: string): WebGLShader; | ||
export declare function loadProgram(gl: WebGLRenderingContext, shaders: Array<WebGLShader>): WebGLProgram; | ||
export declare function killProgram({ gl, buffer, program, vertexShader, fragmentShader }: ProgramInfo): void; | ||
export declare function numberToGLSLFloat(n: number): string; |
@@ -59,2 +59,6 @@ import Graph, { Attributes } from "graphology-types"; | ||
private createCanvasContext; | ||
private registerNodeProgram; | ||
private registerEdgeProgram; | ||
private unregisterNodeProgram; | ||
private unregisterEdgeProgram; | ||
private createWebGLContext; | ||
@@ -61,0 +65,0 @@ private resetWebGLTexture; |
{ | ||
"name": "sigma", | ||
"version": "3.0.0-beta.19", | ||
"version": "3.0.0-beta.20", | ||
"description": "A JavaScript library aimed at visualizing graphs of thousands of nodes and edges.", | ||
@@ -93,3 +93,3 @@ "homepage": "https://www.sigmajs.org", | ||
}, | ||
"gitHead": "23e53736c9a95bd0bc81bdef9644be11e6d630c2" | ||
"gitHead": "d92460da440f1847e93d2786f5b3261352bfc293" | ||
} |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var index = require('../../dist/index-22649381.cjs.dev.js'); | ||
var index = require('../../dist/index-02fdfc6f.cjs.dev.js'); | ||
var inherits = require('../../dist/inherits-4172bb27.cjs.dev.js'); | ||
@@ -297,2 +297,5 @@ var colors = require('../../dist/colors-a4626581.cjs.dev.js'); | ||
exports.drawStraightEdgeLabel = index.drawStraightEdgeLabel; | ||
exports.getAttributeItemsCount = index.getAttributeItemsCount; | ||
exports.getAttributesItemsCount = index.getAttributesItemsCount; | ||
exports.killProgram = index.killProgram; | ||
exports.loadFragmentShader = index.loadFragmentShader; | ||
@@ -299,0 +302,0 @@ exports.loadProgram = index.loadProgram; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var index = require('../../dist/index-3da021c3.cjs.prod.js'); | ||
var index = require('../../dist/index-268476ee.cjs.prod.js'); | ||
var inherits = require('../../dist/inherits-fd41da79.cjs.prod.js'); | ||
@@ -297,2 +297,5 @@ var colors = require('../../dist/colors-d415fc58.cjs.prod.js'); | ||
exports.drawStraightEdgeLabel = index.drawStraightEdgeLabel; | ||
exports.getAttributeItemsCount = index.getAttributeItemsCount; | ||
exports.getAttributesItemsCount = index.getAttributesItemsCount; | ||
exports.killProgram = index.killProgram; | ||
exports.loadFragmentShader = index.loadFragmentShader; | ||
@@ -299,0 +302,0 @@ exports.loadProgram = index.loadProgram; |
@@ -1,3 +0,3 @@ | ||
import { f as NodeProgram, g as EdgeProgram } from '../../dist/index-6bccaf6e.esm.js'; | ||
export { i as AbstractEdgeProgram, A as AbstractNodeProgram, k as AbstractProgram, l as EdgeArrowHeadProgram, E as EdgeArrowProgram, m as EdgeClampedProgram, g as EdgeProgram, e as EdgeRectangleProgram, N as NodeCircleProgram, f as NodeProgram, P as Program, j as createEdgeCompoundProgram, h as createNodeCompoundProgram, c as drawDiscNodeHover, b as drawDiscNodeLabel, d as drawStraightEdgeLabel, o as loadFragmentShader, p as loadProgram, n as loadVertexShader, q as numberToGLSLFloat } from '../../dist/index-6bccaf6e.esm.js'; | ||
import { f as NodeProgram, g as EdgeProgram } from '../../dist/index-2ec8ee70.esm.js'; | ||
export { i as AbstractEdgeProgram, A as AbstractNodeProgram, k as AbstractProgram, l as EdgeArrowHeadProgram, E as EdgeArrowProgram, m as EdgeClampedProgram, g as EdgeProgram, e as EdgeRectangleProgram, N as NodeCircleProgram, f as NodeProgram, P as Program, j as createEdgeCompoundProgram, h as createNodeCompoundProgram, c as drawDiscNodeHover, b as drawDiscNodeLabel, d as drawStraightEdgeLabel, n as getAttributeItemsCount, o as getAttributesItemsCount, s as killProgram, q as loadFragmentShader, r as loadProgram, p as loadVertexShader, t as numberToGLSLFloat } from '../../dist/index-2ec8ee70.esm.js'; | ||
import { _ as _inherits, a as _classCallCheck, b as _callSuper, d as _createClass } from '../../dist/inherits-8fbdedb5.esm.js'; | ||
@@ -4,0 +4,0 @@ import { f as floatColor } from '../../dist/colors-2f6d17f0.esm.js'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var index = require('../../dist/index-22649381.cjs.dev.js'); | ||
var index = require('../../dist/index-02fdfc6f.cjs.dev.js'); | ||
var data = require('../../dist/data-d0a8f6df.cjs.dev.js'); | ||
@@ -8,0 +8,0 @@ require('../../dist/inherits-4172bb27.cjs.dev.js'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var index = require('../../dist/index-3da021c3.cjs.prod.js'); | ||
var index = require('../../dist/index-268476ee.cjs.prod.js'); | ||
var data = require('../../dist/data-7e3d4a4a.cjs.prod.js'); | ||
@@ -8,0 +8,0 @@ require('../../dist/inherits-fd41da79.cjs.prod.js'); |
@@ -1,2 +0,2 @@ | ||
import { d as drawStraightEdgeLabel, b as drawDiscNodeLabel, c as drawDiscNodeHover, N as NodeCircleProgram, E as EdgeArrowProgram, e as EdgeRectangleProgram } from '../../dist/index-6bccaf6e.esm.js'; | ||
import { d as drawStraightEdgeLabel, b as drawDiscNodeLabel, c as drawDiscNodeHover, N as NodeCircleProgram, E as EdgeArrowProgram, e as EdgeRectangleProgram } from '../../dist/index-2ec8ee70.esm.js'; | ||
import { a as assign } from '../../dist/data-31990a76.esm.js'; | ||
@@ -3,0 +3,0 @@ import '../../dist/inherits-8fbdedb5.esm.js'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
864945
19112