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

Adds color animated nodes to tick-driven animations #12886

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rozele
Copy link
Collaborator

@rozele rozele commented Mar 28, 2024

Description

Type of Change

Erase all that don't apply.

  • New feature (non-breaking change which adds functionality)

Why

This change adds color animation support when platformConfig: { useComposition: false } is set. It unblocks usage of Animated.Color nodes with the NativeAnimated module.

Testing

The text color is not animating in this video, but does work with the Paper renderer. Fabric renderers on Windows suffer a limitation where the color prop of virtual spans cannot be animated without a state update (not only synchronously updating props).

RNTester.WinAppSDK.2024-03-22.21-40-42.mp4

Changelog

Should this change be included in the release notes: no

Microsoft Reviewers: Open in CodeFlow

@rozele rozele requested a review from a team as a code owner March 28, 2024 13:43
@rozele rozele force-pushed the colorNode branch 2 times, most recently from 20dcae8 to ed6f60b Compare March 28, 2024 14:18
@rozele rozele marked this pull request as draft March 29, 2024 13:36
@rozele rozele marked this pull request as ready for review March 29, 2024 14:44
@rozele rozele marked this pull request as draft March 29, 2024 16:33
This change adds color animation support when `platformConfig: { useComposition: false }` is set. It unblocks usage of Animated.Color nodes with the NativeAnimated module.
… driver

To avoid overcomplicating the base ValueAnimatedNode, this change uses memcpy to stuff the interpolated color value into the double `value` field in the ValueAnimatedNode, and reads it out as a color type if the output type is set.
@rozele rozele marked this pull request as ready for review March 29, 2024 16:44
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.

2 participants