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

Merge vellottie #13

Merged
merged 43 commits into from
Mar 22, 2024
Merged

Merge vellottie #13

merged 43 commits into from
Mar 22, 2024

Conversation

simbleau
Copy link
Member

@simbleau simbleau commented Mar 10, 2024

This PR will merge in changes from vellottie -
It will also bring velato to a state where it can almost be published.

#14 will bring a followup to continue to prepare for release.

@simbleau simbleau mentioned this pull request Mar 10, 2024
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

Lots of small things which need addressing, but overall this works well for me locally

I feel like there is a better way to present the downloads (e.g. in a clickable grid showing them all running at the same time?)

But that can be a follow-on, if you agree that would be good.

.github/workflows/pages-release.yml Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
.gitignore Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/parser/schema/animated_properties/animated_property.rs Outdated Show resolved Hide resolved
src/import/mod.rs Outdated Show resolved Hide resolved
src/import/util.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@DJMcNab
Copy link
Member

DJMcNab commented Mar 11, 2024

I've also seen that the downloads aren't included in the default runner by default.

I'm not sure the best way to handle that is - we should probably not panic, but yes print the download message?

simbleau and others added 14 commits March 11, 2024 11:27
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
@DJMcNab DJMcNab linked an issue Mar 12, 2024 that may be closed by this pull request
.gitignore Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
examples/assets/LICENSE Outdated Show resolved Hide resolved
examples/scenes/src/download/default_downloads.rs Outdated Show resolved Hide resolved
examples/scenes/src/download.rs Show resolved Hide resolved
src/import/util.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@simbleau simbleau requested a review from dfrg March 13, 2024 18:55
@simbleau simbleau added the release This PR will be followed by a public release. label Mar 13, 2024
@dfrg
Copy link
Contributor

dfrg commented Mar 14, 2024

This is rather large and I’m currently otherwise occupied, but at a glance, I don’t see any major blockers and I’ll review this by the of the week.

Thanks @simbleau for taking this on!

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
@simbleau simbleau removed the release This PR will be followed by a public release. label Mar 14, 2024
@dfrg
Copy link
Contributor

dfrg commented Mar 16, 2024

I haven’t forgotten about this. I’ll be taking a look shortly.

Copy link
Contributor

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

Thanks Spencer! Overall this looks like a set of solid improvements. I added some notes on things I'd like changed before merging, suggestions for future work and a few random comments.

I'm happy to land this after the requested changes are addressed.

src/import/util.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/schema/animated_properties/keyframe.rs Outdated Show resolved Hide resolved
src/runtime/model/fixed.rs Outdated Show resolved Hide resolved
Comment on lines +86 to +90
/// Easing tangent going into the next keyframe
pub in_tangent: Option<EasingHandle>,
/// Easing tangent leaving the current keyframe
pub out_tangent: Option<EasingHandle>,
/// Whether it's a hold frame.
Copy link
Contributor

Choose a reason for hiding this comment

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

Future work in a follow up: these drastically increase the size of this struct. In cases where tangents are non-existent or sparse, this can waste a lot of space. Skottie stores these in a side table and keeps an index in the actual time struct. We can do the same, packing tangent vec index and the hold bit in a single u32, reducing the size of this to 8 bytes.

Basically, low bit is the hold flag and the high 31 bits store index + 1 where 0 represents no tangents.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you link to the Skottie implementation for reference?

Copy link
Member Author

Choose a reason for hiding this comment

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

Either way, I added this as a task to #14 - Will resolve this one.

Copy link
Contributor

Choose a reason for hiding this comment

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

I’ll add a comment with the link to that issue.

src/runtime/model/value.rs Outdated Show resolved Hide resolved
src/runtime/model/value.rs Show resolved Hide resolved
src/runtime/render.rs Outdated Show resolved Hide resolved
src/import/converters.rs Outdated Show resolved Hide resolved
@simbleau simbleau requested a review from dfrg March 21, 2024 22:33
Copy link
Contributor

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

There’s a huge amount of great work here and I’m very happy to see it land upstream. Thanks!

@simbleau simbleau merged commit da8abdf into main Mar 22, 2024
9 checks passed
@DJMcNab DJMcNab deleted the vellottie-merge branch March 22, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error parsing Lottie JSON with precomposition
4 participants