Ninjadoodle Posted July 3, 2018 Share Posted July 3, 2018 Hi @enpu Recently, you added some flags to the 'flash' function, so we could crop the edges -> this.sprite.flash(250, '#ffffff', null, 8, 8, 8, 8); Any chance something like this could be added to the 'tint' function as well? Thanks for any feedback Quote Link to comment Share on other sites More sharing options...
enpu Posted July 3, 2018 Share Posted July 3, 2018 @Ninjadoodle I just added new tintCrop property to Sprite class. It is instance of Rectangle, so you could define all the 4 values. sprite.tint = '#ff0000'; sprite.tintCrop.x = 20; // Crop tint 20px from left sprite.tintCrop.y = 20; // Crop tint 20px from top sprite.tintCrop.width = 20; // Crop tint 20px from right sprite.tintCrop.height = 20; // Crop tint 20px from bottom sprite.tintCrop.set(20, 20, 20, 20); // Shorthand Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 4, 2018 Author Share Posted July 4, 2018 Hi @enpu This is awesome, thank you for the answer and adding the shorthand 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.