sirxemic / jquery.ripples

Add a water ripple effect to your background using WebGL.
https://sirxemic.github.io/jquery.ripples/
MIT License
1.07k stars 418 forks source link

Interactive #38

Closed Karine91 closed 7 years ago

Karine91 commented 7 years ago

Hello, I am set parameter interactive false, but ripple still work on mousemove...(sorry for my bad English)

sirxemic commented 7 years ago

You really need to give me more information in order to help you. Like, what is your code like, and what do you see happening?

Karine91 commented 7 years ago

I want run automatic drops, whithout drops on mousemove. my code: try { $('.gallery-shark').ripples({ resolution: 512, dropRadius: 20, //px perturbance: 0.01, interactive: false }); } catch (e) { $('.error').show().text(e); }

// Automatic drops
setInterval(function() {
    var $el = $('.gallery-shark');
    var x = Math.random() * $el.outerWidth();
    var y = Math.random() * $el.outerHeight();
    var dropRadius = 20;
    var strength = 0.01 + Math.random() * 0.01;
    $el.ripples('drop', x, y, dropRadius, strength);
}, 2000);
Karine91 commented 7 years ago

And now drops appear on a some distance from cursor. if i will stay intarctive, how can i fix it?

sirxemic commented 7 years ago

Can you make a minimal working example showcasing the bug? Because that code is fine. It almost seems like something outside of that code is the root cause...

Karine91 commented 7 years ago

You can see whole project there https://github.com/Karine91/oceanarium/tree/new/app

sirxemic commented 7 years ago

Ah, that explains a lot: you're using a very old version :)