Error in "PIXI.loader.add"
duqingnian opened this issue · 2 comments
duqingnian commented
DennysOliveira-2 commented
This tutorial is a little bit old for newer versions of PIXI. I think it was made to V4ish and you're currently using 6.
You should create an instance of PIXI.Loader or use the PIXI.Loader.shared that would be the "same" as the old loader.
const loader = new PIXI.Loader();
loader.add("images/tree2.png").load(setup);
That should do.
ygj6 commented
You can refer to https://pixijs.download/dev/docs/PIXI.Loader.html