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.
36 lines
917 B
Markdown
36 lines
917 B
Markdown
1 year ago
|
---
|
||
|
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
|
||
1 year ago
|
- wasm-life-2/vertex.glsl
|
||
|
- wasm-life-2/fragment.glsl
|
||
1 year ago
|
unlisted: true
|
||
1 year ago
|
---
|
||
|
|
||
|
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"
|
||
1 year ago
|
vertexSrc="/wasm-life-2/vertex.glsl"
|
||
|
fragmentSrc="/wasm-life-2/fragment.glsl"
|
||
1 year ago
|
canvas="#game"
|
||
|
/>
|
||
|
|
||
|
|