Skip to content

An ImpactJS plugin which allows you to define complex animation sequences with a simple string.

Notifications You must be signed in to change notification settings

Joncom/impact-easy-animation-sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

Impact Easy Animation Sequence

An ImpactJS plugin which allows you to define complex animation sequences with a simple string.

Installation

  1. Put plugin here: /lib/plugins/joncom/easy-animation-sequence/
  2. Require 'plugins.joncom.easy-animation-sequence.animation'.

Examples

// These two statements are equivalent:
this.addAnim('walk', 0.1, [0,1,2,3,4,5]);
this.addAnim('walk', 0.1, "0-5");

// Reverse order works too:
this.addAnim('walk', 0.1, [5,4,3,2,1,0]);
this.addAnim('walk', 0.1, "5-0");

// You can chain ranges like this:
this.addAnim('walk', 0.1, [0,1,2,3,4,5,4,3,2,1]);
this.addAnim('walk', 0.1, "0-5-1");

// Seperate using commas for complex sequences:
this.addAnim('walk', 0.1, [1,2,3,4,5,0,5,4,3,2]);
this.addAnim('walk', 0.1, "1-5,0,5-2");

Special thanks to dmen who inspired this plugin.

About

An ImpactJS plugin which allows you to define complex animation sequences with a simple string.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages