Jump to content

tileSprite using a single frame of a spritesheet


farzher
 Share

Recommended Posts

  • 2 months later...

I didn't want to create a new topic as I have the exact same problem. 

 

I'm using 2.0.7 and still can't make it work. 

 

I'm using width and height to do the tiling. That works fine if your sprite fills the image, but with a specific frame, it doesn't seem to be the right way.

 

Edit: To be precise , I have an image of 256*256, I set the frameHeight/Width to 128 and ask for the frame 0. So this frame exists. But the wole image is displayed when I expand my TileSprite ( width = 300 for example )

Link to comment
Share on other sites

When I've encountered this problem I've just taken the tiled assets out of the sprite sheets/atlases and made them separate; they still have to be power-of-two dimensions though. I know this sounds like a cop-out but I've not yet had time to test what works and what doesn't - I've had sprites from within atlases tile fine in WebGL, and then others which seemingly should work just not. I'd like to find out what the exact requirements are for tiling part of a sprite sheet or atlas, but currently I just don't know what they are.

Link to comment
Share on other sites

I think it's fairly well known by the developers (this would be a pixi issue if anything btw) and I'm not sure if it's a technical limitation. Certainly in other GPU frameworks I've used, tiling a sprite from an atlas isn't possible, or at least not very easy, because the sprite you want to tile has to be extracted from the sprite sheet and set as an individual texture anyway internally for it to work with standard texture operations.

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