🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

simple-animator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-animator

Simple animator

0.0.1
latest
Source
npm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Simple Animator

Simply set only one request for animation on browser and handle your callback.

It request animation frame continuously if any animation exist.

Use it like other Browserify/CommonJS modules.

Installation

$ npm install simple-animator

API

animator = require('simple-animator');

duration = 3000; // duration in ms

callback = function(progress){

	console.log(progress);
	// shows progress normal values(from 0 to 1)

}

handle = animator.animate(duration, callback);

handle.pause();

handle.continue();

handle.cancel();

Sample of multiple requests

handle1 = animator.animate(1000, callback1);
handle2 = animator.animate(2000, callback2);
handle3 = animator.animate(3000, callback3);

Keywords

animator

FAQs

Package last updated on 07 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts