CircleShape

cp. CircleShape

new CircleShape(body, radius, offset)

Source:
Parameters:
Name Type Description
body cp.Body
radius number
offset cp.Vect

Extends

Members

(static, constant) CircleShape#collisionCode :number

Source:
Type:
  • number

(static, constant) CircleShape#collisionTable :Array.<function()>

Source:
Type:
  • Array.<function()>

Methods

active() → {boolean}

Source:
Inherited From:
Returns:
Type
boolean

cacheBB()

Source:
Inherited From:
Returns:

cacheData(p, rot)

Source:
Parameters:
Name Type Description
p cp.Vect
rot cp.Vect

getBB() → {cp.BB}

Source:
Inherited From:
Returns:
Type
cp.BB

getBody() → {cp.Body}

Source:
Inherited From:
Returns:
Type
cp.Body

nearestPointQuery(p) → {NearestPointQueryInfo}

Source:
Parameters:
Name Type Description
p cp.Vect
Returns:
Type
NearestPointQueryInfo

pointQuery(p) → {NearestPointQueryInfo}

Source:
Inherited From:
Parameters:
Name Type Description
p cp.Vect
Returns:
Type
NearestPointQueryInfo

segmentQuery(a, b) → {SegmentQueryInfo}

Source:
Parameters:
Name Type Description
a cp.Vect
b cp.Vect
Returns:
Type
SegmentQueryInfo

setBody(body)

Source:
Inherited From:
Parameters:
Name Type Description
body cp.Body

setCollisionType(collision_type)

Source:
Inherited From:
Parameters:
Name Type Description
collision_type number

setElasticity(e)

Source:
Inherited From:
Parameters:
Name Type Description
e number How bouncy this shape is.

setFriction(u)

Source:
Inherited From:
Parameters:
Name Type Description
u number How much friction this shape has.

setLayers(layers)

Source:
Inherited From:
Parameters:
Name Type Description
layers number

setSensor(sensor)

Source:
Inherited From:
Parameters:
Name Type Description
sensor boolean

update(pos, rot)

Source:
Inherited From:
Parameters:
Name Type Description
pos cp.Vect
rot cp.Vect