News for hackers. Stuff that matters.
Re:Vivus, bringing your SVGs to life by hughes on Wednesday February 25, 2015 @03:09PM (#9109205)
> They all start and finish at the same time, hence the name `async`.

Since the "async" animation is the only one that is synchronous, it seems a bit misnamed!

Re:Vivus, bringing your SVGs to life by TazeTSchnitzel on Wednesday February 25, 2015 @03:28PM (#9109313)
Yes, surely the "delay" one should be Asynchronous, the "async" one should be Synchronous and "one by one" should be Sequential.
Re:Vivus, bringing your SVGs to life by mankyd on Wednesday February 25, 2015 @08:48PM (#9110886)
async and sync aren't even the correct terms here. Parallel, Serial, and Staggered seem more apropos.
Re:Vivus, bringing your SVGs to life by burntcaramel on Wednesday February 25, 2015 @08:53PM (#9110892)
Maybe instead of Delayed, Async, OneByOne, have: Staggered, Together, OneByOne

Keep the names friendly and not too technical.

Re:Vivus, bringing your SVGs to life by nkozyra on Wednesday February 25, 2015 @11:07PM (#9111185)
I felt bad that my impulse coming from that page was to come here and complain about the use of (and poor definition of) 'async.' Imagine my relief when it was already tackled!

The good news is this is really quite beautiful and I like the fact that - unlike other monolithic js animation libraries that do similar things like Raphael - it's super slim.

Re:Vivus, bringing your SVGs to life by nippoo on Thursday February 26, 2015 @11:05AM (#9113195)
Is it called "async" because they're All Synchronised? Bit of a long shot, but it's the most logical thing I could think of...!
Re:Vivus, bringing your SVGs to life by l00mer on Wednesday February 25, 2015 @04:22PM (#9109714)
Sorry, I can't use software that isn't "made with love". Consider revising. You might also consider having your code snippets hosted with ❤.

Kidding of course -- the love that went into this is self-evident.

Re:Vivus, bringing your SVGs to life by pimlottc on Wednesday February 25, 2015 @06:00PM (#9110370)
I initially misread the footed as "Make love with a keyboard" :P
Re:Vivus, bringing your SVGs to life by TeMPOraL on Thursday February 26, 2015 @09:17AM (#9112573)
Speaking of which... where the hell did that "made with ❤" meme started anyway?
Re:Vivus, bringing your SVGs to life by codezero on Wednesday February 25, 2015 @03:03PM (#9109177)
This technique reminds me (aesthetically) a lot of the drawing of RIP images [1], though that only happened because they took forever to download :)

[1] http://en.wikipedia.org/wiki/Remote_Imaging_Protocol

Re:Vivus, bringing your SVGs to life by Domenic_S on Wednesday February 25, 2015 @04:38PM (#9109817)
Oh WOW, it's been forever since I thought about RIP. Memories of graphics coming across at 2400 baud...
Re:Vivus, bringing your SVGs to life by codezero on Wednesday February 25, 2015 @04:48PM (#9109905)
Yep! RIP and even animated ANSI opened up some cool animations when it was exploited to make things like simulated motion and stuff like that, the good old days!
Re:Vivus, bringing your SVGs to life by timmaah on Thursday February 26, 2015 @12:34AM (#9111301)
The strokeDashOffset trick is a great hack.

I used it to animate a route on a US map. http://live.watsonswander.com/

Re:Vivus, bringing your SVGs to life by plurby on Wednesday February 25, 2015 @08:56PM (#9110899)
You can see an great example of Vivus in use at Estée Lauder http://www.esteelauder.com/boutiques/the-classics/index.tmpl
Re:Vivus, bringing your SVGs to life by Edmond on Wednesday February 25, 2015 @02:45PM (#9109056)
Re:Vivus, bringing your SVGs to life by neic on Thursday February 26, 2015 @05:06AM (#9111847)
They look good. However, clock8.svg is broken in Chrome 40 on OSX 10.10.
Re:Vivus, bringing your SVGs to life by WickyNilliams on Thursday February 26, 2015 @05:06AM (#9111848)
Had to do some similar animations recently. Wrote up a super simple function that can be combined with any easing function, and where you're in full control of the animation progress.

It's not specific to SVGs and doesn't do very much on it's own. Thankfully, you can use off-the-shelf easing functions and higher-order functions to have time/frame/whatever-based animation progress (e.g. as an advanced example, i actually utilised the accelerometer as input for animation progress)

Check app.js for example of fading element's opacity and animating an SVG path https://gist.github.com/WickyNilliams/af30ad9b1557f894efab

Re:Vivus, bringing your SVGs to life by deanclatworthy on Wednesday February 25, 2015 @03:07PM (#9109201)
This looks great. I like how it normalises the shapes into paths too. But are there any tools to do this for the command line that "simplify" SVGs so your library won't have to worry about this?
Re:Vivus, bringing your SVGs to life by bshimmin on Wednesday February 25, 2015 @03:49PM (#9109463)
It seems like it wouldn't be a Herculean task to take pathformer.js and turn it into a standalone CLI utility: https://github.com/maxwellito/vivus/blob/master/src/pathform...
Re:Vivus, bringing your SVGs to life by bshimmin on Wednesday February 25, 2015 @05:32PM (#9110232)
Quick and dirty, but this does the trick I think: https://gist.github.com/benshimmin/4bd6bb9cb8733a6acba7
Re:Vivus, bringing your SVGs to life by premasagar on Thursday February 26, 2015 @04:40AM (#9111780)
Yes, SVGO is really good at this and other kinds of SVG optimisation and manipulation: https://github.com/svg/svgo/
Re:Vivus, bringing your SVGs to life by dperfect on Wednesday February 25, 2015 @07:50PM (#9110753)
This is great, though none of the examples have any fills - just stroked paths.

From what I understand, this would not work with filled paths (or it would only animate a stroke, not the fill), right?

Re:Vivus, bringing your SVGs to life by ygra on Thursday February 26, 2015 @06:27AM (#9112039)
It's a hack with path strokes to make it appear as if being drawn, so yes it won't work with fills. Although if you approximate the fill with a zig-zagged stroke you could get a good impression of an animated, drawn fill as well with this.
Re:Vivus, bringing your SVGs to life by andreaferretti on Thursday February 26, 2015 @04:51AM (#9111808)
Really nice and easy to use! I have added an example to the Paths.js demo where I show how it can integrate with Vivus to provide animation of the generated paths

http://andreaferretti.github.io/paths-js-react-demo/

Re:Vivus, bringing your SVGs to life by vanderZwan on Thursday February 26, 2015 @04:50AM (#9111805)
This looks awesome, but as someone who never uses SVGs in practice: what kind of gotcha's should I look out for when using this? I'm thinking incompatible SVGs, performance issues due to abuse, that kind of thing.
Re:Vivus, bringing your SVGs to life by mintplant on Wednesday February 25, 2015 @06:36PM (#9110505)
I feel like this has been posted before--I recognize the aperture demos--but I can't find the thread. Any ideas? Did this change names?
Re:Vivus, bringing your SVGs to life by nperez on Wednesday February 25, 2015 @05:01PM (#9110025)
this could potentially be a really cool alternative to a 'spinner' on initial load of an app.
Re:Vivus, bringing your SVGs to life by sehr on Wednesday February 25, 2015 @06:55PM (#9110585)
Coursera does something like this IIRC
Re:Vivus, bringing your SVGs to life by _ZeD_ on Thursday February 26, 2015 @04:35AM (#9111771)
I see some strange "dots" floating before the start of the animation, with firefox
Re:Vivus, bringing your SVGs to life by puffyrice on Thursday February 26, 2015 @05:51AM (#9111950)
https://github.com/maxwellito/vivus#firefox For Firefox users, you might encounter some glitches depending on your SVG and browser version. On versions before 36, there is a problem to retrieve path length via getTotalLength method.
Re:Vivus, bringing your SVGs to life by andrewljohnson on Wednesday February 25, 2015 @03:02PM (#9109169)
Is this going to be cool if I use it with Rickshaw? Because it seems like it might.
Re:Vivus, bringing your SVGs to life by dmamills on Wednesday February 25, 2015 @03:01PM (#9109160)
This is super cool! Good work!
Re:Vivus, bringing your SVGs to life by Tomlinden on Wednesday February 25, 2015 @03:03PM (#9109179)
Awesome
Re:Vivus, bringing your SVGs to life by searine on Wednesday February 25, 2015 @04:08PM (#9109615)
Oh that's nice.