Textures.Parsers.JSONHash will now perform a hasOwnProperty check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from JSON.parse. Fix #4768

This commit is contained in:
Richard Davey 2020-08-26 13:06:04 +01:00
parent da4af063b9
commit 80c571963c

View file

@ -41,6 +41,11 @@ var JSONHash = function (texture, sourceIndex, json)
for (var key in frames)
{
if (!frames.hasOwnProperty(key))
{
continue;
}
var src = frames[key];
// The frame values are the exact coordinates to cut the frame out of the atlas from