How to use "OculusRiftEffect.js" on the "webgl_interactive_cubes" examples
Asked Answered
L

1

7

I was very excited when I first saw this example (webgl_geometry_minecraft_oculusrift) in mrdoob/three.js · GitHub website. Undoubtedly, it's pretty awesome!

But I'm curious, how to apply this effect on other examples? So I try to implement this effect in the "webgl_interactive_cubes". However, the experimental result is worse than expected.

My problem is that I can't accurately align the cursor to a particular cube to make it change color, seems to be a problem with the projection function? Then I adjusted the screen width coefficient, like this

window.innerWidth * 2

in the whole program. But still can not improve this problem.

Summary my issue :

  1. If I want to apply Oculus Rift Effect on any example, how should I do? by th way, I only added the following code

            effect = new THREE.OculusRiftEffect( renderer );
            effect.setSize( window.innerWidth, window.innerHeight );
    
            // Right Oculus Parameters are yet to be determined
            effect.separation = 20;
            effect.distortion = 0.1;
            effect.fov = 110;
    

    in initialize block init(); and final added effect.render( scene, camera ); in render();

  2. I am very curious to know how

    var vector = new THREE.Vector3( mouse.x, mouse.y, 1 ); projector.unprojectVector( vector, camera );

    works. Why do need to pass parameter 1? what if I change mouse.x to mouse.x * 2

  3. Need to use dual monitors can only be fully present this effect?

Note: My English is not very good, if I have described is unclear, please ask your doubts, I will respond as soon as possible.

This is my DEMO link:

  1. http://goo.gl/VCKyP

  2. http://goo.gl/xuIhr

  3. http://goo.gl/WjqC0

My Folder : https://googledrive.com/host/0B7yrjtQvNRwoYVQtMUc4M1ZZakk/

Lofton answered 28/5, 2013 at 17:50 Comment(2)
Can you share a link to the tweaked webgl_interactive_cubes?Ortensia
I have to make up link URL in the bottom of the articleLofton
A
0

The third one is your example right?

This can help you to use the OR-Effect in a easier way: https://github.com/carstenschwede/RiftThree

And your examples work all, just the third one have to Problem with the Controls. If I drag the move from the Stats-DIV (FPS) It works.

Atonality answered 7/12, 2014 at 19:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.