Add demo links to README

This commit is contained in:
dcodeIO
2018-04-19 17:49:44 +02:00
parent 485c3fd9b2
commit 7d3fb86691
3 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<title>Mandelbrot Set - AssemblyScript</title>
<style>
html, body { height: 100%; margin: 0; overflow: hidden; color: #111; background: #fff; font-family: sans-serif; }
h1 { padding: 20px; font-size: 12pt; }
h1 { padding: 20px; font-size: 12pt; margin: 0; }
a { color: #111; text-decoration: none; }
a:hover { color: #0074C1; text-decoration: underline; }
canvas { position: absolute; top: 60px; left: 20px; width: calc(100% - 40px); height: calc(100% - 80px); background: #eee; }
@ -54,6 +54,9 @@ fetch("build/optimized.wasm")
for (let x = 0; x < width; ++x) argb[yx + x] = colors[mem[yx + x]];
}
ctx.putImageData(imageData, 0, 0);
}).catch(err => {
alert("Failed to load WASM: " + err.message + " (ad blocker, maybe?)");
throw err;
});
// Compute a nice set of colors using a gradient