Merge pull request #4351 from Cirras/spritesheet-from-atlas-base-texture

Add __BASE texture entry in SpriteSheetFromAtlas parser
This commit is contained in:
Richard Davey 2019-04-08 10:17:23 +01:00 committed by GitHub
commit 36b40db7f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,9 +40,9 @@ var SpriteSheetFromAtlas = function (texture, frame, config)
throw new Error('TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.'); throw new Error('TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.');
} }
// Add in a __BASE entry (for the entire atlas) // Add in a __BASE entry (for the entire atlas frame)
// var source = texture.source[sourceIndex]; var source = texture.source[0];
// texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height); texture.add('__BASE', 0, 0, 0, source.width, source.height);
var startFrame = GetFastValue(config, 'startFrame', 0); var startFrame = GetFastValue(config, 'startFrame', 0);
var endFrame = GetFastValue(config, 'endFrame', -1); var endFrame = GetFastValue(config, 'endFrame', -1);