Draw a circle filled with a radial gradient from the center to the rim * - Best when batched with other untextured polys * - If drawing mostly textured sprites, bake the gradient into a texture and use drawTile instead * - Stacking gradients at the exact same position may show a faint vertical
(pos, size=1, colorInner=WHITE, colorOuter=CLEAR_WHITE, useWebGL=glEnable, screenSpace=false, context)
| 827 | * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} [context] |
| 828 | * @memberof Draw */ |
| 829 | function drawCircleGradient(pos, size=1, colorInner=WHITE, colorOuter=CLEAR_WHITE, useWebGL=glEnable, screenSpace=false, context) |
| 830 | { |
| 831 | ASSERT(isNumber(size), 'size must be a number'); |
| 832 | drawEllipseGradient(pos, vec2(size), colorInner, colorOuter, 0, useWebGL, screenSpace, context); |
| 833 | } |
| 834 | |
| 835 | /** |
| 836 | * @callback Canvas2DDrawFunction - A function that draws to a 2D canvas context |
no test coverage detected