Shaku

Shaku JS

Back To Table of Content

Point

PointShape

Collision point class.

Kind: global class

new PointShape(position)

Create the collision shape.

Param Type Description
position Vector2 Point position.

pointShape.shapeId

Kind: instance property of PointShape

pointShape.setPosition(position)

Set this collision shape from vector2.

Kind: instance method of PointShape

Param Type Description
position Vector2 Point position.

pointShape.getPosition() ⇒ Vector2

Get point position.

Kind: instance method of PointShape
Returns: Vector2 - Point position.

pointShape.getCenter()

Kind: instance method of PointShape

pointShape._getRadius()

Kind: instance method of PointShape

pointShape._getBoundingBox()

Kind: instance method of PointShape

pointShape.debugDraw(opacity)

Debug draw this shape.

Kind: instance method of PointShape

Param Type Description
opacity Number Shape opacity factor.