How to use the VREffect function from three
Find comprehensive JavaScript three.VREffect code examples handpicked from public code repositorys.
GitHub: scenevr/client
136 137 138 139 140 141 142 143 144 145
}; Client.prototype.addVRHandlers = function () { var self = this; this.vreffect = new THREE.VREffect(this.renderer); this.vreffect.setSize(window.innerWidth, window.innerHeight); function exitFullscreen () { if (document.webkitFullscreenElement === null || document.mozFullScreenElement === null) {
2
7
4
+ 7 other calls in file
40 41 42 43 44 45 46 47 48
// Store the position of the VR HMD in a dummy camera to allow for panning and junk fakeCamera = new three.Object3D(); vrControls = new three.VRControls(fakeCamera); // Apply VR stereo rendering to renderer. effect = new three.VREffect(renderer); effect.setSize(window.innerWidth, window.innerHeight); // Create a VR manager helper to enter and exit VR mode. manager = new webvrmanager.WebVRManager(renderer, effect, {hideButton: false});
1
3
5
+ 9 other calls in file
64 65 66 67 68 69 70 71 72 73
end: end } // var effect = new THREE.VREffect( threeEnv.renderer ); // var controls = new THREE.DeviceOrientationControls(threeEnv.camera); //var WebVRManager = require('./webvr-manager');
0
4
2
GitHub: PrashanthG45/aframe
21 22 23 24 25 26 27 28 29 30 31
require('three/examples/js/loaders/OBJLoader'); // THREE.OBJLoader require('three/examples/js/loaders/MTLLoader'); // THREE.MTLLoader require('three/examples/js/BlendCharacter'); // THREE.BlendCharacter require('three/examples/js/loaders/ColladaLoader'); // THREE.ColladaLoader require('../../vendor/VRControls'); // THREE.VRControls require('../../vendor/VREffect'); // THREE.VREffect THREE.ColladaLoader.prototype.crossOrigin = 'anonymous'; THREE.MTLLoader.prototype.crossOrigin = 'anonymous'; THREE.OBJLoader.prototype.crossOrigin = 'anonymous';
0
0
0
+ 7 other calls in file
20 21 22 23 24 25 26 27 28
// TODO: Eventually include these only if they are needed by a component. require('../../node_modules/three/examples/js/loaders/OBJLoader'); // THREE.OBJLoader require('../../node_modules/three/examples/js/loaders/MTLLoader'); // THREE.MTLLoader require('../../node_modules/three/examples/js/loaders/ColladaLoader'); // THREE.ColladaLoader require('../../node_modules/three/examples/js/controls/VRControls'); // THREE.VRControls require('../../node_modules/three/examples/js/effects/VREffect'); // THREE.VREffect module.exports = THREE;
0
0
0
+ 3 other calls in file
40 41 42 43 44 45 46 47 48 49
// Round down fractional DPR values for better performance. renderer.setPixelRatio(Math.max(1, Math.floor(window.devicePixelRatio))); var controls = new THREE.VRControls(camera); var effect = new THREE.VREffect(renderer); effect.setSize(window.innerWidth, window.innerHeight); this.minFocalLength = 3; this.maxFocalLength = 36;
0
0
0
three.Vector3 is the most popular function in three (22341 examples)