Skip to content

Commit

Permalink
Fix load bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Dec 28, 2018
1 parent bbe2b19 commit 468a63c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/engine/Resources/Texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class Texture extends Resource<HTMLImageElement> {
this.width = this._sprite.width = this.image.naturalWidth;
this.height = this._sprite.height = this.image.naturalHeight;
this._sprite = new Sprite(this, 0, 0, this.width, this.height);
this.loaded.resolve(this.image);
complete.resolve(this.image);
});
this.image.src = this.path;
Expand Down
2 changes: 1 addition & 1 deletion src/spec/GifSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('A Gif', () => {

var sprite: ex.Sprite = gif.asSprite();
expect(gif.isLoaded()).toBe(true);
(<any>sprite)._applyEffects();
// (<any>sprite)._applyEffects();
sprite.draw(engine.ctx, 0, 0);

imagediff.expectCanvasImageMatches('GifSpec/frame1.png', engine.canvas, done);
Expand Down

0 comments on commit 468a63c

Please sign in to comment.