From 32ebc83955f35e2e37755f9980a7380786086101 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 11 Jul 2024 12:15:49 -0700 Subject: [PATCH] address comments --- sample/occlusionQuery/main.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sample/occlusionQuery/main.ts b/sample/occlusionQuery/main.ts index d499ab29..7c55e056 100644 --- a/sample/occlusionQuery/main.ts +++ b/sample/occlusionQuery/main.ts @@ -230,7 +230,6 @@ const lerpV = (a: number[], b: number[], t: number) => const pingPongSine = (t: number) => Math.sin(t * Math.PI * 2) * 0.5 + 0.5; let depthTexture: GPUTexture | undefined; -let results: BigUint64Array | undefined; let time = 0; let then = 0; @@ -331,7 +330,7 @@ function render(now: number) { if (resultBuffer.mapState === 'unmapped') { resultBuffer.mapAsync(GPUMapMode.READ).then(() => { - results = new BigUint64Array(resultBuffer.getMappedRange()).slice(); + const results = new BigUint64Array(resultBuffer.getMappedRange()).slice(); resultBuffer.unmap(); const visible = objectInfos