0.1.0 • Published 5 years ago

@kirinnee/animatex v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

AnimateX

Extend native DOM Elements to allow for Fluent animation API

Getting Started

Install via NPM

$ npm i @kirinnee/animatex

or

Install via Yarn

$ yarn add @kirinnee/animatex --prefer-offline

Using in browser

Attach scripts in dist/ folder

<script src="./dist/animatex.min.js"></script>

Usage

Allows for extending the DOM Elements with @kirinnee/animate installed.

On how to construct the animator, please click here

//Construct Asynchronous animator, where animator is the synchronous animator, refer to above.
let asyncAnimator: AsynchronousAnimator = new GSAPAsyncAnimator(animator);

//Construct instance of AnimateX and extend the primitives
let animX: AnimateX = new AnimX(asyncAnimator);
animX.ExtendPrimitives();

To use it, use it like @kirinnee/animate, except with the DOM as the caller

//Example
let element:Element = document.querySelector("#id");
element
    .X(0,100,{duration:1000})
    .Y(0,100,{duration:1000})
    .Blur(0,1,{duration:300});

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under MIT - see the LICENSE.md file for details