GourmetGorilla Posted May 16, 2015 Share Posted May 16, 2015 New to Pixi.js and JS OOP in general. The old super simple v2 asset loader looks like this (but doesn't work with pixi.js V3):var loader = new PIXI.AssetLoader(["images/cat.png"]);loader.onComplete = setup;loader.load();What's does the new V3 asset loader look like? Did the loaders for Atlas change too?What else changed in V3 where V2 code no longer works? Thanks, was pulling my hair out trying to do a tutorial, found out it was not working cause I had v2 code in the project with V3 pixi version grrr... Quote Link to comment Share on other sites More sharing options...
xerver Posted May 17, 2015 Share Posted May 17, 2015 Pixi v3 uses a new module we built called "resource-loader":https://github.com/englercj/resource-loaderA pre-made instance with the Pixi.js built-in middleware is available for use at "PIXI.loader". You can also create your own custom one by creating an instance of "PIXI.loaders.Loader".Your example using the v3 loader: PIXI.loader.add('images/cat.png').load(setup); Quote Link to comment Share on other sites More sharing options...
GourmetGorilla Posted May 17, 2015 Author Share Posted May 17, 2015 Thanks, much appreciated 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.