├── .classpath ├── .project ├── .settings ├── org.eclipse.jdt.core.prefs └── org.eclipse.jdt.ui.prefs ├── Ani_Cheat_Sheet.pdf ├── README.md ├── _to_dos.txt ├── demos ├── collage_space │ ├── CollageItem.pde │ ├── collage_space.pde │ └── data │ │ ├── paper │ │ ├── layer2_01.png │ │ ├── layer2_02.png │ │ ├── layer2_03.png │ │ ├── layer2_04.png │ │ └── layer2_05.png │ │ ├── sky │ │ ├── layer1_01.png │ │ ├── layer1_02.png │ │ ├── layer1_03.png │ │ ├── layer1_04.png │ │ ├── layer1_05.png │ │ ├── layer1_06.png │ │ ├── layer1_07.png │ │ ├── layer1_08.png │ │ ├── layer1_09.png │ │ ├── layer1_10.png │ │ └── layer1_11.png │ │ └── urban │ │ ├── layer3_01.png │ │ ├── layer3_02.png │ │ ├── layer3_03.png │ │ ├── layer3_04.png │ │ ├── layer3_05.png │ │ ├── layer3_06.png │ │ ├── layer3_07.png │ │ ├── layer3_08.png │ │ ├── layer3_09.png │ │ ├── layer3_10.png │ │ ├── layer3_11.png │ │ ├── layer3_12.png │ │ ├── layer3_13.png │ │ ├── layer3_14.png │ │ ├── layer3_15.png │ │ ├── layer3_16.png │ │ ├── layer3_17.png │ │ ├── layer3_18.png │ │ ├── layer3_19.png │ │ ├── layer3_20.png │ │ ├── layer3_21.png │ │ └── layer3_22.png ├── valentine_drips_player │ ├── Drip.pde │ ├── data │ │ └── recording.txt │ └── valentine_drips_player.pde └── valentine_drips_recorder │ ├── DrawItem.pde │ ├── data │ ├── recording.txt │ └── underlay.png │ └── valentine_drips_recorder.pde ├── examples ├── Ani_Basics │ └── Ani_Basics.pde ├── Ani_Callback │ └── Ani_Callback.pde ├── Ani_Callback_Delay_End │ └── Ani_Callback_Delay_End.pde ├── Ani_Callback_Object │ └── Ani_Callback_Object.pde ├── Ani_Delay │ └── Ani_Delay.pde ├── Ani_Easing_Custom │ └── Ani_Easing_Custom.pde ├── Ani_Easing_Default │ └── Ani_Easing_Default.pde ├── Ani_Easing_Styles │ └── Ani_Easing_Styles.pde ├── Ani_Easing_Viewer │ └── Ani_Easing_Viewer.pde ├── Ani_Export_Web │ └── Ani_Export_Web.pde ├── Ani_From │ └── Ani_From.pde ├── Ani_PVector │ └── Ani_PVector.pde ├── Ani_PVector_Easing_Styles │ └── Ani_PVector_Easing_Styles.pde ├── Ani_Pause_Resume │ └── Ani_Pause_Resume.pde ├── Ani_PlayMode │ └── Ani_PlayMode.pde ├── Ani_Propertylist │ └── Ani_Propertylist.pde ├── Ani_Repeat │ └── Ani_Repeat.pde ├── Ani_Seek │ └── Ani_Seek.pde ├── Ani_Sequence_Basics │ └── Ani_Sequence_Basics.pde ├── Ani_Sequence_Loop │ └── Ani_Sequence_Loop.pde ├── Ani_Sequence_Seek │ └── Ani_Sequence_Seek.pde ├── Ani_TimeModes │ └── Ani_TimeModes.pde ├── Ani_Workaround_Android │ └── Ani_Workaround_Android.pde ├── Ani_in_Classes │ └── Ani_in_Classes.pde ├── Ani_in_Classes_Bang │ └── Ani_in_Classes_Bang.pde └── Ani_in_Classes_Start_Delays │ └── Ani_in_Classes_Start_Delays.pde ├── library.properties ├── libs └── core.jar ├── reference ├── allclasses-frame.html ├── allclasses-noframe.html ├── constant-values.html ├── de │ └── looksgood │ │ └── ani │ │ ├── Ani.LibraryNotInitializedException.html │ │ ├── Ani.html │ │ ├── AniConstants.html │ │ ├── AniCore.html │ │ ├── AniSequence.html │ │ ├── AniUtil.html │ │ ├── easing │ │ ├── Back.html │ │ ├── Bounce.html │ │ ├── Circ.html │ │ ├── Cubic.html │ │ ├── Custom.html │ │ ├── CustomEasing.html │ │ ├── Easing.html │ │ ├── Elastic.html │ │ ├── Expo.html │ │ ├── Linear.html │ │ ├── Quad.html │ │ ├── Quart.html │ │ ├── Quint.html │ │ ├── Sine.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html ├── deprecated-list.html ├── help-doc.html ├── index-all.html ├── index.html ├── overview-frame.html ├── overview-summary.html ├── overview-tree.html ├── package-list ├── resources │ └── inherit.gif ├── serialized-form.html └── stylesheet.css ├── resources ├── build.xml ├── code │ ├── ExampleTaglet.class │ ├── ExampleTaglet.java │ ├── ant-contrib-1.0b3.jar │ └── doc.sh └── stylesheet.css ├── src └── de │ └── looksgood │ └── ani │ ├── Ani.java │ ├── AniConstants.java │ ├── AniCore.java │ ├── AniSequence.java │ ├── AniUtil.java │ └── easing │ ├── Back.java │ ├── Bounce.java │ ├── Circ.java │ ├── Cubic.java │ ├── CustomEasing.java │ ├── Easing.java │ ├── Elastic.java │ ├── Expo.java │ ├── Linear.java │ ├── Quad.java │ ├── Quart.java │ ├── Quint.java │ └── Sine.java └── web ├── changelog.txt ├── img ├── Ani_Cheat_Sheet.png ├── ani.png ├── arr_big.png ├── arr_small.png ├── color_about.png ├── color_demos.png ├── color_download.png ├── color_examples.png ├── color_installation.png └── color_reference.png ├── index.html ├── js ├── behaviour.js └── jquery-1.4.2.min.js └── stylesheet.css /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ani 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Feb 28 11:37:06 CET 2010 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.5 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.5 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Fri Feb 12 11:38:38 CET 2010 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.ui.javadoc=false 4 | org.eclipse.jdt.ui.text.custom_code_templates= 5 | -------------------------------------------------------------------------------- /Ani_Cheat_Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/Ani_Cheat_Sheet.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ⚠️ This repository is no longer maintained 2 | 3 | Ani 4 | === 5 | A lightweight animation library for the programming environment [Processing](https://processing.org/) 6 | 7 | Documentation -> [dev.benedikt-gross.de/libraries/Ani/](http://dev.benedikt-gross.de/libraries/Ani/) 8 | ------------- 9 | -------------------------------------------------------------------------------- /_to_dos.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/_to_dos.txt -------------------------------------------------------------------------------- /demos/collage_space/CollageItem.pde: -------------------------------------------------------------------------------- 1 | class CollageItem { 2 | // polar coordinates 3 | float a, l; 4 | 5 | // image 6 | float rotation, newRotation; 7 | float scaling, newScaling; 8 | float scaleStart, scaleEnd; 9 | 10 | PImage img = new PImage(); 11 | 12 | // animation 13 | float x=0, y=0, newX=0, newY=0; 14 | Ani aniX, aniY, aniRotation, aniScaling; 15 | 16 | CollageItem() { 17 | init(); 18 | } 19 | 20 | void init() { 21 | x = width/2; 22 | y = height/2; 23 | scaling = 0.1; 24 | l = width; 25 | } 26 | 27 | void randomize() { 28 | a = random(TWO_PI); 29 | newScaling = random(scaleStart,scaleEnd); 30 | //float tmpRotation = AniUtil.shortRotation(rotation,newRotation); 31 | newRotation = a + random(-PI,PI); 32 | } 33 | 34 | void update() { 35 | init(); 36 | randomize(); 37 | newX = width/2 + cos(a) * l; 38 | newY = height/2 + sin(a) * l; 39 | aniX = Ani.to(this, random(5,10), "x", newX, Ani.QUAD_IN_OUT); 40 | aniY = Ani.to(this, random(5,10), "y", newY, Ani.QUAD_IN_OUT); 41 | aniRotation = Ani.to(this, random(5,10), "rotation", newRotation, Ani.QUAD_IN_OUT, "onEnd:update"); 42 | aniScaling = Ani.to(this, random(1,5), "scaling", newScaling, Ani.SINE_IN_OUT); 43 | } 44 | 45 | void draw() { 46 | pushMatrix(); 47 | translate(x, y); 48 | rotate(rotation); 49 | scale(scaling); 50 | image(img, 0,0); 51 | popMatrix(); 52 | } 53 | } 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /demos/collage_space/collage_space.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * animated radial collage generator. 3 | * if you use your own footage, make sure to rename the files or adjust the folder names. 4 | * 5 | * KEYS 6 | * 1-3 : create a new animated collage layer 7 | * s : save png 8 | * 9 | * Ani (a processing animation library) 10 | * Copyright (c) 2010 Benedikt Gross 11 | * http://www.looksgood.de/libraries/Ani 12 | * 13 | * based on P_4_2_1_02.pde out of the book 14 | * Generative Gestaltung, ISBN: 978-3-87439-759-9 15 | * Hartmut Bohnacker, Benedikt Gross, Julia Laub, Claudius Lazzeroni 16 | * http://www.generative-gestaltung.de 17 | */ 18 | 19 | import processing.opengl.*; 20 | import de.looksgood.ani.*; 21 | import java.util.Calendar; 22 | 23 | ArrayList layer1Images, layer2Images, layer3Images; 24 | ArrayList layer1Items, layer2Items, layer3Items; 25 | 26 | 27 | void setup() { 28 | size(800, 600, OPENGL); 29 | imageMode(CENTER); 30 | background(255); 31 | 32 | layer1Images = new ArrayList(); 33 | layer2Images = new ArrayList(); 34 | layer3Images = new ArrayList(); 35 | 36 | layer1Items = new ArrayList(); 37 | layer2Items = new ArrayList(); 38 | layer3Items = new ArrayList(); 39 | 40 | Ani.init(this); 41 | 42 | // ------ load images ------ 43 | layer1Images = loadImages(sketchPath()+"/data/sky/"); 44 | layer2Images = loadImages(sketchPath()+"/data/paper/"); 45 | layer3Images = loadImages(sketchPath()+"/data/urban/"); 46 | 47 | // create fist layer, press 2-3 for more 48 | editCollageItems(layer1Items, layer1Images, (int)random(75,250), 0.25,1); 49 | } 50 | 51 | void draw() { 52 | // draw collage 53 | background(255); 54 | for (int i = 0 ; i < layer1Items.size(); i++) ((CollageItem)layer1Items.get(i)).draw(); 55 | for (int i = 0 ; i < layer2Items.size(); i++) ((CollageItem)layer2Items.get(i)).draw(); 56 | for (int i = 0 ; i < layer3Items.size(); i++) ((CollageItem)layer3Items.get(i)).draw(); 57 | //println(frameRate+" "+layer1Items.size()+" "+layer2Items.size()+" "+layer3Items.size()+" "+Ani.size()); 58 | } 59 | 60 | // ------ interactions ------ 61 | void keyPressed() { 62 | if (key == 's' || key == 'S') saveFrame(timestamp()+"_####.png"); 63 | 64 | if (key == '1') editCollageItems(layer1Items, layer1Images, (int)random(75,250), 0.25,1); 65 | if (key == '2') editCollageItems(layer2Items, layer2Images, (int)random(30,150), 0.5,2); 66 | if (key == '3') editCollageItems(layer3Items, layer3Images, (int)random(20,35), 0,1.5); 67 | } 68 | // ------ collage items helper functions ------ 69 | void editCollageItems(ArrayList theItems, ArrayList theImages, int theCount, float theScaleStart, float theScaleEnd) { 70 | for (int i = 0 ; i < theCount; i++) { 71 | if (theCount > theItems.size()) { 72 | theItems.add( new CollageItem() ); 73 | } 74 | CollageItem tmpItem = (CollageItem) theItems.get(i); 75 | tmpItem.img = (PImage) theImages.get(i%theImages.size()); 76 | tmpItem.scaleStart = theScaleStart; 77 | tmpItem.scaleEnd = theScaleEnd; 78 | tmpItem.update(); 79 | } 80 | } 81 | 82 | // ------ load the images in arraylists ------ 83 | ArrayList loadImages(String thePath) { 84 | println("\nloadImages: "+thePath); 85 | File dir = new File(thePath); 86 | ArrayList images = new ArrayList(); 87 | if (dir.isDirectory()) { 88 | String[] contents = dir.list(); 89 | for (int i = 0 ; i < contents.length; i++) { 90 | // skip hidden files and folders starting with a dot, load .png files only 91 | if (contents[i].charAt(0) == '.') continue; 92 | else if (contents[i].toLowerCase().endsWith(".png")) { 93 | File childFile = new File(dir, contents[i]); 94 | images.add(loadImage(childFile.getPath())); 95 | println(images.size()+" "+contents[i]+" "+childFile.getPath()); 96 | } 97 | } 98 | } 99 | return images; 100 | } 101 | 102 | // timestamp 103 | String timestamp() { 104 | Calendar now = Calendar.getInstance(); 105 | return String.format("%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS", now); 106 | } -------------------------------------------------------------------------------- /demos/collage_space/data/paper/layer2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/paper/layer2_01.png -------------------------------------------------------------------------------- /demos/collage_space/data/paper/layer2_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/paper/layer2_02.png -------------------------------------------------------------------------------- /demos/collage_space/data/paper/layer2_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/paper/layer2_03.png -------------------------------------------------------------------------------- /demos/collage_space/data/paper/layer2_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/paper/layer2_04.png -------------------------------------------------------------------------------- /demos/collage_space/data/paper/layer2_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/paper/layer2_05.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_01.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_02.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_03.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_04.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_05.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_06.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_07.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_08.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_09.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_10.png -------------------------------------------------------------------------------- /demos/collage_space/data/sky/layer1_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/sky/layer1_11.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_01.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_02.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_03.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_04.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_05.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_06.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_07.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_08.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_09.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_10.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_11.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_12.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_13.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_14.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_15.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_16.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_17.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_18.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_19.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_20.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_21.png -------------------------------------------------------------------------------- /demos/collage_space/data/urban/layer3_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/collage_space/data/urban/layer3_22.png -------------------------------------------------------------------------------- /demos/valentine_drips_player/Drip.pde: -------------------------------------------------------------------------------- 1 | public class Drip { 2 | float x = 0, y = 0; 3 | float time = 0; 4 | float diameter = 2; 5 | Ani aniX, aniY; 6 | color col; 7 | Drip(float theX, float theY, color theCol) { 8 | x = theX; 9 | y = theY; 10 | time = random(1,5); 11 | diameter = random(1,4); 12 | aniX = Ani.to(this, time, "x", x+random(-2,2), Ani.QUAD_OUT); 13 | aniY = Ani.to(this, time, "y", y+random(5,70), Ani.QUAD_OUT); 14 | col = theCol; 15 | } 16 | 17 | void draw() { 18 | if (aniX.isPlaying() && aniY.isPlaying()) { 19 | fill(col,50); 20 | ellipse(x,y,diameter,diameter); 21 | } 22 | } 23 | } 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demos/valentine_drips_player/data/recording.txt: -------------------------------------------------------------------------------- 1 | 40.0;195.0;3.726;10;0 2 | 109.0;332.0;1.131;10;0 3 | 49.0;135.0;1.0;10;0 4 | 169.0;383.0;1.066;10;0 5 | 67.0;103.0;1.3;10;0 6 | 226.0;436.0;1.4;10;0 7 | 86.0;77.0;1.384;10;0 8 | 304.0;510.0;1.349;10;0 9 | 114.0;58.0;1.45;10;0 10 | 322.0;480.0;1.416;10;0 11 | 143.0;47.0;1.267;10;0 12 | 346.0;459.0;1.651;10;0 13 | 176.0;41.0;1.367;10;0 14 | 368.0;435.0;1.499;10;0 15 | 212.0;43.0;1.25;10;0 16 | 392.0;412.0;1.467;10;0 17 | 254.0;57.0;1.4;10;0 18 | 419.0;392.0;1.5;10;0 19 | 305.0;92.0;1.267;10;0 20 | 445.0;373.0;1.401;10;0 21 | 330.0;70.0;1.499;10;0 22 | 466.0;353.0;1.417;10;0 23 | 355.0;55.0;1.183;10;0 24 | 491.0;329.0;1.332;10;0 25 | 388.0;44.0;1.418;10;0 26 | 514.0;304.0;0.932;10;0 27 | 421.0;43.0;1.534;10;0 28 | 535.0;273.0;1.233;10;0 29 | 458.0;49.0;1.384;10;0 30 | 550.0;238.0;1.234;10;0 31 | 503.0;72.0;1.266;10;0 32 | 556.0;178.0;1.05;10;0 33 | 553.0;138.0;1.084;10;1 34 | 535.0;102.0;0.7;10;1 35 | 503.0;69.0;0.6;10;1 36 | 475.0;52.0;0.667;10;1 37 | 439.0;42.0;0.733;10;1 38 | 390.0;44.0;0.717;10;1 39 | 352.0;54.0;0.666;10;1 40 | 303.0;92.0;0.734;10;1 41 | 268.0;68.0;1.133;10;1 42 | 208.0;41.0;0.733;10;1 43 | 162.0;43.0;0.651;10;1 44 | 117.0;57.0;0.616;10;1 45 | 69.0;94.0;0.716;10;1 46 | 43.0;151.0;0.717;10;1 47 | 46.0;220.0;0.649;10;1 48 | 64.0;283.0;0.75;10;1 49 | 118.0;343.0;0.649;10;1 50 | 156.0;381.0;0.684;10;1 51 | 196.0;413.0;0.85;10;1 52 | 241.0;443.0;0.667;10;1 53 | 269.0;474.0;0.9;10;1 54 | 298.0;516.0;1.15;10;1 55 | 328.0;480.0;0.633;10;1 56 | 363.0;438.0;0.583;10;1 57 | 409.0;401.0;0.618;10;1 58 | 464.0;366.0;0.883;10;1 59 | 513.0;308.0;0.966;10;1 60 | 540.0;267.0;0.717;10;1 61 | 552.0;221.0;0.833;10;1 62 | 557.0;176.0;1.534;1;1;0000000000000 63 | 203.0;595.0;2.0;0;1 64 | 145.0;744.0;1.599;10;1 65 | 179.0;693.0;1.182;10;1 66 | 231.0;688.0;1.217;10;1 67 | 252.0;741.0;1.167;10;1 68 | 208.0;596.0;1.367;10;1 69 | 294.0;593.0;1.367;0;1 70 | 296.0;593.0;1.566;10;1 71 | 293.0;745.0;1.668;10;1 72 | 303.0;600.0;2.449;10;1 73 | 382.0;741.0;1.384;10;1 74 | 386.0;594.0;1.984;10;1 75 | 439.0;593.0;2.05;0;1 76 | 439.0;593.0;0.849;10;1 77 | 441.0;744.0;1.867;10;1 -------------------------------------------------------------------------------- /demos/valentine_drips_player/valentine_drips_player.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * this sketch plays back the recorded values of valentine_drips_player.pde 3 | * 4 | * KEYS 5 | * space : restart 6 | * 7 | * Ani (a processing animation library) 8 | * Copyright (c) 2010 Benedikt Groß 9 | * 10 | * http://www.looksgood.de/libraries/Ani 11 | */ 12 | 13 | 14 | import de.looksgood.ani.*; 15 | 16 | ArrayList drips; 17 | float x, y, diameter, col; 18 | color currentColor; 19 | 20 | AniSequence seq; 21 | String easing = Ani.QUAD_IN_OUT; 22 | 23 | void setup() { 24 | // use full screen size 25 | //size(screen.width, screen.height); 26 | size(600,800); 27 | background(255); 28 | smooth(); 29 | noStroke(); 30 | cursor(CROSS); 31 | drips = new ArrayList(); 32 | 33 | Ani.init(this); 34 | 35 | // create an empty sequence 36 | seq = new AniSequence(this); 37 | seq.beginSequence(); 38 | 39 | // load the data and put it in the sequence 40 | String[] tokens = loadStrings("recording.txt"); 41 | for (int i = 0; i < tokens.length; i++) { 42 | String[] rawValues = split(tokens[i],";"); 43 | float[] values = new float[rawValues.length]; 44 | for (int ii = 0; ii < values.length; ii++) values[ii] = new Float(rawValues[ii]); 45 | if (i == 0) { 46 | x = values[0]; 47 | y = values[1]; 48 | diameter = values[3]; 49 | col = values[4]; 50 | } 51 | else { 52 | seq.beginStep(); 53 | seq.add(Ani.to(this, values[2], "x", values[0], easing )); 54 | seq.add(Ani.to(this, values[2], "y", values[1], easing )); 55 | seq.add(Ani.to(this, 0.1, "diameter", values[3], easing )); 56 | seq.add(Ani.to(this, values[2]/2, "col", values[4], easing )); 57 | seq.endStep(); 58 | } 59 | } 60 | seq.endSequence(); 61 | // go! 62 | seq.start(); 63 | 64 | //seq.pause(); 65 | //seq.seek(0.70); 66 | //seq.resume(); 67 | } 68 | 69 | 70 | void draw() { 71 | if (seq.isEnded() == false) { 72 | currentColor = lerpColor(color(0,0,0),color(237,77,53),col); 73 | // create new drips 74 | if (random(10) > 8.75 && diameter > 0) { 75 | drips.add(new Drip(x,y+diameter/2,currentColor)); 76 | } 77 | 78 | for (int i = 0; i < drips.size(); i++) { 79 | Drip tmp = (Drip) drips.get(i); 80 | tmp.draw(); 81 | } 82 | fill(currentColor); 83 | ellipse(x,y,diameter,diameter); 84 | } 85 | else { 86 | restart(); 87 | } 88 | } 89 | 90 | void restart() { 91 | delay(7000); 92 | // kill all anis 93 | Ani.killAll(); 94 | // kill all drips 95 | for (int j = drips.size()-1; j >= 0 ; j--) { 96 | drips.remove(j); 97 | } 98 | // restart sequence 99 | seq.start(); 100 | background(255); 101 | } 102 | 103 | // press SPACE to start/restart the sequence 104 | void keyPressed() { 105 | if (key == ' ') { 106 | restart(); 107 | } 108 | } 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /demos/valentine_drips_recorder/DrawItem.pde: -------------------------------------------------------------------------------- 1 | class DrawItem { 2 | float x, y; 3 | float time; 4 | int index; 5 | int diameter; 6 | int col; 7 | DrawItem(int theIndex, float theX, float theY, float theTime, int theDiameter, int theCol) { 8 | index = theIndex; 9 | x = theX; 10 | y = theY; 11 | time = theTime; 12 | diameter = theDiameter; 13 | col = theCol; 14 | 15 | } 16 | void draw() { 17 | if (col == 0) { 18 | fill(0); 19 | stroke(0); 20 | } 21 | if (col == 1) { 22 | fill(165,196,0); 23 | stroke(165,196,0); 24 | } 25 | 26 | if (index > 0) { 27 | DrawItem tmp = (DrawItem) drawItems.get(index-1); 28 | line(x,y,tmp.x,tmp.y); 29 | } 30 | 31 | ellipse(x,y,diameter,diameter); 32 | } 33 | 34 | String toString() { 35 | return x+";"+y+";"+time+";"+diameter+";"+col; 36 | } 37 | } 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /demos/valentine_drips_recorder/data/recording.txt: -------------------------------------------------------------------------------- 1 | 196.0;595.0;5.774;10;1 2 | 145.0;744.0;1.599;10;1 3 | 179.0;693.0;1.182;10;1 4 | 231.0;688.0;1.217;10;1 5 | 252.0;741.0;1.167;10;1 6 | 208.0;596.0;1.367;10;1 7 | 294.0;593.0;1.367;0;1 8 | 296.0;593.0;1.566;10;1 9 | 293.0;745.0;1.668;10;1 10 | 303.0;600.0;2.449;10;1 11 | 382.0;741.0;1.384;10;1 12 | 386.0;594.0;1.984;10;1 13 | 439.0;593.0;2.05;0;1 14 | 439.0;593.0;0.849;10;1 15 | 441.0;744.0;1.867;10;1 16 | -------------------------------------------------------------------------------- /demos/valentine_drips_recorder/data/underlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/demos/valentine_drips_recorder/data/underlay.png -------------------------------------------------------------------------------- /demos/valentine_drips_recorder/valentine_drips_recorder.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * this sketch is a helper application for valentine_drips_player. 3 | * draw something, press p for saving the information to 4 | * a file and load everyting back in valentine_drips ... 5 | * 6 | * MOUSE 7 | * press : new drawing point 8 | * 9 | * KEYS 10 | * del : clear screen 11 | * 1,2 : set color 12 | * 3,4 : set diameter 13 | * z : undo last action 14 | * u : show underlay picture 15 | * s : save png 16 | * p : save drawing values to file 17 | * 18 | * Ani (a processing animation library) 19 | * Copyright (c) 2010 Benedikt Groß 20 | * 21 | * http://www.looksgood.de/libraries/Ani 22 | */ 23 | 24 | ArrayList drawItems; 25 | 26 | boolean showUndelay = false; 27 | float beginTime = 0.0; 28 | 29 | PImage img; 30 | int imageAlpha = 100; 31 | int diameter = 10; 32 | 33 | int col = 0; 34 | 35 | void setup() { 36 | // use full screen size 37 | //size(screen.width, screen.height); 38 | size(600,800); 39 | background(255); 40 | smooth(); 41 | drawItems = new ArrayList(); 42 | cursor(CROSS); 43 | 44 | // load an image in background 45 | img = loadImage("underlay.png"); 46 | } 47 | 48 | void draw() { 49 | 50 | } 51 | 52 | 53 | void mousePressed() { 54 | DrawItem drw = new DrawItem(drawItems.size(),mouseX,mouseY,getStopwatch(),diameter,col); 55 | drw.draw(); 56 | drawItems.add(drw); 57 | resetStopwatch(); 58 | } 59 | 60 | 61 | void keyReleased() { 62 | if (key == 's' || key == 'S') saveFrame(timestamp()+"_##.png"); 63 | if (key == 'p' || key == 'P') savedrawItems(); 64 | 65 | if (key == '1') col = 0; 66 | if (key == '2') col = 1; 67 | 68 | if (key == '3') diameter = 10; 69 | if (key == '4') diameter = 0; 70 | 71 | if (key == DELETE || key == BACKSPACE) { 72 | newdrawItemsList(); 73 | } 74 | if (key == 'u' || key == 'U') showUndelay = !showUndelay; 75 | 76 | if (showUndelay) { 77 | background(255); 78 | reDrawAlldrawItems(); 79 | tint(255, imageAlpha); 80 | image(img, 0, 0); 81 | } 82 | else { 83 | reDrawAlldrawItems(); 84 | } 85 | 86 | if (key == 'z' || key == 'Z') { 87 | undodrawItems(); 88 | } 89 | } 90 | 91 | // timestamp 92 | String timestamp() { 93 | Calendar now = Calendar.getInstance(); 94 | return String.format("%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS", now); 95 | } 96 | 97 | void savedrawItems() { 98 | String[] tokens = new String[drawItems.size()]; 99 | for (int i = 0; i < drawItems.size(); i++) { 100 | DrawItem tmp = (DrawItem) drawItems.get(i); 101 | tokens[i] = tmp.toString(); 102 | println(tokens[i]); 103 | } 104 | saveStrings(dataPath("recording.txt"), tokens); 105 | } 106 | 107 | void reDrawAlldrawItems() { 108 | background(255); 109 | for (int i = 0; i < drawItems.size(); i++) { 110 | DrawItem tmp = (DrawItem) drawItems.get(i); 111 | tmp.draw(); 112 | } 113 | } 114 | 115 | void newdrawItemsList() { 116 | background(255); 117 | drawItems = new ArrayList(); 118 | resetStopwatch(); 119 | } 120 | 121 | void undodrawItems() { 122 | int undoIndex = drawItems.size()-1; 123 | undoIndex = max(undoIndex,0); 124 | 125 | if (undoIndex >= 0) { 126 | for (int i = drawItems.size()-1; i >= undoIndex; i--) { 127 | drawItems.remove(i); 128 | } 129 | } 130 | reDrawAlldrawItems(); 131 | resetStopwatch(); 132 | } 133 | 134 | float getStopwatch() { 135 | return (millis() - beginTime) / 1000; 136 | } 137 | void resetStopwatch() { 138 | beginTime = millis(); 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /examples/Ani_Basics/Ani_Basics.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows the basic use of Ani aka a Hello Ani 3 | * 4 | * MOUSE 5 | * click : set end position of animation 6 | */ 7 | 8 | import de.looksgood.ani.*; 9 | 10 | float x = 256; 11 | float y = 256; 12 | 13 | void setup() { 14 | size(512,512); 15 | smooth(); 16 | noStroke(); 17 | 18 | // you have to call always Ani.init() first! 19 | Ani.init(this); 20 | } 21 | 22 | void draw() { 23 | background(255); 24 | fill(0); 25 | ellipse(x,y,120,120); 26 | } 27 | 28 | void mouseReleased() { 29 | // animate the variables x and y in 1.5 sec to mouse click position 30 | Ani.to(this, 1.5, "x", mouseX); 31 | Ani.to(this, 1.5, "y", mouseY); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /examples/Ani_Callback/Ani_Callback.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to use the callback features onStart and onEnd 3 | * 4 | * MOUSE 5 | * click : set end of animation and trigger a new one 6 | */ 7 | 8 | import de.looksgood.ani.*; 9 | 10 | float x = 256; 11 | float y = 256; 12 | int diameter = 50; 13 | 14 | Ani diameterAni; 15 | 16 | void setup() { 17 | size(512,512); 18 | smooth(); 19 | noStroke(); 20 | 21 | // Ani.init() must be called always first! 22 | Ani.init(this); 23 | 24 | // define a Ani with callbacks, specify the method name after the keywords: onStart, onEnd, onDelayEnd and onUpdate 25 | diameterAni = new Ani(this, 1.5, "diameter", 150, Ani.EXPO_IN_OUT, "onStart:itsStarted, onEnd:newRandomDiameter"); 26 | 27 | // side info: it's also possible to define this in a static way 28 | //diameterAni = Ani.to(this, 1.5, "diameter", 150, Ani.EXPO_IN_OUT, "onStart:itsStarted, onEnd:newRandomDiameter"); 29 | } 30 | 31 | void draw() { 32 | background(255); 33 | fill(0); 34 | ellipse(x,y,diameter,diameter); 35 | } 36 | 37 | void mouseReleased() { 38 | Ani.to(this, 1.5, "x", mouseX, Ani.ELASTIC_OUT); 39 | Ani.to(this, 1.5, "y", mouseY, Ani.ELASTIC_OUT); 40 | 41 | // start diameterAni 42 | diameterAni.start(); 43 | } 44 | 45 | // there are two possiblities to declare the methods for the callbacks: 46 | // without any parameters or with one parameter of type Ani 47 | 48 | // called onStart of diameterAni animation 49 | void itsStarted() { 50 | println("diameterAni started"); 51 | } 52 | 53 | // called onEnd of diameterAni animation 54 | void newRandomDiameter(Ani theAni) { 55 | float end = theAni.getEnd(); 56 | float newEnd = end + random(-20,20); 57 | theAni.setEnd(newEnd); 58 | println("diameterAni finished. current end: "+end+" -> "+"new end: "+newEnd); 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /examples/Ani_Callback_Delay_End/Ani_Callback_Delay_End.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to use the callback feature onDelayEnd 3 | * 4 | * MOUSE 5 | * click : set end of animation and trigger a new one 6 | */ 7 | 8 | import de.looksgood.ani.*; 9 | 10 | float x = 256; 11 | float y = 256; 12 | int diameter = 50; 13 | 14 | Ani diameterAni; 15 | 16 | void setup() { 17 | size(512,512); 18 | smooth(); 19 | noStroke(); 20 | 21 | // Ani.init() must be called always first! 22 | Ani.init(this); 23 | 24 | // define a Ani with callback, specify the method name after the keyword: onDelayEnd 25 | diameterAni = new Ani(this, 1.5, 1, "diameter", 150, Ani.EXPO_IN_OUT, "onDelayEnd:delayIsOver"); 26 | } 27 | 28 | void draw() { 29 | background(255); 30 | fill(0); 31 | ellipse(x,y,diameter,diameter); 32 | //println(diameterAni.isDelaying()); 33 | } 34 | 35 | void mouseReleased() { 36 | Ani.to(this, 1.5, "x", mouseX, Ani.ELASTIC_OUT); 37 | Ani.to(this, 1.5, "y", mouseY, Ani.ELASTIC_OUT); 38 | 39 | // start diameterAni 40 | diameterAni.start(); 41 | } 42 | 43 | // called onDelayEnd if the animation begins to tween the value 44 | void delayIsOver() { 45 | println("diameterAni delayIsOver()"); 46 | } 47 | -------------------------------------------------------------------------------- /examples/Ani_Callback_Object/Ani_Callback_Object.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * How to use the CallbackObject to call methods of objects other than its own. 3 | * 4 | */ 5 | 6 | import de.looksgood.ani.*; 7 | 8 | Circle c1,c2; 9 | 10 | void setup() { 11 | size(512,512); 12 | smooth(); 13 | noStroke(); 14 | textAlign(CENTER); 15 | 16 | // Ani.init() must be called always first! 17 | Ani.init(this); 18 | Ani.noAutostart(); 19 | 20 | c1 = new Circle(200, 100); 21 | c2 = new Circle(300, 400); 22 | 23 | c1.otherCircle = c2; 24 | c1.makeAni(); 25 | 26 | c2.otherCircle = c1; 27 | c2.makeAni(); 28 | 29 | c1.ShrinkAndEnlarge(); 30 | } 31 | 32 | void draw() { 33 | background(255); 34 | c1.draw(); c2.draw(); 35 | } 36 | 37 | class Circle { 38 | int x,y, diameter = 70; 39 | Circle otherCircle; 40 | Ani diameterAni; 41 | 42 | Circle(int x, int y) { 43 | this.x = x; 44 | this.y = y; 45 | } 46 | 47 | void makeAni() { 48 | diameterAni = Ani.to(this, 0.5, 0.5, "diameter", 5, Ani.EXPO_IN_OUT, otherCircle, "onEnd:ShrinkAndEnlarge"); 49 | } 50 | 51 | void ShrinkAndEnlarge() { 52 | otherCircle.diameterAni.reverse(); 53 | diameterAni.start(); 54 | } 55 | 56 | void draw() { 57 | fill(0); 58 | ellipse(x,y,diameter,diameter); 59 | } 60 | 61 | } 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /examples/Ani_Delay/Ani_Delay.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to delay the start of an animation 3 | * 4 | * MOUSE 5 | * click : set end position of the animations and trigger new one 6 | */ 7 | 8 | import de.looksgood.ani.*; 9 | 10 | float x = 256; 11 | float y = 256; 12 | 13 | void setup() { 14 | size(512,512); 15 | smooth(); 16 | noStroke(); 17 | 18 | // you have to call always Ani.init() first! 19 | Ani.init(this); 20 | } 21 | 22 | void draw() { 23 | background(255); 24 | fill(0); 25 | ellipse(x,y,120,120); 26 | } 27 | 28 | void mouseReleased() { 29 | // the animation is 1 sec delayed 30 | Ani.to(this, 0.5, 1, "x", mouseX); 31 | Ani.to(this, 0.5, 1, "y", mouseY); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /examples/Ani_Easing_Custom/Ani_Easing_Custom.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to use a custom easing. 3 | * to define your own easing curve please use the editor of greensock: 4 | * http://www.greensock.com/customease/ 5 | * the definition of the custom easing curve is based on greensock's excellent customease implementation! 6 | * 7 | * MOUSE 8 | * click : set end position of the animations and trigger new one 9 | */ 10 | 11 | 12 | import de.looksgood.ani.*; 13 | import de.looksgood.ani.easing.*; 14 | 15 | CustomEasing myOwnEasing = CustomEasing.create("myOwnEasing","[{s:0,cp:0.383,e:0.644},{s:0.644,cp:0.905,e:1.044},{s:1.044,cp:1.183,e:1.012},{s:1.012,cp:0.841,e:1}]"); 16 | // you can access your easings also in a more static way: CustomEasing.byName("myOwnEasing") 17 | // e.g. Ani.to(this, 1, "x", random(0,width), CustomEasing.byName("myOwnEasing") ); 18 | 19 | float x = 256; 20 | float y = 256; 21 | 22 | Ani aniX; 23 | Ani aniY; 24 | 25 | void setup() { 26 | size(512,512); 27 | smooth(); 28 | noStroke(); 29 | 30 | // you have to call always Ani.init() first! 31 | Ani.init(this); 32 | 33 | // save the references to the anis 34 | aniX = Ani.to(this, 1, "x", random(0,width), myOwnEasing ); 35 | aniY = Ani.to(this, 1, "y", random(0,height), myOwnEasing ); 36 | } 37 | 38 | void draw() { 39 | background(255); 40 | fill(0); 41 | ellipse(x,y,120,120); 42 | } 43 | 44 | void mouseReleased() { 45 | aniX = Ani.to(this, 1, "x", mouseX, myOwnEasing); 46 | aniY = Ani.to(this, 1, "y", mouseY, myOwnEasing); 47 | } 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /examples/Ani_Easing_Default/Ani_Easing_Default.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to set the default easing. 3 | * this can be usefull if you have a lot animations of the same easings. 4 | * 5 | * MOUSE 6 | * click : set end position of the animations and trigger new one 7 | */ 8 | 9 | import de.looksgood.ani.*; 10 | 11 | float x = 256; 12 | float y = 256; 13 | int diameter = 50; 14 | 15 | void setup() { 16 | size(512,512); 17 | smooth(); 18 | noStroke(); 19 | 20 | // you have to call always Ani.init() first! 21 | Ani.init(this); 22 | // set the default easing 23 | Ani.setDefaultEasing(Ani.QUART_IN_OUT); 24 | 25 | } 26 | 27 | void draw() { 28 | background(255); 29 | fill(0); 30 | ellipse(x,y,diameter,diameter); 31 | } 32 | 33 | void mouseReleased() { 34 | Ani.to(this, 1.0, "x", mouseX); 35 | Ani.to(this, 1.0, "y", mouseY); 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/Ani_Easing_Styles/Ani_Easing_Styles.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to set a specific easing (character of movment) 3 | * list of all easing styles below: 4 | * 5 | * Ani.LINEAR 6 | * Ani.QUAD_IN 7 | * Ani.QUAD_OUT 8 | * Ani.QUAD_IN_OUT 9 | * Ani.CUBIC_IN 10 | * Ani.CUBIC_IN_OUT 11 | * Ani.CUBIC_OUT 12 | * Ani.QUART_IN 13 | * Ani.QUART_OUT 14 | * Ani.QUART_IN_OUT 15 | * Ani.QUINT_IN 16 | * Ani.QUINT_OUT 17 | * Ani.QUINT_IN_OUT 18 | * Ani.SINE_IN 19 | * Ani.SINE_OUT 20 | * Ani.SINE_IN_OUT 21 | * Ani.CIRC_IN 22 | * Ani.CIRC_OUT 23 | * Ani.CIRC_IN_OUT 24 | * Ani.EXPO_IN 25 | * Ani.EXPO_OUT 26 | * Ani.EXPO_IN_OUT 27 | * Ani.BACK_IN 28 | * Ani.BACK_OUT 29 | * Ani.BACK_IN_OUT 30 | * Ani.BOUNCE_IN 31 | * Ani.BOUNCE_OUT 32 | * Ani.BOUNCE_IN_OUT 33 | * Ani.ELASTIC_IN 34 | * Ani.ELASTIC_OUT 35 | * Ani.ELASTIC_IN_OUT 36 | * 37 | * MOUSE 38 | * click : set end position of the animations and trigger new one 39 | */ 40 | 41 | import de.looksgood.ani.*; 42 | 43 | float x = 256; 44 | float y = 256; 45 | int diameter = 50; 46 | 47 | void setup() { 48 | size(512,512); 49 | smooth(); 50 | noStroke(); 51 | 52 | // you have to call always Ani.init() first! 53 | Ani.init(this); 54 | } 55 | 56 | void draw() { 57 | background(255); 58 | fill(0); 59 | ellipse(x,y,diameter,diameter); 60 | } 61 | 62 | void mouseReleased() { 63 | Ani.to(this, 1.0, "x", mouseX, Ani.BOUNCE_OUT); 64 | Ani.to(this, 1.0, "y", mouseY, Ani.BOUNCE_OUT); 65 | } 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /examples/Ani_Easing_Viewer/Ani_Easing_Viewer.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * this is not really a how to example ... 3 | * instead this sketch shows you the diffent kind of easings in a very convenient way 4 | * 5 | * MOUSE 6 | * click : set end position of the animations and trigger new one 7 | * 8 | * KEYS 9 | * arrow up : increase duration of animation 10 | * arrow down : decrease duration of animation 11 | * arrow left : change easing (scroll list) 12 | * arrow right : change easing (scroll list) 13 | */ 14 | 15 | import de.looksgood.ani.*; 16 | import de.looksgood.ani.easing.*; 17 | 18 | Easing[] easings = { Ani.LINEAR, Ani.QUAD_IN, Ani.QUAD_OUT, Ani.QUAD_IN_OUT, Ani.CUBIC_IN, Ani.CUBIC_IN_OUT, Ani.CUBIC_OUT, Ani.QUART_IN, Ani.QUART_OUT, Ani.QUART_IN_OUT, Ani.QUINT_IN, Ani.QUINT_OUT, Ani.QUINT_IN_OUT, Ani.SINE_IN, Ani.SINE_OUT, Ani.SINE_IN_OUT, Ani.CIRC_IN, Ani.CIRC_OUT, Ani.CIRC_IN_OUT, Ani.EXPO_IN, Ani.EXPO_OUT, Ani.EXPO_IN_OUT, Ani.BACK_IN, Ani.BACK_OUT, Ani.BACK_IN_OUT, Ani.BOUNCE_IN, Ani.BOUNCE_OUT, Ani.BOUNCE_IN_OUT, Ani.ELASTIC_IN, Ani.ELASTIC_OUT, Ani.ELASTIC_IN_OUT}; 19 | String[] easingsVariableNames = {"Ani.LINEAR", "Ani.QUAD_IN", "Ani.QUAD_OUT", "Ani.QUAD_IN_OUT", "Ani.CUBIC_IN", "Ani.CUBIC_IN_OUT", "Ani.CUBIC_OUT", "Ani.QUART_IN", "Ani.QUART_OUT", "Ani.QUART_IN_OUT", "Ani.QUINT_IN", "Ani.QUINT_OUT", "Ani.QUINT_IN_OUT", "Ani.SINE_IN", "Ani.SINE_OUT", "Ani.SINE_IN_OUT", "Ani.CIRC_IN", "Ani.CIRC_OUT", "Ani.CIRC_IN_OUT", "Ani.EXPO_IN", "Ani.EXPO_OUT", "Ani.EXPO_IN_OUT", "Ani.BACK_IN", "Ani.BACK_OUT", "Ani.BACK_IN_OUT", "Ani.BOUNCE_IN", "Ani.BOUNCE_OUT", "Ani.BOUNCE_IN_OUT", "Ani.ELASTIC_IN", "Ani.ELASTIC_OUT", "Ani.ELASTIC_IN_OUT"}; 20 | String code = ""; 21 | 22 | float x = 256; 23 | float y = 256; 24 | float duration = 1; 25 | 26 | int index = 26; 27 | Easing currentEasing = easings[index]; 28 | 29 | void setup() { 30 | size(512,512); 31 | smooth(); 32 | noStroke(); 33 | cursor(CROSS); 34 | 35 | // you have to call always Ani.init() first! 36 | Ani.init(this); 37 | } 38 | 39 | void draw() { 40 | background(255); 41 | fill(0); 42 | int diameter = 50; 43 | ellipse(x,y,diameter,diameter); 44 | 45 | code = "Ani.to(this, "+nf(duration,0,2)+", \"x\", mouseX, "+easingsVariableNames[index]+");"; 46 | text(code,10,20); 47 | } 48 | 49 | void mouseReleased() { 50 | Ani.to(this, duration, "x", mouseX, easings[index]); 51 | Ani.to(this, duration, "y", mouseY, easings[index]); 52 | println(code); 53 | } 54 | 55 | void keyPressed() { 56 | if (keyCode == UP) duration += 0.1; 57 | if (keyCode == DOWN) duration -= 0.1; 58 | duration = max(0.25,duration); 59 | } 60 | 61 | void keyReleased() { 62 | if (keyCode == LEFT) index--; 63 | if (keyCode == RIGHT) index++; 64 | index = constrain(index,0,easings.length-1); 65 | } 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /examples/Ani_Export_Web/Ani_Export_Web.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * show how to use the Ani library in a webbrowser 3 | * 4 | * you have to add "public" for sketches running 5 | * in browsers (due to the java security manager). 6 | * otherwise Ani will not work! 7 | * 8 | * MOUSE 9 | * click : set end position of the animations and trigger new one 10 | */ 11 | 12 | import de.looksgood.ani.*; 13 | 14 | public float x = 256; 15 | public float y = 256; 16 | 17 | void setup() { 18 | size(512,512); 19 | smooth(); 20 | noStroke(); 21 | 22 | // Ani.init() must be called always first! 23 | Ani.init(this); 24 | } 25 | 26 | void draw() { 27 | background(255); 28 | fill(0); 29 | ellipse(x,y,120,120); 30 | } 31 | 32 | void mouseReleased() { 33 | Ani.to(this, 1.5, "x", mouseX); 34 | Ani.to(this, 1.5, "y", mouseY); 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/Ani_From/Ani_From.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to use the Ani.from feature. this can be usefull 3 | * if you know already the final postion e.g. moving things from 4 | * outside into the display 5 | * 6 | * MOUSE 7 | * click : set end position of the animations and trigger new one 8 | */ 9 | import de.looksgood.ani.*; 10 | 11 | float x = 256; 12 | float y = 256; 13 | 14 | void setup() { 15 | size(512,512); 16 | smooth(); 17 | noStroke(); 18 | 19 | // you have to call always Ani.init() first! 20 | Ani.init(this); 21 | } 22 | 23 | void draw() { 24 | background(255); 25 | fill(0); 26 | ellipse(x,y,120,120); 27 | } 28 | 29 | void mouseReleased() { 30 | // animate the variables x and y in 1.5 sec from mouse click position to the initial values 31 | Ani.from(this, 1.5, "x", mouseX, Ani.QUINT_IN_OUT); 32 | Ani.from(this, 1.5, "y", mouseY, Ani.QUINT_IN_OUT); 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /examples/Ani_PVector/Ani_PVector.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to use Ani in combination with PVector 3 | * 4 | */ 5 | 6 | import de.looksgood.ani.*; 7 | 8 | PVector point1, target1; 9 | PVector point2, target2; 10 | 11 | void setup() { 12 | size(800, 600); 13 | smooth(); 14 | 15 | point1 = new PVector(width/2, height/2); 16 | target1 = new PVector(width/2, height/2); 17 | 18 | point2 = new PVector(width/2, height/2); 19 | target2 = new PVector(width/2, height/2); 20 | 21 | Ani.init(this); 22 | } 23 | 24 | void draw() { 25 | background(250); 26 | 27 | noStroke(); 28 | fill(255, 0, 0, 128); 29 | ellipse(point1.x, point1.y, 15, 15); 30 | stroke(255, 0, 0, 128); 31 | strokeWeight(2); 32 | noFill(); 33 | ellipse(target1.x, target1.y, 20, 20); 34 | 35 | noStroke(); 36 | fill(0, 0, 255, 128); 37 | ellipse(point2.x, point2.y, 15, 15); 38 | stroke(0, 0, 255, 128); 39 | strokeWeight(2); 40 | noFill(); 41 | ellipse(target2.x, target2.y, 20, 20); 42 | } 43 | 44 | void mousePressed() { 45 | if (mouseButton == LEFT) { 46 | target1.x = mouseX; 47 | target1.y = mouseY; 48 | println("set target1"); 49 | Ani.to(point1, 1.0f, "x", target1.x); 50 | Ani.to(point1, 1.0f, "y", target1.y); 51 | } 52 | if (mouseButton == RIGHT) { 53 | target2.x = mouseX; 54 | target2.y = mouseY; 55 | println("set target2"); 56 | Ani.to(point2, 1.0f, "x", target2.x); 57 | Ani.to(point2, 1.0f, "y", target2.y); 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /examples/Ani_PVector_Easing_Styles/Ani_PVector_Easing_Styles.pde: -------------------------------------------------------------------------------- 1 | // shows how to use Ani in combination with PVector 2 | 3 | import de.looksgood.ani.*; 4 | import de.looksgood.ani.easing.*; 5 | float duration = 1; 6 | 7 | PVector point1, target1; 8 | PVector point2, target2; 9 | Easing[] easings = { 10 | Ani.LINEAR, Ani.QUAD_IN, Ani.QUAD_OUT, Ani.QUAD_IN_OUT, Ani.CUBIC_IN, Ani.CUBIC_IN_OUT, Ani.CUBIC_OUT, Ani.QUART_IN, Ani.QUART_OUT, Ani.QUART_IN_OUT, Ani.QUINT_IN, Ani.QUINT_OUT, Ani.QUINT_IN_OUT, Ani.SINE_IN, Ani.SINE_OUT, Ani.SINE_IN_OUT, Ani.CIRC_IN, Ani.CIRC_OUT, Ani.CIRC_IN_OUT, Ani.EXPO_IN, Ani.EXPO_OUT, Ani.EXPO_IN_OUT, Ani.BACK_IN, Ani.BACK_OUT, Ani.BACK_IN_OUT, Ani.BOUNCE_IN, Ani.BOUNCE_OUT, Ani.BOUNCE_IN_OUT, Ani.ELASTIC_IN, Ani.ELASTIC_OUT, Ani.ELASTIC_IN_OUT 11 | }; 12 | String[] easingsVariableNames = { 13 | "Ani.LINEAR", "Ani.QUAD_IN", "Ani.QUAD_OUT", "Ani.QUAD_IN_OUT", "Ani.CUBIC_IN", "Ani.CUBIC_IN_OUT", "Ani.CUBIC_OUT", "Ani.QUART_IN", "Ani.QUART_OUT", "Ani.QUART_IN_OUT", "Ani.QUINT_IN", "Ani.QUINT_OUT", "Ani.QUINT_IN_OUT", "Ani.SINE_IN", "Ani.SINE_OUT", "Ani.SINE_IN_OUT", "Ani.CIRC_IN", "Ani.CIRC_OUT", "Ani.CIRC_IN_OUT", "Ani.EXPO_IN", "Ani.EXPO_OUT", "Ani.EXPO_IN_OUT", "Ani.BACK_IN", "Ani.BACK_OUT", "Ani.BACK_IN_OUT", "Ani.BOUNCE_IN", "Ani.BOUNCE_OUT", "Ani.BOUNCE_IN_OUT", "Ani.ELASTIC_IN", "Ani.ELASTIC_OUT", "Ani.ELASTIC_IN_OUT" 14 | }; 15 | String code = ""; 16 | float x = 256; 17 | float y = 256; 18 | int index = 26; 19 | Easing currentEasing = easings[index]; 20 | 21 | void setup() { 22 | size(800, 600); 23 | smooth(); 24 | 25 | point1 = new PVector(width/2, height/2); 26 | target1 = new PVector(width/2, height/2); 27 | 28 | point2 = new PVector(width/2, height/2); 29 | target2 = new PVector(width/2, height/2); 30 | 31 | Ani.init(this); 32 | } 33 | 34 | void draw() { 35 | background(250); 36 | 37 | noStroke(); 38 | fill(255, 0, 0, 128); 39 | ellipse(point1.x, point1.y, 15, 15); 40 | stroke(255, 0, 0, 128); 41 | strokeWeight(2); 42 | noFill(); 43 | ellipse(target1.x, target1.y, 20, 20); 44 | 45 | noStroke(); 46 | fill(0, 0, 255, 128); 47 | ellipse(point2.x, point2.y, 15, 15); 48 | stroke(0, 0, 255, 128); 49 | strokeWeight(2); 50 | noFill(); 51 | ellipse(target2.x, target2.y, 20, 20); 52 | code = "Ani.to(this, "+nf(duration, 0, 2)+", \"x\", mouseX, "+easingsVariableNames[index]+");"; 53 | text(code, 10, 20); 54 | } 55 | 56 | void mousePressed() { 57 | if (mouseButton == LEFT) { 58 | target1.x = mouseX; 59 | target1.y = mouseY; 60 | Ani.to(point1, duration, "x", target1.x, easings[index]); 61 | Ani.to(point1, duration, "y", target1.y, easings[index]); 62 | println("set target1"); 63 | } 64 | if (mouseButton == RIGHT) { 65 | target2.x = mouseX; 66 | target2.y = mouseY; 67 | Ani.to(point2, 1.0f, "x", target2.x, Ani.ELASTIC_OUT); 68 | Ani.to(point2, 1.0f, "y", target2.y, Ani.ELASTIC_OUT); 69 | println("set target2"); 70 | } 71 | } 72 | 73 | void keyPressed() { 74 | if (keyCode == UP) duration += 0.1; 75 | if (keyCode == DOWN) duration -= 0.1; 76 | duration = max(0.25, duration); 77 | } 78 | 79 | void keyReleased() { 80 | if (keyCode == LEFT) index--; 81 | if (keyCode == RIGHT) index++; 82 | index = constrain(index, 0, easings.length-1); 83 | } 84 | 85 | -------------------------------------------------------------------------------- /examples/Ani_Pause_Resume/Ani_Pause_Resume.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to pause an resume an animation 3 | * 4 | * MOUSE 5 | * click : set end position of the animations and trigger new one 6 | * 7 | * KEYS 8 | * space : toggle, pause and resume animation 9 | */ 10 | import de.looksgood.ani.*; 11 | 12 | float x = 256; 13 | float y = 256; 14 | 15 | Ani aniX; 16 | Ani aniY; 17 | 18 | void setup() { 19 | size(512,512); 20 | smooth(); 21 | noStroke(); 22 | 23 | // you have to call always Ani.init() first! 24 | Ani.init(this); 25 | 26 | // save the references to the anis 27 | aniX = Ani.to(this, 5, "x", random(0,width)); 28 | aniY = Ani.to(this, 5, "y", random(0,height)); 29 | } 30 | 31 | void draw() { 32 | background(255); 33 | fill(0); 34 | ellipse(x,y,120,120); 35 | } 36 | 37 | void mouseReleased() { 38 | aniX = Ani.to(this, 3, "x", mouseX); 39 | aniY = Ani.to(this, 3, "y", mouseY); 40 | } 41 | 42 | void keyPressed() { 43 | if (key == ' ') { 44 | if (aniX.isPlaying() && aniY.isPlaying()) { 45 | aniX.pause(); 46 | aniY.pause(); 47 | } 48 | else { 49 | aniX.resume(); 50 | aniY.resume(); 51 | } 52 | } 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /examples/Ani_PlayMode/Ani_PlayMode.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to set the play mode and repetitions of animations 3 | * possible play modes are: 4 | * 5 | * Ani.FORWARD 6 | * Ani.BACKWARD 7 | * Ani.YOYO 8 | */ 9 | 10 | import de.looksgood.ani.*; 11 | 12 | Ani animation; 13 | float diameter = 10; 14 | float x = 256; 15 | float y = 256; 16 | 17 | void setup() { 18 | size(512,512); 19 | smooth(); 20 | noStroke(); 21 | textAlign(CENTER); 22 | 23 | // Ani.init() must be called always first! 24 | Ani.init(this); 25 | animation = new Ani(this, 2, "diameter", 200); 26 | 27 | // FORWARD, BACKWARD, YOYO 28 | animation.setPlayMode(Ani.YOYO); 29 | animation.repeat(4); 30 | } 31 | 32 | void draw() { 33 | background(255); 34 | fill(0); 35 | ellipse(x,y,diameter,diameter); 36 | 37 | String txt = animation.getRepeatNumber()+" / "+animation.getRepeatCount(); 38 | text(txt, x, y+diameter); 39 | 40 | text("Direction: "+animation.getDirection()+" PlayMode: "+animation.getPlayMode(), width/2,height-5); 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /examples/Ani_Propertylist/Ani_Propertylist.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to define an animation in "propertylist" style. 3 | * this is a shortcut to define similar animations just in one line of code. 4 | */ 5 | 6 | import de.looksgood.ani.*; 7 | 8 | float x,y,w,h; 9 | 10 | void setup() { 11 | size(512,512); 12 | smooth(); 13 | noStroke(); 14 | 15 | x = 0; 16 | y = height/2; 17 | w = 10; 18 | h = 10; 19 | 20 | // Ani.init() must be called always first! 21 | Ani.init(this); 22 | Ani.to(this, 2.5, "x:500,y:256,w:400,h:410", Ani.SINE_IN_OUT); 23 | } 24 | 25 | void draw() { 26 | background(255); 27 | fill(0); 28 | ellipse(x,y,w,h); 29 | } 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/Ani_Repeat/Ani_Repeat.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to set the repeat count of animations 3 | * 4 | */ 5 | 6 | import de.looksgood.ani.*; 7 | 8 | Ani aniA, aniB, aniC; 9 | float diaA = 0, diaB = 0, diaC = 0; 10 | 11 | void setup() { 12 | size(600,300); 13 | smooth(); 14 | noStroke(); 15 | textAlign(CENTER); 16 | 17 | // Ani.init() must be called always first! 18 | Ani.init(this); 19 | 20 | aniA = new Ani(this, 2, "diaA", 100); 21 | 22 | aniB = new Ani(this, 2, "diaB", 100); 23 | // repeat 3 times 24 | aniB.repeat(3); 25 | 26 | aniC = new Ani(this, 2, "diaC", 100); 27 | // repeat forever 28 | aniC.repeat(); 29 | } 30 | 31 | void draw() { 32 | background(255); 33 | fill(0); 34 | 35 | float x = width/3; 36 | float y = 150; 37 | 38 | translate(x/2,0); 39 | 40 | String txtA = "aniA: "+aniA.getRepeatNumber()+"/"+aniA.getRepeatCount(); 41 | text(txtA, x*0, y+diaA); 42 | ellipse(x*0, y, diaA, diaA); 43 | 44 | String txtB = "aniB: "+aniB.getRepeatNumber()+"/"+aniB.getRepeatCount(); 45 | text(txtB, x*1, y+diaB); 46 | ellipse(x*1, y, diaB, diaB); 47 | 48 | String txtC = "aniC: "+aniC.getRepeatNumber()+"/"+aniC.getRepeatCount(); 49 | text(txtC, x*2, y+diaC); 50 | ellipse(x*2, y, diaC, diaC); 51 | 52 | println(aniA.isRepeating()+" "+aniB.isRepeating()+" "+aniC.isRepeating()); 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /examples/Ani_Seek/Ani_Seek.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to seek an animation in time 3 | * 4 | * MOUSE 5 | * drag : move from left to right to seek the animation 6 | * 7 | * KEYS 8 | * space : toggle, pause and resume animation 9 | */ 10 | 11 | import de.looksgood.ani.*; 12 | 13 | int padding = 50; 14 | float startX, startY, endX, endY; 15 | 16 | float x, y; 17 | int diameter = 20; 18 | 19 | Ani aniX; 20 | Ani aniY; 21 | 22 | void setup() { 23 | size(512,512); 24 | smooth(); 25 | 26 | startX = 0 + padding; 27 | startY = height - padding; 28 | endX = width - padding; 29 | endY = 0 + padding; 30 | 31 | x = startX; 32 | y = startY; 33 | 34 | // Ani.init() must be called always first! 35 | Ani.init(this); 36 | aniX = Ani.to(this, 5, 1, "x", endX, Ani.LINEAR); 37 | aniY = Ani.to(this, 5, 1, "y", endY, Ani.ELASTIC_OUT); 38 | } 39 | 40 | void draw() { 41 | // seek 42 | if (mousePressed == true) { 43 | float seekValue = mouseX/(float)width; 44 | aniX.seek(seekValue); 45 | aniY.seek(seekValue); 46 | } 47 | 48 | // draw everything 49 | background(255); 50 | line(startX, startY, endX, endY); 51 | fill(0); 52 | ellipse(x,y,diameter,diameter); 53 | ellipse(x,startY,diameter/4,diameter/4); 54 | ellipse(startX,y,diameter/4,diameter/4); 55 | } 56 | 57 | // pause 58 | void mousePressed() { 59 | aniX.pause(); 60 | aniY.pause(); 61 | } 62 | 63 | // resume 64 | void mouseReleased() { 65 | aniX.resume(); 66 | aniY.resume(); 67 | } 68 | 69 | // pause and resume animation by pressing SPACE 70 | void keyPressed() { 71 | if (key == ' ') { 72 | if (aniX.isPlaying() && aniY.isPlaying()) { 73 | aniX.pause(); 74 | aniY.pause(); 75 | } 76 | else { 77 | aniX.resume(); 78 | aniY.resume(); 79 | } 80 | } 81 | } 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /examples/Ani_Sequence_Basics/Ani_Sequence_Basics.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to create a sequence of animations (timeline) 3 | * 4 | * KEYS 5 | * space : toggle, pause and resume sequence 6 | * s : start or restart sequence 7 | */ 8 | 9 | import de.looksgood.ani.*; 10 | 11 | float x, y, diameter; 12 | AniSequence seq; 13 | 14 | void setup() { 15 | size(512,512); 16 | smooth(); 17 | noStroke(); 18 | textAlign(CENTER); 19 | background(255); 20 | 21 | x = 50; 22 | y = 50; 23 | diameter = 10; 24 | 25 | // Ani.init() must be called always first! 26 | Ani.init(this); 27 | 28 | // create a sequence 29 | // dont forget to call beginSequence() and endSequence() 30 | seq = new AniSequence(this); 31 | seq.beginSequence(); 32 | 33 | // step 0 34 | seq.add(Ani.to(this, 1, "diameter", 55)); 35 | 36 | // step 1 37 | seq.add(Ani.to(this, 2, "x:400,y:100")); 38 | 39 | // step 2 40 | seq.add(Ani.to(this, 1, "x:450,y:400")); 41 | 42 | // step 3 43 | seq.add(Ani.to(this, 1, "x:100,y:450")); 44 | 45 | // step 4 46 | seq.beginStep(); 47 | seq.add(Ani.to(this, 1, "x:50,y:50")); 48 | seq.add(Ani.to(this, 2, "diameter", 5)); 49 | seq.endStep(); 50 | 51 | seq.endSequence(); 52 | 53 | // start the whole sequence 54 | seq.start(); 55 | } 56 | 57 | void draw() { 58 | fill(255,5); 59 | rect(0,0,width,height); 60 | 61 | //println(seq.isFinished()); 62 | 63 | fill(0); 64 | ellipse(x,y,diameter,diameter); 65 | } 66 | 67 | // pause and resume animation by pressing SPACE 68 | // or press "s" to start the sequence 69 | void keyPressed() { 70 | if (key == 's' || key == 'S') seq.start(); 71 | if (key == ' ') { 72 | if (seq.isPlaying()) seq.pause(); 73 | else seq.resume(); 74 | } 75 | } 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /examples/Ani_Sequence_Loop/Ani_Sequence_Loop.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to loop a whole sequence 3 | * 4 | * KEYS 5 | * space : toggle, pause and resume sequence 6 | * s : start or restart sequence 7 | */ 8 | 9 | import de.looksgood.ani.*; 10 | 11 | float x, y, diameter; 12 | AniSequence seq; 13 | 14 | void setup() { 15 | size(512,512); 16 | smooth(); 17 | noStroke(); 18 | textAlign(CENTER); 19 | background(255); 20 | 21 | x = 50; 22 | y = 50; 23 | diameter = 10; 24 | 25 | // Ani.init() must be called always first! 26 | Ani.init(this); 27 | 28 | // create a sequence 29 | // dont forget to call beginSequence() and endSequence() 30 | seq = new AniSequence(this); 31 | seq.beginSequence(); 32 | 33 | // step 0 34 | seq.add(Ani.to(this, 1, "diameter", 55)); 35 | 36 | // step 1 37 | seq.add(Ani.to(this, 2, "x:400,y:100")); 38 | 39 | // step 2 40 | seq.add(Ani.to(this, 1, "x:450,y:400")); 41 | 42 | // step 3 43 | seq.add(Ani.to(this, 1, "x:100,y:450")); 44 | 45 | // step 4 46 | seq.beginStep(); 47 | seq.add(Ani.to(this, 1, "x:50,y:50")); 48 | seq.add(Ani.to(this, 2, "diameter", 5, Ani.EXPO_OUT, "onEnd:sequenceEnd")); 49 | seq.endStep(); 50 | 51 | seq.endSequence(); 52 | 53 | // start the whole sequence 54 | seq.start(); 55 | } 56 | 57 | void draw() { 58 | fill(255,5); 59 | rect(0,0,width,height); 60 | 61 | //println(seq.isFinished()); 62 | 63 | fill(0); 64 | ellipse(x,y,diameter,diameter); 65 | } 66 | 67 | void sequenceEnd() { 68 | //println("sequenceEnd() restart all again"); 69 | seq.start(); 70 | } 71 | 72 | // pause and resume animation by pressing SPACE 73 | // or press "s" to start the sequence 74 | void keyPressed() { 75 | if (key == 's' || key == 'S') seq.start(); 76 | if (key == ' ') { 77 | if (seq.isPlaying()) seq.pause(); 78 | else seq.resume(); 79 | } 80 | } 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /examples/Ani_Sequence_Seek/Ani_Sequence_Seek.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to seek a sequence of animations in time 3 | * 4 | * MOUSE 5 | * drag : move from left to right to seek the sequence 6 | * 7 | * KEYS 8 | * space : toggle, pause and resume sequence 9 | * s : start or restart sequence 10 | */ 11 | 12 | 13 | import de.looksgood.ani.*; 14 | 15 | float x, y, diameter; 16 | 17 | AniSequence seq; 18 | 19 | void setup() { 20 | size(512,512); 21 | smooth(); 22 | noStroke(); 23 | textAlign(CENTER); 24 | 25 | x = 50; 26 | y = 50; 27 | diameter = 10; 28 | 29 | // Ani.init() must be called always first! 30 | Ani.init(this); 31 | 32 | // create a sequence 33 | seq = new AniSequence(this); 34 | seq.beginSequence(); 35 | 36 | seq.beginStep(); 37 | seq.add(Ani.to(this, 1, "diameter", 55)); 38 | seq.endStep(); 39 | seq.add(Ani.to(this, 2, "x:400,y:100")); 40 | seq.add(Ani.to(this, 1, "x:450,y:400")); 41 | seq.add(Ani.to(this, 1, "x:100,y:450")); 42 | seq.beginStep(); 43 | seq.add(Ani.to(this, 1, "x:50,y:50")); 44 | seq.add(Ani.to(this, 2, "diameter", 5)); 45 | seq.endStep(); 46 | 47 | seq.endSequence(); 48 | seq.start(); 49 | 50 | println("total length of this sequence: "+seq.getDuration()); 51 | } 52 | 53 | void draw() { 54 | background(255); 55 | // calc seek value 56 | if (mousePressed == true) { 57 | float seekValue = mouseX/(float)width; 58 | seq.seek(seekValue); 59 | } 60 | 61 | fill(0); 62 | ellipse(x,y,diameter,diameter); 63 | text((int)x+" "+(int)y ,x,y+diameter); 64 | 65 | if (seq.isEnded()) println("done"); 66 | else println("current time: "+seq.getTime()+" current step: "+seq.getStepNumber()+" of "+seq.getStepCount()); 67 | } 68 | 69 | // pause 70 | void mousePressed() { 71 | seq.pause(); 72 | } 73 | 74 | // resume 75 | void mouseReleased() { 76 | seq.resume(); 77 | } 78 | 79 | // pause and resume animation by pressing SPACE 80 | // or press "s" to start/restart the sequence 81 | void keyPressed() { 82 | if (key == 's' || key == 'S') seq.start(); 83 | if (key == ' ') { 84 | if (seq.isPlaying()) seq.pause(); 85 | else seq.resume(); 86 | } 87 | } 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /examples/Ani_TimeModes/Ani_TimeModes.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * shows how to set the default time mode of Ani 3 | * 4 | * MOUSE 5 | * click : set end position of animation 6 | */ 7 | 8 | import de.looksgood.ani.*; 9 | 10 | float x = 256; 11 | float y = 256; 12 | 13 | void setup() { 14 | size(512,512); 15 | smooth(); 16 | noStroke(); 17 | Ani.init(this); 18 | 19 | // the default time mode of Ani is: 20 | println(Ani.getDefaultTimeMode()); 21 | 22 | // sets the time mode: SECONDS or FRAMES 23 | Ani.setDefaultTimeMode(Ani.FRAMES); 24 | } 25 | 26 | void draw() { 27 | background(255); 28 | fill(0); 29 | ellipse(x,y,120,120); 30 | } 31 | 32 | void mouseReleased() { 33 | // animate the variables x and y in 30 frames to mouse click position 34 | Ani.to(this, 30, "x", mouseX); 35 | Ani.to(this, 30, "y", mouseY); 36 | } 37 | 38 | -------------------------------------------------------------------------------- /examples/Ani_Workaround_Android/Ani_Workaround_Android.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * This example is a workaround to get Ani running on android. 3 | * Basically the example mimics the registerPre() mechanism (to hook into 4 | * the draw loop from a library). Unfortunatelly registerPre() is not 5 | * available at processing for android. This sketch is a hack to get around 6 | * this issue: More infos here: 7 | * 8 | * http://wiki.processing.org/w/Android#API_Changed.2C_Gone.2C_or_Forgotten 9 | * https://forum.processing.org/topic/android-api-changes-registering-methods-make-library-also-working-on-android 10 | * https://github.com/b-g/Ani/issues/1#issuecomment-4799082 11 | */ 12 | 13 | import de.looksgood.ani.*; 14 | 15 | float x = 256; 16 | float y = 256; 17 | 18 | ArrayList anis; // workaround 19 | ArrayList anisToUnregister; // workaround 20 | 21 | void setup() { 22 | size(512, 512); 23 | smooth(); 24 | noStroke(); 25 | 26 | Ani.init(this); 27 | 28 | anis = new ArrayList(); // workaround 29 | anisToUnregister = new ArrayList(); // workaround 30 | } 31 | 32 | void draw() { 33 | background(255); 34 | fill(0); 35 | ellipse(x, y, 120, 120); 36 | 37 | updateAnis(); // workaround 38 | } 39 | 40 | void mouseReleased() { 41 | Ani.to(this, 1.5, "x", mouseX); 42 | Ani.to(this, 1.5, "y", mouseY); 43 | } 44 | 45 | // workaround ------------------------------------------- 46 | void updateAnis(){ 47 | if (anis.size() == 0) return; 48 | 49 | for (int i=0; i < anis.size(); i++) { 50 | Ani aniTmp = (Ani)anis.get(i); 51 | aniTmp.pre(); 52 | } 53 | 54 | if(anisToUnregister.size() > 0) { 55 | for (int i=0; i < anisToUnregister.size(); i++) { 56 | anis.remove(i); 57 | anisToUnregister.remove(i); 58 | println("removed"); 59 | } 60 | } 61 | println(anis.size()); 62 | } 63 | 64 | void registerPre(Object obj) { 65 | anis.add( (Ani)obj ); 66 | } 67 | 68 | void unregisterPre(Object obj) { 69 | int index = anis.indexOf( (Ani)obj ); 70 | anisToUnregister.add(index); 71 | } 72 | // workaround ------------------------------------------- 73 | -------------------------------------------------------------------------------- /examples/Ani_in_Classes/Ani_in_Classes.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * how to use Ani in your own classes. 3 | * besides the examples shows also the use of: callbacks, setRepeat() and setPlayMode(). 4 | * 5 | */ 6 | 7 | import de.looksgood.ani.*; 8 | 9 | Cirlce[] cirlces = new Cirlce[5]; 10 | 11 | color from = color(255, 8, 8); 12 | color to = color(8, 187, 255); 13 | 14 | void setup() { 15 | size(512,512); 16 | smooth(); 17 | noStroke(); 18 | textAlign(CENTER); 19 | 20 | // Ani.init() must be called always first! 21 | Ani.init(this); 22 | 23 | for(int i=0; i 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 61 | 62 |
Ani 25 |
26 | AniConstants 27 |
28 | AniCore 29 |
30 | AniSequence 31 |
32 | AniUtil 33 |
34 | Back 35 |
36 | Bounce 37 |
38 | Circ 39 |
40 | Cubic 41 |
42 | CustomEasing 43 |
44 | Easing 45 |
46 | Elastic 47 |
48 | Expo 49 |
50 | Linear 51 |
52 | Quad 53 |
54 | Quart 55 |
56 | Quint 57 |
58 | Sine 59 |
60 |
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /reference/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 61 | 62 |
Ani 25 |
26 | AniConstants 27 |
28 | AniCore 29 |
30 | AniSequence 31 |
32 | AniUtil 33 |
34 | Back 35 |
36 | Bounce 37 |
38 | Circ 39 |
40 | Cubic 41 |
42 | CustomEasing 43 |
44 | Easing 45 |
46 | Elastic 47 |
48 | Expo 49 |
50 | Linear 51 |
52 | Quad 53 |
54 | Quart 55 |
56 | Quint 57 |
58 | Sine 59 |
60 |
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/Ani.LibraryNotInitializedException.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/reference/de/looksgood/ani/Ani.LibraryNotInitializedException.html -------------------------------------------------------------------------------- /reference/de/looksgood/ani/AniUtil.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/reference/de/looksgood/ani/AniUtil.html -------------------------------------------------------------------------------- /reference/de/looksgood/ani/easing/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani.easing (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | de.looksgood.ani.easing 20 | 21 | 22 | 51 | 52 |
23 | Classes  24 | 25 |
26 | Back 27 |
28 | Bounce 29 |
30 | Circ 31 |
32 | Cubic 33 |
34 | CustomEasing 35 |
36 | Easing 37 |
38 | Elastic 39 |
40 | Expo 41 |
42 | Linear 43 |
44 | Quad 45 |
46 | Quart 47 |
48 | Quint 49 |
50 | Sine
53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/easing/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani.easing (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |

82 | Package de.looksgood.ani.easing 83 |

84 | 85 | 86 | 87 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 |
88 | Class Summary
Back 
Bounce 
Circ 
Cubic 
CustomEasing 
EasingThe abstract class Easing, which maps time to position.
Elastic 
Expo 
Linear 
Quad 
Quart 
Quint 
Sine 
143 |   144 | 145 |

146 |

147 |
148 |
149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 170 | 173 | 174 | 175 | 176 | 179 | 195 | 196 |
171 | 172 |
197 | 198 | 199 | 200 |
201 | processing library Ani by Benedikt Gross. (c) 2015 202 | 203 | 204 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/easing/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani.easing Class Hierarchy (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | Hierarchy For Package de.looksgood.ani.easing 84 |

85 |
86 |
87 |
Package Hierarchies:
All Packages
88 |
89 |

90 | Class Hierarchy 91 |

92 |
    93 |
  • java.lang.Object
      94 |
    • de.looksgood.ani.easing.Easing (implements de.looksgood.ani.AniConstants) 95 |
        96 |
      • de.looksgood.ani.easing.Back
      • de.looksgood.ani.easing.Bounce
      • de.looksgood.ani.easing.Circ
      • de.looksgood.ani.easing.Cubic
      • de.looksgood.ani.easing.CustomEasing
      • de.looksgood.ani.easing.Elastic
      • de.looksgood.ani.easing.Expo
      • de.looksgood.ani.easing.Linear
      • de.looksgood.ani.easing.Quad
      • de.looksgood.ani.easing.Quart
      • de.looksgood.ani.easing.Quint
      • de.looksgood.ani.easing.Sine
      97 |
    98 |
99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 121 | 124 | 125 | 126 | 127 | 130 | 146 | 147 |
122 | 123 |
148 | 149 | 150 | 151 |
152 | processing library Ani by Benedikt Gross. (c) 2015 153 | 154 | 155 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | de.looksgood.ani 20 | 21 | 22 | 27 | 28 |
23 | Interfaces  24 | 25 |
26 | AniConstants
29 | 30 | 31 | 32 | 33 | 44 | 45 |
34 | Classes  35 | 36 |
37 | Ani 38 |
39 | AniCore 40 |
41 | AniSequence 42 |
43 | AniUtil
46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |

82 | Package de.looksgood.ani 83 |

84 | 85 | 86 | 87 | 89 | 90 | 91 | 92 | 93 | 94 |
88 | Interface Summary
AniConstantsAll Constants of the Ani library.
95 |   96 | 97 |

98 | 99 | 100 | 101 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
102 | Class Summary
AniThe Class Ani, helps you to create time based animations in an very easy way.
AniCoreThe Class AniCore encapsulates the core features for Ani and AniSequence, it's not recommended to use this class standalone!.
AniSequenceThe Class AniSequence creates sequences out of instances of Ani.
AniUtil 
121 |   122 | 123 |

124 |

125 |
126 |
127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 148 | 151 | 152 | 153 | 154 | 157 | 173 | 174 |
149 | 150 |
175 | 176 | 177 | 178 |
179 | processing library Ani by Benedikt Gross. (c) 2015 180 | 181 | 182 | -------------------------------------------------------------------------------- /reference/de/looksgood/ani/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | de.looksgood.ani Class Hierarchy (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | Hierarchy For Package de.looksgood.ani 84 |

85 |
86 |
87 |
Package Hierarchies:
All Packages
88 |
89 |

90 | Class Hierarchy 91 |

92 | 99 |

100 | Interface Hierarchy 101 |

102 | 104 |
105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 126 | 129 | 130 | 131 | 132 | 135 | 151 | 152 |
127 | 128 |
153 | 154 | 155 | 156 |
157 | processing library Ani by Benedikt Gross. (c) 2015 158 | 159 | 160 | -------------------------------------------------------------------------------- /reference/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Deprecated List (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | Deprecated API

84 |
85 |
86 | Contents
    87 |
88 | 89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 111 | 114 | 115 | 116 | 117 | 120 | 136 | 137 |
112 | 113 |
138 | 139 | 140 | 141 |
142 | processing library Ani by Benedikt Gross. (c) 2015 143 | 144 | 145 | -------------------------------------------------------------------------------- /reference/help-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | API Help (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | How This API Document Is Organized

84 |
85 | This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

86 | Overview

87 |
88 | 89 |

90 | The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

91 |

92 | Package

93 |
94 | 95 |

96 | Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    97 |
  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types
98 |
99 |

100 | Class/Interface

101 |
102 | 103 |

104 | Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    105 |
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description 106 |

    107 |

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary 108 |

    109 |

  • Field Detail
  • Constructor Detail
  • Method Detail
110 | Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
111 | 112 |

113 | Annotation Type

114 |
115 | 116 |

117 | Each annotation type has its own separate page with the following sections:

    118 |
  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail
119 |
120 | 121 |

122 | Enum

123 |
124 | 125 |

126 | Each enum has its own separate page with the following sections:

    127 |
  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail
128 |
129 |

130 | Tree (Class Hierarchy)

131 |
132 | There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    133 |
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
134 |
135 |

136 | Deprecated API

137 |
138 | The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
139 |

140 | Index

141 |
142 | The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
143 |

144 | Prev/Next

145 | These links take you to the next or previous class, interface, package, or related page.

146 | Frames/No Frames

147 | These links show and hide the HTML frames. All pages are available with or without frames. 148 |

149 |

150 | Serialized Form

151 | Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. 152 |

153 |

154 | Constant Field Values

155 | The Constant Field Values page lists the static final fields and their values. 156 |

157 | 158 | 159 | This help file applies to API documentation generated using the standard doclet. 160 | 161 |
162 |


163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 184 | 187 | 188 | 189 | 190 | 193 | 209 | 210 |
185 | 186 |
211 | 212 | 213 | 214 |
215 | processing library Ani by Benedikt Gross. (c) 2015 216 | 217 | 218 | -------------------------------------------------------------------------------- /reference/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Javadocs: Ani 8 | 9 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | <H2> 65 | Frame Alert</H2> 66 | 67 | <P> 68 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 69 | <BR> 70 | Link to<A HREF="overview-summary.html">Non-frame version.</A> 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /reference/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Overview List (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 |
22 |
25 | 26 | 27 | 28 | 38 | 39 |
All Classes 29 |

30 | 31 | Packages 32 |
33 | de.looksgood.ani 34 |
35 | de.looksgood.ani.easing 36 |
37 |

40 | 41 |

42 |   43 | 44 | 45 | -------------------------------------------------------------------------------- /reference/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Overview (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |


29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | Javadocs: Ani 84 |

85 |
86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 |
90 | Packages
de.looksgood.ani 
de.looksgood.ani.easing 
101 | 102 |

103 |  


104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 125 | 128 | 129 | 130 | 131 | 134 | 150 | 151 |
126 | 127 |
152 | 153 | 154 | 155 |
156 | processing library Ani by Benedikt Gross. (c) 2015 157 | 158 | 159 | -------------------------------------------------------------------------------- /reference/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Class Hierarchy (Javadocs: Ani) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 50 | 53 | 54 | 55 | 56 | 59 | 75 | 76 |
51 | 52 |
77 | 78 | 79 | 80 |
81 |
82 |

83 | Hierarchy For All Packages

84 |
85 |
86 |
Package Hierarchies:
de.looksgood.ani, de.looksgood.ani.easing
87 |
88 |

89 | Class Hierarchy 90 |

91 |
    92 |
  • java.lang.Object 100 |
101 |

102 | Interface Hierarchy 103 |

104 | 106 |
107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 128 | 131 | 132 | 133 | 134 | 137 | 153 | 154 |
129 | 130 |
155 | 156 | 157 | 158 |
159 | processing library Ani by Benedikt Gross. (c) 2015 160 | 161 | 162 | -------------------------------------------------------------------------------- /reference/package-list: -------------------------------------------------------------------------------- 1 | de.looksgood.ani 2 | de.looksgood.ani.easing 3 | -------------------------------------------------------------------------------- /reference/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/reference/resources/inherit.gif -------------------------------------------------------------------------------- /reference/serialized-form.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/reference/serialized-form.html -------------------------------------------------------------------------------- /reference/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | /* Define colors, fonts and other style attributes here to override the defaults */ 3 | /* processingLibs style by andreas schlegel, sojamo */ 4 | 5 | 6 | body { 7 | margin : 0; 8 | padding : 0; 9 | padding-left : 10px; 10 | padding-right : 8px; 11 | background-color : #FFFFFF; 12 | font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | font-size : 100%; 14 | font-size : 0.7em; 15 | font-weight : normal; 16 | line-height : normal; 17 | margin-bottom:30px; 18 | } 19 | 20 | 21 | 22 | 23 | /* Headings */ 24 | h1, h2, h3, h4, h5, th { 25 | font-family :Arial, Helvetica, sans-serif; 26 | font-size:1.2em; 27 | } 28 | 29 | 30 | p { 31 | font-size : 1em; 32 | width:80%; 33 | } 34 | 35 | pre, code { 36 | font-family : "Courier New", Courier, monospace; 37 | font-size : 12px; 38 | line-height : normal; 39 | } 40 | 41 | 42 | 43 | table { 44 | border:0; 45 | margin-bottom:10px; 46 | margin-top:10px; 47 | } 48 | 49 | 50 | tr, td { 51 | border-top: 0px solid; 52 | border-left: 0px solid; 53 | padding-top:8px; 54 | padding-bottom:8px; 55 | } 56 | 57 | 58 | 59 | hr { 60 | border:0; 61 | height:1px; 62 | padding:0; 63 | margin:0; 64 | margin-bottom:4px; 65 | 66 | } 67 | 68 | 69 | 70 | dd, th, td, font { 71 | font-size:1.0em; 72 | line-height:1.0em; 73 | } 74 | 75 | 76 | 77 | dt { 78 | margin-bottom:0px; 79 | } 80 | 81 | 82 | 83 | dd { 84 | margin-top:2px; 85 | margin-bottom:4px; 86 | } 87 | 88 | 89 | 90 | a { 91 | text-decoration: underline; 92 | font-weight: normal; 93 | } 94 | 95 | a:hover, 96 | a:active { 97 | text-decoration: underline; 98 | font-weight: normal; 99 | } 100 | 101 | a:visited, 102 | a:link:visited { 103 | text-decoration: underline; 104 | font-weight: normal; 105 | } 106 | 107 | 108 | img { 109 | border: 0px solid #000000; 110 | } 111 | 112 | 113 | 114 | /* Navigation bar fonts */ 115 | .NavBarCell1 { 116 | border:0; 117 | } 118 | 119 | .NavBarCell1Rev { 120 | border:0; 121 | } 122 | 123 | .NavBarFont1 { 124 | font-family: Arial, Helvetica, sans-serif; 125 | font-size:1.1em; 126 | } 127 | 128 | 129 | .NavBarFont1 b { 130 | font-weight:normal; 131 | } 132 | 133 | 134 | 135 | .NavBarFont1:after, .NavBarFont1Rev:after { 136 | font-weight:normal; 137 | content: " \\"; 138 | } 139 | 140 | 141 | .NavBarFont1Rev { 142 | font-family: Arial, Helvetica, sans-serif; 143 | font-size:1.1em; 144 | } 145 | 146 | .NavBarFont1Rev b { 147 | font-family: Arial, Helvetica, sans-serif; 148 | font-size:1.1em; 149 | font-weight:normal; 150 | } 151 | 152 | .NavBarCell2 { 153 | font-family: Arial, Helvetica, sans-serif; 154 | } 155 | 156 | .NavBarCell3 { 157 | font-family: Arial, Helvetica, sans-serif; 158 | } 159 | 160 | 161 | 162 | font.FrameItemFont { 163 | font-family: Helvetica, Arial, sans-serif; 164 | font-size:1.1em; 165 | line-height:1.1em; 166 | } 167 | 168 | font.FrameHeadingFont { 169 | font-family: Helvetica, Arial, sans-serif; 170 | line-height:32px; 171 | } 172 | 173 | /* Font used in left-hand frame lists */ 174 | .FrameTitleFont { 175 | font-family: Helvetica, Arial, sans-serif 176 | } 177 | 178 | 179 | .toggleList { 180 | padding:0; 181 | margin:0; 182 | margin-top:12px; 183 | } 184 | 185 | .toggleList dt { 186 | font-weight:bold; 187 | font-size:12px; 188 | font-family:arial,sans-serif; 189 | padding:0px; 190 | margin:10px 0px 10px 0px; 191 | } 192 | 193 | .toggleList dt span { 194 | font-family: monospace; 195 | padding:0; 196 | margin:0; 197 | } 198 | 199 | 200 | .toggleList dd { 201 | margin:0; 202 | padding:0; 203 | } 204 | 205 | html.isjs .toggleList dd { 206 | display: none; 207 | } 208 | 209 | .toggleList pre { 210 | padding: 4px 4px 4px 4px; 211 | } 212 | 213 | 214 | 215 | 216 | 217 | /* COLORS */ 218 | 219 | pre, code { 220 | color: #000000; 221 | } 222 | 223 | 224 | body { 225 | color : #333333; 226 | background-color :#FFFFFF; 227 | } 228 | 229 | 230 | h1, h2, h3, h4, h5, h6 { 231 | color:#555; 232 | } 233 | 234 | a, 235 | .toggleList dt { 236 | color: #1a7eb0; 237 | } 238 | 239 | a:hover, 240 | a:active { 241 | color: #1a7eb0; 242 | } 243 | 244 | a:visited, 245 | a:link:visited { 246 | color: #1a7eb0; 247 | } 248 | 249 | td,tr { 250 | border-color: #999999; 251 | } 252 | 253 | hr { 254 | color:#999999; 255 | background:#999999; 256 | } 257 | 258 | 259 | .TableHeadingColor { 260 | background: #dcdcdc; 261 | color: #555; 262 | } 263 | 264 | 265 | .TableSubHeadingColor { 266 | background: #EEEEFF 267 | } 268 | 269 | .TableRowColor { 270 | background: #FFFFFF 271 | } 272 | 273 | 274 | .NavBarCell1 { 275 | background-color:#dcdcdc; 276 | color:#000; 277 | } 278 | 279 | .NavBarCell1 a { 280 | color:#333; 281 | } 282 | 283 | 284 | .NavBarCell1Rev { 285 | background-color:transparent; 286 | } 287 | 288 | .NavBarFont1 { 289 | color:#333; 290 | } 291 | 292 | 293 | .NavBarFont1Rev { 294 | color:#fff; 295 | } 296 | 297 | .NavBarCell2 { 298 | background-color:#999; 299 | } 300 | 301 | .NavBarCell2 a { 302 | color:#fff; 303 | } 304 | 305 | 306 | 307 | .NavBarCell3 { 308 | background-color:#dcdcdc; 309 | } 310 | 311 | -------------------------------------------------------------------------------- /resources/code/ExampleTaglet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/resources/code/ExampleTaglet.class -------------------------------------------------------------------------------- /resources/code/ExampleTaglet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or 5 | * without modification, are permitted provided that the following 6 | * conditions are met: 7 | * 8 | * -Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * -Redistribution in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * Neither the name of Sun Microsystems, Inc. or the names of 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * This software is provided "AS IS," without a warranty of any 21 | * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND 22 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, 23 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY 24 | * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY 25 | * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR 26 | * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR 27 | * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE 28 | * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, 29 | * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER 30 | * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF 31 | * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN 32 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 33 | * 34 | * You acknowledge that Software is not designed, licensed or 35 | * intended for use in the design, construction, operation or 36 | * maintenance of any nuclear facility. 37 | */ 38 | 39 | import com.sun.tools.doclets.Taglet; 40 | import com.sun.javadoc.*; 41 | import java.util.Map; 42 | import java.io.*; 43 | /** 44 | * A sample Taglet representing @example. This tag can be used in any kind of 45 | * {@link com.sun.javadoc.Doc}. It is not an inline tag. The text is displayed 46 | * in yellow to remind the developer to perform a task. For 47 | * example, "@example Hello" would be shown as: 48 | *
49 | *
50 | * To Do: 51 | *
Fix this! 52 | *
53 | *
54 | * 55 | * @author Jamie Ho 56 | * @since 1.4 57 | */ 58 | 59 | public class ExampleTaglet implements Taglet { 60 | 61 | private static final String NAME = "example"; 62 | private static final String HEADER = "example To Do:"; 63 | 64 | /** 65 | * Return the name of this custom tag. 66 | */ 67 | public String getName() { 68 | return NAME; 69 | } 70 | 71 | /** 72 | * Will return true since @example 73 | * can be used in field documentation. 74 | * @return true since @example 75 | * can be used in field documentation and false 76 | * otherwise. 77 | */ 78 | public boolean inField() { 79 | return true; 80 | } 81 | 82 | /** 83 | * Will return true since @example 84 | * can be used in constructor documentation. 85 | * @return true since @example 86 | * can be used in constructor documentation and false 87 | * otherwise. 88 | */ 89 | public boolean inConstructor() { 90 | return true; 91 | } 92 | 93 | /** 94 | * Will return true since @example 95 | * can be used in method documentation. 96 | * @return true since @example 97 | * can be used in method documentation and false 98 | * otherwise. 99 | */ 100 | public boolean inMethod() { 101 | return true; 102 | } 103 | 104 | /** 105 | * Will return true since @example 106 | * can be used in method documentation. 107 | * @return true since @example 108 | * can be used in overview documentation and false 109 | * otherwise. 110 | */ 111 | public boolean inOverview() { 112 | return true; 113 | } 114 | 115 | /** 116 | * Will return true since @example 117 | * can be used in package documentation. 118 | * @return true since @example 119 | * can be used in package documentation and false 120 | * otherwise. 121 | */ 122 | public boolean inPackage() { 123 | return true; 124 | } 125 | 126 | /** 127 | * Will return true since @example 128 | * can be used in type documentation (classes or interfaces). 129 | * @return true since @example 130 | * can be used in type documentation and false 131 | * otherwise. 132 | */ 133 | public boolean inType() { 134 | return true; 135 | } 136 | 137 | /** 138 | * Will return false since @example 139 | * is not an inline tag. 140 | * @return false since @example 141 | * is not an inline tag. 142 | */ 143 | 144 | public boolean isInlineTag() { 145 | return false; 146 | } 147 | 148 | /** 149 | * Register this Taglet. 150 | * @param tagletMap the map to register this tag to. 151 | */ 152 | public static void register(Map tagletMap) { 153 | ExampleTaglet tag = new ExampleTaglet(); 154 | Taglet t = (Taglet) tagletMap.get(tag.getName()); 155 | if (t != null) { 156 | tagletMap.remove(tag.getName()); 157 | } 158 | tagletMap.put(tag.getName(), tag); 159 | } 160 | 161 | /** 162 | * Given the Tag representation of this custom 163 | * tag, return its string representation. 164 | * @param tag the Tag representation of this custom tag. 165 | */ 166 | public String toString(Tag tag) { 167 | return createHTML(readFile(tag.text())); 168 | } 169 | 170 | 171 | /** 172 | * Given an array of Tags representing this custom 173 | * tag, return its string representation. 174 | * @param tags the array of Tags representing of this custom tag. 175 | */ 176 | public String toString(Tag[] tags) { 177 | if (tags.length == 0) { 178 | return null; 179 | } 180 | return createHTML(readFile(tags[0].text())); 181 | } 182 | 183 | 184 | 185 | String createHTML(String theString) { 186 | if(theString!=null) { 187 | String dd = ""; 193 | 194 | return dd+"\n
" + 195 | "
+Example
" + 196 | "
"+theString+"
" + 197 | "
"; 198 | } 199 | return ""; 200 | } 201 | 202 | 203 | /** 204 | * check if the examples directory exists and return the example as given in the tag. 205 | * @param theExample the name of the example 206 | */ 207 | String readFile(String theExample) { 208 | String record = ""; 209 | String myResult = ""; 210 | int recCount = 0; 211 | String myDir = "../examples"; 212 | File file=new File(myDir); 213 | if(file.exists()==false) { 214 | myDir = "./examples"; 215 | } 216 | try { 217 | FileReader fr = new FileReader(myDir+"/"+theExample+"/"+theExample+".pde"); 218 | BufferedReader br = new BufferedReader(fr); 219 | record = new String(); 220 | while ((record = br.readLine()) != null) { 221 | myResult += record+"\n"; 222 | } 223 | } catch (IOException e) { 224 | System.out.println(e); 225 | return null; 226 | } 227 | return myResult; 228 | } 229 | } 230 | 231 | 232 | -------------------------------------------------------------------------------- /resources/code/ant-contrib-1.0b3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/resources/code/ant-contrib-1.0b3.jar -------------------------------------------------------------------------------- /resources/code/doc.sh: -------------------------------------------------------------------------------- 1 | # a shell script to create a java documentation 2 | # for a processing library. 3 | # 4 | # make changes to the variables below so they 5 | # fit the structure of your library 6 | 7 | # the package name of your library 8 | package=template; 9 | 10 | # source folder location 11 | src=../src; 12 | 13 | # the destination folder of your documentation 14 | dest=../documentation; 15 | 16 | 17 | # compile the java documentation 18 | javadoc -d $dest -stylesheetfile ./stylesheet.css -sourcepath ${src} ${package} 19 | -------------------------------------------------------------------------------- /resources/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | /* Define colors, fonts and other style attributes here to override the defaults */ 3 | /* processingLibs style by andreas schlegel, sojamo */ 4 | 5 | 6 | body { 7 | margin : 0; 8 | padding : 0; 9 | padding-left : 10px; 10 | padding-right : 8px; 11 | background-color : #FFFFFF; 12 | font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | font-size : 100%; 14 | font-size : 0.7em; 15 | font-weight : normal; 16 | line-height : normal; 17 | margin-bottom:30px; 18 | } 19 | 20 | 21 | 22 | 23 | /* Headings */ 24 | h1, h2, h3, h4, h5, th { 25 | font-family :Arial, Helvetica, sans-serif; 26 | font-size:1.2em; 27 | } 28 | 29 | 30 | p { 31 | font-size : 1em; 32 | width:80%; 33 | } 34 | 35 | pre, code { 36 | font-family : "Courier New", Courier, monospace; 37 | font-size : 12px; 38 | line-height : normal; 39 | } 40 | 41 | 42 | 43 | table { 44 | border:0; 45 | margin-bottom:10px; 46 | margin-top:10px; 47 | } 48 | 49 | 50 | tr, td { 51 | border-top: 0px solid; 52 | border-left: 0px solid; 53 | padding-top:8px; 54 | padding-bottom:8px; 55 | } 56 | 57 | 58 | 59 | hr { 60 | border:0; 61 | height:1px; 62 | padding:0; 63 | margin:0; 64 | margin-bottom:4px; 65 | 66 | } 67 | 68 | 69 | 70 | dd, th, td, font { 71 | font-size:1.0em; 72 | line-height:1.0em; 73 | } 74 | 75 | 76 | 77 | dt { 78 | margin-bottom:0px; 79 | } 80 | 81 | 82 | 83 | dd { 84 | margin-top:2px; 85 | margin-bottom:4px; 86 | } 87 | 88 | 89 | 90 | a { 91 | text-decoration: underline; 92 | font-weight: normal; 93 | } 94 | 95 | a:hover, 96 | a:active { 97 | text-decoration: underline; 98 | font-weight: normal; 99 | } 100 | 101 | a:visited, 102 | a:link:visited { 103 | text-decoration: underline; 104 | font-weight: normal; 105 | } 106 | 107 | 108 | img { 109 | border: 0px solid #000000; 110 | } 111 | 112 | 113 | 114 | /* Navigation bar fonts */ 115 | .NavBarCell1 { 116 | border:0; 117 | } 118 | 119 | .NavBarCell1Rev { 120 | border:0; 121 | } 122 | 123 | .NavBarFont1 { 124 | font-family: Arial, Helvetica, sans-serif; 125 | font-size:1.1em; 126 | } 127 | 128 | 129 | .NavBarFont1 b { 130 | font-weight:normal; 131 | } 132 | 133 | 134 | 135 | .NavBarFont1:after, .NavBarFont1Rev:after { 136 | font-weight:normal; 137 | content: " \\"; 138 | } 139 | 140 | 141 | .NavBarFont1Rev { 142 | font-family: Arial, Helvetica, sans-serif; 143 | font-size:1.1em; 144 | } 145 | 146 | .NavBarFont1Rev b { 147 | font-family: Arial, Helvetica, sans-serif; 148 | font-size:1.1em; 149 | font-weight:normal; 150 | } 151 | 152 | .NavBarCell2 { 153 | font-family: Arial, Helvetica, sans-serif; 154 | } 155 | 156 | .NavBarCell3 { 157 | font-family: Arial, Helvetica, sans-serif; 158 | } 159 | 160 | 161 | 162 | font.FrameItemFont { 163 | font-family: Helvetica, Arial, sans-serif; 164 | font-size:1.1em; 165 | line-height:1.1em; 166 | } 167 | 168 | font.FrameHeadingFont { 169 | font-family: Helvetica, Arial, sans-serif; 170 | line-height:32px; 171 | } 172 | 173 | /* Font used in left-hand frame lists */ 174 | .FrameTitleFont { 175 | font-family: Helvetica, Arial, sans-serif 176 | } 177 | 178 | 179 | .toggleList { 180 | padding:0; 181 | margin:0; 182 | margin-top:12px; 183 | } 184 | 185 | .toggleList dt { 186 | font-weight:bold; 187 | font-size:12px; 188 | font-family:arial,sans-serif; 189 | padding:0px; 190 | margin:10px 0px 10px 0px; 191 | } 192 | 193 | .toggleList dt span { 194 | font-family: monospace; 195 | padding:0; 196 | margin:0; 197 | } 198 | 199 | 200 | .toggleList dd { 201 | margin:0; 202 | padding:0; 203 | } 204 | 205 | html.isjs .toggleList dd { 206 | display: none; 207 | } 208 | 209 | .toggleList pre { 210 | padding: 4px 4px 4px 4px; 211 | } 212 | 213 | 214 | 215 | 216 | 217 | /* COLORS */ 218 | 219 | pre, code { 220 | color: #000000; 221 | } 222 | 223 | 224 | body { 225 | color : #333333; 226 | background-color :#FFFFFF; 227 | } 228 | 229 | 230 | h1, h2, h3, h4, h5, h6 { 231 | color:#555; 232 | } 233 | 234 | a, 235 | .toggleList dt { 236 | color: #1a7eb0; 237 | } 238 | 239 | a:hover, 240 | a:active { 241 | color: #1a7eb0; 242 | } 243 | 244 | a:visited, 245 | a:link:visited { 246 | color: #1a7eb0; 247 | } 248 | 249 | td,tr { 250 | border-color: #999999; 251 | } 252 | 253 | hr { 254 | color:#999999; 255 | background:#999999; 256 | } 257 | 258 | 259 | .TableHeadingColor { 260 | background: #dcdcdc; 261 | color: #555; 262 | } 263 | 264 | 265 | .TableSubHeadingColor { 266 | background: #EEEEFF 267 | } 268 | 269 | .TableRowColor { 270 | background: #FFFFFF 271 | } 272 | 273 | 274 | .NavBarCell1 { 275 | background-color:#dcdcdc; 276 | color:#000; 277 | } 278 | 279 | .NavBarCell1 a { 280 | color:#333; 281 | } 282 | 283 | 284 | .NavBarCell1Rev { 285 | background-color:transparent; 286 | } 287 | 288 | .NavBarFont1 { 289 | color:#333; 290 | } 291 | 292 | 293 | .NavBarFont1Rev { 294 | color:#fff; 295 | } 296 | 297 | .NavBarCell2 { 298 | background-color:#999; 299 | } 300 | 301 | .NavBarCell2 a { 302 | color:#fff; 303 | } 304 | 305 | 306 | 307 | .NavBarCell3 { 308 | background-color:#dcdcdc; 309 | } 310 | 311 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/AniConstants.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/src/de/looksgood/ani/AniConstants.java -------------------------------------------------------------------------------- /src/de/looksgood/ani/AniUtil.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/src/de/looksgood/ani/AniUtil.java -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Back.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Back extends Easing { 39 | public Back(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Back(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | float s = 1.70158f; 49 | return c * (t /= d) * t * ((s + 1) * t - s) + b; 50 | } 51 | 52 | public float easeOut(float t, float b, float c, float d) { 53 | float s = 1.70158f; 54 | return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; 55 | } 56 | 57 | public float easeInOut(float t, float b, float c, float d) { 58 | float s = 1.70158f; 59 | if ((t /= d / 2) < 1) 60 | return c / 2 * (t * t * (((s *= (1.525f)) + 1) * t - s)) + b; 61 | return c / 2 * ((t -= 2) * t * (((s *= (1.525f)) + 1) * t + s) + 2) + b; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Bounce.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Bounce extends Easing { 39 | public Bounce(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Bounce(){ 44 | setMode(easingMode); 45 | } 46 | public float easeIn(float t, float b, float c, float d) { 47 | return c - easeOut(d - t, 0, c, d) + b; 48 | } 49 | 50 | public float easeOut(float t, float b, float c, float d) { 51 | if ((t /= d) < (1 / 2.75f)) { 52 | return c * (7.5625f * t * t) + b; 53 | } else if (t < (2 / 2.75f)) { 54 | return c * (7.5625f * (t -= (1.5f / 2.75f)) * t + .75f) + b; 55 | } else if (t < (2.5 / 2.75)) { 56 | return c * (7.5625f * (t -= (2.25f / 2.75f)) * t + .9375f) + b; 57 | } else { 58 | return c * (7.5625f * (t -= (2.625f / 2.75f)) * t + .984375f) + b; 59 | } 60 | } 61 | 62 | public float easeInOut(float t, float b, float c, float d) { 63 | if (t < d / 2) 64 | return easeIn(t * 2, 0, c, d) * .5f + b; 65 | else 66 | return easeOut(t * 2 - d, 0, c, d) * .5f + c * .5f + b; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Circ.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Circ extends Easing { 39 | public Circ(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Circ(){ 44 | setMode(easingMode); 45 | } 46 | public float easeIn(float t, float b, float c, float d) { 47 | return -c * ((float) Math.sqrt(1 - (t /= d) * t) - 1) + b; 48 | } 49 | 50 | public float easeOut(float t, float b, float c, float d) { 51 | return c * (float) Math.sqrt(1 - (t = t / d - 1) * t) + b; 52 | } 53 | 54 | public float easeInOut(float t, float b, float c, float d) { 55 | if ((t /= d / 2) < 1) 56 | return -c / 2 * ((float) Math.sqrt(1 - t * t) - 1) + b; 57 | return c / 2 * ((float) Math.sqrt(1 - (t -= 2) * t) + 1) + b; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Cubic.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Cubic extends Easing { 39 | public Cubic(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Cubic(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return c * (t /= d) * t * t + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return c * ((t = t / d - 1) * t * t + 1) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | if ((t /= d / 2) < 1) 57 | return c / 2 * t * t * t + b; 58 | return c / 2 * ((t -= 2) * t * t + 2) + b; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/CustomEasing.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | this class is a port of greensock's excellent customease class 3 | http://www.greensock.com/customease/ 4 | 5 | *****************************************/ 6 | 7 | package de.looksgood.ani.easing; 8 | 9 | import java.util.ArrayList; 10 | import java.util.HashMap; 11 | import java.util.regex.Matcher; 12 | import java.util.regex.Pattern; 13 | 14 | import processing.core.PApplet; 15 | 16 | public class CustomEasing extends Easing { 17 | private static HashMap customEasingsLookup = new HashMap(); 18 | private ArrayList segments = new ArrayList(); 19 | private String name; 20 | 21 | private class Segment{ 22 | public float s; 23 | public float cp; 24 | public float e; 25 | 26 | public Segment(float s, float cp, float e) { 27 | this.s = s; 28 | this.cp = cp; 29 | this.e = e; 30 | } 31 | } 32 | 33 | public CustomEasing(String theName, String theSegments){ 34 | // no use here for easingMode ... just inherited from superclass 35 | setMode(easingMode); 36 | 37 | this.name = theName; 38 | this.segments = new ArrayList(); 39 | 40 | // parse theSegments string in property list style 41 | // e.g. [{s:0,cp:0.54,e:0.748},{s:0.748,cp:0.956,e:0.832},{s:0.832,cp:0.708,e:1}] 42 | Pattern regex = Pattern.compile("\\{(.*?)\\}"); 43 | Matcher regexMatcher = regex.matcher(theSegments.toLowerCase()); 44 | 45 | while (regexMatcher.find()) { 46 | String segmentString = regexMatcher.group(); 47 | segmentString = segmentString.replace( '{', ' ' ); 48 | segmentString = segmentString.replace( '}', ' ' ); 49 | segmentString = PApplet.trim(segmentString); 50 | 51 | String[] segmentPropertiesString = PApplet.split(segmentString,','); 52 | HashMap segmentProperties = new HashMap(); 53 | for (int i = 0; i < segmentPropertiesString.length; i++) { 54 | String[] p = PApplet.split(PApplet.trim(segmentPropertiesString[i]),':'); 55 | segmentProperties.put( PApplet.trim(p[0]), Float.parseFloat(p[1]) ); 56 | } 57 | segments.add(new Segment(segmentProperties.get("s"), 58 | segmentProperties.get("cp"), 59 | segmentProperties.get("e") )); 60 | } 61 | 62 | customEasingsLookup.put(name, this); 63 | //System.out.println(ANI_DEBUG_PREFIX+" Info @ CustomEasing -> add CustomEasing: "+theName); 64 | } 65 | 66 | public static CustomEasing create(String theName, String theSegments) { 67 | CustomEasing tmp = new CustomEasing(theName, theSegments); 68 | return tmp; 69 | } 70 | 71 | public static CustomEasing byName(String theName) { 72 | return customEasingsLookup.get(theName); 73 | } 74 | 75 | public float easeIn(float t, float b, float c, float d) { 76 | return easeBezier(t, b, c, d); 77 | } 78 | 79 | public float easeOut(float t, float b, float c, float d) { 80 | return easeBezier(t, b, c, d); 81 | } 82 | 83 | public float easeInOut(float t, float b, float c, float d) { 84 | return easeBezier(t, b, c, d); 85 | } 86 | private float easeBezier(float t, float b , float c, float d) { 87 | float factor = t / d; 88 | int qty = segments.size(); 89 | int i = (int)(qty * factor); 90 | i = PApplet.min(i, segments.size()-1); 91 | float time = (factor - (i * (1 / (float)qty))) * qty; 92 | Segment s = segments.get(i); 93 | //System.out.println("tmp: "+time); 94 | return b + c * (s.s + time * (2 * (1 - time) * (s.cp - s.s) + time * (s.e - s.s))); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Easing.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/src/de/looksgood/ani/easing/Easing.java -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Elastic.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Elastic extends Easing { 39 | public Elastic(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Elastic(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | if (t == 0) 49 | return b; 50 | if ((t /= d) == 1) 51 | return b + c; 52 | float p = d * .3f; 53 | float a = c; 54 | float s = p / 4; 55 | return -(a * (float) Math.pow(2, 10 * (t -= 1)) * (float) Math.sin((t * d - s) * (2 * (float) Math.PI) / p)) + b; 56 | } 57 | 58 | public float easeOut(float t, float b, float c, float d) { 59 | if (t == 0) 60 | return b; 61 | if ((t /= d) == 1) 62 | return b + c; 63 | float p = d * .3f; 64 | float a = c; 65 | float s = p / 4; 66 | return (a * (float) Math.pow(2, -10 * t) * (float) Math.sin((t * d - s) * (2 * (float) Math.PI) / p) + c + b); 67 | } 68 | 69 | public float easeInOut(float t, float b, float c, float d) { 70 | if (t == 0) 71 | return b; 72 | if ((t /= d / 2) == 2) 73 | return b + c; 74 | float p = d * (.3f * 1.5f); 75 | float a = c; 76 | float s = p / 4; 77 | if (t < 1) 78 | return -.5f * (a * (float) Math.pow(2, 10 * (t -= 1)) * (float) Math.sin((t * d - s) * (2 * (float) Math.PI) / p)) + b; 79 | return a * (float) Math.pow(2, -10 * (t -= 1)) * (float) Math.sin((t * d - s) * (2 * (float) Math.PI) / p) * .5f + c + b; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Expo.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Expo extends Easing { 39 | public Expo(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Expo(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return (t == 0) ? b : c * (float) Math.pow(2, 10 * (t / d - 1)) + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return (t == d) ? b + c : c * (-(float) Math.pow(2, -10 * t / d) + 1) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | if (t == 0) 57 | return b; 58 | if (t == d) 59 | return b + c; 60 | if ((t /= d / 2) < 1) 61 | return c / 2 * (float) Math.pow(2, 10 * (t - 1)) + b; 62 | return c / 2 * (-(float) Math.pow(2, -10 * --t) + 2) + b; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Linear.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Linear extends Easing { 39 | public Linear(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Linear(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return easeNone(t, b, c, d); 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return easeNone(t, b, c, d); 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | return easeNone(t, b, c, d); 57 | } 58 | private float easeNone (float t,float b , float c, float d) { 59 | return c*t/d + b; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Quad.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Quad extends Easing { 39 | public Quad(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Quad(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return c * (t /= d) * t + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return -c * (t /= d) * (t - 2) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | if ((t /= d / 2) < 1) 57 | return c / 2 * t * t + b; 58 | return -c / 2 * ((--t) * (t - 2) - 1) + b; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Quart.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Quart extends Easing { 39 | public Quart(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Quart(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return c * (t /= d) * t * t * t + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return -c * ((t = t / d - 1) * t * t * t - 1) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | if ((t /= d / 2) < 1) 57 | return c / 2 * t * t * t * t + b; 58 | return -c / 2 * ((t -= 2) * t * t * t - 2) + b; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Quint.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Quint extends Easing { 39 | public Quint(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Quint(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return c * (t /= d) * t * t * t * t + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return c * ((t = t / d - 1) * t * t * t * t + 1) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | if ((t /= d / 2) < 1) 57 | return c / 2 * t * t * t * t * t + b; 58 | return c / 2 * ((t -= 2) * t * t * t * t + 2) + b; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/de/looksgood/ani/easing/Sine.java: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | TERMS OF USE - EASING EQUATIONS 3 | Open source under the BSD License. 4 | Copyright (c) 2001 Robert Penner 5 | JavaScript version copyright (C) 2006 by Philippe Maegerman 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | * Neither the name of the author nor the names of contributors may 19 | be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | *****************************************/ 35 | 36 | package de.looksgood.ani.easing; 37 | 38 | public class Sine extends Easing { 39 | public Sine(int theEasingMode){ 40 | setMode(theEasingMode); 41 | } 42 | 43 | public Sine(){ 44 | setMode(easingMode); 45 | } 46 | 47 | public float easeIn(float t, float b, float c, float d) { 48 | return -c * (float) Math.cos(t / d * (Math.PI / 2)) + c + b; 49 | } 50 | 51 | public float easeOut(float t, float b, float c, float d) { 52 | return c * (float) Math.sin(t / d * (Math.PI / 2)) + b; 53 | } 54 | 55 | public float easeInOut(float t, float b, float c, float d) { 56 | return -c / 2 * ((float) Math.cos(Math.PI * t / d) - 1) + b; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /web/changelog.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------- 2 | Ani 2.7 - 2 June 2015 3 | 4 | New 5 | + Made Ani compatible with the upcoming Processing 3.0 6 | (pull request by Jens de Boer/jnsdbr and a gentle push by 7 | Benjamin Stephan/b3nson. Many thanks!) 8 | 9 | 10 | -------------------------------------------------------------------------- 11 | Ani 2.6 - 8 November 2013 12 | 13 | New 14 | + CallbackObject property for callbacks on objects other than its own 15 | (pull request by ZeroMax-dev. Many Thanks!) 16 | + examples/Ani_in_Classes_Start_Delays 17 | 18 | 19 | -------------------------------------------------------------------------- 20 | Ani 2.5 - 28 February 2013 21 | 22 | New 23 | + Introduced new callback feature "onUpdate". 24 | Many thanks to Jean-Maxime Couillard! 25 | + examples/Ani_PVector_Easing_Styles 26 | + examples/Ani_TimeModes/ 27 | 28 | -------------------------------------------------------------------------- 29 | Ani 2.4 - 19 October 2012 30 | 31 | Fix 32 | * Ani was not working correctly in combination with PVector. 33 | A big thank you to Till Nagel for spotting and reporting! 34 | 35 | New 36 | + examples/Ani_PVector 37 | 38 | -------------------------------------------------------------------------- 39 | Ani 2.3 - 8 October 2012 40 | 41 | New 42 | + Introduced new callback feature "onDelayEnd" 43 | + examples/Ani_Callback_Delay_End 44 | 45 | -------------------------------------------------------------------------- 46 | Ani 2.2 - 19 April 2012 47 | 48 | New 49 | + examples/Ani_Workaround_Android 50 | Thanks LimeJuice for the reminder to find a workaround for this old issue! 51 | 52 | Changes 53 | * AniCore. Reading and updating the target variable is now more efficient. 54 | No updating until after durationDelay has passed. Thanks to Slight Ic 55 | for the code snippet! 56 | 57 | -------------------------------------------------------------------------- 58 | Ani 2.1 - 6 January 2012 59 | 60 | Fixes 61 | * Easing styles Ani.CUBIC_IN_OUT and Ani.CUBIC_OUT fixed. Now they are 62 | what their name says. Thank you Jean-Francois Renaud for reporting! 63 | 64 | New 65 | + examples/Ani_Sequence_Loop 66 | + examples/Ani_in_Classes_Bang 67 | 68 | -------------------------------------------------------------------------- 69 | Ani 2.0 - 27 September 2011 70 | 71 | New 72 | + Possibility to have custom easings, based on greensock's customease 73 | class, see http://www.greensock.com/customease/ 74 | + examples/Ani_Easing_Custom 75 | 76 | Changes 77 | * Refactoring of all easing parameters from type 'String' to type 'Easing' 78 | 79 | -------------------------------------------------------------------------- 80 | Ani 1.3 - 1 August 2011 81 | 82 | New 83 | + library.properties 84 | fix compatibility for the upcoming processing 2.0 85 | 86 | -------------------------------------------------------------------------- 87 | Ani 1.2 - 9 June 2010 88 | 89 | Performance improvement "under the hood" in AniCore: 90 | The updatePosition() function use no longer the java reflection 91 | mechanism ... which is good. 92 | 93 | 94 | -------------------------------------------------------------------------- 95 | Ani 1.1 - 8 June 2010 96 | 97 | New Demos 98 | + collage space 99 | + valentine drips player and recorder 100 | 101 | New functions 102 | + Ani.killAll() 103 | Stops and kills all references to ongoing animations 104 | + AniUtil.shortRotation() 105 | calculates the minimal difference of two angles given in 106 | radians (helpfull for animating angles) 107 | 108 | 109 | -------------------------------------------------------------------------- 110 | Ani 1.0 - 9 May 2010 111 | 112 | Initial release -------------------------------------------------------------------------------- /web/img/Ani_Cheat_Sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/Ani_Cheat_Sheet.png -------------------------------------------------------------------------------- /web/img/ani.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/ani.png -------------------------------------------------------------------------------- /web/img/arr_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/arr_big.png -------------------------------------------------------------------------------- /web/img/arr_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/arr_small.png -------------------------------------------------------------------------------- /web/img/color_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_about.png -------------------------------------------------------------------------------- /web/img/color_demos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_demos.png -------------------------------------------------------------------------------- /web/img/color_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_download.png -------------------------------------------------------------------------------- /web/img/color_examples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_examples.png -------------------------------------------------------------------------------- /web/img/color_installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_installation.png -------------------------------------------------------------------------------- /web/img/color_reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b-g/Ani/32163e100af160645fa8925056ec5bf06ea26251/web/img/color_reference.png -------------------------------------------------------------------------------- /web/js/behaviour.js: -------------------------------------------------------------------------------- 1 | 2 | $(document).ready(function() { 3 | 4 | $('#menu a').click(function(e){ 5 | var link = $(this).blur(); 6 | 7 | $('html, body').animate({scrollTop: $(link.attr('href')).offset().top},'medium'); 8 | return false; 9 | }); 10 | 11 | $('.up').click(function(e){ 12 | var link = $(this).blur(); 13 | 14 | $('html, body').animate({scrollTop: $(link.attr('href')).offset().top},'medium'); 15 | return false; 16 | }); 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/stylesheet.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin:0; 3 | padding:0; 4 | border:0; 5 | } 6 | 7 | 8 | body { 9 | font-family : Lucida Grande, Verdana, Geneva, Arial, Helvetica, sans-serif; 10 | font-size : 100%; 11 | font-size : 12px; 12 | font-weight : normal; 13 | line-height : normal; 14 | } 15 | 16 | #container { 17 | margin-left:64px; 18 | background-color: #fff; 19 | } 20 | 21 | #header { 22 | float:left; 23 | padding-bottom: 36px; 24 | padding-top: 10px; 25 | } 26 | 27 | #content { 28 | float:left; 29 | } 30 | 31 | #sidebar { 32 | float:left; 33 | } 34 | 35 | /* Sidebar Items */ 36 | 37 | #menu, 38 | #info, 39 | #reference, 40 | #cheatsheet, 41 | #source, 42 | #keywords { 43 | border-top: 5px solid #333; 44 | float:left; 45 | width: 160px; 46 | margin-bottom:10px; 47 | padding-top:5px; 48 | padding-left:1px; 49 | } 50 | #menu { 51 | padding-bottom: 12px; 52 | } 53 | #menu .about{ 54 | background: url(img/color_about.png) center right no-repeat !important; 55 | padding-right: 20px !important; 56 | } 57 | #menu .download{ 58 | background: url(img/color_download.png) center right no-repeat !important; 59 | padding-right: 20px !important; 60 | } 61 | #menu .installation{ 62 | background: url(img/color_installation.png) center right no-repeat !important; 63 | padding-right: 20px !important; 64 | } 65 | #menu .examples{ 66 | background: url(img/color_examples.png) center right no-repeat !important; 67 | padding-right: 20px !important; 68 | } 69 | #menu .demos{ 70 | background: url(img/color_demos.png) center right no-repeat !important; 71 | padding-right: 20px !important; 72 | } 73 | #menu .reference{ 74 | background: url(img/color_reference.png) center right no-repeat !important; 75 | padding-right: 20px !important; 76 | } 77 | 78 | #container a.up, 79 | #container a.up:visited { 80 | float: right; 81 | border: 0px; 82 | padding: 0px; 83 | font-size : 10px; 84 | text-decoration: none !important; 85 | background-image: none; 86 | } 87 | 88 | /* Content Items */ 89 | 90 | #about, #about_more, 91 | #download, 92 | #examples, 93 | #demos, 94 | #installation, 95 | #short_reference ,#ani , #anisequence, #aniconstants, 96 | #misc { 97 | width:480px; 98 | float:left; 99 | margin-right:24px; 100 | margin-bottom:20px; 101 | padding:5px; 102 | background-color:#fff; 103 | } 104 | 105 | #about .about_text_color { 106 | color: #E8A100; 107 | } 108 | 109 | #about, #menu { 110 | font-size: 20px; 111 | } 112 | 113 | #about,#about_more { 114 | border-top: 20px solid #E8A100; 115 | } 116 | 117 | #download { 118 | border-top: 20px solid #95CBE8; 119 | } 120 | 121 | #installation { 122 | border-top: 20px solid #BFD6A4; 123 | } 124 | 125 | #examples { 126 | border-top: 20px solid #E6A9C4; 127 | } 128 | 129 | #demos { 130 | border-top: 20px solid #A79DC5; 131 | } 132 | 133 | #short_reference, #ani, #anisequence, #aniconstants { 134 | border-top: 20px solid #EBC29D; 135 | } 136 | 137 | #misc { 138 | border-top: 20px solid #A2A2A2; 139 | } 140 | 141 | 142 | .clear { 143 | clear:both; 144 | } 145 | 146 | #footer { 147 | padding-left:5px; 148 | height:20px; 149 | margin-bottom:32px; 150 | } 151 | 152 | 153 | ul { 154 | list-style:none; 155 | padding:0; 156 | margin:0; 157 | } 158 | 159 | 160 | #menu ul li, #subMenu ul li { 161 | float:left; 162 | padding-right:6px; 163 | } 164 | 165 | #menu li { 166 | background-image: url(img/arr_big.png); 167 | background-repeat: no-repeat; 168 | padding-left:22px; 169 | background-position: left center; 170 | } 171 | 172 | 173 | 174 | 175 | 176 | 177 | /* Headings */ 178 | 179 | h1 { 180 | font-size:2em; 181 | font-weight:normal; 182 | } 183 | 184 | 185 | h3, h4, h5, th { 186 | font-size:20px; 187 | font-weight:normal; 188 | margin-bottom:4px; 189 | } 190 | 191 | h2 { 192 | font-size:20px; 193 | font-weight:normal; 194 | margin-bottom:4px; 195 | float: left; 196 | } 197 | 198 | 199 | 200 | p { 201 | font-size:1em; 202 | width:90%; 203 | margin-bottom:16px; 204 | clear:left; 205 | } 206 | 207 | 208 | pre, code { 209 | font-family:"Courier New", Courier, monospace; 210 | font-size:1em; 211 | line-height:normal; 212 | } 213 | 214 | 215 | 216 | 217 | hr { 218 | border:0; 219 | height:1px; 220 | margin-bottom:24px; 221 | } 222 | 223 | a:link, a:visited { 224 | text-decoration: none; 225 | border-bottom: 1px solid #000; 226 | font-weight: normal; 227 | background-image: url(img/arr_small.png); 228 | background-repeat: no-repeat; 229 | padding-left:14px; 230 | background-position: left center; 231 | 232 | } 233 | 234 | #about a:link, #about a:visited { 235 | background-image: url(img/arr_big.png); 236 | padding-left:22px; 237 | } 238 | 239 | #menu a:link, #menu a:visited { 240 | background-image: none; 241 | padding: 0px; 242 | border: none; 243 | } 244 | 245 | a:hover, 246 | a:active { 247 | text-decoration: none; 248 | font-weight: normal; 249 | } 250 | 251 | 252 | 253 | 254 | 255 | 256 | img { 257 | border: 0px solid #000000; 258 | } 259 | a.image-link, a.image-link { 260 | border:none; 261 | background-image:none; 262 | padding:0; 263 | } 264 | 265 | 266 | /* COLORS */ 267 | 268 | 269 | body { 270 | color : #333; 271 | background-color :#f0f0f0; 272 | } 273 | 274 | 275 | #header { 276 | background-color:#f0f0f0; 277 | color:#333; 278 | } 279 | 280 | 281 | #content { 282 | background-color:#f0f0f0; 283 | } 284 | 285 | 286 | 287 | h1, h2, h3, h4, h5, h6 { 288 | color:#333; 289 | } 290 | 291 | 292 | pre, code { 293 | color: #000000; 294 | } 295 | 296 | 297 | a,strong { 298 | color: #333; 299 | } 300 | 301 | 302 | a:hover, 303 | a:active { 304 | color: #333; 305 | } 306 | 307 | 308 | a:visited, 309 | a:link:visited { 310 | color: #333; 311 | } 312 | 313 | 314 | #footer { 315 | background-color:#f0f0f0; 316 | color:#333; 317 | } 318 | 319 | 320 | #footer a, #menu a { 321 | color:#333; 322 | } 323 | 324 | br { 325 | clear: left; 326 | } 327 | --------------------------------------------------------------------------------