Constructor
new PhraseNetTextMapper(graphWidth, graphHeight)
Parameters:
Name | Type | Description |
---|---|---|
graphWidth |
number | The display with of the phrase-net |
graphHeight |
number | The display height of the phrase-net |
- Source:
Requires:
- module:d3,
Requires
- module:d3,
Methods
applyMetric(metric)
applies the given metric on the phrase-net
Parameters:
Name | Type | Description |
---|---|---|
metric |
object | The metric to set the graph elements' visual properties |
- Source:
Requires:
- module:d3,
clearPhraseNet()
clears the phrase net
- Source:
Requires:
- module:d3,
createPhraseNet(nodes, links, method, metric)
creates a phrase-net for the given node- and link-sets using the specified force-method and metric
Parameters:
Name | Type | Description |
---|---|---|
nodes |
arry | An array of nodes |
links |
arry | An array of links |
method |
string | The used force method (d3 or cola) |
metric |
object | The initial metric to set the graph elements' visual properties |
- Source:
Requires:
- module:d3,
intersect(pos, vec, BBox)
Determines the intersection-point of a given vector at a given position with a given bounding box
Parameters:
Name | Type | Description |
---|---|---|
pos |
array | A position |
vec |
array | A direction vector |
BBox |
object | A bounding box |
- Source:
Returns:
the intersection point
tick()
updates the phrase-net's elements
- Source:
Requires:
- module:d3,