三.js-更改已加载的网格&#x27的顶点坐标绝对(扭曲网格)并使用该顶点

发布于 2025-01-20 03:17:17 字数 567 浏览 1 评论 0原文

我想以绝对方式更改加载的网格体的顶点。例如,这是原始网格(加载的网格)的顶点: 原始顶点

该顶点必须是这样的: 已更改顶点

如您所见,y 坐标已更改(特别是 y),但存在问题。 我无法在视口上看到它并用于定位。 换句话说,我想通过改变顶点坐标值来扭曲我的网格,在扭曲过程之后我想对其进行操作。

为此,我使用了这个: 代码 ,所以我把y坐标减去5.5;

console.log(向量)显示预期的顶点,但视口(屏幕)上没有变化,如果我尝试使用该顶点,它会恢复到其原始值。

注意:我还使用了 .updateMatrixWorld();和 .needsUpdate = true;但没有运气。

请帮助我。谢谢。

I want to change my loaded mesh's vertices in absolute way. For example, this is a vertex from original mesh (loaded mesh):
original vertex

That vertex has to be like this:
changed vertex

As you can see y coordinate changed (specifically y), but there is a problem.
I cannot see that on viewport and use for positioning.
In other word, I want to distort my mesh by changing vertex coordinate values, after distortion process I want to make manipulation on it.

To do that I used this:
codes
, so I made y coordinate subtracted with 5.5;

console.log(vector) shows expected vertex, but there is no change on viewport(screen) and if I try to use that vertex, it reverts back to its original value.

Note: I also used .updateMatrixWorld(); and .needsUpdate = true; but no luck.

Help me, please. Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文