mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-24 22:52:13 +00:00
Add demo links to README
This commit is contained in:
parent
485c3fd9b2
commit
7d3fb86691
@ -12,10 +12,10 @@ See [the AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/w
|
||||
Examples
|
||||
--------
|
||||
|
||||
* **[Conway's Game of Life](./examples/game-of-life)**<br />
|
||||
Continuously updates the cellular automaton and visualizes its state on a canvas. There's also [this WebAssembly Studio fiddle](https://webassembly.studio/?f=gvuw4enb3qk) of it.
|
||||
* **[Conway's Game of Life](./examples/game-of-life)** [ [demo](https://rawgit.com/AssemblyScript/assemblyscript/master/examples/game-of-life/index.html) | [fiddle](https://webassembly.studio/?f=gvuw4enb3qk) ]<br />
|
||||
Continuously updates the cellular automaton and visualizes its state on a canvas.
|
||||
|
||||
* **[Mandelbrot Set](./examples/mandelbrot)**<br />
|
||||
* **[Mandelbrot Set](./examples/mandelbrot)** [ [demo](https://rawgit.com/AssemblyScript/assemblyscript/master/examples/mandelbrot/index.html) ]<br />
|
||||
Renders the Mandelbrot set to a canvas.
|
||||
|
||||
* **[i64 polyfill](./examples/i64-polyfill)**<br />
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Conway's Game Of Life - 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: #851ba7; text-decoration: underline; }
|
||||
canvas { position: absolute; top: 60px; left: 20px; width: calc(100% - 40px); height: calc(100% - 80px); background: #eee; }
|
||||
@ -83,6 +83,7 @@ fetch("build/optimized.wasm")
|
||||
})();
|
||||
|
||||
}).catch(err => {
|
||||
alert("Failed to load WASM: " + err.message + " (ad blocker, maybe?)");
|
||||
throw err;
|
||||
});
|
||||
</script>
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user