SourcePolygon

SourcePolygon

An extension of the base PIXI.Polygon class designed for polygons which are constructed as a radius around some central origin.

Constructor

new SourcePolygon()

Extends

  • PIXI.Polygon

Methods

clone()

contains(x, y) → {boolean}

See:
  • PIXI.Polygon#contains

Optimize Polygon membership test by first checking the hypotenuse of the candidate point against the known origin

Parameters:
Name Type Description
x number

The candidate x-coordinate

y number

The candidate y-coordinate

Returns:

Is the provided point contained within the SourcePolygon?

Type
boolean