phaser3-parcel-template icon indicating copy to clipboard operation
phaser3-parcel-template copied to clipboard

Cant load images

Open sergdevguy opened this issue 2 years ago • 1 comments

Cant load images from public folder as writed in readme file (and all others). Trying a lot of variants. No errors. Just green square.

What I was doing:

  1. instal parcel@next // because error if npm install -g parcel-bundler
  2. clone this template
  3. this.load.setBaseURL('http://localhost:8000');
  4. create public/images/star.png // and other variants, for examples assets/images in different places
  5. this.load.image('star', 'images/star.png'); // and other variants of path
  6. this.add.image(200, 300, 'star');

Thx

sergdevguy avatar Apr 14 '22 13:04 sergdevguy

Parcel v1 is no longer maintained, you can try this template: https://github.com/khanxbahria/phaser-parcel-boilerplate

khanxbahria avatar May 15 '22 21:05 khanxbahria