-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test to display foveated areas #201
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright 2018 The Immersive Web Community Group | |
Copyright 2024 The Immersive Web Community Group |
} | ||
} | ||
|
||
function createScene(gl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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