Class: Cmorph

Animates any number of properties on any object.

Extends

Cmorph Method: constructor

Syntax

new Cmorph( item, object );

Arguments

  1. item - (object) The object to which the animations are applied.
  2. options - (object) Fx.options

Returns

Notes

Cmorph does not work synchron with Thread or even the draw-event of an item. An item's properties will be modified regardless of whether the item is currently rendered or even visible at all.

At the moment, chaining will not work as expected.

Cmorph Method: morph

Syntax

cmorph.morph( object );

Arguments

  1. properties - (object) The properties of the object that you want to animate.

Returns

Notes

Each value can either be a number which describes the end-value of the animation or an array with the start and end-value of each property. If only a number is given Cmorph will attempt to retrieve the start-value from the current state of the object.

Example

var obj = { a : 0, b : 0 };

new Cmorph(obj,{
	duration : 500
}).morph({
	a : 100, //will go from 0 to 100
	b : [100,200] //will go from 100 to 200
});
  1. CANVAS
  2. LayerHash
  3. Layer
  4. CanvasItem
  5. Thread
  6. Cmorph