Jump to content

BUG: Canvas vs webGL: different pixi.js API behavier


Recommended Posts

Let say that I have an image in the size 600 x 300.

Inside the image there are 9 images representing frames in a matrix of 3x3 when each frame is 200x100.


I'm creating a tiling sprite:


var sprite = new PIXI.TilingSprite ( texture, 200, 100 );


Let's say that every 100 miliseconds I want to move the tile position to the right "frame" image.

So I need to play with both sprite.tilePosition.x and sprite.tilePosition.y.


The problem is that in canvas mode I just need to multiply the Y offset with 100 (the horizontal size of each frame) and the X offset with 200.

In webGL the numbers are different and I didn't manage to find out what's these values representing but they are the same in all browsers and systems.


Tested with pixi.js from github.


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