this is were layers come in handy
transitions are a special case of this
which is hardware accelerated and runs in its own thread
anything that operates purely on (existing) pixels
#my-element {
transition-property: opacity;
transition-duration: 1s;
transition-timing-function: linear;
}
https://jsfiddle.net/8L02ssgc/
function render() {
update();
requestAnimationFrame(render);
}
render();
https://jsfiddle.net/jnhuq7x2/2/