bubamara Posted October 30, 2013 Share Posted October 30, 2013 Hi, when I have sprite created from frame and apply crop on it, I would expect, that only portion of actual frame will be croppedvar mainMenu = _game.add.sprite(0, 0 , 'atlas');mainMenu.frameName = 'mainMenu.png';mainMenu.cropEnabled = true;mainMenu.crop = new Phaser.Rectangle(10,10,100,100);Instead of that, result is texture area cropped from whole atlas. Is this intentional? Thanks Link to comment Share on other sites More sharing options...
hackenstein Posted November 29, 2013 Share Posted November 29, 2013 I noticed the same problem with spritesheets. The whole spritesheet will be cropped instead of the currently visible frame. My guess is that spritesheets are internally cropped to show the individual frames. So cropping spritesheets with more than one frame will lead to conflicts and result in unexpected behaviour. mariogarranz 1 Link to comment Share on other sites More sharing options...
mariogarranz Posted October 10, 2014 Share Posted October 10, 2014 Hey, I've been skipping this problem by using separate images for any texture I would need to crop, but now I would like to crop an Image that is part of a TextureAtlas. Is there a way to do this with the built in Phaser functionality? It seems, just like hackenstein said, that the crop function will be applied to the whole atlas instead of the image frame. Link to comment Share on other sites More sharing options...
Recommended Posts