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

Make aframe work with WebVR APIs 1.0 #1423

Merged
merged 1 commit into from May 11, 2016

Conversation

Projects
None yet
3 participants
@dmarcos
Collaborator

dmarcos commented Apr 29, 2016

I made the necessary changes to adapt aframe to the new API spec.

  • I added two flags to the webvr-polyfill to disable the UI and turn-your-phone instructions. The package.json points to my fork while I submit and merge a PR on boris repo.
  • I tested on mobile (Safari iOS / Chrome for Android) and desktop Windows on Firefox (no webvr) and latest WebVR enabled Chromium builds on Rift and Vive. Everything seems to work.
Show outdated Hide outdated src/style/aframe.css Outdated
switch (event.data.type) {
case 'fullscreen': {
switch (event.data.data) {
case 'enter':

This comment has been minimized.

@cvan

cvan Apr 29, 2016

Member

I think we should port this logic: some postMessage handler for entering and exiting using new API

@cvan

cvan Apr 29, 2016

Member

I think we should port this logic: some postMessage handler for entering and exiting using new API

function enterFullscreenHandler (scene) {
scene.addState('fullscreen');
scene.emit('fullscreen-enter');

This comment has been minimized.

@cvan

cvan Apr 29, 2016

Member

did you update the docs?

@cvan

cvan Apr 29, 2016

Member

did you update the docs?

Show outdated Hide outdated src/index.js Outdated
Show outdated Hide outdated src/index.js Outdated
// Lock to landscape orientation on mobile.
if (scene.isMobile && window.screen.orientation) {
if (fullscreenElement) {
window.screen.orientation.lock('landscape');

This comment has been minimized.

@cvan

cvan Apr 29, 2016

Member

can you confirm that this is still correctly handled by the polyfill?

@cvan

cvan Apr 29, 2016

Member

can you confirm that this is still correctly handled by the polyfill?

Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated package.json Outdated
Show outdated Hide outdated package.json Outdated
@cvan

This comment has been minimized.

Show comment
Hide comment
@cvan

cvan Apr 29, 2016

Member

we should add keyboard shortcuts per cvan@af2cfa3#diff-b4f74a9a2c02669787c5210f0cbed271R20

Member

cvan commented Apr 29, 2016

we should add keyboard shortcuts per cvan@af2cfa3#diff-b4f74a9a2c02669787c5210f0cbed271R20

Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
@cvan

This comment has been minimized.

Show comment
Hide comment
@cvan

cvan Apr 29, 2016

Member

thanks for doing this. I really appreciate it. I don't have my CV1 in front of me atm but I'll test as soon as I get a chance.

Member

cvan commented Apr 29, 2016

thanks for doing this. I really appreciate it. I don't have my CV1 in front of me atm but I'll test as soon as I get a chance.

@cvan

This comment has been minimized.

Show comment
Hide comment
@cvan

cvan Apr 29, 2016

Member

and just make sure we are using the latest VREffect and VRControls. also see this: mrdoob/three.js#8568 (comment) it's important

Member

cvan commented Apr 29, 2016

and just make sure we are using the latest VREffect and VRControls. also see this: mrdoob/three.js#8568 (comment) it's important

Show outdated Hide outdated src/components/look-controls.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated tests/__init.test.js Outdated
Show outdated Hide outdated src/components/scene/canvas.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated src/core/scene/a-scene.js Outdated
Show outdated Hide outdated examples/test/iframe/index.html Outdated
Show outdated Hide outdated docs/core/scene.md Outdated
Show outdated Hide outdated docs/core/scene.md Outdated
Show outdated Hide outdated docs/core/scene.md Outdated
Show outdated Hide outdated src/utils/urlOptions.js Outdated
@dmarcos

This comment has been minimized.

Show comment
Hide comment
@dmarcos

dmarcos May 11, 2016

Collaborator

This is ready to merge.

Collaborator

dmarcos commented May 11, 2016

This is ready to merge.

Show outdated Hide outdated src/style/aframe.css Outdated
Show outdated Hide outdated src/core/scene/postMessageAPI.js Outdated

@dmarcos dmarcos merged commit 1279ac5 into aframevr:master May 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ngokevin ngokevin referenced this pull request May 11, 2016

Closed

Support WebVR 1.0 API #1176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment