Skip to content

Instantly share code, notes, and snippets.

View tmsanchez's full-sized avatar

Tito Sanchez tmsanchez

View GitHub Profile
@tmsanchez
tmsanchez / Drawtext.html
Created November 20, 2020 20:43
Draw a text in random coordinates on a Canvas
<!DOCTYPE html>
<html>
<head>
<script>
function drawWords() {
const ctx = document.getElementById('drawArea').getContext('2d');
ctx.font = '12px serif';
const x = Math.floor(Math.random() * 300);