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

el property should accepts object #103

Merged
merged 6 commits into from
Oct 21, 2023
Merged

el property should accepts object #103

merged 6 commits into from
Oct 21, 2023

Conversation

willybrauner
Copy link
Owner

el property can received an object element instead of an HTMLElement:

const program = { 
  uniforms: { 
    uProgress: { 
      value: 0 
    } 
  } 
}

// classic interpolation
new Interpol({
  props: {
    value: [0, 100],
  },
  onUpdate: ({ value }) =>  {
    program.uniforms.uProgress.value = value
  }
})

// shortest interpolation with `el` object property
new Interpol({
  el: program.uniforms.uProgress,
  props: {
    value: [0, 100],
  }
})

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2023

🦋 Changeset detected

Latest commit: 5d3a6b5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wbe/interpol Minor

Not sure what this means? Click here to learn what changesets are.

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

@willybrauner willybrauner linked an issue Oct 16, 2023 that may be closed by this pull request
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 16, 2023

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 5d3a6b5:

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

@willybrauner
Copy link
Owner Author

willybrauner commented Oct 16, 2023

size-limit report 📦

Path Size
@wbe/interpol 2.91 KB (+0.24% 🔺)

@willybrauner willybrauner added the enhancement New feature or request label Oct 16, 2023
@willybrauner willybrauner marked this pull request as ready for review October 21, 2023 10:24
@willybrauner willybrauner merged commit 66c3998 into main Oct 21, 2023
3 checks passed
@willybrauner willybrauner deleted the el-object branch October 21, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

el could receive object
1 participant