vanta icon indicating copy to clipboard operation
vanta copied to clipboard

High CPU Usage (and therefore temps)

Open Yuvimon opened this issue 6 years ago • 3 comments

Love the birds animation, but high CPU usage is making my computer hot and its hard to justify using vanta for a simple webpage. Does anyone know any fixes?

Yuvimon avatar Jan 11 '20 00:01 Yuvimon

also would like to know if anyone finds a fix to this issue. I've changed file paths, removed excess code, but nothing has improved significantly.

JoeHancock1995 avatar Jul 08 '20 19:07 JoeHancock1995

Consider rendering less pixels to the screen by changing the scale parameters.

For Birds, you'd want to use

VANTA.BIRDS({
  el: "#your-element-selector",
  mouseControls: true,
  touchControls: true,
  gyroControls: false,
  minHeight: 200.00,
  minWidth: 200.00,
  scale: 2.00,
  scaleMobile: 2.00
})

This modification will cut processing by 75%, while the quality of the effect will decrease, becoming slightly blurrier.

If the effect you're looking at uses Three.js but the source code doesn't have a scale parameter, you'll need to change the renderer.setPixelRatio manually, probably to something like renderer.setPixelRatio(window.devicePixelRatio * 0.5).

jhancock532 avatar Jan 03 '22 18:01 jhancock532

As @jhancock532 said parameter scale increase page loading speed but decrease quality. For full screen animation I used: scale: 5.00

ghost avatar Feb 01 '23 09:02 ghost