Home Reference Source
import GlSplineDrawer from './ui/gldraw/glsplinedrawer.js'
public class | source

GlSplineDrawer

draw splines, e.g. cables on the patchfield

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

name: *

public set
Private Members
private

_arrEdges: *[]

private

_cgl: *

private

_colors: *

private
private
private

_count: *

private

_doDraw: *

private

_geom: *

private
private

_mesh: *

private

_points: *

private
private
private
private
private

_rebuildLater: boolean

private

_rebuildReason: string

private

_shader: *

private

_speeds: *

private
private
private
private

_splines: *[]

private

_thePoints: *[]

private
private
private
private
private
private
private
private
private
private
private
private

_verts: *

Method Summary

Public Methods
public
public

deleteSpline(idx: *)

public
public

hideSpline(idx: *)

public

ip(a: *, b: *, p: *): *

public
public

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

public
public

setSpline(idx: *, points: *)

public

setSplineColor(idx: *, rgba: *)

public

setSplineColorBorder(idx: *, rgba: *)

public

setSplineColorInactive(idx: *, rgba: *)

public

setSplineSpeed(idx: *, speed: *)

public

setWidth(w: *)

public

showSpline(idx: *)

public

tessEdges(oldArr: *): *

Private Methods
private

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

private

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

private

_updateAttribsCoordinates(idx: *, updateWhat: *)

private

Public Constructors

public constructor() source

Public Members

public name: * source

public set zPos source

Private Members

private _arrEdges: *[] source

private _cgl: * source

private _colors: * source

private _colorsBorder: * source

private _colorsInactive: * source

private _count: * source

private _doDraw: * source

private _geom: * source

private _laterTimeout: * source

private _mesh: * source

private _points: * source

private _points2: * source

private _points3: * source

private _pointsProgress: * source

private _pointsSplineLength: * source

private _rebuildLater: boolean source

private _rebuildReason: string source

private _shader: * source

private _speeds: * source

private _splineColors: *[] source

private _splineHidden: *[] source

private _splineIndex: * source

private _splines: *[] source

private _thePoints: *[] source

private _uniFadeoutOptions: * source

private _uniMousePos: * source

private _uniResX: * source

private _uniResY: * source

private _uniTime: * source

private _uniWidth: * source

private _uniWidthSelected: * source

private _uniZoom: * source

private _uniZpos: * source

private _uniscrollX: * source

private _uniscrollY: * source

private _verts: * source

Public Methods

public buildMesh() source

public deleteSpline(idx: *) source

Params:

NameTypeAttributeDescription
idx *

public getSplineIndex(): * source

Return:

*

public hideSpline(idx: *) source

Params:

NameTypeAttributeDescription
idx *

public ip(a: *, b: *, p: *): * source

Params:

NameTypeAttributeDescription
a *
b *
p *

Return:

*

public rebuild() source

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

Params:

NameTypeAttributeDescription
resX *
resY *
scrollX *
scrollY *
zoom *
mouseX *
mouseY *

public setDebugRenderer(i: *) source

Params:

NameTypeAttributeDescription
i *

public setSpline(idx: *, points: *) source

Params:

NameTypeAttributeDescription
idx *
points *

public setSplineColor(idx: *, rgba: *) source

Params:

NameTypeAttributeDescription
idx *
rgba *

public setSplineColorBorder(idx: *, rgba: *) source

Params:

NameTypeAttributeDescription
idx *
rgba *

public setSplineColorInactive(idx: *, rgba: *) source

Params:

NameTypeAttributeDescription
idx *
rgba *

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

Params:

NameTypeAttributeDescription
idx *
speed *

public setWidth(w: *) source

Params:

NameTypeAttributeDescription
w *

public showSpline(idx: *) source

Params:

NameTypeAttributeDescription
idx *

public tessEdges(oldArr: *): * source

Params:

NameTypeAttributeDescription
oldArr *

Return:

*

Private Methods

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

Params:

NameTypeAttributeDescription
x1 *
y1 *
x2 *
y2 *

Return:

*

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

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

private _updateAttribsCoordinates(idx: *, updateWhat: *) source

Params:

NameTypeAttributeDescription
idx *
updateWhat *

private _updateAttribsSpeed(idx: *) source

Params:

NameTypeAttributeDescription
idx *