-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
A-AnimationMake things move and change over timeMake things move and change over timeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
What problem does this solve or what need does it fill?
Allow modification of known animation curves, random or targeted adjustments to animation curves.
What solution would you like?
impl<P, C> Debug for AnimatableCurve<P, C>
where
C: Debug,
{
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("AnimatableCurve")
**.field("curve", &self.curve)**
.finish()
}
}
I have noticed that dyn AnimableCurve supports printing on debug traits that have already been implemented, so I think it is possible to allow C generics to return data when implementing a certain trait.
So only when the C generic supports a certain trait, will it return the actual data of AnimableCurve.
Meanwhile, this trait supports converting data, just like converting any trait to an actual type.
What alternative(s) have you considered?
Not.
Additional context
I haven't found any known AnimatableCurve to obtain actual curve data, please let me know if there is.
Metadata
Metadata
Assignees
Labels
A-AnimationMake things move and change over timeMake things move and change over timeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!