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 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.
It also happens to be written in JavaScript
(Latest version on OSX Lion)
Is learning this one simple API call too hard for people?
While it is possible to do these without jQuery, you could say that about any jQ plugin.
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.