本文介绍了ThreeJS几何翻转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我面临着几何翻转出了问题,我试着用负标技术,翻转,但它失败。
I am facing a problem with geometry flipping, I tried flipping using the negative scale technique but it fails.
什么是我可以用它来预测各轴翻转3D对象的技术?
What is the technique that I can use to flip a 3d object across specific axis?
翻转我的意思是对象应该是因为它是呈现了一面镜子。
By flipping I mean the object should look as it was rendered over a mirror.
如果这是不可能通过three.js渲染怎么用搅拌机来实现这一目标?
if this is not possible through three.js rendering how can I use Blender to achieve this?
推荐答案
您必须转换矩阵应用于几何体(或网/对象),这里是plannar一个例子(O,Y,Z)symetry,你能适应您的具体情况。
You have to apply a transformation matrix to the geometry (or mesh/object), here is an example for plannar (O, y, z) symetry, you can adapt for your specific case
var mS = (new THREE.Matrix4()).identity();
//set -1 to the corresponding axis
mS.elements[0] = -1;
//mS.elements[5] = -1;
mS.elements[10] = -1;
geometry.applyMatrix(mS);
//mesh.applyMatrix(mS);
//object.applyMatrix(mS);
这篇关于ThreeJS几何翻转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!