You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ashen-earth/posts/2023-08-25_wasm-game-of-lif...

36 lines
917 B
Markdown

---
title: "Pure Wasm Life 2: Optimizing Webassembly and Canvas"
subtitle: You know I couldn't leave it alone
resources:
- wasm-life-2/controller.js
- wasm-life-2/game.wat
- wasm-life-2/vertex.glsl
- wasm-life-2/fragment.glsl
unlisted: true
---
This post is part 2 of my Webassembly Game of Life series, read part 1
[here](/wasm-game-of-life-1).
<noscript>[If you enable Javascript, you'll see a game board here]</noscript>
<canvas
id="game"
width="800"
height="600"
data-pixelsize="1"
style="width:100%; aspect-ratio: 4/3; image-rendering: pixelated;"
/>
<p style="display: flex; align-items: flex-start; margin-top: 4px; height: 64px">
<span style="flex: 1" id="frameTimes"/>
<button id="reset">Reset</button>
</p>
<ScriptLoader
src="/wasm-life-2/controller.js"
wasm="/wasm-life-2/game.wat"
vertexSrc="/wasm-life-2/vertex.glsl"
fragmentSrc="/wasm-life-2/fragment.glsl"
canvas="#game"
/>