I’ve been working with phaser and I’m curious, is it necessary for each scene to have their own preload() method as a standard form of asset management? I would think it be better handled in a central config file so that developers have a reasonable scope of where a file is loaded. If you wanted to get granular you could have a directory of loader files per scene and export them to the config file. The idea is to have the framework do the preload work for you.
I just think loading assets directly in a scene (when using a bundler) leads to bloated error-prone code if you’re not careful. I realize you could set up a ‘bootup’ scene and shove your assets in there, but I imagine a config file would make a lot more sense to many more people.
I’m also curious why you have to specify a key and a file location when the key could trivially be parsed from the filename. If necessary you could override the key as an optional, secondary parameter or an inline object.