Jump to content

sprite.tilePosition values?


sandbird
 Share

Recommended Posts

I created a PIXI.TilingSprite based sprite and what I want to do is animation using image file with all the frames of the animation.

So... all I want to do is to shift the tiled image to the next frame to display.

Anyway, I found out that sprite.tilePosition.x and sprite.tilePosition.y excepting strange values and there is no documentation what unit sprite.tilePosition expecting.

 

Each of my "frames" are X = 1083, Y = 374.

I found out that I need to enter:

 

sprite.tilePosition.x = frame_x * -1637;

sprite.tilePosition.y = frame_y * -410;

 

It do working on Chorme, Firefox, IE on my Windows 8.1 in any resolution.

Since that pixi.js only working with web-gl under Windows 8.1 I don't know if it'll work also with Canvas mode.

Guess that I need to install XP to see how it'll work with canvas :)

 

Anyone know what unit sprite.tilePosition excepting?

 

BTW: I'm working with the github master version.

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