Noid Posted May 6, 2014 Share Posted May 6, 2014 (Either I'm the first to notice this or everyone thinks it's so obvious they didn't bother to write a forum post about it ) When I run my game, I see two red hearts and a gray one next to "Phaser vX.X.X ...". I thought it was just decoration but I noticed in screenshots from other people that sometimes there are three red hearts. So I inspected the piece of code responsible for the output of that line which, with 'pretty print' enabled, reads: var a = b.VERSION, c = "Canvas", d = "HTML Audio", e = 1;if (this.renderType === b.WEBGL ? (c = "WebGL", e++) : this.renderType == b.HEADLESS && (c = "Headless"), this.device.webAudio && (d = "WebAudio", e++), this.device.chrome) { for (var f = ["%c %c %c Phaser v" + a + " - " + c + " - " + d + " %c %c http://phaser.io %c %c ♥%c♥%c♥ ", "background: #0cf300", "background: #00bc17", "color: #ffffff; background: #00711f;", "background: #00bc17", "background: #0cf300", "background: #00bc17"], g = 0; 3 > g; g++) f.push(e > g ? "color: #ff2424; background: #fff" : "color: #959595; background: #fff"); console.log.apply(console, f) }Notice there is an 'e' variable that starts at 1 and is incremented when c = WebGL and d = "WebAudio". There is also a loop using a 'g' variable and at the end an f.push line that compares e to g and according to which is greater sets color to #ff2424(red) or #959595(gray). So the meaning of the hearts are: ♥: Basic functionality♥♥: Either WebGl or WebAudio enabled♥♥♥: WebGl and WebAudio enabled That's really cool! charlie_says, Mike, drhayes and 7 others 10 Link to comment Share on other sites More sharing options...
turnA Posted May 6, 2014 Share Posted May 6, 2014 Great find! I also always see it and wonder what it means, but not too bothered to find out.Now I can rest in peace Link to comment Share on other sites More sharing options...
rich Posted May 6, 2014 Share Posted May 6, 2014 I wondered when someone would bother to dig into the code behind this easter egg yovo, kass, drhayes and 1 other 4 Link to comment Share on other sites More sharing options...
clark Posted May 6, 2014 Share Posted May 6, 2014 This is great I noticed there was hearts but I never gave them meaning. Link to comment Share on other sites More sharing options...
jpdev Posted May 7, 2014 Share Posted May 7, 2014 I wondered when someone would bother to dig into the code behind this easter egg The easteregg looks really really ugly in the webstorm console btw (When running from webstorm in chrome, you get alot of weird characters in the webstorm console, but no colors) Link to comment Share on other sites More sharing options...
Heppell08 Posted May 7, 2014 Share Posted May 7, 2014 Yeah I get the weird characters in chrome but I never used to.Good find though, I genuinely never knew what them hearts were for. I just thought it was an adoration aesthetic lol. Link to comment Share on other sites More sharing options...
Nambiar Posted May 7, 2014 Share Posted May 7, 2014 We all love phaser and I thought the hearts were just phaser returning the feeling. LeonardoDigital and LTNGames 2 Link to comment Share on other sites More sharing options...
stasuss Posted May 7, 2014 Share Posted May 7, 2014 And I noticed that when debugging app on phone and desktop, there was different heart count, so I assumed that they mean something, but not usefull for me Link to comment Share on other sites More sharing options...
Kapsonfire Posted May 7, 2014 Share Posted May 7, 2014 I have no hearts oO"Phaser v2.0.4 - Renderer: WebGL - Audio: WebAudio - http://phaser.io" Link to comment Share on other sites More sharing options...
stasuss Posted May 7, 2014 Share Posted May 7, 2014 I have no hearts oO"Phaser v2.0.4 - Renderer: WebGL - Audio: WebAudio - http://phaser.io"Are you from your planet? Link to comment Share on other sites More sharing options...
Noid Posted May 7, 2014 Author Share Posted May 7, 2014 @Kapsonfire I have no hearts oO"Phaser v2.0.4 - Renderer: WebGL - Audio: WebAudio - http://phaser.io"If your browser is not chrome it doesn't output any hearts or it would look really ugly on browsers that don't support styled console logs. Link to comment Share on other sites More sharing options...
yovo Posted May 7, 2014 Share Posted May 7, 2014 use Chrome to see the hearts ,) Link to comment Share on other sites More sharing options...
Kapsonfire Posted May 7, 2014 Share Posted May 7, 2014 oh yeah its so sweet.... hearts <3<3<3ok - didnt read before that i have to use chrome for it^^ my life is so much better know with these kindly red hearts.. spread love everywhere^^ Link to comment Share on other sites More sharing options...
Recommended Posts