tencent cloud

All product documents
Tencent Cloud Super App as a Service
Frame Rate
Last updated: 2025-02-24 17:10:41
Frame Rate
Last updated: 2025-02-24 17:10:41

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.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon