question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow `repulse` range to be configurable

See original GitHub issue

Is your feature request related to a problem? Please describe. Currently, when using the onhover repulse mode, there’s a radius around the mouse that’s much larger than the mouse itself. For my usage of the library, I’d like to shrink that down to roughly the size of the mouse itself

Describe the solution you’d like It would be nice if we’re able to pass in a number as a config prop that enables the radius around the hovered mouse to be variable

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
crutchcorncommented, Apr 20, 2020

After testing with the alpha version you suggested, and keeping the particle size 20, this config had the behavior I was looking for:

repulse: {
  distance: 20,
    duration: 1,
    speed: 0.2,
},

Thank you so much for working on that! 😄

0reactions
matteobrunicommented, Apr 20, 2020

Thank you so much 😊

I’ve checked and the issue was on 1.13 alpha as well. I’ve added a speed option to the repulse configuration in 1.13.0-alpha.6.

I’ve seen you set the distance to 10 but the particles have a size of 20, I’d suggest to have a repulse distance >= of the particles size.

If you want to test the speed you need to update react-particles-js to 3.1.0, this version doesn’t include tsParticles in its bundle so you can have a different version dependency.

The new speed option have 1 as default value, if you want a smoother effect you should use a value between 0 and 1, if you want a faster effect > 1. Remember this is an alpha version and this value range could be changed until release (it could remain the same, I need to do more tests).

If you’ll try the alpha version let me know if the movement is working as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Repulse - the Wiki - Wargaming
This allows every ship with a gun caliber of 228mm or higher to ... Repulse can comfortably fight at any range and consistently...
Read more >
Premium Ship Review - Repulse - General Game Discussion
Repulse pairs average visibility with excellent range. Combined with her accuracy over distance and her great top speed, Repulse feels far ...
Read more >
Repulse - Gaea Documentation - QuadSpinner
Official documentation for QuadSpinner Gaea. Includes tutorials and knowledge base.
Read more >
Customizing Particle Effects - Slider Revolution Manual
The Repulse Distance option allows you to set how far, in pixels, the particles will be repelled from the mouse, within a range...
Read more >
Attractive and repulsive forces between atoms - ACS Community
Please allow me to name the each particle, as electron1, ... I observed that the distance between attracting particles in this configuration ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found