granim.js icon indicating copy to clipboard operation
granim.js copied to clipboard

Improving performance

Open RobinAdlung opened this issue 4 years ago • 2 comments

Hi there. Thank you for providing this library! It is very powerful and easy to use.

I am currently working on a website based live wallpaper and I am planning to use the gradient as a background. My problem is that I cant have it take much of the performance, as I want to add 3D models with three.js on top of it. The gradient canvas will take up the entire viewport size. Unfortunately this stresses out the GPU a lot - even when there is no animation going on.

As I just need transitions between different gradient states at certain events and no permanent looped gradient animation, I wanted to ask if there is an option to safe performance when there is no transition running between gradients and it is just a solid gradient.

Code_2021-07-20_22-09-16

chrome_2021-07-20_22-13-29

Regarding the example file: As you can see, even though it is just a solid gradient it goes heavily on the GPU when displaying the page in Chrome. Is there a way to resolve this issue?

Thank you very much!

RobinAdlung avatar Jul 20 '21 20:07 RobinAdlung

Hello, Can you please reproduce the issue on codepen or codesandbox ? It will be easier to test on my side. Thank you.

sarcadass avatar Jul 31 '21 11:07 sarcadass