Skip to content

Commit

Permalink
Update block-maker.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnole25 authored Apr 12, 2024
1 parent b1648b9 commit 5855e19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block-maker.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ <h1>Block Maker</h1>
let c = document.getElementById("myCanvas");
let ctx = c.getContext("2d");
let base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
shade = 17;
setInterval(function() {
ctx.clearRect(0, 0, c.width, c.height);
ctx.fillStyle = "#ddd";
Expand All @@ -30,12 +31,14 @@ <h1>Block Maker</h1>
if (!(colour === 64)) {
ctx.fillStyle = "rgb(" + r + ", " + g + ", " + b + ")";
ctx.fillRect(16 + x, 16 + y, 80, 80);
ctx.fillStyle = "rgb(" + (r - shade) + ", " + (g - shade) + ", " + (b + shade) + ")";
ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(16 + x, 16 + y);
ctx.lineTo(16 + x, 96 + y);
ctx.lineTo(x, 80 + y);
ctx.fill();
ctx.fillStyle = "rgb(" + (r + shade) + ", " + (g + shade) + ", " + (b + shade) + ")";
ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(80 + x, y);
Expand Down

0 comments on commit 5855e19

Please sign in to comment.