简体   繁体   English

在Threejs中缩小材质面

[英]Shrink material faces in threejs

Iam using Threejs for rendering model in browser, after rendering model in browser is it possible to shrink the faces, not the mesh. 我使用Threejs在浏览器中渲染模型,在浏览器中渲染模型之后,可以缩小面而不是缩小网格。 Give your suggestions for it. 给你建议。

See 看到

three.js/examples/js/modifiers/ExplodeModifier.js.

Once each face has its own unique vertices, you can move each face vertex to a new location. 一旦每个面都有自己独特的顶点,就可以将每个面的顶点移动到新位置。 You will likely also want the reset the face centroid , faceNormal , and vertexNormal s. 您可能还希望重置face centroidfaceNormalvertexNormal

If you are using WebGLrenderer , you will have to set 如果您使用的是WebGLrenderer ,则必须设置

geometry.verticesNeedUpdate = true;

See the Wiki article How to Update Things with WebGLRenderer . 请参阅Wiki文章如何使用WebGLRenderer更新内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM