wx.setPreferredFramesPerSecond
This API is called using wx.setPreferredFramesPerSecond(number fps).
Feature description:Modifies the rendering frame rate. The default rendering frame rate is 60 frames per second. Changing this will affect the frequency of requestAnimationFrame callbacks.
Parameter and description: number fps. Frame rate. Value range: 1-60.
cancelAnimationFrame
This API is called using cancelAnimationFrame(number requestID).
Feature description: Cancels an animation frame request previously scheduled with requestAnimationFrame.
Parameter and description:number requestID.
requestAnimationFrame
This API is called using the number requestAnimationFrame(function callback).
Feature description: Schedules a callback to be executed before the next repaint.
Parameter and description:function callback. The function to be executed.
Return value: Request ID.