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);




Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.