Description

Adds a loop listener in a element to perform an animation (with addLoopListener). From the method call, the loop is started on the animation stop. Use the play method to start the animation

Usage

Parameters

  • el {CanvasEngine.Element}

  • uniq {Boolean} optional

    (optional) (>=1.3.1) Indicates if the element has only an animation. false by default.

    Example :

    In ready method :

    var el = this.createElement();
    var animation = canvas.Animation.New({...});
    
    animation.add(el, true);
    animation.add(el, true);
    
    // Despite that adds twice the animation element, only the second assignment will be considered
    

Discussion