Closed andreasplesch closed 7 years ago
Three of the four scenes I've been testing on have something in them that causes Cobweb to redraw constantly, I'm not totally sure what specifically. The fourth is a static scene, and does not get redrawn to HMD unless I actually move around in the scene (just mouseover doesn't seem to be sufficient). This is about as uncomfortable as one might expect, and is one of many defects that I'm still not sure how to fix. On my Rift, I get an hourglass and it looks almost as though the one drawing of the scene is on a flat surface surrounded by blackness. I assume this is ATW/ASW kicking in. Not sure what happens on Vive.
I will try a couple more cobweb example scenes. If there is an animation, I guess, it needs to redraw. Ok, here is a spinning globe: https://rawgit.com/andreasplesch/cobweb/vr-work/cobweb.js/tests/VR/world.html Here, HMD changes do get immediately reflected, eg. the scene is redrawn constantly. (I may try my cobweb_dom bridge which translates most(all?) x3d events to dom events and has a tracer to perhaps get a better idea.)
https://rawgit.com/andreasplesch/cobweb/f74549fb1745b0ecc668ddc14b2efc63b78bd72f/cobweb.js/tests/VR/Basic_Inline.xhtml uses cobweb_dom for easy scene access and experimentation. Here is (more or less) how a frame is updated:
browser = X3D .getBrowser (X3DCanvas);
browser .addBrowserEvent ();
Thank you. I saw the requestAnimationFrame
within addBrowserEvent
, but the naming of the latter threw me off.
Thanks for providing the build. I quickly put together a minimal scene using your build in a branch of my cobweb fork: https://github.com/andreasplesch/cobweb/blob/vr-work/cobweb.js/tests/VR/Basic.html rawgit lets you directly serve: https://rawgit.com/andreasplesch/cobweb/vr-work/cobweb.js/tests/VR/Basic.html With spites excellent webvr emulator chrome extension - https://github.com/spite/WebVR-Extension - the scene looks like this: Nice ! What I noticed is that the frames are only updating on mouseover, at least with the webvr extension. Eg. if one moves the HMD (in the extension) the frame is only updated when mouse is over the canvas. With an actual HMD one could just leave the mouse pointer there. Is that what you do ?