+ 2

Why does adding filter to canavs elements,slows them down?

In the following code, in class clouds I have added filter inside function new_pos if you remove that thing's work fine but with filter applied sometimes things slow down a lot ,why is it so? Note:you won't see it mostly and it's rare but it happened three times with me after applying filter https://code.sololearn.com/WZ18MUC04AVA/?ref=app

12th Aug 2020, 10:28 AM
Abhay
Abhay - avatar
3 Réponses
+ 1
JaScript why not? If I Don't use it images will remain on the canvas ,I think it's better to clear them
12th Aug 2020, 11:01 AM
Abhay
Abhay - avatar
0
I see no need for: //cloud_inst.clear_clouds();
12th Aug 2020, 11:00 AM
JaScript
JaScript - avatar
0
In your code the images overlapped but Abhay you can play of course it safe.
12th Aug 2020, 6:39 PM
JaScript
JaScript - avatar