bevyengine / bevyengine/bevy

Support obtaining the curve of AnimatableCurve

Open
#19,313 0 comments 0 reactions 0 assignees View on GitHub
A-Animation C-Usability D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

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 Debug for AnimatableCurve
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.