Home Reference Source
import GlPatch from './ui/glpatch/glpatch.js'
public class | source

GlPatch

Extends:

Events → GlPatch

rendering the patchfield

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set
public

blueprint: boolean

public
public
public

cacheOIRxa: number

public

cacheOIRxb: number

public

cacheOIRya: number

public

cacheOIRyb: number

public

cutLineActive: boolean

public

debugData: {}

public get
public

frameCount: number

public

greyOut: boolean

public
public

isAnimated: boolean

public get
public get
public
public

links: {}

public
public get

name: string

public

needsRedraw: boolean

public
public set
public get
public
public

paused: boolean

public
public get
public get
public

snap: *

public get
public
public get
public
public get

time: *

public

viewBox: *

public
public
Private Members
private
private
private

_canvasMouseDown: boolean

private
private

_cgl: *

private
private

_cursor: *

private

_cutLine: *[]

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

_fpsStartTime: number

private
private

_glOpz: {}

private
private
private
private
private
private

_hoverOps: *[]

private
private

_lastButton: number

private
private
private

_lines: *

private
private

_log: *

private
private
private
private
private
private
private
private
private
private
private

_pressedCtrlKey: boolean

private

_pressedShiftKey: boolean

private
private
private
private
private
private

_showingOpCursor: boolean

private

_spacePressed: boolean

private

_splineDrawers: {"0": *}

private
private
private
private
private
private
private
private
private

_time: number

private
private
private

_viewZoom: number

Method Summary

Public Methods
public

addLink(l: *)

public

addOp(op: *, fromDeserialize: *)

public

center(x: *, y: *)

public

copy(e: *)

public

cursorNavOps(x: *, y: *)

public

cut(e: *)

public

deleteLink(linkId: *)

public

deleteOp(opid: *)

public
public

focus()

public

focusOp(opid: *)

public

focusOpAnim(opid: *)

public

getConnectedGlPorts(opid: *, portname: *): *

public
public

getGlOp(op: *): *

public
public
public

getOp(opid: *): *

public

getOpBounds(ops: *): *

public

getSplineDrawer(subpatchId: *): *

public

getZoomForAllOps(): number

public

isDraggingOps(): boolean

public
public

isFocused(): *

public
public

mouseMove(x: *, y: *)

public

paste(e: *)

public

pause()

public
public

render(resX: *, resY: *)

public

reset()

public

restoreSubPatchViewBox(sub: *, next: *)

public

resume()

public
public

screenToPatchCoord(x: *, y: *): *

public

selectOpId(id: *)

public

serialize(dataUi: *)

public

setCurrentSubPatch(sub: *, next: *)

public

setCursor(c: *)

public

setDrawableColorByType(e: *, t: *, diff: *)

public

setHoverLink(e: *, link: *)

public

setProject(proj: *)

public
public

setSize(x: *, y: *, w: *, h: *)

public

showOpCursor(show: *)

public
public
public

subPatchOpAnimStart(bounds: *, next: *)

public
public

unSelectOpId(id: *)

public
public
public
public
public
public
public

zIndex(): *

public

zoomStep(s: *)

Private Methods
private
private
private

_getGlOpsInRect(xa: *, ya: *, xb: *, yb: *): *

private
private
private
private
private
private
private

_onKeyDelete(e: *)

private
private

_selectOpsInRect(xa: *, ya: *, xb: *, yb: *)

private
private

Inherited Summary

From class Events
public

off: *

public

on: *

private
private
private

_log: *

private

_logEvents: boolean

private

_logName: string

public

addEventListener(which: *, cb: *, idPrefix: string): string

add event listener

public

emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *)

emit event

public

hasEventListener(id: *, cb: *): boolean

check event listener registration

public

hasListenerForEventName(eventName: *): boolean

check event listener by name

public

logEvents(enabled: boolean, logName: string)

enable/disable logging of events for the class

public

removeEventListener(id: *, cb: *)

rempve event listener registration

Public Constructors

