Skip to content

Commit 267cb95

Browse files
author
Igor Petushkov
committed
Move loading __DEFAULT and __MISSING images to boot function.
1 parent e224faa commit 267cb95

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

v3/src/boot/Game.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ var Game = new Class({
7272

7373
AddToDOM(this.canvas, this.config.parent);
7474

75+
this.textures.boot();
76+
7577
this.anims.boot(this.textures);
7678

7779
this.scene.boot();

v3/src/textures/TextureManager.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ var TextureManager = new Class({
2727

2828
this._tempCanvas = CanvasPool.create2D(this, 1, 1);
2929
this._tempContext = this._tempCanvas.getContext('2d');
30+
},
3031

31-
this.addBase64('__DEFAULT', game.config.defaultImage);
32-
this.addBase64('__MISSING', game.config.missingImage);
32+
boot: function ()
33+
{
34+
this.addBase64('__DEFAULT', this.game.config.defaultImage);
35+
this.addBase64('__MISSING', this.game.config.missingImage);
3336
},
3437

3538
addBase64: function (key, data)

0 commit comments

Comments
 (0)