-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
VR support #3394
Conversation
Conflicts: Source/Scene/Scene.js Source/Widgets/FullscreenButton/FullscreenButton.js Source/Widgets/FullscreenButton/FullscreenButtonViewModel.js
…nging angles and only update camera once per frame.
…d to add support for off-center frustum in the future.
The demo is awesome on my iPhone. I was holding it in "landscape mode", then rotated it to "Portrait mode" and it looked like one (or one and part of the other) viewport went away when iOS rotated the canvas 90 degrees. Is this expected? Can we disable it? What is typical? |
Quaternion) { | ||
"use strict"; | ||
|
||
function DeviceOrientationCameraController(scene) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be @private
for now? Or do you plan to expose it right away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to keep it @private
. This should be expanded to use a PositionSensorVRDevice when we fully support WebVR. Still, there isn't anything configurable there so I don't know if we would every expose it.
Part of #3001. |
As for the 1x1 video, perhaps let's see what it looks like in a Sandcastle example first. |
Another thought would be perhaps VR support should be a CesiumViewer reference app feature and not a Viewer widget feature, but I guess that depends on how cleanly is can be supported in Viewer (in my opinion Viewer has grown way to big for it's own britches and eventually I would like a major refactor to occur). |
var vrSubscription; | ||
var vrModeSubscription; | ||
var vrCallback; | ||
if (options.vrButton === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since vrButton is a boolean, no need for === true
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is every other boolean checked with !== false
? Which is what I meant to put to be consistent with the other checks.
…ble callback on fullscreen change event.
This is ready for another review. |
@@ -9,6 +9,7 @@ Change Log | |||
* Fixed a bug that prevented WMS feature picking from working with THREDDS XML and msGMLOutput in Internet Explorer 11. | |||
* Added `getExtensionFromUri` helper function. | |||
* Added `getAbsoluteUri` helper function. | |||
* Added `VRButton` which is a simple, single-button widget that toggles VR mode. It is off by default. To enable the button, set the `vrButton` option to `Viewer` to `true`. Only Cardboard for mobile is supported. More VR devices will be supported when the WebVR API is more stable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also mention scene.useWebVR
?
This is ready once you make the Sandcastle/camera changes discussed offline. |
@pjcozzi This is ready. |
The tests are crashing Firefox. Does that happen for you? |
However, the Sandcastle demo works in Firefox. Perhaps the crash is an awkward viewport size. |
Nevermind, I updated Firefox and we are good! |
Only adds support for Cardboard and features that will make adding support for WebVR easier.
We should add another frustum type for an offset eye that creates a custom
PerspectiveOffCenterFrustum
, but we expect aPerspectiveFrustum
whenever in 3D or Columbus view.For a demo following an aircraft based on the interpolation Sandcastle example, go to bagnell.github.io/WebVRDemo.