Constructor
new EdgeTrace(width, bounds)
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
width |
number | The maximum width of your entity, used as padding around obstacles |
|
bounds |
Rectangle |
null
|
optional outer bounds, this is useful if rectangles touch a wall |
Methods
calc(start, end) → {Array.<{x: Number, y:Number}>}
- Source:
calculate a path
Parameters:
Name | Type | Description |
---|---|---|
start |
Object | |
end |
Object |
Returns:
- Type
- Array.<{x: Number, y:Number}>
updateNodes(rects)
- Source:
save the rectangle corners as nodes
Parameters:
Name | Type | Description |
---|---|---|
rects |
Array.<Rectangle> |