JeZxLee Posted June 26, 2020 Share Posted June 26, 2020 Hi, We took an older PixiJSv4 game we made and upgraded it to PixiJSv5. Game runs, but there is a bad warning in Internet browser's console & we don't know how to fix it. Below is the details, hope someone can help us! WARNING: "PixiJS Deprecation Warning: PIXI.loader instance has moved to PIXI.Loader.shared Deprecated since v5.0.0" CODE: var Container = PIXI.Container, autoDetectRenderer = PIXI.autoDetectRenderer, loader = PIXI.loader, resources = PIXI.loader.resources, TextureCache = PIXI.utils.TextureCache, Texture = PIXI.Texture, Sprite = PIXI.Sprite, Text = PIXI.Text, Graphics = PIXI.Graphics; Thanks in advance! Jesse Quote Link to comment Share on other sites More sharing options...
jonforum Posted June 26, 2020 Share Posted June 26, 2020 (edited) as error say ! just do ` loader = `PIXI.Loader.shared` !! ? Also here guide , if you missing it.https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide but strangely, nothing about Loader !! Edited June 26, 2020 by jonforum Quote Link to comment Share on other sites More sharing options...
JeZxLee Posted June 26, 2020 Author Share Posted June 26, 2020 Hi, Thanks for the reply. I made the change but it does not run in browser: var Container = PIXI.Container, autoDetectRenderer = PIXI.autoDetectRenderer, loader = PIXI.loader.shared, resources = PIXI.loader.resources, TextureCache = PIXI.utils.TextureCache, Texture = PIXI.Texture, Sprite = PIXI.Sprite, Text = PIXI.Text, Graphics = PIXI.Graphics; Any ideas? Thanks! Jesse Quote Link to comment Share on other sites More sharing options...
JeZxLee Posted June 26, 2020 Author Share Posted June 26, 2020 Hi, Our PixiJS game project is open-source. Please view the source on GitHub below:https://github.com/SLNTHERO/PacDudeHero4110PercentTurbo Any help provided would be appreciated! Jesse Quote Link to comment Share on other sites More sharing options...
jonforum Posted June 26, 2020 Share Posted June 26, 2020 (edited) it should work, i just test it in devtool It same reference, so maybe you have more and another issue somewhere. No time on my side to debug your projet sorry, but maybe wait if someone from Pixi team can help Edited June 26, 2020 by jonforum Quote Link to comment Share on other sites More sharing options...
JeZxLee Posted June 26, 2020 Author Share Posted June 26, 2020 No problem, perhaps someone else can help us... Game is live on Itch:https://slnthero.itch.io/pacdude-hero-pacman-remix Jesse Quote Link to comment Share on other sites More sharing options...
bubamara Posted June 26, 2020 Share Posted June 26, 2020 it's 'Loader' with first capital letter and you need to change it for resources as well var loader = PIXI.Loader.shared; var resources = PIXI.Loader.shared.resources; JeZxLee and jonforum 1 1 Quote Link to comment Share on other sites More sharing options...
JeZxLee Posted June 26, 2020 Author Share Posted June 26, 2020 1 hour ago, bubamara said: it's 'Loader' with first capital letter and you need to change it for resources as well var loader = PIXI.Loader.shared; var resources = PIXI.Loader.shared.resources; Hi... Thanks, that actually worked! I have some other questions that I will ask soon in the forum. Jesse ivan.popelyshev 1 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.