News for hackers. Stuff that matters.
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by bascule on Sunday April 01, 2012 @03:03PM (#3784579)
Are you familiar with Pow? http://pow.cx/

It also happens to be written in JavaScript

Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by wamatt on Monday April 02, 2012 @04:55AM (#3787029)
It's cool, but makes Chrome laggy and slow to scroll :/

(Latest version on OSX Lion)

Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by 75c84fb8 on Monday April 02, 2012 @02:34PM (#3789430)
Yeah, it's probably the gratuitous secondary sunburst being drawn into the background of that demo page. That's a pretty big PNG image (i.e. the size of your viewport) being generated. For smaller uses it shouldn't be an issue, but gratuitous use will definitely cause performance problems.
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by pyre on Sunday April 01, 2012 @07:48PM (#3785493)
Looks rather interesting when you tell it to do 1000 rays.
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by shousper on Monday April 02, 2012 @12:19AM (#3786299)
I liked 100000 better.
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by NHQ on Sunday April 01, 2012 @06:11PM (#3785148)
Very nice. Forked!
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by wavephorm on Sunday April 01, 2012 @03:59PM (#3784702)
If you only have one element, then why does it require jQuery?

Is learning this one simple API call too hard for people?

  document.getElementById()
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by statenjason on Sunday April 01, 2012 @04:22PM (#3784752)
It does more than just selecting an element. It also finds an inner element to do the burst from, grabs OuterWidth, and sets css.

While it is possible to do these without jQuery, you could say that about any jQ plugin.

[deleted]
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by pippy on Sunday April 01, 2012 @06:57PM (#3785323)
Using jQuery allows for chaining, CSS selectors and a simple function call.

Simply getting the width/height of an element in JavaScript is very hairy, especially when you want a cross browser solution.

I agree this jQuery thing a little redundant, but the simple fact it's the defacto, it fixes cross compatibility issues and it's easy to write stuff in.

Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by jQueryIsAwesome on Sunday April 01, 2012 @09:15PM (#3785727)
Pretty cool, but originX and originY don't work in this example (Last Chrome / Windows 7) and the fact that you generate base64 enconded images on the fly instead of using canvas (or svg) renders this unusable for animations.
Re:Pow.js - Algorithmic sunburst generator via CSS, canvas a... by 75c84fb8 on Monday April 02, 2012 @12:08PM (#3788744)
originEl if present overrides originX/Y. It wouldn't be too hard to build a similar tool that absolutely positions a canvas within an element, but there's a tradeoff in complexity. Setting a CSS background is a nice, simple approach.