如何将这 ThreeCanvas.js 行代码转换为 Three.js?
无论出于何种原因, Three.js 和 ThreeCanvas.js 是不兼容的。我正在尝试将 ThreeCanvas.js 程序更改为 Three.js,但是这一行给我带来了巨大的问题:
var position = new THREE.Vector3().add(
intersect.point,
intersect.object.matrixRotation.transform( intersect.face.normal.clone() )
);
问题是 Three.js 中既不存在“THREE.Object3D MatrixRotation”也不存在“THREE.Matrix4 Transform”,并且不同名称下似乎没有等效的方法。例如,有“THREE.Object3D matrixRotationWorld”,但代码完全不同。
有谁知道如何在 Three.js 中重写它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论