Skip to content

Rendering

Canvas

Mini-games have only one on-screen canvas and can have multiple off-screen canvases.wx.createCanvasYou can create a canvas object.

TIP

The first call to this interface creates an on-screen canvas, and the rest are off-screen canvases.

Drawing context and interface

Canvas.getContext can be used to create a drawing context. The specific drawing context type returned can be viewed in RenderingContext.

Frame lock

wx.setPreferredFramesPerSecondThe interface can implement frame lock.