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

It removes the ability to provide an external canvas. The canvas size… #1474

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

dmarcos
Copy link
Member

@dmarcos dmarcos commented May 18, 2016

… and positioning can be controled styling the a-scene when adding the embedded attribute

@@ -65,11 +65,30 @@ module.exports = registerElement('a-scene', {
this.setupRenderer();
this.resize();
});
if (!this.hasAttribute('embedded')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Componentize to keep scene uncluttered?

@ngokevin
Copy link
Member

Should we add a test example showing multiple scenes on a page?

@dmarcos
Copy link
Member Author

dmarcos commented May 31, 2016

I don't think multiple scenes per page works quite yet

@dmarcos dmarcos force-pushed the noExternalCanvas branch 8 times, most recently from 5c87917 to dacfc03 Compare June 2, 2016 02:01
@@ -0,0 +1,13 @@
var register = require('../../core/component').registerComponent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerComponent to be consistent

@dmarcos dmarcos force-pushed the noExternalCanvas branch 4 times, most recently from 35ee462 to 80b03ed Compare June 7, 2016 22:39
@dmarcos
Copy link
Member Author

dmarcos commented Jul 21, 2016

The offset in the y axis should still apply

@ngokevin
Copy link
Member

Yeah, I'm just talking about the Y-axis. Try the geometry gallery scene and enter fullscreen (non-VR).

@dmarcos dmarcos force-pushed the noExternalCanvas branch 2 times, most recently from 302771c to a868b9e Compare July 22, 2016 04:26
@dmarcos
Copy link
Member Author

dmarcos commented Jul 22, 2016

I believed I covered all the cases: Desktop with and without headset, mobile, scenes with and without default camera. I have to do one more round of tests with a headset.

defaultCameraEl.setAttribute(DEFAULT_CAMERA_ATTR, '');
defaultCameraEl.setAttribute('camera', {'active': true});
defaultCameraEl.setAttribute('wasd-controls', '');
defaultCameraEl.setAttribute('look-controls', '');
sceneEl.appendChild(defaultCameraEl);
// Adding defautlt offset to the camera
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@ngokevin
Copy link
Member

  1. Consider configurable camera property nonVRHeight or similar name such that user-defined cameras can benefit from the non-VR offset. Default camera can set this to 1.8 by default.
  2. Consider, now or later, to differentiate between VR and flat fullscreen. The save/restore camera pose when entering in and out seems useful for only VR, not flat fullscreen.

@dmarcos
Copy link
Member Author

dmarcos commented Jul 22, 2016

Ready to go. The offset in the y is now applied to all cameras and configured via the userHeight property in camera. The offset is removed in the presence of a headset. When exiting VR the previous (before entering VR mode) position of the camera is restored when a headset is connected.

… and positioning can be controled styling the a-scene when adding the embedded attribute
@ngokevin
Copy link
Member

very nice

@ngokevin
Copy link
Member

r+ when you ready to merge

@ngokevin
Copy link
Member

I would probably add userHeight: 1.8 to <a-camera> as a default.

@dmarcos
Copy link
Member Author

dmarcos commented Jul 22, 2016

@ngokevin can you test a bit to see if everything make sense?

@ngokevin
Copy link
Member

I tested around a few examples on my laptop, everything makes sense there:

  • Flat:
    • Default camera, 1.8m offset.
    • Enter fullscreen, offset still applies.
    • Exit fullscreen, pose is not overwritten.

I haven't tested in VR. But I assume you have this:

  • VR:
    • Enter VR, offset is removed.
    • Exit VR, pose is restored to before entering VR.

Just the one note that if I did <a-camera></a-camera>, I would sort of expect to have similar defaults as the default camera.

@ngokevin
Copy link
Member

We can decide on the user-defined <a-camera> default later.

@ngokevin ngokevin merged commit 7d9ddcb into aframevr:master Jul 25, 2016
@ngokevin
Copy link
Member

Nice. Love resolving the camera height inside and outside VR.

@FrederickDesimpel
Copy link
Contributor

If we're nitpicking eyeheight would rather be 1.6 m ...

JChehe added a commit to JChehe/aframe that referenced this pull request Aug 18, 2016
CHANGELOG.md says "Default camera is now positioned at 0, 1.6, 0 rather than 0, 1.8, -4. In VR mode, the 1.6m height offset as defined by camera.userHeight is removed. (aframevr#1474, aframevr#1718)"

but in v0.3 doc, still v0.2 value of Default camera position.

My English is so poor~Sorry
@JChehe JChehe mentioned this pull request Aug 18, 2016
ngokevin pushed a commit that referenced this pull request Aug 18, 2016
CHANGELOG.md says "Default camera is now positioned at 0, 1.6, 0 rather than 0, 1.8, -4. In VR mode, the 1.6m height offset as defined by camera.userHeight is removed. (#1474, #1718)"

but in v0.3 doc, still v0.2 value of Default camera position.

My English is so poor~Sorry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants