Replies: 1 comment
-
Currently, slots use an integral type enum. The advantage of this proposal is composability and better scalability. OTOH the integral enum approach is slightly easier to parse and more in line with other existing Lottie type specifiers. Do you expect a lot of type variations, or a fairly stable/small set? If the latter, expanding the existing enum might be more straightforward. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just an idea to represent value types as a compact string. I think this is useful for declaring slots, could be useful for future extensions too.
Basically representing types property types with a short string that helps parsers know what types are being handled. My idea is to have the following fields encoded in the string:
Base type could have the following values:
v
for vectors
for scalarc
for colorp
for bezier pathg
for gradientLength is the number of components for vectors and the like
Modifiers give more context, examples:
p
percentage, like scale, opacity where a value of 100 means "100%". This is useful as implementation might want to convert it to [0-1] values internallya
angle, for rotations and the liket
transparency, for RGB + A gradientsExamples:
v2
2D vector data, eg: positionv2p
2D "percentage" vector for scalesa
Scalar angle (rotation)c3
RGB color, (the 3 could be optional)c4
RGBA colorg
RGB Gradient (I don't think we need to specify the size here)gt
RGB + Transparency GradientMainly this would be used to specify slot types to make them easier to parse but could also be used in expressions and effects if we want to rework those systems.
Beta Was this translation helpful? Give feedback.
All reactions