Jump to content

TileSprite tilePosition bug in v2.4.4?


tsphillips
 Share

Recommended Posts

I am drawing TileSprite images (256 x 64 and 256 x 32) and they are rendering incorrectly.  I am only tiling horizontally.

 

The 256 x 64 image is rendering as if I had set sprite.tilePosition.y = 1, although tilePosition.y is actually 0.  The 256 x 32 image is rendering as if I had set sprite.tilePosition.y = -1, although tilePosition.y is actually 0.

 

The console reports Phaser v2.4.4 and Pixi v2.2.9.

 

After quite a bit of debugging I found that the bug is caused by non-integer values passed to width and height of the Phaser.Game constructor.

Phaser.Game(width, height, Phaser.CANVAS, 'game');// Warning: If width or height is not an integer, then TileSprite may not render correctly.

It seems like the root problem is some precision errors in the rendering code.

 

I have posted a bug about this on the GitHub repository.

 

https://github.com/photonstorm/phaser/issues/2262

 

Tom

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