Skip to content

Commit 6fd707e

Browse files
committed
try to reduce latency for wasm
1 parent db45a9f commit 6fd707e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

window.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const canvas = document.getElementById('canvas');
2-
const ctx = canvas.getContext("2d");
2+
const ctx = canvas.getContext("2d", {desynchronized: true, alpha: false});
33
export function draw(slice, width) {
44
const clamped = new Uint8ClampedArray(slice);
55
const height = clamped.length / (width * 4);
@@ -15,4 +15,4 @@ export function resize(x, y) {
1515
}
1616
export function dpr() {
1717
return window.devicePixelRatio
18-
}
18+
}

0 commit comments

Comments
 (0)