Elrinth Posted April 14, 2016 Share Posted April 14, 2016 Here's my loader code which worked on the old version of pixi.js (1.6.1)http://pastebin.com/4032KFxm But now there's a new loader implemented, and I don't understand how it works. How can I make my loadercode work for the latest pixi.js? Basically you send a file called "assets/gfx/something.sprdef" to the loader which had forexample this line in it: 42,42 then it'd take the same name as above, but replace .sprdef with .png, then split the png into 42 wide and 42 high textures which then could be used in pixi. Then I could easily use it with: player = PIXI.Sprite.fromFrame("assets/gfx/something.png0"); But it'd also support making many different for example if you wrote in the .sprdef: 000,000,008,008,016,016,Font1 it'd start from position x:0, y:0 and grab sprites at 8 pixels wide and 8 pixels high. 16 in x-direction and 16 in y-direction. Then name it Font1. Ofcourse the naming part is not implemented as you can see in the code. Quote Link to comment Share on other sites More sharing options...
d13 Posted April 16, 2016 Share Posted April 16, 2016 Hi Elrinth, Pixi's new loader is pretty complex, but it works really well. There are some basic explanations here: https://github.com/kittykatattack/learningPixi#loading Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 19, 2016 Share Posted April 19, 2016 https://github.com/pixijs/pixi-tilemap allows to draw insane amount of tiles every frame. Just clear it and fill with new tiles every time camera is scrolled. 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.