This repository has been archived by the owner on May 7, 2024. It is now read-only.
forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Quat animation #1
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
975fd99
Work in progress Quat animation
iwikal 978dbbd
Remove shim now that it isn't needed
iwikal 93a4a72
Add resampling extension to Spline
iwikal c9443e2
Merge 'mcpar-land/master' into animation
iwikal 0324d83
Format
iwikal 71514a5
Error message for missing interpolation variants
iwikal 6ece91e
Refactor and format animation example
iwikal 378b38d
Enable impl-glam for splines
iwikal ab06147
Refactor away spline_key_times
iwikal a5fce5b
Fix some clippy warnings
iwikal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we should leave the
splines
function available for general use alongside your newspline_key_times
function, rather than replacing it.Dunno about returning a
Vec
containing arbitrary iterators. Consider adding anothertype
to theSplineGroup
trait 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.
The thing is, there can no longer be an
fn splines(&self) -> Vec<&Spline<f32, f32>>
on SplineGroup, since not all splines have f32 values - one of them has Quats instead. So I looked around to see what the splines method was used for internally, replaced it with spline_key_times, and didn't really think too hard about how people might want to use it in general. I kind of assumed that it was just a side effect of needing to use it internally, and not having private trait methods. What's the use case?I was absolutely not pleased with returning a
Vec<Box<dyn Iterator>>
, but I just wanted to get a proof of concept working. Now that you've brought it back to my attention, I would like to look into if there's a better way to implement start_time, end_time and is_empty on SplineGroup, which to my knowledge are the only things spline_key_times is used for. Maybe we could just leave them as required methods, instead of trying to create a general default implementation that will probably end up needing dynamic dispatch?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.
Ah, true that.
main one I thought of is that if this is eventually integrated into a UI, you'd want direct access to the splines for drawing them in a curve editor.
Seems like a good option. Feel free to experiment.
It's worth mentioning that there's Another PR doing animation that uses property names and just seems overall more flexible than the hard-typed implementation we're doing here. It might be a better option entirely.
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.
Wow, I hadn't seen that. I'm looking through it now, trying to understand what they're doing.