Construct an Edge by providing the following information.
The first endpoint of the edge
The second endpoint of the edge
Optional
options: {Additional options which describe the edge
Optional
direction?: WallDirectionA direction of effect for the edge
Optional
id?: stringA string used to uniquely identify this edge
Optional
light?: WallSenseTypeHow this edge restricts light
Optional
move?: WallSenseTypeHow this edge restricts movement
Optional
object?: PlaceableObjectA PlaceableObject that is responsible for this edge, if any
Optional
priority?: numberA source priority for this edge. Typically zero unless this edge was contributed by a high-priority source.
Optional
sight?: WallSenseTypeHow this edge restricts sight
Optional
sound?: WallSenseTypeHow this edge restricts sound
Optional
threshold?: WallThresholdDataConfiguration of threshold data for this edge
Optional
type?: EdgeTypeThe type of edge
The first endpoint of the edge.
The second endpoint of the edge.
The rectangular bounds of the edge. Used by the quadtree.
The direction of effect for the edge.
A string used to uniquely identify this edge.
Record other edges which this one intersects with.
How this edge restricts light.
How this edge restricts movement.
The endpoint of the edge which is oriented towards the top-left.
The endpoint of the edge which is oriented towards the bottom-right.
How this edge restricts sight.
How this edge restricts sound.
Specialized threshold data for this edge.
A PolygonVertex instance. Used as part of ClockwiseSweepPolygon computation.
A PolygonVertex instance. Used as part of ClockwiseSweepPolygon computation.
Test whether to apply a proximity threshold to this edge. If the proximity threshold is met, this edge excluded from perception calculations.
Sense type for the source
The origin or position of the source on the canvas
Optional
externalRadius: number = 0The external radius of the source
True if the edge has a threshold greater than 0 for the source type, and the source type is within that distance.
Create a copy of the Edge which can be safely mutated.
Get an intersection point between this Edge and another.
Is this edge limited for a particular type?
Determine the orientation of this Edge with respect to a reference point.
Some reference point, relative to which orientation is determined
An orientation in CONST.WALL_DIRECTIONS which indicates whether the Point is left, right, or collinear (both) with the Edge
Record the intersections between two edges.
Another edge to test and record
Remove intersections of this edge with all other edges.
Static
identifyIdentify intersections between a provided iterable of edges.
An iterable of edges
A data structure used to represent potential edges used by the ClockwiseSweepPolygon. Edges are not polygon-specific, meaning they can be reused across many polygon instances.