Pepa489 Posted October 28, 2015 Share Posted October 28, 2015 Hello, i have problem with smoothing on tilesprite(not working). My codevar background = game.add.tileSprite(0,0,50,50, 'Background')background.scale.set(10);background.smoothed = false; Link to comment Share on other sites More sharing options...
jmp909 Posted October 28, 2015 Share Posted October 28, 2015 with a normal sprite if you changed smoothed value you can do thisbackground.smoothed=!background.smoothedbackground.texture.baseTexture.dirty() // not a public API functionthere might be an equivalent for tileSprite indextwo 1 Link to comment Share on other sites More sharing options...
Pepa489 Posted October 28, 2015 Author Share Posted October 28, 2015 with a normal sprite if you changed smoothed value you can do thisbackground.smoothed=!background.smoothedbackground.texture.baseTexture.dirty() // not a public API functionthere might be an equivalent for tileSprite Not working Link to comment Share on other sites More sharing options...
jmp909 Posted October 28, 2015 Share Posted October 28, 2015 i don't think smoothed even works on a tileSprite if you use it initially, never mind changing it later the source says it @extends Phaser.Component.Smoothedhttps://github.com/photonstorm/phaser/blob/master/src/gameobjects/TileSprite.js#L50 so it could be a PIXI issue. whilst the dirty() approach i used is not a public API, i would raise an issue about the initial value not working however also note if you update the baseTexture (in the sprite example) it affects all sprites using this texture obviouslyhttp://phaser.io/sandbox/OIfuRInI/play Link to comment Share on other sites More sharing options...
Pepa489 Posted October 28, 2015 Author Share Posted October 28, 2015 i don't think smoothed even works on a tileSprite if you use it initially, never mind changing it later the source says it @extends Phaser.Component.Smoothedhttps://github.com/photonstorm/phaser/blob/master/src/gameobjects/TileSprite.js#L50 so it could be a PIXI issue. whilst the dirty() approach i used is not a public API, i would raise an issue about the initial value not working however also note if you update the baseTexture (in the sprite example) it affects all sprites using this texture obviouslyhttp://phaser.io/sandbox/OIfuRInI/playWhat is the solution? Link to comment Share on other sites More sharing options...
Recommended Posts