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

feat: add VFXProps.overlay #78

Merged
merged 1 commit into from
Jul 4, 2024
Merged

feat: add VFXProps.overlay #78

merged 1 commit into from
Jul 4, 2024

Conversation

fand
Copy link
Owner

@fand fand commented Jul 4, 2024

This PR adds new property: VFXProps.overlay.
It allows us to control the opacity of the original element.

By default, VFX-JS hides the original element by setting its opacity to 0.
However, in some cases you might want not to hide the original element.
overlay allows you to specify the opacity to be set explicitly.

This is useful when you want to show an effect on top of the original element.
This could also be used to avoid the scroll rag issue, if the shader is adding some decoration on the element, rather than replacing the element.

Changes

  • Add VFXProps.overlay
  • Set the opacity of the original element by VFXProps.overlay

Copy link

vercel bot commented Jul 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-vfx-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2024 8:52pm

@fand fand changed the title feat: overlay mode feat: add VFXProps.overlay Jul 4, 2024
@fand fand merged commit d454e68 into main Jul 4, 2024
3 checks passed
@fand fand deleted the feat/overlay-mode branch July 4, 2024 20:52
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