Home Reference Source
import GraphNode from 'videocontext/src/graphnode.js'
public class | source

GraphNode

Direct Subclass:

ProcessingNode, SourceNode

Constructor Summary

Public Constructor
public

Base class from which all processing and source nodes are derrived.

Member Summary

Public Members
public get

Get whether the node has been destroyed or not.

public get

displayName: *: *

Get a string representation of the class name.

public get

Get the names of the inputs to this node.

public get

Get an array of all the nodes which connect to this node.

public get

The maximum number of connections that can be made to this node.

public get

Get an array of all the nodes which this node outputs to.

Private Members
private
private
private

_gl: *

private
private
private
private

Method Summary

Public Methods
public

connect(targetNode: GraphNode, targetPort: number | String): *

Connect this node to the targetNode

public

Destory this node, removing it from the graph.

public

disconnect(targetNode: GraphNode): *

Disconnect this node from the targetNode.

Public Constructors

public constructor() source

Base class from which all processing and source nodes are derrived.

Public Members

public get destroyed: boolean: * source

Get whether the node has been destroyed or not.

Return:

boolean

A true/false value of whather the node has been destoryed or not.

public get displayName: *: * source

Get a string representation of the class name.

Return:

*

String A string of the class name.

public get inputNames: String[]: * source

Get the names of the inputs to this node.

Return:

String[]

An array of the names of the inputs ot the node.

public get inputs: GraphNode[]: * source

Get an array of all the nodes which connect to this node.

Return:

GraphNode[]

An array of nodes which connect to this node.

public get maximumConnections: number: * source

The maximum number of connections that can be made to this node. If there is not limit this will return Infinity.

Return:

number

The number of connections which can be made to this node.

public get outputs: GraphNode[]: * source

Get an array of all the nodes which this node outputs to.

Return:

GraphNode[]

An array of nodes which this node connects to.

Private Members

private _destroyed: boolean source

private _displayName: string source

private _gl: * source

private _inputNames: * source

private _limitConnections: * source

private _renderGraph: * source

private _rendered: boolean source

Public Methods

public connect(targetNode: GraphNode, targetPort: number | String): * source

Connect this node to the targetNode

Params:

NameTypeAttributeDescription
targetNode GraphNode

the node to connect.

targetPort number | String
  • optional

the port on the targetNode to connect to, this can be an index, a string identifier, or undefined (in which case the next available port will be connected to).

Return:

*

public destroy() source

Destory this node, removing it from the graph.

public disconnect(targetNode: GraphNode): * source

Disconnect this node from the targetNode. If targetNode is undefind remove all out-bound connections.

Params:

NameTypeAttributeDescription
targetNode GraphNode
  • optional

the node to disconnect from. If undefined, disconnect from all nodes.

Return:

*