Methods
-
inner findPaths(wires, nonRoutableNodes, inconvenientNodes) → {Array}
-
find paths for all the specified wires
Parameters:
Name Type Description wires
Array array of objects with attributes
from
andto
, both of them which are objects with valuesx
andy
containing coordinates of the wire endpointsnonRoutableNodes
Iterable Set or array of non routable nodes
inconvenientNodes
Iterable Set or array of inconvenient nodes
Returns:
Array -array of paths, each item is an array of points of the path the returned array contains paths for the wires with corresponding indexes from the
wires
parameter -
inner onmessage(event)
-
callback when a message is sent to the web worker
Parameters:
Name Type Description event
Object web worker event object (the
data
item of the event object is expected to contain these items:wires
(array),nonRoutableNodes
(iterable) andinconvenientNodes
(iterable))