Skip to content

lottie/expressions: support posterizeTime#4182

Draft
tinyjin wants to merge 1 commit into
mainfrom
jinny/exp-posterize-time
Draft

lottie/expressions: support posterizeTime#4182
tinyjin wants to merge 1 commit into
mainfrom
jinny/exp-posterize-time

Conversation

@tinyjin
Copy link
Copy Markdown
Member

@tinyjin tinyjin commented Mar 3, 2026

Overview

Test file: posterizeTime(3).json
See also: https://lottiefiles.github.io/lottie-docs/expressions/#posterizetime

Current Patched Expectation

More Examples

fps == 1 fps == 3 fps == 6
fps1 fps3 fps6

@tinyjin tinyjin self-assigned this Mar 3, 2026
@tinyjin tinyjin added enhancement Improve features lottie Lottie animation labels Mar 3, 2026
@tinyjin tinyjin force-pushed the jinny/exp-posterize-time branch 2 times, most recently from d2736ce to 686f7c1 Compare March 3, 2026 08:47
@tinyjin tinyjin marked this pull request as ready for review March 3, 2026 08:48
@tinyjin tinyjin requested a review from hermet as a code owner March 3, 2026 08:48
Copilot AI review requested due to automatic review settings March 3, 2026 08:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for the After Effects expression function posterizeTime(fps) to the Lottie expressions runtime, allowing time/value quantization to FPS intervals during expression evaluation.

Changes:

  • Introduces a posterizeTime function binding in the global expression realm.
  • Implements _posterizeTime() to quantize time and update value accordingly.
  • Wires the function into evaluation by attaching the current LottieExpression* as native data and releasing the new JerryScript value in the destructor.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/loaders/lottie/tvgLottieExpressions.h Adds posterizeTime handle to the LottieExpressions runtime state.
src/loaders/lottie/tvgLottieExpressions.cpp Implements and registers posterizeTime, and wires native pointer setup + cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
@tinyjin tinyjin force-pushed the jinny/exp-posterize-time branch 2 times, most recently from f560bb3 to e9d1a0c Compare March 3, 2026 12:51
Copilot AI review requested due to automatic review settings March 3, 2026 12:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
@hermet
Copy link
Copy Markdown
Member

hermet commented Mar 4, 2026

@tinyjin Let's apply this once we have a practical real-world usage. Thanks.

@hermet hermet force-pushed the main branch 2 times, most recently from 5cb1306 to f076d22 Compare March 4, 2026 05:01
@tinyjin tinyjin force-pushed the jinny/exp-posterize-time branch from e9d1a0c to 10f8d52 Compare March 12, 2026 09:29
@hermet hermet added the compliance Specification Compliance for W3C, Lottie, SVG, etc. label Apr 7, 2026
@hermet hermet force-pushed the main branch 2 times, most recently from a00fdaa to 9bd7217 Compare April 7, 2026 12:26
@tinyjin tinyjin force-pushed the jinny/exp-posterize-time branch from 10f8d52 to d0fb1cf Compare April 8, 2026 22:08
Copilot AI review requested due to automatic review settings April 8, 2026 22:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/loaders/lottie/tvgLottieExpressions.cpp
@hermet hermet marked this pull request as draft April 9, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compliance Specification Compliance for W3C, Lottie, SVG, etc. enhancement Improve features lottie Lottie animation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants