-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradient - clarification needed #105
Comments
Offsets for alpha stops don't need to have the same values as the ones for color stops. The stop count is always defined, otherwise you can't tell if you are using transparency or not. |
@mbasaglia What is the current status of the Gradient slot specifications ? Is this example aligned with the Lottie specifications? Here’s the slot data to override: {
"gradient_fill": {
"p": {
"p": 2, // Number of color stops: 2
"k": {
"k": [
0,
0.1,
0.1,
0.2,
1,
1,
0.1,
0.2,
0,
0,
1,
1
]
}
}
}
} Here’s the target gradient property: "g": {
"p": 9, // Number of color stops: 9
"k": {
"a": 0,
"k": [
0,
0.514,
0.373,
0.984,
0.141,
0.478,
0.412,
0.984,
0.283,
0.443,
0.451,
0.984,
0.379,
0.408,
0.49,
0.984,
0.475,
0.373,
0.529,
0.984,
0.606,
0.278,
0.647,
0.925,
0.737,
0.184,
0.765,
0.867,
0.868,
0.092,
0.882,
0.808,
1,
0,
1,
0.749
]
},
"sid": "gradient_fill"
} |
@theashraf gradient slots are not in the 1.0 specification. It is something we plan to add in the future. Possibly 1.1. That being said, your example is consistent with how other slottable properties behave and some players may already support it. |
From the specs:
first paragraph:
...tuples, where position is similar to color stops' position.
Similar
should be specified. Should it be the same value for colors and for transparency? (I know it does not, because it is written later in the specs).third paragraph:
The color stop count is typically specified in a separate field from the gradient values
Typically
? it may not be specified?since
Transparency stops may or may not match the count and offset of color stops.
then how to interpret 8 values?1 color stop and 2 alphas:
off r g b off a off a
or
2 color stops:
off r g b off r g b
The text was updated successfully, but these errors were encountered: