Draw added detail layers on top of some obstacles and sometimes the player
Measurements for details such as sizes, thicknesses etc are given as a proportion of the item radius.
- This allows the layers to scale with the different-sized items
- A value of
1
is equal to the item radius _target
params will either be obstacles or the player
- License
- GPL-3.0-only
- Source
Methods
(static) drawBowler(_x, _y, _target, _data)
- Source
Bowler-style hat
Parameters
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
|||||||||||||||
_y |
number | Y coordinate of the item centre |
|||||||||||||||
_target |
object | The item to draw on top of |
|||||||||||||||
_data |
object |
|
(static) drawDot(_x, _y, _target, _data)
- Source
Simple dot/circle
Parameters
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
|||||||||
_y |
number | Y coordinate of the item centre |
|||||||||
_target |
object | The item to draw on top of |
|||||||||
_data |
object |
|
(static) drawEyes(_x, _y, _target, _data)
- Source
Eyes for a character
Parameters
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
|||||||||||||||
_y |
number | Y coordinate of the item centre |
|||||||||||||||
_target |
object | The item to draw on top of |
|||||||||||||||
_data |
object |
|
(static) drawHelicopterTailPropeller(_x, _y, _target, _data)
- Source
Rotating top-down propeller
Parameters
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
||||||||||||
_y |
number | Y coordinate of the item centre |
||||||||||||
_target |
object | The item to draw on top of |
||||||||||||
_data |
object |
|
(static) drawMouth(_x, _y, _target, _data)
- Source
Mouth for character
Parameters
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
|||||||||
_y |
number | Y coordinate of the item centre |
|||||||||
_target |
object | The item to draw on top of
|
|||||||||
_data |
object |
|
(static) drawSpokes(_x, _y, _target, _data)
- Source
Spokes eg for bicycle wheels
Parameters
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
||||||||||||
_y |
number | Y coordinate of the item centre |
||||||||||||
_target |
object | The item to draw on top of |
||||||||||||
_data |
object |
|
(static) drawStem(_x, _y, _target, _data)
- Source
Stem for leaves
Parameters
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
||||||||||||||||||
_y |
number | Y coordinate of the item centre |
||||||||||||||||||
_target |
object | The item to draw on top of |
||||||||||||||||||
_data |
object |
|
(static) drawStetson(_x, _y, _target, _data)
- Source
Stetson-style hat
Parameters
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
|||||||||||||||
_y |
number | Y coordinate of the item centre |
|||||||||||||||
_target |
object | The item to draw on top of |
|||||||||||||||
_data |
object |
|
(static) drawTriangles(_x, _y, _target, _data)
- Source
Stylised cracks effect based on several random overlapping triangles
Parameters
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_x |
number | X coordinate of the item centre |
||||||||||||
_y |
number | Y coordinate of the item centre |
||||||||||||
_target |
object | The item to draw on top of |
||||||||||||
_data |
object |
|