"src/lib/nano-pow/classes/gpu.ts"() {
"use strict";
init_shaders();
- NanoPowGpu = class {
+ NanoPowGpu = class _NanoPowGpu {
// Initialize WebGPU
static #busy = false;
static #device = null;
static reset(loss) {
console.dir(loss);
console.warn(`Device lost. Reinitializing...`);
- console.dir(this);
- console.dir(this.#cpuBuffer);
- if (this.#cpuBuffer) this.#cpuBuffer.destroy();
- if (this.#gpuBuffer) this.#gpuBuffer.destroy();
- if (this.#uboBuffer) this.#uboBuffer.destroy();
- this.#busy = false;
- this.init();
+ console.dir(_NanoPowGpu);
+ console.dir(_NanoPowGpu.#cpuBuffer);
+ if (_NanoPowGpu.#cpuBuffer) _NanoPowGpu.#cpuBuffer.destroy();
+ if (_NanoPowGpu.#gpuBuffer) _NanoPowGpu.#gpuBuffer.destroy();
+ if (_NanoPowGpu.#uboBuffer) _NanoPowGpu.#uboBuffer.destroy();
+ _NanoPowGpu.#busy = false;
+ _NanoPowGpu.init();
}
/**
* Finds a nonce that satisfies the Nano proof-of-work requirements.
<head>
<link rel="icon" href="./favicon.ico">
<script type="module"
- src="https://zoso.dev/?p=libnemo.git;a=blob_plain;f=global.min.1.js;hb=refs/heads/ios"></script>
+ src="https://zoso.dev/?p=libnemo.git;a=blob_plain;f=global.min.2.js;hb=refs/heads/ios"></script>
<!-- <script type="module" src="https://cdn.jsdelivr.net/npm/nano-webgl-pow@1.1.1/nano-webgl-pow.js"></script> -->
<script type="module">
(async () => {
static reset (loss?: GPUDeviceLostInfo): void {
console.dir(loss)
console.warn(`Device lost. Reinitializing...`)
- console.dir(this)
- console.dir(this.#cpuBuffer)
- if (this.#cpuBuffer) this.#cpuBuffer.destroy()
- if (this.#gpuBuffer) this.#gpuBuffer.destroy()
- if (this.#uboBuffer) this.#uboBuffer.destroy()
- this.#busy = false
- this.init()
+ console.dir(NanoPowGpu)
+ console.dir(NanoPowGpu.#cpuBuffer)
+ if (NanoPowGpu.#cpuBuffer) NanoPowGpu.#cpuBuffer.destroy()
+ if (NanoPowGpu.#gpuBuffer) NanoPowGpu.#gpuBuffer.destroy()
+ if (NanoPowGpu.#uboBuffer) NanoPowGpu.#uboBuffer.destroy()
+ NanoPowGpu.#busy = false
+ NanoPowGpu.init()
}
/**