kittykatattack / learningPixi

A step-by-step introduction to making games and interactive media with the Pixi.js rendering engine.
4.4k stars 851 forks source link

Pixi loader is depreciated #149

Closed djave-co closed 3 years ago

djave-co commented 4 years ago

I had a console warning that the loader is depreciated when following the tutorial. I think I have correctly replaced it in the tutorial, however as its my first time with Pixi it would be worth checking my PR.

DennysOliveira-2 commented 3 years ago

I think you can also create a new instance of PIXI.Loader() like that, so the code would be changed a little bit less.

const loader = PIXI.Loader();
loader.add("assets/example.png")
    .load(setup);