Live data from Hacker News

Keyframes: Delivering scalable, high-quality animations to mobile clients

code.facebook.com

71–80 of 153 posts

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#71
post #62

Earlier quoted context omitted.

From your jungle.horse "more info" panel: > Word of warning: while I'm not a vampire, I may or may not be a night owl. That totally sounds absolutely non-suspicious... Also, you may or may not be having a HN-driven traffic spike.

Oh no, I've been outed. ;p

Well it sounds like the MO of a modern vampire: "let's meet for an artistic collaboration -- after the sun has settled" :P

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#72

I'm reminded of this: https://youtu.be/pAEAbqrE5Zw Does it represent a lot of work by skilled technicians? Undoubtedly. Is it interesting in it's own right? Frankly I think not. The surrounding question of the socialization of the internet is interesting, to be sure, but at the end of the day these are just animated emojis...

[deleted]

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#73
post #5

This is really slick, and I'm going to investigate using it for the Donald Trump animation on jungle.horse. The license [1] doesn't look to be as encumbered as some of Facebook's other open source licenses, but does include a clause I found to be strange: > provided Your Software does not consist solely of the Software So if I'm reading this correctly, it means only Facebook can redistribute this software? Wat. [1] h…

Apparently facebook uses this restrictive license on other so-called open source projects as well (FBMemoryProfiler, etc).

Presumably if you added a unique feature it might not "consist solely of the Software". But that clause isn't the troublesome one -- "modify the Software for your own internal use" makes it crystal clear that this is absolutely not Open Source.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#74
post #23

Hey, everyone! I'm one of the developers at Facebook who worked on this library since its conception! Really excited to be able to share this library today! I'll be checking up here periodically and can help answer any technical questions that you have!

Hi, I'm new to this, does it work with 3d animations ? Like something generated with blender ?

Thanks.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#75

I'm reminded of this: https://youtu.be/pAEAbqrE5Zw Does it represent a lot of work by skilled technicians? Undoubtedly. Is it interesting in it's own right? Frankly I think not. The surrounding question of the socialization of the internet is interesting, to be sure, but at the end of the day these are just animated emojis...

> Does it represent a lot of work by skilled technicians? Undoubtedly. Is it interesting in it's own right? Frankly I think not. You don't think having an easy way to create high quality animations for any purpose that work on multiple platforms is interesting...? You might not find the current application of it interesting but that's like saying React isn't interesting because someone used it to make another Flappy…

> You don't think having an easy way to create high quality animations for any purpose that work on multiple platforms is interesting...?

It would be more if they'd have created an extension to the SVG standard that they'd just parse out via JS. Then it'd just be a polyfill, and could easily be integrated natively in the future, and gain support on other platforms, too.

This will change the world for a few months, modifying the standard would change it for years.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#76

I was totally down with this - a tight, efficient vector graphics format with After Effects integration, super - up until the point they said these animations were JSON files. Huh? Didn't I just read a whole blog post saying that one of their requirements was fast loading from disk, small bandwidth usage, etc? And that's what justified creating an entirely new image format from scratch, not something the internet is…

While a binary format would be better over the wire, once it's put into memory the format really doesn't matter. In fact I would argue that the decision to use JSON versus XML versus a binary format is entirely immaterial as it'll get cached once and likely never downloaded again (essentially). At least as far as Facebook's usage is concerned (they load these 6 once and never again).

Also I think you have to pick something human readable here. One of the great things about SVG is that it's in XML so you can read it, tweak it, etc. It's super handy when you want to make small changes that only affect the image. So I see using JSON as pretty handy.

Don't forget there are many types of formats out there that have 2 types: a binary and human readable type. One used typically during debugging and one used for optimal over-the-wire transport. I don't see why this couldn't be possible at a later time.

Edit: I don't understand the downvotes. Over-optimizing is a thing. For a one time download I don't see the handfuls of milliseconds you're saving mattering. In either case of receiving a binary or JSON you will store it in an optimal format on the device...

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#77
post #27
post #23

Hey, everyone! I'm one of the developers at Facebook who worked on this library since its conception! Really excited to be able to share this library today! I'll be checking up here periodically and can help answer any technical questions that you have!

Why does the software license [1] include the following clause: > provided Your Software does not consist solely of the Software Why didn't you guys choose MIT or BSD? It feels like the custom Facebook license is close to the intent of these, but it has that mysterious gotcha. In any case, thanks for the software! It looks really slick, and I definitely have a use case for using it to replace the sprite sheet I used…

I find clause 3 of the license bad also, since it says that you can only use changes internally. Taken together, I read the license as saying that you may only release unmodified copies of the code and only as part of a larger project.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#78

Earlier quoted context omitted.

> Does it represent a lot of work by skilled technicians? Undoubtedly. Is it interesting in it's own right? Frankly I think not. You don't think having an easy way to create high quality animations for any purpose that work on multiple platforms is interesting...? You might not find the current application of it interesting but that's like saying React isn't interesting because someone used it to make another Flappy…

But react isn't interesting because they could have just modified custom elements via a polyfill and javascript extension. It would work mostly natively on newer browsers. Keyframes is just after effects animation in HTML5, a feature that could be implemented more natively using svg and a solution similar to this for older browsers. Facebook seems to want to dominate with single-use, clunky libaries.

Yeah and on mobile devices you can waste a lot more battery running animations in HTML5. I'm sure your users will appreciate that. Surely the most important thing is to optimize programmer time and comfort without regard to the end-user experience and that thinking has lead to a world filled with wonderful well-designed software that properly handles error conditions and never presents users with useless choices or non-actionable obscure error messages.*

Snark aside, if you have a native mobile app it is a much, much nicer experience to have native animations integrated rather than trying to mash an HTML view into the app just for some animations.

*Because programmers are the worst kind of pedants: Yes I know sometimes you can't afford to write native apps, sometimes a partial solution is better than no solution, etc. Just don't lie and tell me a web app is as good as (or better than) a native app, or that Cordova is a great way to write mobile apps. Those are compromises. Sometimes you make compromises to get shit done. It doesn't magically transform a compromise into an ideal solution.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#79

I was totally down with this - a tight, efficient vector graphics format with After Effects integration, super - up until the point they said these animations were JSON files. Huh? Didn't I just read a whole blog post saying that one of their requirements was fast loading from disk, small bandwidth usage, etc? And that's what justified creating an entirely new image format from scratch, not something the internet is…

For those who use JSON regularly and aren't familiar with Protobufs (or one of the variants like Cap'n'Proto), they're an amazing binary serialization format that is tightly packed, encoding and decoding efficient, and designed around supporting protocol changes.

Fields are serialized to tag numbers instead of field names in the binary format, so it's easy to rename fields. This also saves a ton of space versus JSON.

Proto "messages", analagous to structs in other languages, are typesafe, negating the need for a separate schema definition language. They support optional and sum types too.

So many languages have great protobuf libraries available. (I'm hoping one becomes available for Rust soon--as well as gRPC.) It would be amazing if the browser vendors would come together and standardize it as a first class browser serializarion format. It'd save so much bandwidth to emit protos instead of JSON.

Re: Keyframes: Delivering scalable, high-quality animations to mobile clients

#80
post #69
post #36

Earlier quoted context omitted.

I'm not misreading it. The license says we cannot fork the software. That's not open source.

If I understand right, you can fork it and even redistribute it, as long as your software isn't a blatant plagiarism of this repo. So technically, taking this library and putting it together with some other library yielding some meaningful application is enough to satisfy that clause.

I read it as only allowing you to redistribute unmodified copies, because clause 3 only permits modification "for your own internal use."
Post reply on HN