rezoner / playground

Playground.js is a framework for your javascript based games. It gives you out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs.
MIT License
459 stars 50 forks source link

Failed to load image #13

Closed gregmax17 closed 9 years ago

gregmax17 commented 9 years ago

Just getting started and I'm running into errors. This is my code:

var app = new PLAYGROUND.Application(
{
    paths : 
    {
        images : 'media/images/'
    },

    create : function()
    {
        this.loadImage('cake-6');
    },

    render : function()
    {
        this.layer.clear('#000');
    }
});

This is the error:

Uncaught (in promise) TypeError: this.getAssetEntry is not a function {stack: (...), message: "this.getAssetEntry is not a function"}message: "this.getAssetEntry is not a function"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }proto: Errorpromise @ playground.js:1412PLAYGROUND.Application.loadOneImage @ playground.js:1436PLAYGROUND.Application.loadImages @ playground.js:1391PLAYGROUND.Application.loadImage @ playground.js:1371PLAYGROUND.Application.create @ main.js:10PLAYGROUND.Application.emitLocalEvent @ playground.js:1175(anonymous function) @ playground.js:1081

rezoner commented 9 years ago

Pushed a fix

gregmax17 commented 9 years ago

Thank you!