(Reason being that for some animations, we wanted it to finish in a precise amount of time, but for others, maintaining frame rate was paramount, even if total elapsed time was longer)
Why doesn't it work? I imagine it's this funky DNS config:
sergio@sergio-laptop:~ > dig www.connoratherton.com
;; QUESTION SECTION:
;www.connoratherton.com. IN A
;; ANSWER SECTION:
www.connoratherton.com. 3529 IN CNAME http://connor-personal.herokuapp.com.
http://connor-personal.herokuapp.com. 229 IN CNAME us-east-1-a.route.herokuapp.com.
us-east-1-a.route.herokuapp.com. 55 IN A 50.19.235.218
This is not valid CNAME content. Does this work on some browsers???
It renders well if the tab is in focus (fantastic work!) but there's a bug: if I open it in a tab in the background, and visit it later (after the animation would have completed?) I see only a nearly-blank page. Confused me for a bit, as I open mass-tabs here on HN...
Really silly request, but could someone provide an implementation where I can just drop in an svg and it would have this effect? Please, and thank you.
This seems like an awful lot of code for animating the path's strokeDashArray and strokeDashOffset attributes. Especially if you're already using another library with built in transitions, such as D3 or even jQuery.
Very nice. It's funny, I keep clicking on these 'new JS library' links thinking, oh geez, not another one... but then I leave thinking, wow, that is very impressive and super useful.
make sure to leave and come back/hit refresh etc to try to get the animation to fire. looks cool, although there was nothing on the screen the first time i went to the tab on Chrome/MacOSX
it seems that it doesnt run if I open this in a new tab and stay on the current page but if I reload the page it works (all done with chrome) Seems like a page focus event gone wrong
Since you can write more or less, arbitrary "tween" functions in D3 (I learnt more than I wanted to about these when I wrote the dynamic "semaphore pie" we used here [1] ) it's relatively viable to do it for paths created from within D3. For paths already present and wanting to be selected... I guess it would work pretty much the same, since d3 selectors are more or less good to go with embedded SVGs, IIRC.
It's actually a very nice trick (and I love moving things around in graphs), and I'm intrigued by how I'd do it with D3. If I have any free time this weekend I'll look into it ;)
[+] [-] thedz|11 years ago|reply
This is really great stuff; has a super friendly API to boot.
FWIW, we also released a generalized library for some of the things we were doing WRT frame-based and duration-based animation:
https://github.com/voxmedia/metronome
(Reason being that for some animations, we wanted it to finish in a precise amount of time, but for others, maintaining frame rate was paramount, even if total elapsed time was longer)
[+] [-] sergiosgc|11 years ago|reply
Why doesn't it work? I imagine it's this funky DNS config:
This is not valid CNAME content. Does this work on some browsers???[+] [-] connoratherton|11 years ago|reply
[+] [-] scott_karana|11 years ago|reply
It renders well if the tab is in focus (fantastic work!) but there's a bug: if I open it in a tab in the background, and visit it later (after the animation would have completed?) I see only a nearly-blank page. Confused me for a bit, as I open mass-tabs here on HN...
[+] [-] cturhan|11 years ago|reply
Edit: Checked the code. He uses requestAnimationFrame.
[+] [-] andrethegiant|11 years ago|reply
[+] [-] experimental-|11 years ago|reply
[+] [-] popey456963|11 years ago|reply
[+] [-] maemre|11 years ago|reply
[+] [-] andrewrice|11 years ago|reply
[+] [-] connoratherton|11 years ago|reply
[+] [-] JohnHaugeland|11 years ago|reply
I'm telling you because I'm pretty sure I'm the only Windows Phone user worldwide.
[+] [-] sighlent|11 years ago|reply
I'm using Two.js https://github.com/jonobr1/two.js to do the SVG interpreting and processing.
[+] [-] yblu|11 years ago|reply
[+] [-] jakelear|11 years ago|reply
[+] [-] thrush|11 years ago|reply
[+] [-] boomskats|11 years ago|reply
http://lazylinepainter.info/
[+] [-] idid|11 years ago|reply
[+] [-] chadillac|11 years ago|reply
[+] [-] bengali3|11 years ago|reply
[+] [-] TheAceOfHearts|11 years ago|reply
https://www.dropbox.com/s/z57g1fmmn10qmej/Screenshot%202014-...
[+] [-] liminal|11 years ago|reply
[+] [-] olso4052|11 years ago|reply
[+] [-] lnanek2|11 years ago|reply
[+] [-] drunken_thor|11 years ago|reply
[+] [-] coob|11 years ago|reply
[+] [-] jh47|11 years ago|reply
[+] [-] Mithaldu|11 years ago|reply
[+] [-] na85|11 years ago|reply
Furthermore if I middleclick to open a new tab, the animation does not play.
[+] [-] connoratherton|11 years ago|reply
[+] [-] S4M|11 years ago|reply
I don't know if HN crashed the server or if there is some irony involved.
[+] [-] erex78|11 years ago|reply
[+] [-] RBerenguel|11 years ago|reply
It's actually a very nice trick (and I love moving things around in graphs), and I'm intrigued by how I'd do it with D3. If I have any free time this weekend I'll look into it ;)
[1] VanillaSEO: http://vanillaseo.com/report/20141030fdec7fda61eafac3b8dca58...
Ninja edit (or almost): Here's the relevant part of d3 docs about tweens: https://github.com/mbostock/d3/wiki/Transitions
[+] [-] mbostock|11 years ago|reply
http://bl.ocks.org/mbostock/5649592
And here’s an older graphic that demonstrates the technique in use:
http://www.nytimes.com/interactive/2013/02/20/movies/among-t...
We also used this technique to render the progress map in The Russia Left Behind:
http://www.nytimes.com/newsgraphics/2013/10/13/russia/
[+] [-] bengali3|11 years ago|reply
[1] http://www.nytimes.com/interactive/2013/10/09/us/yellen-fed-...