Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR support #3394

Merged
merged 38 commits into from
Jan 15, 2016
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b107e0a
WebVR WIP.
bagnell Dec 11, 2015
aaad726
Merge branch 'master' into vr
bagnell Dec 21, 2015
b1cbe67
Clean up left/right camera/frustum object creation.
bagnell Dec 22, 2015
ab36354
Merge branch 'master' into vr
bagnell Dec 29, 2015
d22559b
Start adding device orientation camera control.
bagnell Dec 30, 2015
fbb91df
Move device orientation camera controller to scene. Keep track of cha…
bagnell Jan 4, 2016
19c854d
Merge branch 'master' into vr
bagnell Jan 4, 2016
7334a59
Use perspective frustum with fov because we expect it everywhere. Nee…
bagnell Jan 5, 2016
ca3d2cf
Update credit display to work with vr.
bagnell Jan 6, 2016
e0b9173
Fix when switching back from vr mode by saving the frustum.
bagnell Jan 6, 2016
71d6f22
Update vr to work for all scene modes.
bagnell Jan 6, 2016
4ad8cf0
Merge branch 'master' into vr
bagnell Jan 6, 2016
d20eab7
Re-add using device orientation camera controller.
bagnell Jan 6, 2016
cc91ee7
Create credit containers in CesiumWidget.
bagnell Jan 6, 2016
3a82035
Tweaks.
bagnell Jan 6, 2016
99e6414
Add VR button WIP.
bagnell Jan 11, 2016
f4ddde1
Exit VR when fullscreen is escaped without using the button.
bagnell Jan 11, 2016
4dbfc08
Fix jsHint error.
bagnell Jan 11, 2016
251a38e
Add Sandcastle example.
bagnell Jan 11, 2016
94ad698
Merge branch 'master' into vr
bagnell Jan 11, 2016
8021efe
Update licenses.
bagnell Jan 11, 2016
60dcbe1
Update doc and from review.
bagnell Jan 12, 2016
030b30b
Fix failing tests.
bagnell Jan 12, 2016
f5ead66
Add device orientation tests.
bagnell Jan 12, 2016
31af728
Add VR icon
emackey Jan 12, 2016
3dce1b9
Merge pull request #3416 from AnalyticalGraphicsInc/vr-icon
bagnell Jan 12, 2016
bf6cbca
Factor out code to execute commands in multiple viewports out into it…
bagnell Jan 12, 2016
488fcbd
Update locking device orientation to landscape mode. Temporarily disa…
bagnell Jan 13, 2016
1bd364a
Set style visibility instead of display to prevent stomping on displa…
bagnell Jan 13, 2016
9600a07
Remove double credit displays for each vr viewport.
bagnell Jan 13, 2016
dec5af5
Hide credit display when the scene is switched to vr mode.
bagnell Jan 13, 2016
2e535bf
Fix aspect ratio issue when exiting vr mode.
bagnell Jan 13, 2016
75f87ea
Fix exiting vr mode/fullscreen without clicking the vr button.
bagnell Jan 13, 2016
0ed5fd7
Add a few more tests for the vr button widget.
bagnell Jan 13, 2016
7b59f5f
Merge branch 'master' into vr
bagnell Jan 13, 2016
c66c057
Update CHANGES.md.
bagnell Jan 13, 2016
e0dc52b
Allow screen space input when in VR mode and update Sandcastle.
bagnell Jan 15, 2016
66e8405
Update CHANGES.md.
bagnell Jan 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Apps/Sandcastle/gallery/Cardboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Configure viewer to add a button enabling look at a mobile device with cardboard.">
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
"use strict";
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer', {
vrButton : true
});
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/Cardboard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ https://developer.nvidia.com/nvidia-graphics-sdk-11-direct3d
>
> LIMITATION OF LIABILITY: NVIDIA SHALL NOT BE LIABLE TO DEVELOPER, DEVELOPER’S CUSTOMERS, OR ANY OTHER PERSON OR ENTITY CLAIMING THROUGH OR UNDER DEVELOPER FOR ANY LOSS OF PROFITS, INCOME, SAVINGS, OR ANY OTHER CONSEQUENTIAL, INCIDENTAL, SPECIAL, PUNITIVE, DIRECT OR INDIRECT DAMAGES (WHETHER IN AN ACTION IN CONTRACT, TORT OR BASED ON A WARRANTY), EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF THE ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. IN NO EVENT SHALL NVIDIA’S AGGREGATE LIABILITY TO DEVELOPER OR ANY OTHER PERSON OR ENTITY CLAIMING THROUGH OR UNDER DEVELOPER EXCEED THE AMOUNT OF MONEY ACTUALLY PAID BY DEVELOPER TO NVIDIA FOR THE SOFTWARE OR ANY OTHER MATERIALS.

### NoSleep.js

https://github.com/richtr/NoSleep.js

> NoSleep.js v0.5.0 - git.io/vfn01
> Rich Tibbett
> MIT license

Tests
=====

Expand Down
5 changes: 3 additions & 2 deletions Source/Core/Fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ define([
* If fullscreen mode is not supported by the browser, does nothing.
*
* @param {Object} element The HTML element which will be placed into fullscreen mode.
* @param {HMDVRDevice} vrDevice The VR device.
*
* @example
* // Put the entire page into fullscreen.
Expand All @@ -230,12 +231,12 @@ define([
* // Place only the Cesium canvas into fullscreen.
* Cesium.Fullscreen.requestFullscreen(scene.canvas)
*/
Fullscreen.requestFullscreen = function(element) {
Fullscreen.requestFullscreen = function(element, vrDevice) {
if (!Fullscreen.supportsFullscreen()) {
return;
}

element[_names.requestFullscreen]();
element[_names.requestFullscreen]({ vrDisplay: vrDevice });
};

/**
Expand Down
Loading