Config based SS rip.

This commit is contained in:
photonstorm 2017-04-11 17:22:22 +01:00
parent 4b4ef1dcfd
commit 01a542303a
2 changed files with 11 additions and 2 deletions

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: '17c49dd0-1e5e-11e7-a489-ff140a784e90'
build: '3cdef7a0-1ec7-11e7-a131-f3c6d91827e1'
};
module.exports = CHECKSUM;

View file

@ -7,6 +7,7 @@
var Parser = require('./parsers');
var Texture = require('./Texture');
var CanvasPool = require('../dom/CanvasPool');
var GetObjectValue = require('../utils/object/GetObjectValue');
/**
* Textures are managed by the global TextureManager. This is a singleton class that is
@ -152,8 +153,16 @@ TextureManager.prototype = {
return texture;
},
addSpriteSheetFromAtlas: function (key, atlasKey, atlasFrame, config)
addSpriteSheetFromAtlas: function (key, config)
{
var atlasKey = GetObjectValue(config, 'atlas', null);
var atlasFrame = GetObjectValue(config, 'frame', null);
if (!atlasKey || !atlasFrame)
{
return;
}
var atlas = this.get(atlasKey);
var sheet = atlas.get(atlasFrame);