-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Support new hand animations #2191
Conversation
src/components/hand-controls.js
Outdated
mesh.mixer.clipAction(animation).clampWhenFinished = true; | ||
mesh.mixer.clipAction(animation).timeScale = timeScale; | ||
clipAction = mesh.mixer.clipAction(animation); | ||
if (!clipAction) { return; } |
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 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.
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.
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)
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.
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.
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.
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?
src/components/hand-controls.js
Outdated
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'; |
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.
Let's point these URLs to the proper CDN so we can merge it.
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'll update the models in the CDN before merge
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.
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!
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 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.
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.
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.
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.
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...
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.
The change is really exceptional. I really don't expect assets to change once published.
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.
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.
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.
if you change the url back I can update the CDN and merge this PR simultaneously.
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.
ok, see latest commit
src/components/hand-controls.js
Outdated
'touch': 'touch', | ||
'thumb': 'thumb' | ||
'': 'Open', | ||
'pointing': 'Point', |
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.
don't need quotes for js keys heere
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.
well, the empty string does... is there any harm in leaving them for consistency?
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.
The empty string is the default. An empty string as a key feels weird to me.
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.
right, the default (no gesture) may still have a named animation associated (as it does here)
src/components/hand-controls.js
Outdated
// (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; } |
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.
Remove line
a7ad3d6
to
ebbb26b
Compare
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 |
needs rebase |
ebbb26b
to
4f4a46a
Compare
rebased but not yet double-checked. still recommend new CDN URLs to avoid breaking npm builds that already pulled down old code... |
ran this last night looked ok on Touch... |
I am guessing this one may be waiting for point release |
d29d0b1
to
341a018
Compare
tested working with latest experimental Chromium and Oculus Touch; |
latest version confirmed working with latest Nightly 54.0a1 (2017-02-08), latest SteamVR 1485823399 , OpenVR API 1.02 DLL, Vive controllers 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 |
819820c
to
3f3a2d1
Compare
update to CDN URLs from aframevr/assets#18
530f417
to
29c1364
Compare
separating the old-and-new Vive support into |
29c1364
to
7b2c6a7
Compare
update to use new hand animations from arturitu via rawgit
TODO: update to aframe CDN URLs once published
TODO: unused poses