News for hackers. Stuff that matters.
Re:Show HN: fontBomb - Stylishly destroy the web by plehoux on Friday July 06, 2012 @11:25AM (#4208131)
I'm the author, it works best in Safari and IE 9. Use the bookmarklet to destroy any website.

Source is here: https://github.com/plehoux/fontBomb/tree/master/src/coffee

Re:Show HN: fontBomb - Stylishly destroy the web by mortenjorck on Friday July 06, 2012 @01:45PM (#4208841)
Great fun.

A couple of suggestions, speaking as a front-end designer / occasional indie-game artist:

- I don't know how you're calculating it, but consider adding a bit of randomness to the effect radius. This way, you won't be blasting perfect circles each time.

- If keeping the graphics CSS-only isn't a priority, consider some sprites! If you need a sooty blast scar or maybe a simple explosion sprite, I'd be glad to lend a hand.

Re:Show HN: fontBomb - Stylishly destroy the web by plehoux on Friday July 06, 2012 @04:02PM (#4209369)
Some randomness would effectively be great to add! As for the sprites, I really wanted to focus on font and simplicity. It is much more about the chaos of many destructions, than about a single explosion.

I might add different velocity depending on the mousedown event duration. The longer you press, the bigger the explosion get.

Tks for your comments!

Re:Show HN: fontBomb - Stylishly destroy the web by bicknergseng on Friday July 06, 2012 @11:36AM (#4208182)
So awesome. Spent 10 min blowing the hell out of hn. Now instead of raging against trolls I can simply blow them up.
Re:Show HN: fontBomb - Stylishly destroy the web by mozillarewind on Friday July 06, 2012 @12:17PM (#4208380)
In Firefox 13, the explosions don't correspond to the clicked locations/where the bombs are placed.
Re:Show HN: fontBomb - Stylishly destroy the web by plehoux on Friday July 06, 2012 @12:45PM (#4208505)
I'm not using jquery and I had a lot of problems getting the position and offset of click and elements. I guess it still need more work.
Re:Show HN: fontBomb - Stylishly destroy the web by alptrv on Friday July 06, 2012 @11:45AM (#4208220)
Just curious, why it so faster in Safari then in Chrome?
Re:Show HN: fontBomb - Stylishly destroy the web by plehoux on Friday July 06, 2012 @11:51AM (#4208249)
My guess is that Safari rendering system use hardware acceleration and Chrome doesn't.

The bottleneck here is not javascript, it is the browser rendering system when applying all those css 2d transform.

Re:Show HN: fontBomb - Stylishly destroy the web by TazeTSchnitzel on Friday July 06, 2012 @12:20PM (#4208402)
Yep. Safari runs a 3D CSS demo/benchmark/unrealistic-stress-test I made much smoother than Chrome.
Re:Show HN: fontBomb - Stylishly destroy the web by _jb on Friday July 06, 2012 @11:49AM (#4208239)
I'm kinda sure it has to do with hardware acceleration.
Re:Show HN: fontBomb - Stylishly destroy the web by balloot on Friday July 06, 2012 @12:07PM (#4208327)
Would totally make sense given it works best in the two browsers most closely tied to the underlying OS.
Re:Show HN: fontBomb - Stylishly destroy the web by plehoux on Friday July 06, 2012 @12:57PM (#4208557)
I was totally impress by the speed of IE 9 running in a virtualbox instance on my macbook pro. Times they are changing!
Re:Show HN: fontBomb - Stylishly destroy the web by danso on Friday July 06, 2012 @03:52PM (#4209342)
This is cool...

When I looked at your JS, I thought to myself "that is a reasonable amount of code for that kind of functionality...even a little less than I would've thought"...considering there's no dependencies to browser-taming libraries: https://github.com/plehoux/fontBomb/blob/master/js/particle....

And then I saw the CS: https://github.com/plehoux/fontBomb/blob/master/src/coffee/p...

Nice!

Re:Show HN: fontBomb - Stylishly destroy the web by hoprocker on Friday July 06, 2012 @04:58PM (#4209622)
Seems like this is calling out for a ClojureScript implementation, too.
Re:Show HN: fontBomb - Stylishly destroy the web by tristanlabbe on Friday July 06, 2012 @11:28AM (#4208146)
Siiick!!
Re:Show HN: fontBomb - Stylishly destroy the web by septerr on Friday July 06, 2012 @12:09PM (#4208340)
Thanks!