sunny Posted July 21, 2017 Share Posted July 21, 2017 I create a container and I add some sprites on this container, then it is very bad. This is my main code: Ground.prototype.createCGround = function (count, x, y) { var front = PIXI.Sprite.fromFrame('Tile_10.png'), blank = PIXI.Sprite.fromFrame('Tile_13.png'); var container = new PIXI.Container(); container.addChild(front); container.addChild(blank); front.position.set(0, 0); var count = count || 1; for (var i = 0; i < count; i++) { var span = PIXI.Sprite.fromFrame('Tile_11.png'); container.addChild(span); span.position.set(front.width + i * span.width, 0); } blank.position.set(front.width + i * span.width, 0); container.position.set(x, y); container.isUes = false; return container; } It have some black lines in the border !!!!!!! And the black lines are random , not all !!!! Who can help me ! I'm very need help!!! Thank you! Quote Link to comment Share on other sites More sharing options...
xerver Posted July 21, 2017 Share Posted July 21, 2017 Looks like you may be scaling your sprites, which when using Linear interpolation (default) can cause rounding errors resulting in the lines you see here. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 21, 2017 Share Posted July 21, 2017 When you create the atlas, please add some padding, at least 1 pixel. All the tools (texturePacker, shoebox) can do that. sunny 1 Quote Link to comment Share on other sites More sharing options...
sunny Posted July 22, 2017 Author Share Posted July 22, 2017 11 hours ago, ivan.popelyshev said: When you create the atlas, please add some padding, at least 1 pixel. All the tools (texturePacker, shoebox) can do that. Thank you! You are right. I solved the problem according to your method. You are very good. Thank you! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.