public constructor() source

Override:

Events#constructor

Public Members

public get allowDragging: * source

public set allowDragging source

public blueprint: boolean source

public cablesHoverText: * source

public cacheOIRops: * source

public cacheOIRxa: number source

public cacheOIRxb: number source

public cacheOIRya: number source

public cacheOIRyb: number source

public cutLineActive: boolean source

public debugData: {} source

public get dragLine: * source

public frameCount: number source

public greyOut: boolean source

public hasFocus: * source

public isAnimated: boolean source

public get isAreaSelecting: * source

public get lineDrawer: * source

public linkStartedDragging: boolean source

public mouseState: * source

public get name: string source

public needsRedraw: boolean source

public opShakeDetector: * source

public set patchAPI source

public get patchAPI: * source

public pauseTimeOut: * source

public paused: boolean source

public profileMouseEvents: * source

public get rectDrawer: * source

public get selectedGlOps: * source

public snap: * source

public get spacePressed: * source

public startLinkButtonDrag: * source

public get subPatch: * source

public subpatchAreaSpline: * source

public get time: * source

public viewBox: * source

public vizFlowMode: * source

public vizLayer: * source

Private Members

private _cachedFirstSelectedOp: * source

private _cachedNumSelectedOps: number source

private _canvasMouseDown: boolean source

private _canvasMouseDownSelecting: * source

private _cgl: * source

private _currentSubpatch: number source

private _cursor: * source

private _cutLine: *[] source

private _cutLineIdx: * source

private _debugRenderStyle: * source

private _dropInCircleRect: * source

private _dropInOpBorder: * source

private _eleDropOp: * source

private _fadeOutRect: * source

private _fadeOutRectAnim: * source

private _focusRect: * source

private _focusRectAnim: * source

private _focusRectOp: * source

private _fpsStartTime: number source

private _glCursors: {} source

private _glOpz: {} source

private _glSelectionAreas: {} source

private _greyOutRect: * source

private _hoverDragOp: * source

private _hoverOpLongStartTime: number source

private _hoverOps: *[] source

private _ignoreNonExistError: *[] source

private _lastButton: number source

private _lastMouseX: * source

private _lastMouseY: * source

private _lines: * source

private _localGlCursor: * source

private _log: * source

Override:

Events#_log

private _mouseLeaveButtons: number source

private _numSelOpsTimeout: * source

private _numSelectedGlOps: * source

private _oldMouseMoveX: * source

private _oldMouseMoveY: * source

private _overLayRects: * source

private _overlaySplines: * source

private _patchAPI: * source

private _pauseMouseUntilButtonUp: boolean source

private _portDragLine: * source

private _pressedCtrlKey: boolean source

private _pressedShiftKey: boolean source

private _rectInstancer: * source

private _redrawFlash: * source

private _selectedGlOps: {} source

private _selectionArea: * source

private _showRedrawFlash: number source

private _showingOpCursor: boolean source

private _spacePressed: boolean source

private _splineDrawers: {"0": *} source

private _subpatchAnimFade: * source

private _subpatchAnimOutH: * source

private _subpatchAnimOutW: * source

private _subpatchAnimOutX: * source

private _subpatchAnimOutY: * source

private _subpatchoprect: * source

private _textWriter: * source

private _textWriterOverlay: * source

private _time: number source

private _timeStart: * source

private _ttTImeout: * source

private _viewZoom: number source

Public Methods

Params:

NameTypeAttributeDescription
l *

public addOp(op: *, fromDeserialize: *) source

Params:

NameTypeAttributeDescription
op *
fromDeserialize *

