the circle-rect collision object
- Source
Methods
(static) collide(circle, rectangle, sizeopt) → {boolean}
returns whether a circle and a rectangle are colliding
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
circle | Object | |||
rectangle | Object | |||
size | number | <optional> | circle.size | size of the circle for collisions |
- Source
Returns:
- Type:
- boolean
(static) physics(circle, rectangle, sizeopt) → {Object}
returns the resolution position of a circle when in collision with a rectangle
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
circle | Object | |||
rectangle | Object | |||
size | number | <optional> | circle.size | size of the circle for collisions |
- Source
Returns:
- Type:
- Object