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

gsap wrapper API #146

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

gsap wrapper API #146

wants to merge 1 commit into from

Conversation

willybrauner
Copy link
Owner

@willybrauner willybrauner commented Jun 3, 2024

The goal is to create a function witch return a Interpol instance and takes params like gsap does.

const tween = itp(element, {
  x: "10px", // will extract value from string and add unit after interpolation
  y: 50, // will add px by default
  opacity: { from: 0.1, to: 1 } // will accept Props
  ease: "power3.out",
  onComplete: ({x}, time, props, instance) => {
    // access to same callbacks than Interpol. 
  }
})
  • get element and options params
  • compute style for from properties
  • make element (first param) optionnel

Copy link

changeset-bot bot commented Jun 3, 2024

⚠️ No Changeset found

Latest commit: 01e075e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@willybrauner willybrauner marked this pull request as draft June 3, 2024 07:21
@willybrauner
Copy link
Owner Author

size-limit report 📦

Path Size
@wbe/interpol 2.79 KB (0%)

Copy link

codesandbox-ci bot commented Jun 3, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 01e075e:

Sandbox Source
interpol-basic Configuration
interpol-colors Configuration
interpol-dom-ondrag Configuration
interpol-ease Configuration
interpol-graphic Configuration
interpol-menu Configuration
interpol-object-el Configuration
interpol-particles Configuration
interpol-timeline Configuration
interpol-offsets Configuration

@willybrauner willybrauner changed the title gsap like wrapper gsap's like wrapper Jun 26, 2024
@willybrauner willybrauner changed the title gsap's like wrapper gsap's like wrapper API Jun 26, 2024
@willybrauner willybrauner changed the title gsap's like wrapper API gsap wrapper API Jun 26, 2024
@willybrauner willybrauner self-assigned this Aug 9, 2024
@willybrauner willybrauner mentioned this pull request Aug 9, 2024
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.

1 participant