如何在mousemove上增加three.js长方体的长度和高度

时间:2015-05-07 14:27:50

标签: three.js

我的代码是:

// HEIGHT = height of the canvas area

function OnMouseMove(event) {
  xx = event.clientX ;  
  yy = event.clientY ;

  removeCuboid();  //each time I remove the cuboid
  addCuboid(xx ,HEIGHT - yy,breadth);

 /* addCuboid creates a three.js cuboid:
 new THREE.Mesh(new THREE.CubeGeometry(len,height,breadth) *.

}

这仅在某种程度上起作用。即使我将鼠标拖到画布区域的最角落,长方体的高度和长度也不会增加。

0 个答案:

没有答案