0

Is it possible to loop through folder to load all possible images inside this folder (in Phaser I need to this.load.image and also afterwards add loaded images)? This is necessary for Phaser3 game. It is hosted on Apache.

I think that it could be a problem from security reasons or there is some approach?

winner_joiner
  • 12,173
  • 4
  • 36
  • 61
renathy
  • 5,125
  • 20
  • 85
  • 149

1 Answers1

-2

I searched through Phaser documentation but I didn't find anything that would do the job, Phaser does not seems to implement a filesystem by itself. So you could use this answer and if it doesn't work you should refer to Apache filesystem.

The goal here is to store all the images contained in your assets folder in an list (recursively? if you have some nested folders) then loop through that list calling this.load.image with each image directory.

If you manage to make it work please post the code : )

mDeram
  • 69
  • 1
  • 9