tencent cloud

Tencent Cloud Super App as a Service

Frame Rate

Download
Focus Mode
Font Size
Last updated: 2025-04-10 18:18:34

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 descriptionnumber 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 descriptionfunction callback. The function to be executed.
Return value: Request ID.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback