小程序里引入threejs的话,用不了getContext('2d')了吗?
发布于 5 年前 作者 guiying32 9579 次浏览 来自 官方Issues

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

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

1 回复

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

回到顶部