OJs Posted September 8, 2022 Share Posted September 8, 2022 (edited) I am a new bee in Pixi tilemap, I used below code to load each of the individual json files based on their level. this.app.loader .add('map0', '/assets/level_0/level_0.json') .add('map1', '/assets/level_1/level_1.json') .add('map2', '/assets/level_2/level_2.json') I kindly ask for insights on the better way to do this so that I can detect and load all JSON files present in the folder at once without specifying them individually I will appreciate your response Regards Edited September 8, 2022 by OJs Correction Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 8, 2022 Share Posted September 8, 2022 (edited) > I can detect and load all JSON files present in the folder at once without specifying them individually Welcome to the web development, its not possible to list files in directories there Maybe with webpack and rollup and whatever you write to assemble application you can just generate this , but honestly, better to write it by hand. For more details, ask in our discord. Edited September 8, 2022 by ivan.popelyshev OJs 1 Quote Link to comment Share on other sites More sharing options...
OJs Posted September 9, 2022 Author Share Posted September 9, 2022 Thank you very much Ivan, for your response. I am grateful. Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.