pc.extend(pc, function () {
    var SpriteAtlasHandler = function (loader) {
        this._loader = loader;
    };

    SpriteAtlasHandler.prototype = {
        // Load the sprite atlas texture using the texture resource loader
        load: function (url, callback) {
            var handler = this._loader.getHandler("texture");
            return handler.load(url, callback);
        },

        // Create sprite atlas resource using the texture from the texture loader
        open: function (url, data) {
            var handler = this._loader.getHandler("texture");
            var texture = handler.open(url, data);
            if (! texture) return null;

            var resource = new pc.SpriteAtlas();
            resource.texture = texture;
            return resource;
        },

        patch: function (asset, assets) {
            // pass defaults to texture
            var texture = asset.resource.texture;
            if (texture) {
                texture.name = asset.name;
                texture.minFilter = pc.FILTER_NEAREST_MIPMAP_NEAREST; //pc.FILTER_LINEAR_MIPMAP_LINEAR;
                texture.magFilter = pc.FILTER_NEAREST; //pc.FILTER_LINEAR;
                texture.addressU = pc.ADDRESS_CLAMP_TO_EDGE;
                texture.addressV = pc.ADDRESS_CLAMP_TO_EDGE;
                texture.mipmaps = true;
                texture.anisotropy = 1;
            }

            // set frames
            asset.resource.frames = {};
            for (var key in asset.data.frames) {
                asset.resource.frames[key] = {
                    rect: new pc.Vec4(asset.data.frames[key].rect),
                    pivot: new pc.Vec2(asset.data.frames[key].pivot),
                };
            }

            asset.on('change', function (asset, attribute, value) {
                if (attribute === 'data') {
                    asset.resource.frames = value.frames;
                }
            });
        }
    };

    return {
        SpriteAtlasHandler: SpriteAtlasHandler
    };

}());

@@ -17,24 +17,579 @@
 nction () %7B%0A
+    var JSON_ADDRESS_MODE = %7B%0A        %22repeat%22: pc.ADDRESS_REPEAT,%0A        %22clamp%22:  pc.ADDRESS_CLAMP_TO_EDGE,%0A        %22mirror%22: pc.ADDRESS_MIRRORED_REPEAT%0A    %7D;%0A%0A    var JSON_FILTER_MODE = %7B%0A        %22nearest%22:             pc.FILTER_NEAREST,%0A        %22linear%22:              pc.FILTER_LINEAR,%0A        %22nearest_mip_nearest%22: pc.FILTER_NEAREST_MIPMAP_NEAREST,%0A        %22linear_mip_nearest%22:  pc.FILTER_LINEAR_MIPMAP_NEAREST,%0A        %22nearest_mip_linear%22:  pc.FILTER_NEAREST_MIPMAP_LINEAR,%0A        %22linear_mip_linear%22:   pc.FILTER_LINEAR_MIPMAP_LINEAR%0A    %7D;%0A%0A
     var Spri
@@ -621,24 +621,24 @@
  (loader) %7B%0A
-
         this
@@ -1408,27 +1408,20 @@
 ass 
-defaults to 
 texture
+ data
 %0A   
@@ -1537,16 +1537,17 @@
 t.name;%0A
+%0A
         
@@ -1558,371 +1558,1304 @@
     
-texture.minFilter = pc.FILTER_NEAREST_MIPMAP_NEAREST; //pc.FILTER_LINEAR_MIPMAP_LINEAR;%0A                texture.magFilter = pc.FILTER_NEAREST; //pc.FILTER_LINEAR;%0A                texture.addressU = pc.ADDRESS_CLAMP_TO_EDGE;%0A                texture.addressV = pc.ADDRESS_CLAMP_TO_EDGE;%0A                texture.mipmaps = true;%0A                texture.anisotropy = 1
+if (asset.data.hasOwnProperty('minfilter') && texture.minFilter !== JSON_FILTER_MODE%5Basset.data.minfilter%5D)%0A                    texture.minFilter = JSON_FILTER_MODE%5Basset.data.minfilter%5D;%0A%0A                if (asset.data.hasOwnProperty('magfilter') && texture.magFilter !== JSON_FILTER_MODE%5Basset.data.magfilter%5D)%0A                    texture.magFilter = JSON_FILTER_MODE%5Basset.data.magfilter%5D;%0A%0A                if (asset.data.hasOwnProperty('addressu') && texture.addressU !== JSON_ADDRESS_MODE%5Basset.data.addressu%5D)%0A                    texture.addressU = JSON_ADDRESS_MODE%5Basset.data.addressu%5D;%0A%0A                if (asset.data.hasOwnProperty('addressv') && texture.addressV !== JSON_ADDRESS_MODE%5Basset.data.addressv%5D)%0A                    texture.addressV = JSON_ADDRESS_MODE%5Basset.data.addressv%5D;%0A%0A                if (asset.data.hasOwnProperty('mipmaps') && texture.mipmaps !== asset.data.mipmaps)%0A                    texture.mipmaps = asset.data.mipmaps;%0A%0A                if (asset.data.hasOwnProperty('anisotropy') && texture.anisotropy !== asset.data.anisotropy)%0A                    texture.anisotropy = asset.data.anisotropy;%0A%0A                var rgbm = !!asset.data.rgbm;%0A                if (asset.data.hasOwnProperty('rgbm') && texture.rgbm !== rgbm)%0A                    texture.rgbm = rgbm
 ;%0A  

Use texture asset options for the texture of the sprite atlas