小程序里引入threejs的话,用不了getContext('2d')了吗?

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

这里直接提示我getContext for canvas 2d is not yet supported

现在已经不支持使用canvas.getContext(‘2d’)了吗

1 回复
wjin
wjin1 楼5 年前

检查下 canvas 的 type,type=“webgl” 只能 getContext(‘webgl’)
type=“2d” 只能 getContext(‘2d’)