-
Notifications
You must be signed in to change notification settings - Fork 8
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
add loop
and loopMode
capabilities for AnimationSystem, fix for comp-audio
to match comp-anim
: state
-->action
#599
Conversation
Your Render PR Server URL is https://examples-mrjs-pr-599.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-coo4ia7sc6pc73a8rg90. |
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
loop
and loopMode
capabilities for AnimationSystem, fix for comp-audio
to be action
instead of state
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
loop
and loopMode
capabilities for AnimationSystem, fix for comp-audio
to be action
instead of state
loop
and loopMode
capabilities for AnimationSystem, fix for comp-audio
to match comp-anim
: state
-->action
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.
Looks great with a few comments!
break; | ||
let action = entity.mixer.clipAction(clip); | ||
|
||
if (comp.hasOwnProperty('action')) { |
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.
You can also do comp?.action
which is a little cleaner.
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 like the simpler approach you note, but that also makes it turn into a truthy check of the action
value if it exists, meaning it can silently error (instead of hitting the default case) if a user makes a typo and leaves it as a 0 or an empty string for example
i'd prefer to keep it as the hasOwnProperty line, but lmk your thoughts
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.
hmm does comp?.action == null not hit the default state?
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.
sorry im confused - all that does is check if comp exists - and then whether comp.action == null
in the comp.hasOwnProperty
line im trying to check if action exists before running through our switch statements - do you have a different preferred way of writing that?
in the audio system it looks like that's setup as comp.action ?? false
- is that what you'd prefer instead?
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 i'd still be a little worried of the comp.action
value existing but being incorrect as a truthy-ness option and not going into if-statement even with comp.action ?? false
🤔
thoughts?
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'm going to merge it in since approved so not blocker, but lmk since that's a quick pr fix afterwards if needed
Approved for merge. I use |
oh i think |
Linking
related to:
state
-->action
for consistencyProblem
loop not implemented for data-comp-animation
Solution
implement it
Breaking Change
YES!!
action
. Made sure this was updated in the documentation repo and the samples hereNotes
...
Required to Merge
Untitled.mov
@lobau
@hanbollar