Circle
Circle
Kind: global class
- Circle
- new Circle([x], [y], [r])
- .x :
Number
- .y :
Number
- .r :
Number
- .readPosition(target)
- .move(deltaX, deltaY)
- .overlaps(other) ⇒
boolean
- .equals(other) ⇒
boolean
- .set(x, y, r)
- .copy(other)
- .clone() ⇒
Circle
new Circle([x], [y], [r])
A circle or a 2-dimensional sphere. Represented as a position (x,y) and radius (r)
Param | Type | Default | Description |
---|---|---|---|
[x] | Number | 0 | |
[y] | Number | 0 | |
[r] | Number | 0 | radius |
circle.x : Number
Position along X axis
Kind: instance property of Circle
circle.y : Number
Position along Y axis
Kind: instance property of Circle
circle.r : Number
Radius
Kind: instance property of Circle
circle.readPosition(target)
Kind: instance method of Circle
Param | Type |
---|---|
target | Vector2 |
circle.move(deltaX, deltaY)
Kind: instance method of Circle
Param | Type |
---|---|
deltaX | Number |
deltaY | Number |
circle.overlaps(other) ⇒ boolean
Kind: instance method of Circle
Param | Type |
---|---|
other | Circle |
circle.equals(other) ⇒ boolean
Kind: instance method of Circle
Param | Type |
---|---|
other | Circle |
circle.set(x, y, r)
Kind: instance method of Circle
Param | Type |
---|---|
x | number |
y | number |
r | number |
circle.copy(other)
Kind: instance method of Circle
Param | Type |
---|---|
other | Circle |
circle.clone() ⇒ Circle
Kind: instance method of Circle