开发者

How do I convert this threeCanvas.js line of code into three.js?

开发者 https://www.devze.com 2023-03-15 08:01 出处:网络
For whatever reason, three.js and ThreeCanvas.js are incompatible.I\'m attempting to change a ThreeCanvas.js program over to three.js, but this line is giving me huge problems:

For whatever reason, three.js and ThreeCanvas.js are incompatible. I'm attempting to change a ThreeCanvas.js program over to three.js, but this line is giving me huge problems:

var position = new THREE.Vector3().add(
   intersect.point,
   intersect.object.matrixRotation.transform( intersect.face.normal.开发者_运维问答clone() ) 
);

The problem is that neither "THREE.Object3D matrixRotation" nor "THREE.Matrix4 transform" exist in three.js, and there appear to be no equivalent methods under different names. There is, for example, "THREE.Object3D matrixRotationWorld", but the code is entirely different.

Does anyone know how to rewrite this in three.js?

0

精彩评论

暂无评论...
验证码 换一张
取 消