shaku
Version:
A simple and effective JavaScript game development framework that knows its place!
64 lines (43 loc) • 1.95 kB
Markdown

[Back To Table of Content](index.md)
# Rectangle
<a name="RectangleShape"></a>
## RectangleShape
Collision rectangle class.
**Kind**: global class
* [RectangleShape](#RectangleShape)
* [new RectangleShape(rectangle)](#new_RectangleShape_new)
* [.shapeId](#RectangleShape+shapeId)
* [.setShape(rectangle)](#RectangleShape+setShape)
* [._getRadius()](#RectangleShape+_getRadius)
* [._getBoundingBox()](#RectangleShape+_getBoundingBox)
* [.getCenter()](#RectangleShape+getCenter)
* [.debugDraw()](#RectangleShape+debugDraw)
<a name="new_RectangleShape_new"></a>
### new RectangleShape(rectangle)
Create the collision shape.
| Param | Type | Description |
| --- | --- | --- |
| rectangle | <code>Rectangle</code> | the rectangle shape. |
<a name="RectangleShape+shapeId"></a>
### rectangleShape.shapeId
**Kind**: instance property of [<code>RectangleShape</code>](#RectangleShape)
<a name="RectangleShape+setShape"></a>
### rectangleShape.setShape(rectangle)
Set this collision shape from rectangle.
**Kind**: instance method of [<code>RectangleShape</code>](#RectangleShape)
| Param | Type | Description |
| --- | --- | --- |
| rectangle | <code>Rectangle</code> | Rectangle shape. |
<a name="RectangleShape+_getRadius"></a>
### rectangleShape.\_getRadius()
**Kind**: instance method of [<code>RectangleShape</code>](#RectangleShape)
<a name="RectangleShape+_getBoundingBox"></a>
### rectangleShape.\_getBoundingBox()
**Kind**: instance method of [<code>RectangleShape</code>](#RectangleShape)
<a name="RectangleShape+getCenter"></a>
### rectangleShape.getCenter()
**Kind**: instance method of [<code>RectangleShape</code>](#RectangleShape)
<a name="RectangleShape+debugDraw"></a>
### rectangleShape.debugDraw()
**Kind**: instance method of [<code>RectangleShape</code>](#RectangleShape)