shaku
Version:
A simple and effective JavaScript game development framework that knows its place!
79 lines (53 loc) • 2.25 kB
Markdown

[Back To Table of Content](index.md)
# Point
<a name="PointShape"></a>
## PointShape
Collision point class.
**Kind**: global class
* [PointShape](#PointShape)
* [new PointShape(position)](#new_PointShape_new)
* [.shapeId](#PointShape+shapeId)
* [.setPosition(position)](#PointShape+setPosition)
* [.getPosition()](#PointShape+getPosition) ⇒ <code>Vector2</code>
* [.getCenter()](#PointShape+getCenter)
* [._getRadius()](#PointShape+_getRadius)
* [._getBoundingBox()](#PointShape+_getBoundingBox)
* [.debugDraw(opacity)](#PointShape+debugDraw)
<a name="new_PointShape_new"></a>
### new PointShape(position)
Create the collision shape.
| Param | Type | Description |
| --- | --- | --- |
| position | <code>Vector2</code> | Point position. |
<a name="PointShape+shapeId"></a>
### pointShape.shapeId
**Kind**: instance property of [<code>PointShape</code>](#PointShape)
<a name="PointShape+setPosition"></a>
### pointShape.setPosition(position)
Set this collision shape from vector2.
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
| Param | Type | Description |
| --- | --- | --- |
| position | <code>Vector2</code> | Point position. |
<a name="PointShape+getPosition"></a>
### pointShape.getPosition() ⇒ <code>Vector2</code>
Get point position.
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
**Returns**: <code>Vector2</code> - Point position.
<a name="PointShape+getCenter"></a>
### pointShape.getCenter()
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
<a name="PointShape+_getRadius"></a>
### pointShape.\_getRadius()
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
<a name="PointShape+_getBoundingBox"></a>
### pointShape.\_getBoundingBox()
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
<a name="PointShape+debugDraw"></a>
### pointShape.debugDraw(opacity)
Debug draw this shape.
**Kind**: instance method of [<code>PointShape</code>](#PointShape)
| Param | Type | Description |
| --- | --- | --- |
| opacity | <code>Number</code> | Shape opacity factor. |