index.html 493 B

1234567891011121314151617181920212223
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8'>
  5. </head>
  6. <body>
  7. <pre id='code'><code></code></pre>
  8. <script type="module">
  9. let c = document.getElementById('code');
  10. import SVA from "/build/sva.js";
  11. let assembly = SVA.assemble("OpCapability Shader");
  12. if (typeof assembly === "string") {
  13. c.innerText = assembly;
  14. } else {
  15. c.innerText = Array.from(assembly)
  16. .map(b => b.toString(16).padStart(8, "0")).join(" ");
  17. }
  18. </script>
  19. </body>
  20. </html>