# Rendering

# Canvas

Mini Games only have one on-screen canvas, but can have multiple off-screen canvases. You can use wx.createCavans to create a canvas object.

Convention: The first time you call this API, it creates an on-screen canvas. Subsequent calls create off-screen canvases.

# Drawing Context and API

You can use Canvas.getContext to create a drawing context. Refer to RenderingContext for the specific type of drawing context returned by this operation.

# Locking Frame

You can use the wx.setPreferredFramesPerSecond API to perform the frame lock operation.

# Using Compressed Textures

Compressed textures are supported from base library version 2.5.0. iOS supports the PVR format and Android supports the ETC1 format.

点击咨询小助手