Skip to content

Variable proximity calculate on mouse move#169

Merged
DavidHDev merged 1 commit intoDavidHDev:mainfrom
PedroMarianoAlmeida:VariableProximity-calculate-on-mouse-move
Mar 26, 2025
Merged

Variable proximity calculate on mouse move#169
DavidHDev merged 1 commit intoDavidHDev:mainfrom
PedroMarianoAlmeida:VariableProximity-calculate-on-mouse-move

Conversation

@PedroMarianoAlmeida
Copy link
Contributor

When I used the VariableProximity component, I noticed that my browser started to become slower, so I checked the code and realized that the distance calculation is running all the time and impacts the performance

Screen.Recording.2025-03-25.at.1.30.10.PM.mov

So my fix is to do the same calculation, but only when the mouse moves

Screen.Recording.2025-03-25.at.1.43.55.PM.mov

@vercel
Copy link

vercel bot commented Mar 25, 2025

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
react-bits-ui ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2025 4:56pm

Copy link
Owner

@DavidHDev DavidHDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DavidHDev DavidHDev merged commit b5ce81f into DavidHDev:main Mar 26, 2025
3 checks passed
AthalarBlizz pushed a commit to EventHorizon-Forge/ehfcreact-bits that referenced this pull request May 4, 2025
…ximity-calculate-on-mouse-move

Variable proximity calculate on mouse move
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.

2 participants