Workshop › Pool › Step 24 of 33
A bar under the table shows the power: a dark bar as wide as the table, and over it an orange part as wide as
power / MAX_POWER of it.
```js
// Power bar
ctx.fillStyle = '#334155'
ctx.fillRect(LEFT, 304, RIGHT - LEFT, 14)
ctx.fillStyle = '#f59e0b'
ctx.fillRect(LEFT, 304, ((RIGHT - LEFT) * power) / MAX_POWER, 14)
```440 × power / 16: at power 8 it is half full.In draw, after the ball loop, leave an empty line and write the comment and the four bar lines.
Skills: Drawing on a canvas
← Choose the power A slingshot →