I'm currently learning pixi.js and have hit a snag with the loader when attempting to load a bitmap font
ERROR Error: Resource named "/fonts/IBM_BIOS-2y-16_0.png" already exists.
I get this after loading the associated xml file and made absolutely sure the loader only gets called once by setting breakpoints and stepping trough the program
this.loader = new PIXI.Loader('game-assets', 8);
this.loader
.use(PIXI.BitmapFontLoader.use)
.add('fonts/IBM_BIOS-2y-16.xml')
.load((_loader, context) => {
// snipped for simplicity
});
});
The fact that it reads the texture once as verified by the devtool network tab despite not asking for it makes me confident the xml file is being processed correctly, and I also made sure that it does only have one single texture associated with it and referenced in the file
<pages>
<page id="0" file="IBM_BIOS-2y-16_0.png" />
</pages>
After following the steps I can see that it only makes a single call to `BitmapText.add(... )` at `@pixi/text-bitmap/lib/text-bitmap.es.js : 830` for the texture and throws the error there.
Tracing it further I noticed that after the BitmapFontLoader has loaded the xml file, the `resource-loader/lib/Resource.js` file eventually calls `this._loadElement('image');`, and then BitmapFontLoader tries to load the same texture again
So basically the standard loader gets in between the sequence of the bitmap loader, the question is why? Did I misunderstand how to use loader plugins as seen above?