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

Support new hand animations #2191

Merged
merged 2 commits into from
Feb 9, 2017

Conversation

machenmusik
Copy link
Contributor

update to use new hand animations from arturitu via rawgit
TODO: update to aframe CDN URLs once published
TODO: unused poses

mesh.mixer.clipAction(animation).clampWhenFinished = true;
mesh.mixer.clipAction(animation).timeScale = timeScale;
clipAction = mesh.mixer.clipAction(animation);
if (!clipAction) { return; }
Copy link
Member

Choose a reason for hiding this comment

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

I prefer this to break loudly on a Q/A pass. If the animation is not present then hand-controls are not working as expected and I want it to be hard to miss. The hand model and this component will be always in sync.

Copy link
Contributor Author

@machenmusik machenmusik Dec 20, 2016

Choose a reason for hiding this comment

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

great for QA, not great for people actually using it.
Maybe spew warnings / errors to console to get the required attention?
Without this, things break but there is no messaging on why (and we clearly know why in this case, so may as well say so)

Copy link
Member

Choose a reason for hiding this comment

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

The whole point of Q/A is to help users. Your change makes more likely for us to push bugs to them. I think the code we had was fine. We have just have to make sure that when we update the model this component reflects the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

different perspective, the change makes it more forgiving for users to take as example and replace with their own model -- instead of "why does the controller no longer move or react" it becomes "why do my animations not work" as it should be. But I do understand your perspective. Would you prefer the early-return that masks errors to be commented and disabled?

var OCULUS_LEFT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/leftHand.json';
var OCULUS_RIGHT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/rightHand.json';
var OCULUS_LEFT_HAND_MODEL_URL = 'https://rawgit.com/arturitu/assets/e698020d6f335fb46a6169f8985b4e12297e157d/controllers/oculus-hands/leftHand.json'; // 'https://cdn.aframe.io/controllers/oculus-hands/leftHand.json';
var OCULUS_RIGHT_HAND_MODEL_URL = 'https://rawgit.com/arturitu/assets/e698020d6f335fb46a6169f8985b4e12297e157d/controllers/oculus-hands/rightHand.json'; // 'https://cdn.aframe.io/controllers/oculus-hands/rightHand.json';
Copy link
Member

Choose a reason for hiding this comment

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

Let's point these URLs to the proper CDN so we can merge it.

Copy link
Member

Choose a reason for hiding this comment

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

I'll update the models in the CDN before merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for backwards compatibility, I strongly suggest making a new CDN URL for the new files, to avoid the breakage issue we had earlier today.

if you wouldn't mind updating these once you make the new CDN URLs, that would be great, thx!

Copy link
Member

Choose a reason for hiding this comment

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

I don't want to confuse people with multiple versions of the same model for each tiny change we make. I don't think this model has that much use to justify keeping the old one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but then you have to coordinate the CDN change with global replacement of code everywhere that references the old version... which seems unlikely to me. this is just like the difference between cdn.rawgit.com and rawgit.com - when you publish the URLs to production, the assumption is that you won't break things by destructive changes to required CDN assets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to use a recent example, we changed the URL for oculus-compatible hands rather than overwriting the old ones, which would have broken hand-controls usage across all of a-frame...

Copy link
Member

Choose a reason for hiding this comment

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

The change is really exceptional. I really don't expect assets to change once published.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They definitely shouldn't (also so you don't have to deal with flushing older versions from all the caches in the Internet).

If you don't use different URLs, then you have to attempt to update the CDN assets and simultaneously the referencing code (and all uses of it, which seems unreasonable given encouragement to pull versions via npm eather than using direct URL).

You've offered to to update the CDN assets and then update the code, so if that is really what you'd like to do, feel free -- but then we are likely to face spurious issues as we did before reverting the prior hands change.

Copy link
Member

Choose a reason for hiding this comment

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

if you change the url back I can update the CDN and merge this PR simultaneously.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, see latest commit

'touch': 'touch',
'thumb': 'thumb'
'': 'Open',
'pointing': 'Point',
Copy link
Member

Choose a reason for hiding this comment

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

don't need quotes for js keys heere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, the empty string does... is there any harm in leaving them for consistency?

Copy link
Member

Choose a reason for hiding this comment

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

The empty string is the default. An empty string as a key feels weird to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, the default (no gesture) may still have a named animation associated (as it does here)

// (e.g. controllers no longer updating pose)
// but per https://github.com/aframevr/aframe/pull/2191#discussion_r93121878
// the preference is to NOT prevent the issues to catch bugs earlier in QA.
// if (!clipAction) { return; }
Copy link
Member

Choose a reason for hiding this comment

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

Remove line

@machenmusik machenmusik force-pushed the support-new-hand-animations branch 3 times, most recently from a7ad3d6 to ebbb26b Compare December 22, 2016 01:59
@machenmusik
Copy link
Contributor Author

may want to do #2192 first to avoid spurious conflicts, as it uses the hand animation names that are then updated as part of this one

@dmarcos
Copy link
Member

dmarcos commented Dec 27, 2016

needs rebase

@machenmusik
Copy link
Contributor Author

rebased but not yet double-checked. still recommend new CDN URLs to avoid breaking npm builds that already pulled down old code...

@machenmusik
Copy link
Contributor Author

ran this last night looked ok on Touch...

@machenmusik
Copy link
Contributor Author

I am guessing this one may be waiting for point release

@machenmusik
Copy link
Contributor Author

tested working with latest experimental Chromium and Oculus Touch;
using Nightly plus Vive, gamepad id has changed from OpenVR Gamepad to OpenVR Controller

@machenmusik
Copy link
Contributor Author

machenmusik commented Feb 9, 2017

latest version confirmed working with examples/showcase/tracked-controls in VR on:

latest Nightly 54.0a1 (2017-02-08), latest SteamVR 1485823399 , OpenVR API 1.02 DLL, Vive controllers
OpenVR Controller x2 (when in concert with #2370)

latest experimental Chromium 56.0.2910.0, Oculus 1.11.0.335615 (1.11.0.335772), Rift and Touch controllers

older experimental Chromium 56.0.2900.0, older SteamVR vrserver.exe 1481163074, Vive controllers
OpenVR Gamepad x2
(see toji/chrome-webvr-issues#135 (comment) for details)

@machenmusik
Copy link
Contributor Author

separating the old-and-new Vive support into
#2370

@ngokevin ngokevin merged commit 5dfe0f9 into aframevr:master Feb 9, 2017
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