Jump to content

get texture UV coordinate


Recommended Posts


I'm trying to build game with Tiled editor

I just made my own parser of Tiled leves, for sprite drawing I used TilingSprite class
But its like really slow. Small tiled level ends up with a 9 fps

So, the question is, how can I make tiles from big textures thats doesnt have an atlas file?

I know that I can use vertex shader, maybe you know some examples of it?

Or maybe I can recreate custom TextureCache frames for tiles I used?

Link to comment
Share on other sites

Yes you can take any region of any spritesheet you have.

new PIXI.Texture(baseTexture, new PIXI.Rectangle(128, 128, 32, 32));
//or this, it will take baseTexture of another texture automagically
new PIXI.Texture(anotherTexture, new PIXI.Rectangle(128, 128, 32, 32));

Also, look at https://github.com/pixijs/pixi-tilemap

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.

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.


  • Recently Browsing   0 members

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