()
| 81 | } |
| 82 | |
| 83 | cleanup() { |
| 84 | if (this.mainLoopInterval) { |
| 85 | clearInterval(this.mainLoopInterval); |
| 86 | this.mainLoopInterval = null; |
| 87 | } |
| 88 | |
| 89 | this.surface.destroy(); |
| 90 | this.window.close(); |
| 91 | this.device.destroy(); |
| 92 | } |
| 93 | |
| 94 | async loadShader(name) { |
| 95 | const code = await Deno.readTextFile(new URL(`./shaders/${name}.wgsl`, import.meta.url)); |