Description

Adds values to the properties of a period.

Usage

Parameters

  • attr {Object}

    Property values :

    • opacity
    • x
    • y
    • scaleX
    • scaleY
    • rotation

    Example :

    {x: 200, scaleX: 2}
    

  • frames {Integer}

    Duration in frames

  • ease {Function} optional

    (optional) Effect. See to()

Returns

CanvasEngine.Timeline

Example

var timeline = canvas.Timeline.new(el);
timeline.add({x: 100}, 70,  Ease.easeOutElastic).call();

Discussion