1.0.31 • Published 7 years ago

vuedrops-animate v1.0.31

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

vuedrops-animate

Synopsis

A simple Animation tool

Table of Contents

Installation

npm install -S vuedrops-animate

Usage

  import Animate from "vuedrops-animate" 

or

let Animaton = new Animate({speed: 300, easing: 'linear'})

Code Example

  import Animation from "vuedrops-animate"
  
  let Element = ducument.querySelector('#element'),
      animateHeight = function(height){ Element.style.height = height + 'px' }
  
  // first we create a new instance of the Animation Class, the prarameter are the options of the animation chain
  // they will be the default parameter for every animation callback
  let animation = new VDAnimate({easing:'linear')
           // then we register our first callback animation
          .register("height1", setHeight)
          //then we set the option of this animation
          .from(0).to(100).during(100).every(20)
          //we register our second callback animation and set the options
          .register("height2").callback(setHeight).options({from: 100, to: 50, every(25), during(250)})
          //we can also use css directly
          .register("height3").css({height: "<value>px"}).options({from: 50, to: 0, every(25), during(250)})
          //we start ou first animation
          .animate('height1')
          //then after the first animation is completed we trigger the second one
          .then().animate('height2')
          //then after .3s the second animation is completed we animate the third one
          .then().after(500).animate('height3')

API

Options

from

  • Type : Number
  • Default : 0

the initial value of the animated property

to

  • Type : Number
  • Default : 1

the final value of the animated property

easing

  • Type : String
  • Default : linear
  • Easing Type: linear, swing, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint, easeInSine, easeOutSine, easeInOutSine, easeInExpo, easeOutExpo, easeInOutExgitpo, easeInCirc, easeOutCirc, easeInOutCirc, easeInElastic, easeOutElastic, easeInOutElastic , easeInBack, easeOutBack, easeInOutBack, easeInBounce, easeOutBounce, easeInOutBounce

speed

  • Type : Number
  • Default : 300

The speed or duration of the animation in milliseconds

API Reference

Depending on the size of the project, if it is small and simple enough the reference docs can be added to the README. For medium size to larger projects it is important to at least provide a link to where the API reference docs live.

Tests

Describe and show how to run the tests with code examples.

Contributors

Let people know how they can dive into the project, include important links to things like issue trackers, irc, twitter accounts if applicable.

IMAGE ALT TEXT HERE

License

ISC License. © 2017 Amine Chouaiekh.

Thanks to javascript.info and jQuery Easing v1.3 that inspired vuedrops-animate

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago