- An animation library which uses "stage" and "actor" as metaphors
- Automatic switch between CSS transitions and JS tweening
- Provide a flexible way to write asynchronous sequence of actions
- Support CSS transform value
- ChoreoJS can either be viewed as an independent library, or as a part of OzJS mirco-framework.
- It's wrapped as an AMD (Asynchronous Module Definition) module. You should use it with oz.js (or require.js or similar for handling dependencies).
- If you want to make it available for both other AMD code and traditional code based on global namespace. OzJS provides a mini define/require implementation to transform AMD module into traditional module pattern.
- See http://ozjs.org for details.
Add to your project as new dependency
Or download directly from Github
var choreo = require('choreo');
choreo.config(opt)
--choreo.transform(elm, prop, value)
--choreo.Stage(name)
--choreo.Actor(opt|actors, stage)
--
var stage = choreo('stageName[optional]'); // Singleton with stageName
stage.isPlaying()
--stage.isCompleted()
--stage.play()
--stage.pause()
--stage.complete()
--stage.cancel()
--stage.clear()
--stage.actor(opt)
--stage.group(actor, actor, ...)
--stage.follow()
--
var actor1 = stage.actor(elment, prop, duration, easeing, delay);
var actor2 = stage.actor(option, option);
var actorGroup = stage.group(actor1, actor2);
actor.enter(stage)
--actor.exit()
--actor.fork()
--actor.setto(value)
--actor.extendto(value)
--actor.reverse()
--actor.follow()
--
var promise = stage.follow(); // or actor1.follow(), actorGroup.follow()
promise.then()
--promise.done()
--promise.fail()
--promise.bind()
--- ... -- see EventMaster
Under construction...
Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.