Js array canvas to achieve animation effect?

there is a js array that contains XMagol y coordinates, and these points need to be displayed through the effect of dynamic drawing.
is currently through traversal, direct drawing, no animation effect, to achieve dynamic effects, how to deal with? RequestAnimationFrame, has been used or has no effect
var rander = function () {

//

}
requestAnimationFrame (rander);

clipboard.png

Mar.23,2022

requestAnimationFrame is equivalent to a setInterval, time period of about 16ms, and you have to write the contents of the execution yourself

.
Menu