Constructor Summary
Public Constructor | ||
public |
constructor(tag: *, duration: *, points: *) |
Method Summary
Public Methods | ||
public |
clone(): misc.Polygon Clone a polygon |
|
public |
|
|
public |
|
|
public |
|
|
public |
rotate(originPoint: *, angleDegrees: *): * Rotate all points of polygon around an origin point |
|
public |
rotateAroundZero(angleDegrees: *): misc.Polygon Optimized algorithm for polygon rotation around coordinate beginning |
|
public |
translate(translatePoint: *): * Translate all points of polygon |
Public Constructors
public constructor(tag: *, duration: *, points: *) source
Params:
Name | Type | Attribute | Description |
tag | * | {String} - Additional information about polygon to describe it |
|
duration | * | {Number} - Polygon will be destroyed after given number of milliseconds |
|
points | * | {Array<misc.Point>} - Array of points which can describe an polygon |
Public Methods
public rotate(originPoint: *, angleDegrees: *): * source
Rotate all points of polygon around an origin point
Params:
Name | Type | Attribute | Description |
originPoint | * | {misc.Point} Center point of rotation |
|
angleDegrees | * | {Number} Required angle of rotation |
Return:
* |
public rotateAroundZero(angleDegrees: *): misc.Polygon source
Optimized algorithm for polygon rotation around coordinate beginning
Params:
Name | Type | Attribute | Description |
angleDegrees | * | {Number} |
Return:
misc.Polygon |
public translate(translatePoint: *): * source
Translate all points of polygon
Params:
Name | Type | Attribute | Description |
translatePoint | * | {misc.Point} Point which represents x and y value of translation |
Return:
* |