Draw a debug circle in world space * @param {Vector2} pos * @param {number} [size] - diameter * @param {Color|string} [color] * @param {number} [time] * @param {boolean} [fill] * @param {boolean} [screenSpace] * @memberof Debug
(pos, size=0, color=WHITE, time=0, fill=false, screenSpace=false)
| 123 | * @param {boolean} [screenSpace] |
| 124 | * @memberof Debug */ |
| 125 | function debugCircle(pos, size=0, color=WHITE, time=0, fill=false, screenSpace=false) |
| 126 | { |
| 127 | ASSERT(isVector2(pos), 'pos must be a vec2'); |
| 128 | ASSERT(isNumber(size), 'size must be a number'); |
| 129 | ASSERT(isStringLike(color) || isColor(color), 'color is invalid'); |
| 130 | ASSERT(isNumber(time), 'time must be a number'); |
| 131 | |
| 132 | if (isColor(color)) |
| 133 | color = color.toString(); |
| 134 | pos = pos.copy(); |
| 135 | const timer = new Timer(time); |
| 136 | debugPrimitives.push({pos, size, color, timer, angle:0, fill, screenSpace}); |
| 137 | } |
| 138 | |
| 139 | /** Draw a debug point in world space |
| 140 | * @param {Vector2} pos |
no test coverage detected