crowbar Posted May 31, 2015 Share Posted May 31, 2015 I am using PIXI v3.x and I have added a bunch of sprites to a container. The container looks like this: Which is confusing to me because each square sprite is flush with the others so the black lines in between don't make any sense. The lines also seem to get larger and smaller when I zoom in and out or move the container. The original images for the sprites look like these: Can someone help me figure out where these black lines are coming from and get rid of them? Regards,Jordan Quote Link to comment Share on other sites More sharing options...
xerver Posted June 1, 2015 Share Posted June 1, 2015 If you are scaling and using non-nearest scaling you can get this to happen in webgl due to floating point rounding errors and the wrapping type we use. Use PIXI.SCALE_MODE.NEAREST and it should clear up. Quote Link to comment Share on other sites More sharing options...
d13 Posted June 2, 2015 Share Posted June 2, 2015 Use PIXI.SCALE_MODE.NEARESTWhich property should be set to this value? Quote Link to comment Share on other sites More sharing options...
xerver Posted June 3, 2015 Share Posted June 3, 2015 Depends on how you load your textures, but baseTexture can take it in the ctor param: http://pixijs.github.io/docs/PIXI.BaseTexture.html You can also change it on the fly: http://pixijs.github.io/docs/PIXI.BaseTexture.html#scaleModetexture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; d13 and Shahdee 2 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.