<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
</head> | |
<body> | |
<pre id='code'><code></code></pre> | |
<script type="module"> | |
let c = document.getElementById('code'); | |
import SVA from "/build/sva.js"; | |
let assembly = SVA.assemble("OpCapability Shader"); | |
if (typeof assembly === "string") { | |
c.innerText = assembly; | |
} else { | |
c.innerText = Array.from(assembly) | |
.map(b => b.toString(16).padStart(8, "0")).join(" "); | |
} | |
</script> | |
</body> | |
</html> |