Skip to content
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

Clarify stroke dash array ordering #110

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

b-wils
Copy link
Contributor

@b-wils b-wils commented Nov 15, 2024

No description provided.

Copy link

cla-bot bot commented Nov 15, 2024

We require contributors to sign our Contributor License Agreement, and we don"t have @b-wils on file. In order for us to review and merge your code, please contact @heathmill or @jcgregorio to get yourself added.

@b-wils b-wils linked an issue Nov 15, 2024 that may be closed by this pull request
@@ -473,6 +473,8 @@ come before them in [[stacking order]].

{schema_string:shapes/stroke-dash/description}

A stroke dash array consists of `n` dash entries, `[n-1,n]` gap entries and `[0-1]` offset entries. Dash and gap entries MUST all be in a continuous order and alternate between dash and gap, starting with dash. If there are an odd number of dashes + gaps, the sequence will repeat with dashes and gaps reversed. For example a sequence of `[4d, 8g, 16d]` MUST be rendered as `[4d, 8g, 16d, 4g, 8d, 16g]`.

Copy link
Member

@mbasaglia mbasaglia Nov 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs to specify how the presence of the offset is determined. Presumably checking the type of the last item? (is offset always at the end?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As spec is currently written, offset could be anywhere in the array. Bodymovin seems to always export this at the end and I know Skottie assumes this position as well. The stroke example has offset as the first element which lottie-web seems to handle.

I think restricting offset to always be the last item makes implementations simpler, though I'm not sure if other authoring tools export this in a different position.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to specify offset MUST be at end. IMO it's better to be more restrictive to start an we can loosen if there is a need.

@mbasaglia
Copy link
Member

Also, do we want this for 1.0.1 or 1.1?

@mbasaglia
Copy link
Member

@cla-bot check

Copy link

cla-bot bot commented Nov 16, 2024

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot cla-bot bot added the cla-signed label Nov 16, 2024
@b-wils
Copy link
Contributor Author

b-wils commented Nov 18, 2024

Also, do we want this for 1.0.1 or 1.1?

My thought was 1.0.1 as the feature is already in the spec and this is clarifying the wording. It is a bit more substantial of an edit though, so could see a reason to push this to 1.1.

@mbasaglia mbasaglia changed the base branch from main to 1.0-fixes November 18, 2024 17:27
@b-wils b-wils requested a review from mbasaglia November 27, 2024 15:15
@b-wils b-wils merged commit f472717 into lottie:1.0-fixes Dec 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarifying stroke dash array ordering
3 participants