SebastianMtl Posted June 1, 2020 Share Posted June 1, 2020 Hello , I try to implement pixi-tilmap to may vueJs project and I have an error message on my chrome console is it someone here to tell me what's the problem ? I think it's maybe a path problem this is my code : Quote Link to comment Share on other sites More sharing options...
SebastianMtl Posted June 1, 2020 Author Share Posted June 1, 2020 I have this error in my console , But the path is ok . error: Error: Error trying to parse loaded json: SyntaxError: Unexpected token < in JSON at position 0 at Resource.abort (webpack-internal:///7dg0:658:18) at Resource._xhrOnLoad (webpack-internal:///7dg0:1105:18) message: "Error trying to parse loaded json: SyntaxError: Unexpected token < in JSON at position 0" stack: "Error: Error trying to parse loaded json: SyntaxError: Unexpected token < in JSON at position 0↵ at Resource.abort (webpack-internal:///7dg0:658:18)↵ at Resource._xhrOnLoad (webpack-internal:///7dg0:1105:18)" Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 1, 2020 Share Posted June 1, 2020 Something was changed in pixi loader and they are reverting it back, so no '.texture" access for atlas for now. However, you dont actually need this parameter (bitmaps). Tilemap will work with textures itself Quote Link to comment Share on other sites More sharing options...
SebastianMtl Posted June 2, 2020 Author Share Posted June 2, 2020 I just take the same code as the example code on github Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 2, 2020 Share Posted June 2, 2020 It works with dev version or pixi or versions before 5.2.2 , because 5.2.2 had a bug. Just remove that parameter and everything will be ok Quote Link to comment Share on other sites More sharing options...
SebastianMtl Posted June 2, 2020 Author Share Posted June 2, 2020 6 minutes ago, ivan.popelyshev said: It works with dev version or pixi or versions before 5.2.2 , because 5.2.2 had a bug. Just remove that parameter and everything will be ok So I just write it like this : tilemap = new PIXI.tilemap.CompositeRectTileLayer(0); or tilemap = new PIXI.tilemap.CompositeRectTileLayer(); Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 2, 2020 Share Posted June 2, 2020 .. doesnt actually matter, zIndex is also not used. Honestly, did you look at sources of pixi and pixi-tilemap ? You should clone pixiJS locally and open it in IDE. Looking in sources of things that you use and debugging, going inside methods that throw errors might make your development process much faster. Yes, you are not supposed to do that in ideal framework, but pixi is hardcore rendering lib, there's webgl and many other things underneath, things break every time. Quote Link to comment Share on other sites More sharing options...
SebastianMtl Posted June 2, 2020 Author Share Posted June 2, 2020 I use it in vueJS , and the things are not the same if I use in plain JS and HTML. 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.