Easings
Description
Customizable Optimized Library for Easing, Interpolation, Curves and Splines for Python.
Installation
pip install easings
Usage
Ease values between 0 and 1:
import easings
progress = easings.back_in_out(
progress = 0.5,
bounce_const = easings.both_back_consts[0.1]
)
print(progress)
Easing values with a start and end value using an Easer
import easings
easer = easings.Easer(4, 12)
value = easer.value(easings.poly_in_out, 0.5, 2)
print(value)
Using a Bezier curve
import numpy as np
import easings
points = np.array([[0, 0], [1, 2], [3, 3], [4, 0]])
curve = easings.curves.Bezier(points)
print(curve.point(0.4))
Using a Catmull-Rom spline
import numpy as np
import easings
points = np.array([[0, 0], [1, 2], [2, 4], [3, 3], [4, 1], [5, 2], [6, 0], [7, -1], [8, 1], [9, 3], [10, 2]])
spline = easings.splines.Catmull(points)
print(spline.point(1.2))
License
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
Metadata
Release files for easings 4.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easings-4.1.2.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easings-4.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / easings-4.1.2.tar.gz
| Download URL | easings-4.1.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
946049f4611407ee6014709562ecee4287e3ff093a7c11c8302da375162ece4e
|
|
BLAKE2b-256 checksum How to use checksums |
517e33ba24b4915b8782b18a1779022ea7d24c82226ca317a6e70805e299159a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / easings-4.1.2-py3-none-any.whl
| Download URL | easings-4.1.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bdc2c39254bf4c424cbde00a334851112ff0e7811597a9dc6ce8f9bc6349cc4
|
|
BLAKE2b-256 checksum How to use checksums |
3d5dbd490ae45ed85a415d20bc7b10fdc645d6037f5172bc83c633a4fbad9a0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|