A directed acyclic graph (DAG). In Verge3D this structure is used to define the hierarchy of node-based materials.
Create a new graph of the size
Graph adjacency list.
Data attached to graph nodes.
Add a new node to the graph and attach .nodeInfo data to it.
Remove all nodes and edges from the graph.
Add an edge to the graph.
Add a new edge to the graph which connects nodes
Remove an edge from the graph which connects nodes
Return an edge which connects nodes
null if no such edge is found.
Return node adjacent to node
Return node info data for node
Return the index of the node which has the passed .nodeInfo data.
Return a new graph which has all edges reversed. The source graph remains intact.
Return graph length.
Return input edges for node
Return output edges for node
v from the graph. If
removeNode=false (default) leave the disconnected node inside the graph. If
removeNode=true remove the node (with its data) as well.
G subgraph into the graph. The
edgesOutG arrays represent input and output edges which will be used to connect the subgraph. Optional callbacks
copyEdgeCb are executed per node/edge inserted to the graph.
Convert the graph to the DOT (Graphviz) format and print to the browser console. Optional
labelCallback is used to assign labels for the printed graph nodes. It accepts node index and node info as parameters.
For more info on how to obtain the source code of this module see this page.