diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-10-29 16:09:56 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-10-29 16:09:56 +0530 |
| commit | b6ebba87606d180735994d62e2d71c3fbf0b8763 (patch) | |
| tree | 3aa0ff77d8d3c569be285e911e9ed44f10777b50 /sketches/week-1/index.html | |
| parent | 95eae658a4845f86e1b6b2c16387a41dd36f9d42 (diff) | |
| download | creative-coding-playground-b6ebba87606d180735994d62e2d71c3fbf0b8763.tar.gz creative-coding-playground-b6ebba87606d180735994d62e2d71c3fbf0b8763.zip | |
feat: week 1 sort-of done? but not really
Diffstat (limited to 'sketches/week-1/index.html')
| -rw-r--r-- | sketches/week-1/index.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sketches/week-1/index.html b/sketches/week-1/index.html new file mode 100644 index 0000000..7c59b0e --- /dev/null +++ b/sketches/week-1/index.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Gen bqn.js</title> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <style> + pre#debug { + word-wrap: break-word; + white-space: pre-wrap; + overflow: auto; + background-color: #0f0c19; + color: #fff; + padding: 1rem; + } + canvas { + border: 1px solid #000; + } + </style> + </head> + <body> + <script src="./bqn.js"></script> + <script> + const debugNode = () => { + const $debug = document.getElementById('debug') ?? document.createElement('pre') + $debug.parentNode || document.body.appendChild($debug) + $debug.id = 'debug' + return $debug + } + const debug = (value) => { + console.log(fmt(value)) + const $dbg = debugNode() + $dbg.innerText = `${$dbg.innerText || '> start'}\n> ${fmt(value)}` + } + </script> + <script src="./script.js"></script> + </body> +</html> |
