Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrexplode/blaze
Lightweight animation library
https://github.com/mrexplode/blaze
minecraft opengl
Last synced: about 1 month ago
JSON representation
Lightweight animation library
- Host: GitHub
- URL: https://github.com/mrexplode/blaze
- Owner: MrExplode
- License: mit
- Created: 2021-08-17T20:22:12.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T20:48:24.000Z (about 1 year ago)
- Last Synced: 2024-01-12T08:03:38.568Z (about 1 year ago)
- Topics: minecraft, opengl
- Language: Java
- Homepage:
- Size: 179 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blaze [![Release](https://jitpack.io/v/MrExplode/Blaze.svg)](https://jitpack.io/#MrExplode/Blaze)
Lightweight animation library made mainly for OpenGL usage## Installation
Maven:
```xmljitpack.io
https://jitpack.iocom.github.MrExplode
Blaze
2.1.1```
Gradle:
```groovy
repositories {
maven { url 'https://jitpack.io' }
}dependencies {
implementation 'com.github.MrExplode:Blaze:2.1.1'
}
```## Building
You can build the project by running `./gradlew build`## Usage
Create an `Animator` instance, and update it in every render loop:
```java
Animator animator = new Animator();//update in render loop
animator.update(partialTicks);
```
Creating and using animations:
```java
Animation animation1 = Animation.animation(Eases.LINEAR);
Animation animation2 = Animation.animation(Eases.SINE_IN_OUT, AnimationType.bouncing(), 0.1);animator.start(animation1);
//use animation value in render call
//...
double animValue = animation1.value();
//eg. translate the matrix
GL11.glTranslate2d(x, y + animValue);
//...
```Built-in animation types:
```java
AnimationType bouncing();
AnimationType bouncing(Ease backwardEase);
AnimationType once();
AnimationType once(Runnable runnable);
AnimationType loop(Ease backwardEase);
```## License
```
MIT LicenseCopyright (c) 2024 SunStorm
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```