BoxLayouter
Functions
-
evaluateEdgeCost(edge) ⇒
number -
computeBoundingBox(boxes) ⇒
AABB2
Computes a bounding box for a group of AABB2s
-
evaluateLayout(boxes, edges) ⇒
number -
evaluateBoxPositionCost(box) ⇒
number -
trySwapBoxes(box0, box1, costFunction) ⇒
boolean -
applyNodeSwapPass(boxes) ⇒
number -
applyNodeSwaps(boxes, allowedSteps) ⇒
number - applyPull(edges, strength)
- centerAABB2CollectionOn(boxes, center)
- forceLayout(input, graph, [center])
evaluateEdgeCost(edge) ⇒ number
Kind: global function
| Param | Type |
|---|---|
| edge | Connection |
computeBoundingBox(boxes) ⇒ AABB2
Computes a bounding box for a group of AABB2s
Kind: global function
| Param | Type |
|---|---|
| boxes | Array.<AABB2> |
evaluateLayout(boxes, edges) ⇒ number
Kind: global function
| Param | Type |
|---|---|
| boxes | Array.<AABB2> |
| edges | Array.<Connection> |
evaluateBoxPositionCost(box) ⇒ number
Kind: global function
| Param | Type |
|---|---|
| box | AABB2 |
trySwapBoxes(box0, box1, costFunction) ⇒ boolean
Kind: global function
| Param | Type |
|---|---|
| box0 | AABB2 |
| box1 | AABB2 |
| costFunction | function |
applyNodeSwapPass(boxes) ⇒ number
Kind: global function
| Param | Type |
|---|---|
| boxes | Array.<AABB2> |
applyNodeSwaps(boxes, allowedSteps) ⇒ number
Kind: global function
| Param | Type |
|---|---|
| boxes | Array.<AABB2> |
| allowedSteps | number |
applyPull(edges, strength)
Kind: global function
| Param | Type |
|---|---|
| edges | Array.<Connection> |
| strength | number |
centerAABB2CollectionOn(boxes, center)
Kind: global function
| Param | Type |
|---|---|
| boxes | Array.<AABB2> |
| center | Vector2 |
forceLayout(input, graph, [center])
Kind: global function
| Param | Type | Default |
|---|---|---|
| input | Array.<AABB2> | |
| graph | Graph | |
| [center] | Vector2 | |