getContext('2d') 小程序是不是就没显示这个函数?

发布于 7 年前作者 yangmao1136 次浏览最后编辑 7 年前来自 ask

  我的代码如下:

var  canvas= wx.createOffscreenCanvas();

    var context = canvas.getContext(‘2d’);

调用后出现  “context is not defined”

2 回复
guoping
guoping1 楼6 年前

小程序不支持2D,只有WebGL组件

zhouming
zhouming2 楼5 年前

哦哦,那如何实现 将文字绘制到画布中,并将其用作Texture(纹理)?