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.

[Bug]: Grab mode opacity doesn't work on local but works on online sample

See original GitHub issue

Contact Details

matheusalmeida016@gmail.com

What happened?

I have an issue with modes: { grab: { links: { opacity: 0.5 } } }. It works on the online sample but do not on my project.

Version

^1.39.0

Which library are you using?

React.js (react-tsparticles, react-particles-js)

tsParticles Configuration

options={{
          bounce: false,
          fullScreen: {
            enable: false,
          },
          fpsLimit: 60,
          interactivity: {
            events: {
              onHover: {
                enable: true,
                mode: 'grab',
                parallax: {
                  enable: true,
                  force: 60,
                  smooth: 10
                },
              },
              resize: true,
            },
          },
          modes: {
            grab: {
              distance: 100,
              links: {
                opacity: 0.7
              }
            }
          },
          particles: {
            color: {
              value: 'rgba(215,183,246,1)',
            },
            links: {
              color: 'rgba(215,183,246,1)',
              distance: 150,
              enable: true,
              width: 5,
            },
            collisions: {
              enable: true,
            },
            move: {
              direction: 'none',
              enable: true,
              outMode: 'bounce',
              random: false,
              speed: 1.5,
              straight: false,
            },
            number: {
              density: {
                enable: true,
                area: 800,
              },
              value: 100,
            },
            opacity: {
              value: 0.7,
            },
            shape: {
              type: 'circle',
            },
            size: {
              random: true,
              value: 8,
            },
          },
          detectRetina: true,
        }}

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mutheuscommented, Feb 3, 2022

Thanks for your time.

0reactions
matteobrunicommented, Feb 3, 2022

Thanks for your reply. You’re right about modes section being outside interactivity. Where should I put bounce: false as the opposite seems to cause a bug on the particles speed?

collisions { enable: false } disables particles collisions, the outMode: "bounce" is responsible for edge bouncing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing Browser Compatibility Issues With CSS Opacity & RGBA
This is a LambdaTest Experiment on CSS opacity for background color where we will learn how to fix the browser compatibility issues with...
Read more >
Bug with low opacity layer on transparent background?
The issue you are facing is due to the use of the opacity slider without a layer underneath. This is a normal behavior:...
Read more >
Why is "cursor:pointer" effect in CSS not working
I messed with my css for hours, changing the positioning and z-index of just about every element on the page. I deleted every...
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Google Analytics not working? Here are 21 ways to fix it
Google Analytics not working? Here are 21 ways to fix it. #1 Delete and Disable the cache #2 Use Google Tag Assistant and...
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