mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Creates a __BASE entry for the atlas.
Defaults to __BASE if no texture frame was found in the atlas (may consider replacing with blank texture)
This commit is contained in:
parent
5e0bbd7028
commit
07f3756761
4 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: 'cf1b58d0-bc6a-11e6-80ab-e1859222c781'
|
||||
build: 'e17829d0-bc6b-11e6-a3c1-a55832c87262'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -84,6 +84,8 @@ Texture.prototype = {
|
|||
if (!frame)
|
||||
{
|
||||
console.warn('No Texture.frame found with name ' + name);
|
||||
|
||||
return this.frames['__BASE'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -22,6 +22,10 @@ var JSONArrayTextureParser = function (texture, sourceIndex, json)
|
|||
return;
|
||||
}
|
||||
|
||||
// Add in a __BASE entry (for the entire atlas)
|
||||
var source = texture.source[sourceIndex];
|
||||
texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);
|
||||
|
||||
// By this stage frames is a fully parsed array
|
||||
var frames = json['frames'];
|
||||
var newFrame;
|
||||
|
|
|
@ -22,6 +22,10 @@ var JSONHashTextureParser = function (texture, sourceIndex, json)
|
|||
return;
|
||||
}
|
||||
|
||||
// Add in a __BASE entry (for the entire atlas)
|
||||
var source = texture.source[sourceIndex];
|
||||
texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);
|
||||
|
||||
// By this stage frames is a fully parsed Object
|
||||
var frames = json['frames'];
|
||||
var newFrame;
|
||||
|
|
Loading…
Reference in a new issue