M
M
MaxKondratenko2014-09-05 06:35:17
css
MaxKondratenko, 2014-09-05 06:35:17

How to make a dynamically changing blur effect with good performance?

I'm making an image slider like RoundAbout
jsfiddle.net/MaxKondratenko/4anxt8gL/1
and stumbled upon a problem... I need to blur the image, in theory it would be nice to make it dynamically changeable... but for example, as done now by adding a class, everything works but not dynamically + to everything if you move already blurry images, the performance drops at times ...
Can you advise some solutions? in which direction to dig at all. I was thinking about HTML5 Canvas, but won't I run into the same performance issue there?

c761e92f41b14c69a37e2f45a8e3b453.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2014-09-06
@MaxKondratenko

The most productive way is to make two layers one on top of the other, insert a clear image on one, put a copy of the image with blur under it (that is, already blurred in the jpeg editor), and then add a class like this to the top layer: transition: opacity 2s; opacity: 0
The blur filter eats up a huge amount of resources due to the amount of calculations and you can’t optimize it in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question