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

m-attr-lerp #165 #171

Merged
merged 3 commits into from
May 21, 2024
Merged

m-attr-lerp #165 #171

merged 3 commits into from
May 21, 2024

Conversation

MarcusLongmuir
Copy link
Collaborator

@MarcusLongmuir MarcusLongmuir commented May 21, 2024

Resolves #165

This PR adds a new element, m-attr-lerp that allows smoothly lerping between element attribute values similarly to m-attr-anim, but without having to specify document-time based timings and explicit start and end attributes.

Example usage:

<m-cube x="-3" onclick="this.setAttribute('x','3');">
  <m-attr-lerp attr="x" duration="2000" easing="easeInOutCubic"></m-attr-lerp>
</m-cube>

The "attr" attribute also allows specifying multiple comma-separated attributes or all to apply to all attributes at once (which is also the default if attr is not provided).


What kind of changes does your PR introduce? (check at least one)

  • Feature

Does your PR introduce a breaking change? (check one)

  • No

Does your PR fulfill the following requirements?

  • All tests are passing
  • The title references the corresponding issue # (if relevant)

@TheCodeTherapy TheCodeTherapy merged commit 2ca3477 into main May 21, 2024
8 checks passed
@MarcusLongmuir MarcusLongmuir deleted the feature/lerp branch September 26, 2024 13:16
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.

m-attr-lerp
2 participants