GlPatch
Extends:
Renders the patchfield.
Static Member Summary
| Static Public Members | ||
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
EVENT_PAUSED: * |
|
| public static |
EVENT_RESIZE: * |
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
|
|
| public static |
linkStartedDragging: boolean |
|
| public static |
paused: boolean |
|
| public static |
|
|
| Static Private Members | ||
| private static |
_canvasMouseDown: boolean |
|
| private static |
_canvasMouseDownSelecting: boolean |
|
| private static |
|
|
| private static |
_pauseMouseUntilButtonUp: boolean |
|
| private static |
|
|
Static Method Summary
| Static Public Methods | ||
| public static |
getOpNamespaceColor(ns: string): * |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(cgl: CglContext) |
|
Member Summary
| Public Members | ||
| public |
|
|
| public get |
|
|
| public set |
|
|
| public |
blueprint: * |
|
| public |
|
|
| public |
cacheOIRops: * |
|
| public |
cacheOIRxa: * |
|
| public |
cacheOIRxb: * |
|
| public |
cacheOIRya: * |
|
| public |
cacheOIRyb: * |
|
| public get |
cgl: * |
|
| public |
|
|
| public |
debugData: * |
|
| public get |
dragLine: * |
|
| public |
frameCount: * |
|
| public |
greyOut: * |
|
| public |
hasFocus: * |
|
| public |
hoverPort: * |
|
| public |
|
|
| public |
isAnimated: * |
|
| public get |
|
|
| public get |
lastMouseX: * |
|
| public get |
lastMouseY: * |
|
| public get |
lineDrawer: * |
|
| public |
|
|
| public |
mouseState: * |
|
| public get |
name: string |
|
| public |
needsRedraw: * |
|
| public |
|
|
| public set |
|
|
| public get |
patchAPI: * |
|
| public |
pauseTimeOut: * |
|
| public |
paused: * |
|
| public |
portDragLine: * |
|
| public |
|
|
| public get |
rectDrawer: * |
|
| public get |
|
|
| public |
snap: * |
|
| public get |
spacePressed: * |
|
| public get |
|
|
| public |
|
|
| public get |
subPatch: * |
|
| public |
|
|
| public get |
textWriter: * |
|
| public get |
time: * |
|
| public |
viewBox: * |
|
| public |
vizFlowMode: * |
|
| public |
vizLayer: * |
|
| public |
wasFocussed: * |
|
| Private Members | ||
| private |
|
|
| private |
|
|
| private |
_canvasMouseDown: boolean |
|
| private |
|
|
| private |
_currentSubpatch: string |
|
| private |
_cursor: * |
|
| private |
_cutLine: number[] |
|
| private |
_cutLineIdx: * |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
_eleDropOp: * |
|
| private |
_fadeOutRect: * |
|
| private |
|
|
| private |
_focusRect: * |
|
| private |
|
|
| private |
_focusRectOp: * |
|
| private |
|
|
| private |
_glCursors: {} |
|
| private |
|
|
| private |
|
|
| private |
_greyOutRect: * |
|
| private |
_hoverDragOp: * |
|
| private |
|
|
| private |
_hoverOps: string | any[] |
|
| private |
_ignoreNonExistError: string[] |
|
| private |
_lastButton: number |
|
| private get |
_lastMouseX: * |
|
| private get |
_lastMouseY: * |
|
| private |
|
|
| private |
_log: * |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
_pauseMouseUntilButtonUp: boolean |
|
| private |
_pressedCtrlKey: boolean |
|
| private |
_pressedShiftKey: boolean |
|
| private |
_selectedGlOps: Object<string, GlOp> |
|
| private |
|
|
| private |
_spacePressed: boolean |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
_time: * |
|
| private |
_timeStart: * |
|
| private |
_ttTImeout: * |
|
| private |
_viewZoom: * |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
lines: * |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
selectionUndoIds: string[] |
|
| private |
|
|
| private |
|
|
| private |
|
|
Method Summary
| Public Methods | ||
| public |
|
|
| public |
|
|
| public |
center(x: number, y: number) |
|
| public |
copy(e: ClipboardEvent) |
|
| public |
cursorNavOps(_x: boolean, _y: boolean) |
|
| public |
cut(e: ClipboardEvent) |
|
| public |
deleteLink(linkId: string ) |
|
| public |
deleteOp(opid: string) |
|
| public |
dispose() |
|
| public |
focus() |
|
| public |
focusOp(opid: string) |
|
| public |
focusOpAnim(opid: string) |
|
| public |
getConnectedGlPorts(opid: string, portname: string): * |
|
| public |
getCurrentSubPatch(): * |
|
| public |
|
|
| public |
getNumSelectedOps(): * |
|
| public |
getOnlySelectedOp(): * |
|
| public |
getOp(opid: string): * |
|
| public |
getOpBounds(ops: Op[]): * |
|
| public |
getSplineDrawer(subpatchId: string | number): GlSplineDrawer |
|
| public |
getZoomForAllOps(): number |
|
| public |
gotoOp(opid: string, options: import("../components/patchview.js").GotoOpOptions) |
|
| public |
isDraggingOps(): boolean |
|
| public |
isDraggingPort(): * |
|
| public |
isFocused(): * |
|
| public |
isMouseOverOp(): * |
|
| public |
mouseMove(x: number, y: number, e: MouseEvent) |
|
| public |
paste(e: ClipboardEvent) |
|
| public |
pause() |
|
| public |
|
|
| public |
render(resX: number, resY: number) |
|
| public |
reset() |
|
| public |
restoreSubPatchViewBox(sub: string | number, next: Function) |
|
| public |
resume() |
|
| public |
|
|
| public |
screenToPatchCoord(x: number, y: number): * |
|
| public |
selectOpId(id: String) |
|
| public |
|
|
| public |
serialize(dataUi: import("cables-shared-client").SerializedPatchUi) |
|
| public |
setCurrentSubPatch(sub: string, next: function) |
|
| public |
setHoverLink(e: MouseEvent, link: GlLink) |
|
| public |
setProject(proj: import("cables-shared-client").SerializedPatch) |
|
| public |
setSelectedOpById(id: String) |
|
| public |
setSize(_x: number, _y: number, _w: number, _h: number) |
|
| public |
showOpCursor(show: boolean) |
|
| public |
|
|
| public |
subPatchOpAnimEnd(opid: string | number) |
|
| public |
subPatchOpAnimEndBounds(bounds: BoundingBox) |
|
| public |
subPatchOpAnimStart(bounds: BoundingBox, next: Function) |
|
| public |
|
|
| public |
unSelectOpId(id: String) |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
zoomStep(s: number) |
|
| Private Methods | ||
| private |
|
|
| private |
|
|
| private |
_getGlOpsInRect(xa: number, ya: number, xb: number, yb: number): * |
|
| private |
_onCanvasMouseDown(e: PointerEvent) |
|
| private |
_onCanvasMouseEnter(e: PointerEvent) |
|
| private |
_onCanvasMouseLeave(e: PointerEvent) |
|
| private |
_onCanvasMouseMove(e: MouseEvent) |
|
| private |
_onKeyDelete(e: KeyboardEvent) |
|
| private |
|
|
| private |
_selectOpsInRect(xa: number, ya: number, xb: number, yb: number) |
|
| private |
|
|
| private |
|
|
| private |
onCanvasDblClick(e: MouseEvent) |
|
| private |
onCanvasMouseUp(e: PointerEvent) |
|
| private |
|
|
| private |
restoreSelection(ids: string[]) |
|
| private |
subPatchOpAnimEndRect(x: number, y: number, w: number, h: number) |
|
Static Public Members
public static : * source
public static EVENT_META_SCROLL: * source
public static EVENT_MOUSE_DOWN: * source
public static EVENT_MOUSE_DOWN_OVER_PORT: * source
public static EVENT_MOUSE_DRAG_LINK: * source
public static EVENT_MOUSE_ENTER: * source
public static EVENT_MOUSE_LEAVE: * source
public static EVENT_MOUSE_META_SCROLL: * source
public static EVENT_MOUSE_MOVE: * source
public static EVENT_MOUSE_UP: * source
public static EVENT_MOUSE_UP_OVER_OP: * source
public static EVENT_MOUSE_UP_OVER_PORT: * source
public static EVENT_PAUSED: * source
public static EVENT_RESIZE: * source
public static EVENT_RESUMED: * source
public static EVENT_SELECTED_OPS_CHANGED: * source
public static EVENT_SPACE_DOWN: * source
public static EVENT_SPACE_UP: * source
public static USERPREF_GLPATCH_CABLE_WIDTH: * source
public static linkStartedDragging: boolean source
public static paused: boolean source
public static startLinkButtonDrag: * source
Static Private Members
private static _canvasMouseDown: boolean source
private static _canvasMouseDownSelecting: boolean source
private static _dropInCircleLink: * source
private static _pauseMouseUntilButtonUp: boolean source
private static _subpatchoprect: * source
Static Public Methods
public static getOpNamespaceColor(ns: string): * source
Params:
| Name | Type | Attribute | Description |
| ns | string |
Return:
| * |
Public Constructors
public constructor(cgl: CglContext) source
Params:
| Name | Type | Attribute | Description |
| cgl | CglContext |
Public Members
public : * source
public get allowDragging: * source
public set allowDragging source
public blueprint: * source
public cablesHoverText: * source
public cacheOIRops: * source
public cacheOIRxa: * source
public cacheOIRxb: * source
public cacheOIRya: * source
public cacheOIRyb: * source
public get cgl: * source
public cutLineActive: * source
public debugData: * source
public get dragLine: * source
public frameCount: * source
public greyOut: * source
public hasFocus: * source
public hoverPort: * source
public hoveringResize: * source
public isAnimated: * source
public get isAreaSelecting: * source
public get lastMouseX: * source
public get lastMouseY: * source
public get lineDrawer: * source
public mouseState: * source
public get name: string source
public needsRedraw: * source
public opShakeDetector: * source
public set patchAPI source
public get patchAPI: * source
public pauseTimeOut: * source
public paused: * source
public portDragLine: * source
public profileMouseEvents: * source
public get rectDrawer: * source
public get selectedGlOps: * source
public snap: * source
public get spacePressed: * source
public get splineDrawers: * source
public startLinkButtonDrag: * source
public get subPatch: * source
public suggestionTeaser: * source
public get textWriter: * source
public get time: * source
public viewBox: * source
public vizFlowMode: * source
public vizLayer: * source
public wasFocussed: * source
Private Members
private _cablesHoverButtonRect: * source
private _cachedFirstSelectedOp: * source
private _canvasMouseDown: boolean source
private _canvasMouseDownSelecting: * source
private _currentSubpatch: string source
private _cursor: * source
private _cutLine: number[] source
private _cutLineIdx: * source
private _debugRenderStyle: * source
private _dropInCircleLink: * source
private _dropInCircleRect: * source
private _eleDropOp: * source
private _fadeOutRect: * source
private _fadeOutRectAnim: * source
private _focusRect: * source
private _focusRectAnim: * source
private _focusRectOp: * source
private _fpsStartTime: * source
private _glCursors: {} source
private _glSelectionAreas: {} source
private _greyOutRect: * source
private _hoverDragOp: * source
private _hoverOpLongStartTime: * source
private _hoverOps: string | any[] source
private _ignoreNonExistError: string[] source
private _lastButton: number source
private get _lastMouseX: * source
private get _lastMouseY: * source
private _localGlCursor: * source
private _log: * source
private _mouseLeaveButtons: * source
private _oldMouseMoveX: * source
private _oldMouseMoveY: * source
private _overLayRects: * source
private _patchAPI: GlPatchAPI source
private _pauseMouseUntilButtonUp: boolean source
private _pressedCtrlKey: boolean source
private _pressedShiftKey: boolean source
private _showingOpCursor: * source
private _spacePressed: boolean source
private _subpatchAnimFade: * source
private _subpatchAnimOutH: * source
private _subpatchAnimOutW: * source
private _subpatchAnimOutX: * source
private _subpatchAnimOutY: * source
private _subpatchoprect: * source
private _textWriterOverlay: * source
private _time: * source
private _timeStart: * source
private _ttTImeout: * source
private _viewZoom: * source
private cachedNumSelectedOps: * source
private dropInOpBorder: * source
private lines: * source
private numSelOpsTimeout: * source
private numSelectedGlOps: * source
private overlaySplines: * source
private rectInstancer: GlRectInstancer source
private selectionArea: * source
private selectionUndoIds: string[] source
private selectionUndoIndex: * source
private selectionUndoLength: * source
private selectionUndoTimeout: * source
Public Methods
public addOp(op: UiOp, fromDeserialize: boolean) source
Params:
| Name | Type | Attribute | Description |
| op | UiOp | ||
| fromDeserialize | boolean |
public center(x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number |
public copy(e: ClipboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent |
public cursorNavOps(_x: boolean, _y: boolean) source
Params:
| Name | Type | Attribute | Description |
| _x | boolean | ||
| _y | boolean |
public cut(e: ClipboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent |
public deleteLink(linkId: string ) source
Params:
| Name | Type | Attribute | Description |
| linkId | string |
public deleteOp(opid: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string |
public dispose() source
public focus() source
public focusOp(opid: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string |
public focusOpAnim(opid: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string |
public getConnectedGlPorts(opid: string, portname: string): * source
Params:
| Name | Type | Attribute | Description |
| opid | string | ||
| portname | string |
Return:
| * |
public getSplineDrawer(subpatchId: string | number): GlSplineDrawer source
Params:
| Name | Type | Attribute | Description |
| subpatchId | string | number |
public gotoOp(opid: string, options: import("../components/patchview.js").GotoOpOptions) source
Params:
| Name | Type | Attribute | Description |
| opid | string | ||
| options | import("../components/patchview.js").GotoOpOptions |
public mouseMove(x: number, y: number, e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| e | MouseEvent |
|
public paste(e: ClipboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent |
public pause() source
public pauseInteraction() source
public render(resX: number, resY: number) source
Params:
| Name | Type | Attribute | Description |
| resX | number | ||
| resY | number |
public reset() source
public restoreSubPatchViewBox(sub: string | number, next: Function) source
Params:
| Name | Type | Attribute | Description |
| sub | string | number | ||
| next | Function |
|
public resume() source
public resumeInteraction() source
public screenToPatchCoord(x: number, y: number): * source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number |
Return:
| * |
public selectOpId(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public selectionChanged() source
public serialize(dataUi: import("cables-shared-client").SerializedPatchUi) source
Params:
| Name | Type | Attribute | Description |
| dataUi | import("cables-shared-client").SerializedPatchUi |
public setCurrentSubPatch(sub: string, next: function) source
Params:
| Name | Type | Attribute | Description |
| sub | string | ||
| next | function |
|
public setHoverLink(e: MouseEvent, link: GlLink) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent | ||
| link | GlLink |
public setProject(proj: import("cables-shared-client").SerializedPatch) source
Params:
| Name | Type | Attribute | Description |
| proj | import("cables-shared-client").SerializedPatch |
public setSelectedOpById(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public setSize(_x: number, _y: number, _w: number, _h: number) source
Params:
| Name | Type | Attribute | Description |
| _x | number | ||
| _y | number | ||
| _w | number | ||
| _h | number |
public showOpCursor(show: boolean) source
Params:
| Name | Type | Attribute | Description |
| show | boolean |
public storeSubPatchViewBox() source
public subPatchOpAnimEnd(opid: string | number) source
Params:
| Name | Type | Attribute | Description |
| opid | string | number |
public subPatchOpAnimEndBounds(bounds: BoundingBox) source
Params:
| Name | Type | Attribute | Description |
| bounds | BoundingBox |
public subPatchOpAnimStart(bounds: BoundingBox, next: Function) source
Params:
| Name | Type | Attribute | Description |
| bounds | BoundingBox | ||
| next | Function |
public toggleOpsEnable() source
public unSelectOpId(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public unselectAll() source
public updateCableWidth() source
public updateCursor() source
public updateSubPatchOpAnim() source
public updateTheme() source
public updateTime() source
public updateVizFlowMode() source
public zoomStep(s: number) source
Params:
| Name | Type | Attribute | Description |
| s | number |
Private Methods
private _cycleDebug() source
private _drawCursor() source
private _getGlOpsInRect(xa: number, ya: number, xb: number, yb: number): * source
Params:
| Name | Type | Attribute | Description |
| xa | number | ||
| ya | number | ||
| xb | number | ||
| yb | number |
Return:
| * |
private _onCanvasMouseDown(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private _onCanvasMouseEnter(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private _onCanvasMouseLeave(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private _onCanvasMouseMove(e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent |
private _onKeyDelete(e: KeyboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | KeyboardEvent |
private _removeDropInRect() source
private _selectOpsInRect(xa: number, ya: number, xb: number, yb: number) source
Params:
| Name | Type | Attribute | Description |
| xa | number | ||
| ya | number | ||
| xb | number | ||
| yb | number |
private _updateGreyout() source
private _updateNumberOfSelectedOps() source
private onCanvasDblClick(e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent |
private onCanvasMouseUp(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private recordSelectionUndo() source
private restoreSelection(ids: string[]) source
Params:
| Name | Type | Attribute | Description |
| ids | string[] |
private subPatchOpAnimEndRect(x: number, y: number, w: number, h: number) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| w | number | ||
| h | number |