Jump to content

Texture Atlas wrong position


Recommended Posts

I use texture atlas for tiled map. I use firefox. Today i run my game in Google Chrome and saw border between tiles.


Each tile on the left is from one pixel to the previous. Just like positiion.x - 1px. I don't know what i can do. Help me please.

var loader = PIXI.loader;
loader.load(function() {
    var texture = PIXI.loader.resources[Resouce.name].textures["grass.jpg"];
    texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST;
    var sprite = new PIXI.Sprite(texture);




Link to comment
Share on other sites

I thought Shoebox doesnt need windows. There are three ways

1. use https://github.com/pixijs/pixi-picture  (example code  http://pixijs.github.io/examples/index.html?s=picture&f=border-artifacts.js&title=Border%20artifacts&plugins=pixi-picture&v= )

2. use pixi-tilemap but to reduce artifacts your tiles must be SQUARES

3. pack textures with a border and reduced border artifacts option.

The first way is naive and slow, while the second and third way are effective.

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