interpol icon indicating copy to clipboard operation
interpol copied to clipboard

gsap wrapper API

Open willybrauner opened this issue 1 year ago • 3 comments

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. 
  }
})
  • [x] get element and options params
  • [ ] compute style for from properties
  • [ ] make element (first param) optionnel

willybrauner avatar Jun 03 '24 07:06 willybrauner

⚠️ No Changeset found

Latest commit: 2ebaf5b9da2f746174d05786ab57ba564a0aaa91

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

changeset-bot[bot] avatar Jun 03 '24 07:06 changeset-bot[bot]

size-limit report 📦

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

willybrauner avatar Jun 03 '24 07:06 willybrauner

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 2ebaf5b9da2f746174d05786ab57ba564a0aaa91:

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

codesandbox-ci[bot] avatar Jun 03 '24 07:06 codesandbox-ci[bot]