The Wayback Machine - https://web.archive.org/web/20201106021511/https://github.com/unixzii/android-SpringAnimator
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
app
 
 
art
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

Screencast

Requirements

SpringAnimator requires API 16 or higher.

Download

Gradle:

repositories {
    jcenter()
}

dependencies {
    compile 'me.cyandev:springanimator:0.1.0-alpha1'
}

Find out more releases here.

Get Started

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/Framer for providing original algorithms.

Thanks MartinRGB for designing user interface of the playground app and providing graphical resources.

License

Copyright 2017 Cyandev

Licensed 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 at

   http://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.

About

A framer.js DHO and RK4 spring animation port for Android.

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.