public center(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

public copy(e: *) source

Params:

NameTypeAttributeDescription
e *

public cursorNavOps(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

public cut(e: *) source

Params:

NameTypeAttributeDescription
e *

Params:

NameTypeAttributeDescription
linkId *

public deleteOp(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public dispose() source

public focus() source

public focusOp(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public focusOpAnim(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public getConnectedGlPorts(opid: *, portname: *): * source

Params:

NameTypeAttributeDescription
opid *
portname *

Return:

*

public getCurrentSubPatch(): * source

Return:

*

public getGlOp(op: *): * source

Params:

NameTypeAttributeDescription
op *

Return:

*

public getNumSelectedOps(): * source

Return:

*

public getOnlySelectedOp(): * source

Return:

*

public getOp(opid: *): * source

Params:

NameTypeAttributeDescription
opid *

Return:

*

public getOpBounds(ops: *): * source

Params:

NameTypeAttributeDescription
ops *

Return:

*

public getSplineDrawer(subpatchId: *): * source

Params:

NameTypeAttributeDescription
subpatchId *

Return:

*

public getZoomForAllOps(): number source

Return:

number

public isDraggingOps(): boolean source

Return:

boolean

public isDraggingPort(): * source

Return:

*

public isFocused(): * source

Return:

*

public isMouseOverOp(): * source

Return:

*

public mouseMove(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

public paste(e: *) source

Params:

NameTypeAttributeDescription
e *

public pause() source

public pauseInteraction() source

public render(resX: *, resY: *) source

Params:

NameTypeAttributeDescription
resX *
resY *

public reset() source

public restoreSubPatchViewBox(sub: *, next: *) source

Params:

NameTypeAttributeDescription
sub *
next *

public resume() source

public resumeInteraction() source

public screenToPatchCoord(x: *, y: *): * source

Params:

NameTypeAttributeDescription
x *
y *

Return:

*

public selectOpId(id: *) source

Params:

NameTypeAttributeDescription
id *

public serialize(dataUi: *) source

Params:

NameTypeAttributeDescription
dataUi *

public setCurrentSubPatch(sub: *, next: *) source

Params:

NameTypeAttributeDescription
sub *
next *

public setCursor(c: *) source

Params:

NameTypeAttributeDescription
c *

public setDrawableColorByType(e: *, t: *, diff: *) source

Params:

NameTypeAttributeDescription
e *
t *
diff *

Params:

NameTypeAttributeDescription
e *
link *

public setProject(proj: *) source

Params:

NameTypeAttributeDescription
proj *

public setSelectedOpById(id: *) source

Params:

NameTypeAttributeDescription
id *

public setSize(x: *, y: *, w: *, h: *) source

Params:

NameTypeAttributeDescription
x *
y *
w *
h *

public showOpCursor(show: *) source

Params:

NameTypeAttributeDescription
show *

public storeSubPatchViewBox() source

public subPatchOpAnimEnd(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public subPatchOpAnimStart(bounds: *, next: *) source

Params:

NameTypeAttributeDescription
bounds *
next *

public toggleOpsEnable() source

public unSelectOpId(id: *) source

Params:

NameTypeAttributeDescription
id *

public unselectAll() source

public updateCursor() source

public updateSubPatchOpAnim() source

public updateTheme() source

public updateTime() source

public updateVizFlowMode() source

public zIndex(): * source

Return:

*

public zoomStep(s: *) source

Params:

NameTypeAttributeDescription
s *

Private Methods

private _cycleDebug() source

private _drawCursor() source

private _getGlOpsInRect(xa: *, ya: *, xb: *, yb: *): * source

Params:

NameTypeAttributeDescription
xa *
ya *
xb *
yb *

Return:

*

private _onCanvasDblClick(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onCanvasMouseDown(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onCanvasMouseEnter(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onCanvasMouseLeave(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onCanvasMouseMove(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onCanvasMouseUp(e: *) source

Params:

NameTypeAttributeDescription
e *

private _onKeyDelete(e: *) source

Params:

NameTypeAttributeDescription
e *

private _removeDropInRect() source

private _selectOpsInRect(xa: *, ya: *, xb: *, yb: *) source

Params:

NameTypeAttributeDescription
xa *
ya *
xb *
yb *

private _updateGreyout() source

private _updateNumberOfSelectedOps() source