Workshop › Lunar Lander › Step 30 of 31
Each piece is drawn as a small orange square, and the wrecked lander itself is no longer drawn.
```js
if (state !== 'crashed') drawLander()
ctx.fillStyle = '#fb923c'
for (const d of debris) ctx.fillRect(d.x - 1.5, d.y - 1.5, 3, 3)
```- 1.5 is half its size).In draw, replace drawLander() with the three lines.
Skills: Drawing on a canvas
← Pieces fall and fade Build it yourself: wind →