mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Add demo links to README
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user