Oh my mistake. The value of y worked only by accident because it was defined as some random function.
It is wierd because no matter what numerical value I set it mess up the position, but if you set it to NaN or non-numerical string it works.
I use this now: renderer.setViewport(0, "-", sw,sh); and it works perfectly. However, I don't really understand what black magic is this.
Posts by Hoky
-
-
@Mr.Tie
By the way that picture of Appart 2, is it a 3D object (box/tile) with assigned texture?
How did you get working the VR (click) on the 3D objects?Thank you
-
@Mr.Tie, Amazing, thanks for sharing the migration guide! I discovered the bad positioning of objects is probably caused by renderer.setViewport method, since that is the only change between v84 and v85 where it stopped working.
I tried to change renderer.setViewport(0, 0, sw,sh); to renderer.setViewport(0,-y, sw,sh); for both viewports when VR rendering and Voila! it it works now perfectly!
-
@Alexy are you loading the Male02 using the JSON or OBJ? It seems it doesn't load MTL in your case. Is there any error in the JavaScript console?
Would you mind sharing your snippet for dynamically loading 3D models? Sounds pretty cool!
-
By the trial and error I managed to track that the undesired shifting in VR first occur in Three v86. In v85 it behaves normally (except the dark screen). But I have no idea which commit is causing this. I will try to play with this later.
-
Thanks for the reply. I don't think it's a problem of positioning since even the box moves and there is no change of the camera nor this object position, right? It also crops/hides the model if you tilt the VR down (see the picture)

I'll try to look into what could be causing this issue.
Furthermore, I would love to start extending on this idea and implement more features into VR, since I am really missing the possibility to display pictures, texts, videos and iframes in webgl. I think an easy way to display pictures, texts and video would be to simply create "pseudo 3D" object and use the desired texture, right? I also came to this topic of embedding the HTML/DOM content using CSS3D, but currently have no idea how to solve the 'stereoscopic' rendering for VR: http://learningthreejs.com/blog/2013/04/3…html-and-webgl/
-
No problem. Let me know if it works for you

I'd love to see some other examples of this in action. Still working on my case.I just recognized loading GLTF models doesn't work with IE, but there's an easy way around this: https://github.com/mrdoob/three.js/issues/12683
good job -JJ- porting the example to a new version of THREE. However, just now when I tested your version, I noticed there is an issue when viewing the 3D models in WebVR - the models doesn't stick to their place and moves around. In the older version of three.js (original example) it seems to work normally as expected. Do you know what could be causing this issue?