Home Reference Source
import GlLinedrawer from './ui/gldraw/gllinedrawer.js'
public class | source

GlLinedrawer

draw lines on the patchfield

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private

_colors: *

private

_counter: number

private

_dists: *

private

_geom: *

private

_mesh: *

private

_name: *

private

_needsUpload: boolean

private

_num: *

private
private

_shader: *

private

_speeds: *

private
private
private
private
private
private
private

Method Summary

Public Methods
public

clear()

public
public

getIndex(): *

public
public

render(resX: *, resY: *, scrollX: *, scrollY: *, zoom: *)

public

setColor(idx: *, r: *, g: *, b: *, a: *)

public
public

setLine(idx: *, x: *, y: *, x2: *, y2: *)

public

setSpeed(idx: *, speed: *)

Private Methods
private

_distance(x1: *, y1: *, x2: *, y2: *): *

private

_float32Diff(a: *, b: *): *

private

Public Constructors

public constructor() source

Private Members

private _colors: * source

private _counter: number source

private _dists: * source

private _geom: * source

private _mesh: * source

private _name: * source

private _needsUpload: boolean source

private _num: * source

private _positions: * source

private _shader: * source

private _speeds: * source

private _startTime: * source

private _uniResX: * source

private _uniResY: * source

private _uniTime: * source

private _uniZoom: * source

private _uniscrollX: * source

private _uniscrollY: * source

Public Methods

public clear() source

public dispose() source

public getIndex(): * source

Return:

*

public rebuild() source

public render(resX: *, resY: *, scrollX: *, scrollY: *, zoom: *) source

Params:

NameTypeAttributeDescription
resX *
resY *
scrollX *
scrollY *
zoom *

public setColor(idx: *, r: *, g: *, b: *, a: *) source

Params:

NameTypeAttributeDescription
idx *
r *
g *
b *
a *

public setDebugRenderer(i: *) source

Params:

NameTypeAttributeDescription
i *

public setLine(idx: *, x: *, y: *, x2: *, y2: *) source

Params:

NameTypeAttributeDescription
idx *
x *
y *
x2 *
y2 *

public setSpeed(idx: *, speed: *) source

Params:

NameTypeAttributeDescription
idx *
speed *

Private Methods

private _distance(x1: *, y1: *, x2: *, y2: *): * source

Params:

NameTypeAttributeDescription
x1 *
y1 *
x2 *
y2 *

Return:

*

private _float32Diff(a: *, b: *): * source

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

private _setupAttribBuffers() source