add test to display foveated areas#201
Conversation
toji
left a comment
There was a problem hiding this comment.
Thanks! Great idea for a test page. I appreciate that it looks like it'll work regardless of how the underlying foveation is applied. A couple of comments that I'd appreciate being addressed prior to landing.
| @@ -0,0 +1,553 @@ | |||
| <!doctype html> | |||
| <!-- | |||
| Copyright 2018 The Immersive Web Community Group | |||
There was a problem hiding this comment.
| Copyright 2018 The Immersive Web Community Group | |
| Copyright 2024 The Immersive Web Community Group |
| } | ||
| } | ||
|
|
||
| function createScene(gl) |
There was a problem hiding this comment.
As this is a test page and not a "sample" I'm not too concerned about it, but this is pretty different from the structure of most of our pages. From the looks of the comments it seems like it's ported from some Meta sample code? If it's publicly accessible code it would be good to add a comment somewhere indicating what this code is based on with a URL where the original can be found.
| for ( var i = 0; i < NUM_INSTANCES; i++ ) | ||
| { | ||
| obj.CubePositions[i] = { x:0, y:0, z:0 }; | ||
| // Using volatile keeps the compiler from optimizing away multiple calls to ovrScene_RandomFloat(). |
There was a problem hiding this comment.
It would be worth doing a pass over the comments to make sure they still make sense in this context. volatile isn't a concept that your average JavaScript developer knows about (or wants to know about, for that matter...😁)
This adds a test that shows the areas and strength of the foveated areas in an XR scene