Newer
Older
pixi.js / src / loaders / textureParser.js
@Chad Engler Chad Engler on 23 Jan 2015 405 bytes more jshint fixes
var core = require('../core');

module.exports = function ()
{
    return function (resource, next)
    {
        // create a new texture if the data is an Image object
        if (resource.data && resource.data.nodeName && resource.data.nodeName.toLowerCase() === 'img')
        {
            resource.texture = new core.Texture(new core.BaseTexture(resource.data));
        }

        next();
    };
};