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

cardboard support for cursor-controller #343

Merged
merged 5 commits into from
May 9, 2018

Conversation

InfiniteLee
Copy link
Contributor

Properly show cursor when in cardboard. Note: cardboard input is broken until we upgrade to aframe 0.8.2.

Copy link
Contributor

@brianpeiris brianpeiris left a comment

Choose a reason for hiding this comment

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

Just one comment. LGTM otherwise.

@@ -370,10 +376,8 @@ AFRAME.registerComponent("cursor-controller", {
},

_handleEnterVR: function() {
if (AFRAME.utils.device.checkHeadsetConnected()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was it necessary to remove this check? In theory it should return true because the polyfill provides a "Cardboard" headset.

Copy link
Contributor Author

@InfiniteLee InfiniteLee May 8, 2018

Choose a reason for hiding this comment

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

I'm not sure if thats true, at least it wasn't in the older version of the polyfill. But regardless listening to just enter/exit VR should be sufficient. That check was mostly just there as a holdover from before when we only used the cursor for 2d mode.

@@ -93,6 +93,8 @@ AFRAME.registerComponent("cursor-controller", {
this.data.playerRig.addEventListener(this.data.primaryUp, this._handlePrimaryUp);
this.data.playerRig.addEventListener(this.data.grabEvent, this._handlePrimaryDown);
this.data.playerRig.addEventListener(this.data.releaseEvent, this._handlePrimaryUp);
this.data.playerRig.addEventListener("gamepadbuttondown", this._handlePrimaryDown);
Copy link
Contributor

@cvan cvan May 8, 2018

Choose a reason for hiding this comment

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

(apologies in advance, as I know this is a WIP PR.)

is this a correct branch? this appears to be for #364 perhaps?

btw, gamepadbuttondown/gamepadbuttonup/gamepadaxismove are events that are proprietary to and work only in Firefox. (see w3c/gamepad#15 for context.) also, only in Firefox Nightly/Beta is the about:config flag dom.gamepad.non_standard_events set to true; in release-channel Firefox, it's false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

gd lol, I should've checked before spamming you with unnecessary info. thanks!

@InfiniteLee InfiniteLee changed the title WIP - cardboard support cardboard support for cursor-controller May 8, 2018
@InfiniteLee InfiniteLee merged commit 135331f into master May 9, 2018
@InfiniteLee InfiniteLee mentioned this pull request May 10, 2018
@brianpeiris brianpeiris deleted the feature/carboard_cursor_support branch September 24, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants