Skip to content

Commit

Permalink
Fix VR
Browse files Browse the repository at this point in the history
  • Loading branch information
agrande committed Sep 3, 2017
1 parent 54635e2 commit 006238f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
6 changes: 5 additions & 1 deletion apps/ios/LBA2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Adrien Grandemange";
TargetAttributes = {
7A0E3FAD1D4A0F320017A100 = {
Expand Down Expand Up @@ -331,8 +331,10 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -379,8 +381,10 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion apps/ios/LBA2/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ViewController: UIViewController {
let defaults = UserDefaults.standard
var urlStr = defaults.string(forKey: "url")
if urlStr == nil {
urlStr = "http://adri42.bitbucket.org/lba2/"
urlStr = "http://192.168.0.12:8080/#scene=42&useVR=true"
}
let url = URL(string: urlStr!)
let req = URLRequest(url: url!)
Expand Down
2 changes: 1 addition & 1 deletion src/game/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function createGame(params: Object, isMobile: boolean, callback : Functio
cameraLookAtLerp: new THREE.Vector3(),
cameraOrientation: new THREE.Quaternion(),
cameraHeadOrientation: new THREE.Quaternion(),
freeCamera: false,
freeCamera: params.useVR,
action: 0,
jump: false,
texts: null,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function setupVR(baseRenderer) {
const params = Cardboard.uriToParams('https://vr.google.com/cardboard/download/?p=CgdUd2luc3VuEgRBZHJpHfT91DwlYOVQPSoQAAC0QgAAtEIAALRCAAC0QlgANQIrBz06CClcjz0K1yM8UABgAA');
console.log(params);
const stereoEffect = new StereoEffect(baseRenderer, params);
stereoEffect.eyeSeparation = 0.006;
stereoEffect.eyeSeparation = -0.0006;
stereoEffect.focalLength = 0.0122;
stereoEffect.setSize(window.innerWidth, window.innerHeight);
return stereoEffect;
Expand Down

0 comments on commit 006238f

Please sign in to comment.