Jump to content

Tinting TileSprite in Canvas


Sturb
 Share

Recommended Posts

Hey, just wondering if it is ever going to be possible to tint a Phaser.Tilesprite. I'm trying to setup light to dark transitions on an endless runner environment by combining tinting and overlays. My environment is broken up into several parallax layers so I wanted to tint my foreground layer and a couple background layers, then have an overlay with a light radius cutout on the layer the player is on.

Anyway, tinting a TileSprite works in WebGL, however I would like it if I wasn't limited to WebGL. I've found this post saying it's a bug in PIXI however here it seems to have been fixed. Is there any news or updates about this?

Link to comment
Share on other sites

Something that might be of help are these tutorials by Josh Morony (which I found through recent Phaser news).

http://www.joshmorony.com/how-to-create-a-day-night-cycle-in-phaser/

http://www.joshmorony.com/how-to-add-weather-effects-in-phaser-games/

They're fantastic, planning to do something similar in my own game, but perhaps with more direct control (no tweening).

It looks like he tints the tilesprites for the day/night cycle.

Link to comment
Share on other sites

  • 1 year later...

Sorry to resurrect an old topic but I'm running into the same issue here : WebGL tinting works great with the tweenTint function suggested in the above posts, but when in Canvas rendering mode, the colouring seems buggy. I could probably modify the function to change the text's style if canvas mode is detected. Would this be the correct approach to bypass this issue?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...