Jump to content

pixi-tilemap error of texture


SebastianMtl
 Share

Recommended Posts

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)"

 

Link to comment
Share on other sites

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();

 

Link to comment
Share on other sites

.. 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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...