-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Make aframe work with WebVR APIs 1.0 #1423
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
Conversation
| top: 0; | ||
| } | ||
|
|
||
| :-webkit-full-screen { |
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.
in chrome mobile the user agent stylesheet set it to white.
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.
Worth a comment
| switch (event.data.type) { | ||
| case 'fullscreen': { | ||
| switch (event.data.data) { | ||
| case 'enter': |
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 think we should port this logic: some postMessage handler for entering and exiting using new API
|
we should add keyboard shortcuts per https://github.com/cvan/aframe/commit/af2cfa39fe8bc72cc1875009f810f7e3c8560f13#diff-b4f74a9a2c02669787c5210f0cbed271R20 |
src/core/scene/a-scene.js
Outdated
| } | ||
| if (!vrDisplay) { return; } | ||
| vrDisplay.requestPresent([{source: this.renderer.domElement}]); | ||
| this.addState('vr-mode'); |
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.
we should not blindly assume that this succeeded. we should change state and emit events only when the promise resolves à la https://github.com/cvan/aframe/commit/af2cfa39fe8bc72cc1875009f810f7e3c8560f13#diff-eb9bb1084863a2f65678ea67d6e7cf5eR135
|
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. |
|
and just make sure we are using the latest VREffect and VRControls. also see this: mrdoob/three.js#8568 (comment) it's important |
5e80595 to
b1f69bc
Compare
src/components/look-controls.js
Outdated
| currentHMDPosition = this.calculateHMDPosition(); | ||
| deltaHMDPosition.copy(currentHMDPosition).sub(previousHMDPosition); | ||
| previousHMDPosition.copy(currentHMDPosition); | ||
| // Do nothing if we have not moved |
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.
punctuation.
| this.entityEl = entityFactory(); | ||
| var el = this.el = this.entityEl.parentNode; | ||
| var resolvePromise = function () { | ||
| return new Promise(function (resolve) { |
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.
Promise.resolve() will return a resolved promise
src/components/scene/canvas.js
Outdated
| canvas.classList.add('a-canvas'); | ||
| canvas.style.height = data.height + '%'; | ||
| canvas.style.width = data.width + '%'; | ||
| canvas.style.height = data.height + 'px'; |
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.
% vs px?
f6ea8c8 to
96955c8
Compare
e372fd7 to
4061edd
Compare
|
This is ready to merge. |
src/style/aframe.css
Outdated
| display: -webkit-flex; | ||
| font-family: sans-serif, monospace; | ||
| font-size: 13px; | ||
| font-size: 13px;} |
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.
oops brace?
10000c0 to
e5dd14d
Compare
I made the necessary changes to adapt aframe to the new API spec.