This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div class="relative"> | |
<canvas width="500" height="500" id="canvas"></canvas> | |
<button id="blue-button">Blue</button> | |
<button id="red-button">Red</button> | |
<input type="range" id="pen-width" min="1" max="10" value="5" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<canvas width="500" height="500" id="canvas"></canvas> | |
<script> | |
// Read here: https://harrisonmilbradt.com/articles/canvas-panning-and-zooming | |
const canvas = document.getElementById('canvas') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: | |
let person = { | |
name: "Harrison", | |
age: 200, | |
address: { | |
street: "12345 Street", | |
zip: "abcde" | |
}, |