Skip to content

Java library which helps to work with ipfx.org animation interpolators

License

Notifications You must be signed in to change notification settings

dsidex/ipfx.org-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ipfx.org-java

Java library which helps to work with (www.ipfx.org) animation interpolators. Feel free to contribute!

Basic usage

  1. go to (http://ipfx.org/)
  2. create interpolator function
  3. copy generated url (data is encoded in the url)
  4. pass url as a parameter to Interpolator.parseUrl() method

Super simple

import org.ipfx.Interpolator;
...
final Interpolator interpolator = Interpolator.parseUrl(urlData);
...
float y = interpolator.calc(x);
...

Java Android example

final Interpolator interpolator = Interpolator.parseUrl(urlData);

ObjectAnimator animator = ObjectAnimator.ofFloat(testButton, View.Y, startY, endY);
animator.setDuration(1000);

animator.setInterpolator(new TimeInterpolator() {
    @Override
    public float getInterpolation(float input) {
        return interpolator.calc(input);
    }
});
animator.start();

About

Java library which helps to work with ipfx.org animation interpolators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages