-
<private> _initProps(properties) → {Node}
-
Initialize Node properties
Parameters:
Name |
Type |
Description |
properties |
Object
|
Options passed in from the constructor |
- Source:
Returns:
The Node the method was called on
-
Type
-
Node
-
addTo(graph) → {Node}
-
Add the Node to a Graph
Parameters:
Name |
Type |
Description |
graph |
Graph
|
Graph the Node will be added to |
- Source:
Returns:
The Node the method was called on
-
Type
-
Node
-
getColor() → {String}
-
Get the color of the Node
- Source:
Returns:
String hexadecimal representation of the Edge's color
-
Type
-
String
-
getId() → {String|Number|null}
-
Get the ID of the Node
- Source:
Returns:
ID of the Node
-
Type
-
String
|
Number
|
null
-
getPos() → {Array}
-
Get the position of the Node
- Source:
Returns:
Array of three Numbers representing the position of the Node in 3D space (x, y, z)
-
Type
-
Array
Example
var x = 14, y = 20, z = -5;
myNode.getPos([x, y, z]);
-
setColor(color)
-
Set the color of the Node
Parameters:
Name |
Type |
Description |
color |
Number
|
String
|
Hexadecimal or CSS-style string representation of a color |
- Source:
Returns:
The Node the method was called
-
setPos(pos) → {Node}
-
Set the position of the Node
Parameters:
Name |
Type |
Description |
pos |
Array
|
Array of three Numbers representing the position of the Node in 3D space (x, y, z) |
- Source:
Returns:
The Node the method was called on
-
Type
-
Node
Example
var x = 14, y = 20, z = -5;
myNode.setPos([x, y, z]);