https://github.com/unixzii/android-springanimator
A framer.js DHO and RK4 spring animation port for Android.
https://github.com/unixzii/android-springanimator
android android-library android-ui android-ui-insipired animation port
Last synced: 6 months ago
JSON representation
A framer.js DHO and RK4 spring animation port for Android.
- Host: GitHub
- URL: https://github.com/unixzii/android-springanimator
- Owner: unixzii
- License: apache-2.0
- Created: 2017-07-20T05:36:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-28T02:43:40.000Z (over 2 years ago)
- Last Synced: 2025-03-20T13:13:35.047Z (7 months ago)
- Topics: android, android-library, android-ui, android-ui-insipired, animation, port
- Language: Java
- Size: 2.79 MB
- Stars: 42
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SpringAnimator
[](https://travis-ci.org/unixzii/android-SpringAnimator)
A framer.js DHO and RK4 spring animation port for Android.### Features
* Extends from `Animator`, providing a familiar API to use
* Provides **DHO** and **RK4** algorithm from Framer.js
* Bundled playground app, fine-tuning made easy## Demo
Checkout the playground here: [playground.apk](https://github.com/unixzii/android-SpringAnimator/releases/download/0.1.0-alpha1/playground.apk)
## Requirements
SpringAnimator requires API 16 or higher.## Download
Gradle:
```groovy
repositories {
jcenter()
}dependencies {
compile 'me.cyandev:springanimator:0.1.0-alpha1'
}
```Find out more releases [here](https://github.com/unixzii/android-SpringAnimator/releases).
## Get Started
```java
DhoSpringAnimator animator = new DhoSpringAnimator();
animator.setStiffness(200);
animator.setDamping(10);
animator.setMass(1);
animator.setVelocity(0);
animator.addUpdateListener(new AbsSpringAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(AbsSpringAnimator animation) {
// Do something cool here...
}
});
animator.start();
```Parameters are fully matched with Frame.js.
## Acknowledgement
Thanks [koenbok](https://github.com/koenbok)/[Framer](https://github.com/koenbok/Framer) for providing original algorithms.Thanks [MartinRGB](https://github.com/MartinRGB) for designing user interface of the playground app and providing graphical resources.
## License
```
Copyright 2017 CyandevLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```