v1.5.3
Make Builder Animable !
Animable.js requière RequestFrame.js.
Animable.js requière Builder.js Optionnel ! Pour ajouter les methodes Builder::anime() & Builder::stopAnime()
Exécute update
a 60 fps en lui transmettant la valeur actuelle en 1er paramètre.
Renvois l'id (int) de l'animation.
update
function Fonction exécutée à chaque frame.from
Number Nombre de départ.to
Number Nombre de fin.time
int Durée de l'animation.smooth
function Fonction d'accélération de l'animation. Par défaultsmooth.Line
. (Optionnel)
Arrête l'animation correspondant à l'id.
id
int Identifiant unique renvoyé parfunction anime()
.
Anime la property
CSS de l'élément.
Détecte automatiquement la valeur de départ et l'unité.
callback
est exécuté une fois l'animation terminée.
property
String Propriété CSS.to
int Valeur de fin (sans l'unité).time
int Durée de l'animation.callback
function Fonction exécutée à la fin de l'animation. Par défaultnull
. (Optionnel)smooth
function Fonction d'accélération de l'animation. Par défaultsmooth.Line
. (Optionnel)
Note: Créer une propriété _animations
dans le Builder
.
Annule une ou plusieurs animations sur un Builder.
Si property
n'est pas défini, arrête toute les animations lié à ce Builder.
property
String Propriété animée à stoppper. (Optionnel)
Note: Créer une propriété _animations
dans le Builder
.
Contiens les effects d'accélération de base qui peuvent être transmis à anime()
.
Smooth effects de base:
smooth.Line
smooth.In
smooth.Out
smooth.InOut
Smooth effects avancés (basés sur les Easing Equations de Robert Penner):
Note: Pour utiliser les smooth effects suivant, vous devez inclure le fichier easing.js après Animable.js
smooth.CubicIn
smooth.CubicOut
smooth.CubicInOut
smooth.QuartIn
smooth.QuartOut
smooth.QuartInOut
smooth.QuintIn
smooth.QuintOut
smooth.QuintInOut
smooth.SineIn
smooth.SineOut
smooth.SineInOut
smooth.ExpoIn
smooth.ExpoOut
smooth.ExpoInOut
smooth.CircIn
smooth.CircOut
smooth.CircInOut
The MIT License (MIT)
Copyright (c) 2014 juloo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.