-
Notifications
You must be signed in to change notification settings - Fork 0
0J Draw animations with canvas
Luis Murillo Baltodano edited this page Aug 3, 2020
·
1 revision
preset(({draw}) => {
draw(() => {
// rendering functions and more can go here
}, optionalFrameRate)
})
This uses requestAnimationFrame under the hood
You could set it between 0 and a maximumFrameRate fps which by the default is 60
I you want to change the default maximumFrameRate just bind and object like
anyConfig {
maxFrameRate Number // your desired maximum frame rate
}
This also depends on the browser's implementation of requestAnimationFrame for the maximum frame rate