Description

Calls a function when the canvas is loaded

Usage

Parameters

  • callback {Function}

    Function called when the canvas is loaded

Example

RPGJS.defines({
    canvas: "canvas",
    autoload: false
}).ready(function() {

    RPGJS.Player.init({
        actor: 1,
        start: {x: 10, y: 10, id: 1}
    });

    RPGJS.Scene.map();
});

Discussion