mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Config based SS rip.
This commit is contained in:
parent
4b4ef1dcfd
commit
01a542303a
2 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '17c49dd0-1e5e-11e7-a489-ff140a784e90'
|
||||
build: '3cdef7a0-1ec7-11e7-a131-f3c6d91827e1'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue