Giter Site home page Giter Site logo

animable.js's Introduction

Animable

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()

Exemple

Exemple

Références

function anime(update, from, to, time, smooth)

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éfault smooth.Line. (Optionnel)
function stopAnime(id)

Arrête l'animation correspondant à l'id.

  • id int Identifiant unique renvoyé par function anime().
Builder::anime(property, to, time, callback, smooth)

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éfault null. (Optionnel)
  • smooth function Fonction d'accélération de l'animation. Par défault smooth.Line. (Optionnel)

Note: Créer une propriété _animations dans le Builder.

Builder::stopAnime(property)

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.

var smooth

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

License

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.

animable.js's People

Contributors

julow avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.