charlie_says Posted March 24, 2014 Share Posted March 24, 2014 I've just tested out tinting. It works well, but a perhaps little too correctly...If you tint a white sprite it goes to the new colour, if you tint a black sprite it stays black... I can work around this, but is it possible to recolour (as in how tint worked in Flash?) -I had a quick look in Pixi.Sprite but didn't see anything obvious. Link to comment Share on other sites More sharing options...
charlie_says Posted March 24, 2014 Author Share Posted March 24, 2014 Also, is it possible to tint an animation? Link to comment Share on other sites More sharing options...
JP91 Posted March 24, 2014 Share Posted March 24, 2014 maybe this can work check in Pixi Canvastinter.js and CanvasTinter.tintWithPerPixel Link to comment Share on other sites More sharing options...
charlie_says Posted March 24, 2014 Author Share Posted March 24, 2014 Having read through Canvastinter.js it specifies the blendmode used... I think you're correct that tintWithPerPixel may work, but it's not immediately obvious how I'd change Sprite.tint to use that method instead...And, how you'd tint an animation is still a mystery. Link to comment Share on other sites More sharing options...
JP91 Posted March 24, 2014 Share Posted March 24, 2014 that's true.. this.jugador.tint = "0xff0000" work well but........ < var canvas = document.createElement("canvas"); PIXI.CanvasTinter.tintWithPerPixel(this.sprite.texture,"0xff0000",canvas); > Link to comment Share on other sites More sharing options...
charlie_says Posted March 24, 2014 Author Share Posted March 24, 2014 Ok sprite.animations.tint works perfectly... it just doesn't work if your sprite is black.As for the blendmode/colour replacing I'm still trying. Link to comment Share on other sites More sharing options...
Recommended Posts