Untitled
unknown
plain_text
2 years ago
621 B
11
Indexable
html
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-canvas/3.1.0/html5-canvas.min.js"></script>
<script>
const canvas = document.getElementById(“canvas”);
const ctx = canvas.getContext(“2d”);
const numBoxes = 10;
const boxWidth = 30;
const boxHeight = 30;
const boxSpacing = 20;
const symbolSize = 20;
function getRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function drawGrid() {
ctx.fillStyle = “rgba(128, 128, 128, 0.5)”;
ctx.fillRect(0, 0, canvas.width, canvasEditor is loading...
Leave a Comment