bevy/crates/bevy_math/images/easefunction/Elastic.svg
SpecificProtagonist 7c2d54c93f
EaseFunction svg graphs in doc (#17461)
# Objective

The docs of `EaseFunction` don't visualize the different functions,
requiring you to check out the Bevy repo and running the
`easing_function` example.

## Solution

- Add tool to generate suitable svg graphs. This only needs to be re-run
when adding new ease functions.
- works with all themes
- also add missing easing functions to example.

---

## Showcase

![Graphs](https://i.imgur.com/V2oTEUq.png)

---------

Co-authored-by: François Mockers <mockersf@gmail.com>
2025-02-08 09:52:39 +00:00

5 lines
2.6 KiB
XML

<svg viewBox="-0.04 -0.9130816 1.08 1.9530816" width="6em" xmlns="http://www.w3.org/2000/svg">
<title>Elastic(50.0)</title>
<path d="M0,0 L0,1 M1,0 L1,1 M0,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 M0,1 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0 m0.1,0 l0.1,0" fill="none" stroke="var(--main-color)" stroke-width="0.02"/>
<polyline fill="none" points="0 1 0.01010101 0.87652457 0.02020202 0.5430269 0.030303031 0.08985078 0.04040404 -0.36685824 0.05050505 -0.7148113 0.060606062 -0.87308156 0.07070707 -0.8107506 0.08080808 -0.55244195 0.09090909 -0.1699208 0.1010101 0.23758578 0.11111111 0.5690067 0.121212125 0.74639827 0.13131313 0.7331244 0.14141414 0.5410442 0.15151516 0.22541612 0.16161616 -0.13067424 0.17171717 -0.43805146 0.18181819 -0.62368226 0.1919192 -0.64789987 0.2020202 -0.51258254 0.21212122 -0.2586938 0.22222222 0.045701385 0.23232323 0.323524 0.24242425 0.50810283 0.25252524 0.5590545 0.26262626 0.47088003 0.27272728 0.27251196 0.28282827 0.018388987 0.2929293 -0.22629714 0.3030303 -0.40221977 0.3131313 -0.470196 0.32323232 -0.4197166 0.33333334 -0.26991928 0.34343433 -0.063200235 0.35353535 0.14656717 0.36363637 0.30795324 0.37373737 0.384485 0.3838384 0.3627196 0.3939394 0.25414383 0.4040404 0.09079921 0.41414142 -0.08389914 0.42424244 -0.22657609 0.43434343 -0.30457044 0.44444445 -0.30326605 0.45454547 -0.22847569 0.46464646 -0.10361636 0.47474748 0.03728491 0.4848485 0.15871769 0.4949495 0.23254418 0.5050505 0.2443906 0.5151515 0.19616282 0.5252525 0.10433936 0.53535354 -0.0052199364 0.54545456 -0.10439193 0.5555556 -0.16991067 0.56565654 -0.18871152 0.57575756 -0.1603024 0.5858586 -0.095810294 0.5959596 -0.014217138 0.6060606 0.06303555 0.61616164 0.11757636 0.6262626 0.13836896 0.6363636 0.12374747 0.64646465 0.080914974 0.65656567 0.023267984 0.6666667 -0.03356588 0.67676765 -0.07585454 0.68686867 -0.094979525 0.6969697 -0.089021325 0.7070707 -0.062480092 0.7171717 -0.024399519 0.72727275 0.014448881 0.7373737 0.044489622 0.74747473 0.059607744 0.75757575 0.058243513 0.7676768 0.043173373 0.7777778 0.020197451 0.7878788 -0.0037806034 0.7979798 -0.022693872 0.8080808 -0.032753825 0.8181818 -0.033070922 0.82828283 -0.025409937 0.83838385 -0.013266563 0.8484849 -0.00062561035 0.85858583 0.009203136 0.86868685 0.014359295 0.8787879 0.014653623 0.8888889 0.0112707615 0.8989899 0.006127298 0.90909094 0.0011420846 0.9191919 -0.0023419857 0.9292929 -0.00382936 0.93939394 -0.0036069155 0.94949496 -0.002430439 0.959596 -0.0011194944 0.969697 -0.0002272129 0.97979796 0.000103116035 0.989899 0.000070393085 1 0" stroke="red" stroke-width="0.04"/>
</svg>