Skip to content

Commit bb6c5bb

Browse files
committed
Key added to TextureAtlas and SpriteSheet, fixing the 'undefined' key error in LoadTexture.
1 parent b6ad27e commit bb6c5bb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/loader/Cache.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ Phaser.Cache.prototype = {
553553
addSpriteSheet: function (key, url, data, frameWidth, frameHeight, frameMax, margin, spacing) {
554554

555555
var obj = {
556+
key: key,
556557
url: url,
557558
data: data,
558559
frameWidth: frameWidth,
@@ -582,6 +583,7 @@ Phaser.Cache.prototype = {
582583
addTextureAtlas: function (key, url, data, atlasData, format) {
583584

584585
var obj = {
586+
key: key,
585587
url: url,
586588
data: data,
587589
base: new PIXI.BaseTexture(data)

0 commit comments

Comments
 (0)