Three.js画布纹理drawImage为黑色

时间:2018-10-18 02:29:02

标签: three.js html5-canvas

https://codepen.io/matelich/pen/PyRZeb

试图在透明的画布/材质上绘制白色的半透明图像。除了将其绘制为黑色的半透明图像之外,它都工作正常。

function doPaintPoint (_x, _y) {
  var image3 = mesh.material.map.image;
  var ctx = image3.getContext('2d');
  ctx.drawImage(brushy, _x, _y);
  mesh.material.map.needsUpdate = true;
  mesh.material.needsUpdate = true;
}

0 个答案:

没有答案