kittykatattack / learningPixi

A step-by-step introduction to making games and interactive media with the Pixi.js rendering engine.
4.4k stars 851 forks source link

Need Help: Sprite not shown properly on the #127

Closed ghost closed 5 years ago

ghost commented 5 years ago

Reproduce here.

I'm currently finding a way to make a simple template for me to use. It currently has these features:

  1. Pixijs, definitely
  2. Typescript
  3. Webpack

When I followed some of the code in the loader example, the sprite cat.png won't show up in my window. However, the text work, so it's not the problem of the stage. I can see that the images are completely loaded using progress event.

I use localhost to access to my index.html under dist/. I'm on Windows version of Firefox (Newest stable version, I checked that it supports WebGL)

ghost commented 5 years ago

I just fixed it myself. The argument that I pass into the loader.add should be relative to index.html instead of main.ts.