API Docs for: 0.2.0
Show:

Polygon Class

Module: LE

The Polygon class is used to render polygonss to the scene. Shadows can be cast off a Polygon, they are cast based on the vertices

Constructor

Polygon

(
  • [parameters]
)

Parameters:

  • [parameters] Object optional

    Parameters is an object that contains the PointLights properties

    • [x=0] Number optional

      X position

    • [y=0] Number optional

      Y position

    • [rotation=0] Number optional

      Rotation

    • [vertices=LE.Vertices.regularPolygon(50, 3)] Object optional

      Vertices

    • [colour=new LE.Colour(255, 255, 255, 255)] Colour optional

      Colour, default is white

Item Index

Properties

centerPoint

Object private

Default: LE.Utilities.centerOfVerts(this.vertices)

colour

LE.Colour

Default: new LE.Colour(255, 255, 255, 255)

rotation

Number

Default: 0

vertices

Object private

Default: LE.Vertices.regularPolygon(50, 3)

x

Number

Default: 0

y

Number

Default: 0