Description

Adds a function that executes the loop for rendering the element

Usage

Parameters

  • callback() {Function}

    Callback

Example

In the method "ready" in the scene class :

var el = this.createElement();
el.addLoopListener(function() {
    this.x += 3;
});

or

var el = this.createElement();
el.on("canvas:render", (function() {
    this.x += 3;
});

Discussion