Polygon Class
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 optionalParameters is an object that contains the PointLights properties
-
[x=0]
Number optionalX position
-
[y=0]
Number optionalY position
-
[rotation=0]
Number optionalRotation
-
[vertices=LE.Vertices.regularPolygon(50, 3)]
Object optionalVertices
-
[colour=new LE.Colour(255, 255, 255, 255)]
Colour optionalColour, default is white
-
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