Skip to content

Commit c06495e

Browse files
author
Felix Mariotto
committed
webxr_vr_layers: fix GUI bug
1 parent 8b2ab83 commit c06495e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/webxr_vr_layers.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
function onChange() {
236236

237237
eyeCharts.position.z = - parameters.eyeChartDistanceFt * 0.3048;
238+
snellenConfig.z = eyeCharts.position.z;
238239

239240
if ( quadLayerPlain ) {
240241

@@ -316,6 +317,8 @@
316317

317318
}
318319

320+
let test;
321+
319322
function render( t, frame ) {
320323

321324
const xr = renderer.xr;
@@ -431,6 +434,7 @@
431434
gl.pixelStorei( gl.UNPACK_FLIP_Y_WEBGL, true );
432435
const canvas = guiMesh.material.map.image;
433436
gl.texSubImage2D( gl.TEXTURE_2D, 0, 0, 0, canvas.width, canvas.height, gl.RGBA, gl.UNSIGNED_BYTE, canvas );
437+
guiLayer.needsUpdate = false;
434438

435439
}
436440

0 commit comments

Comments
 (0)