Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Methods

  • toClipperPoints([options]?: { scalingFactor: number }): { X: number; Y: number }[]
  • Convert a PIXI.Polygon into an array of clipper points [{X,Y}, ...]. Note that clipper points must be rounded to integers. In order to preserve some amount of floating point precision, an optional scaling factor may be provided.

    Parameters

    • [options]: { scalingFactor: number } = {}

      Options which affect how clipper points are generated

      • scalingFactor: number

    Returns { X: number; Y: number }[]

    } An array of points to be used by clipper

  • intersectPolygon(other: Polygon, [options]?: { clipType: number; scalingFactor: number }): Polygon
  • Intersect this PIXI.Polygon with another PIXI.Polygon using the clipper library.

    Parameters

    • other: Polygon

      Another PIXI.Polygon

    • [options]: { clipType: number; scalingFactor: number } = {}

      Options which configure how the intersection is computed

      • clipType: number
      • scalingFactor: number

    Returns Polygon

    The intersected polygon or null if no solution was present

  • intersectCircle(circle: Circle, options: { density: number }): Polygon
  • Intersect this PIXI.Polygon with a PIXI.Circle. For now, convert the circle to a Polygon approximation and use intersectPolygon. In the future we may replace this with more specialized logic which uses the line-circle intersection formula.

    Parameters

    • circle: Circle

      A PIXI.Circle

    • options: { density: number }
      • density: number

    Returns Polygon

    The intersected polygon

  • Intersect this PIXI.Polygon with a PIXI.Rectangle. For now, convert the rectangle to a Polygon and use intersectPolygon. In the future we may replace this with more specialized logic which uses the line-line intersection formula.

    Parameters

    • rect: Rectangle

      A PIXI.Rectangle

    • options: any

    Returns Polygon

    The intersected polygon

Properties

isClosed: boolean

Accessors

isClosed