facebookarchive / Keyframes

A library for converting Adobe AE shape based animations to a data format and playing it back on Android and iOS devices.
https://facebookincubator.github.io/Keyframes/
Other
5.33k stars 302 forks source link

Export KFVectorView and the types for accessible Data Model objects #91

Open skagedal opened 7 years ago

skagedal commented 7 years ago

Issue #87.

renyu-io commented 7 years ago

Hi @skagedal I agree to expose KFVectorView, but why other data models? Is the implementation detail necessary for users?

skagedal commented 7 years ago

Hi!

I think it is a bit strange API design that the way to setup a KFVectorLayer is to assign a KFVector to it, and then the KFVector type is not exposed. KFVectorFromFromDictionary "feels" more like a helper function. Maybe it would be more sense as an opaque type if there was a [KFVector initWithDictionary:]...?

I think that it might be useful to be able to access the model. There might be some aspect of the animation that you want to control programmatically. That's what I was trying to do anyway. But as I kept playing around, I realized that the model wasn't quite designed for that and is at the moment probably better kept as an implementation detail. :)

Regards, Simon

renyu-io commented 7 years ago

Hi @skagedal,

I agree with you control model programmatically could be very interesting, but currently these models does not have very friendly API. And KFVector is exposed, I like [KFVector initWithDictionary:] a lot, feel free to make these changes. But at this moment, I don't think we should expose all models. Thanks!