Three.js - 如何更新THREE.Points(或THREE.ParticleSystem)中的顶点?

时间:2020-12-31 19:38:47

I'm seeing examples that mention about setting the vertices' (i.e. THREE.Vector3) objects .velocity and seeing the particleSystem's geometry.__dirtyVertices to true.

我看到的例子提到了设置顶点(即THREE.Vector3)对象.velocity并看到particleSystem的几何.__ dirtyVertices为true。

But I am not seeing either of these properties. I am using definitely typed definition for three.js revision 75.

但我没有看到这些属性中的任何一个。我正在使用three.js修订版75的明确类型定义。

If all else fails I will likely resort to manually updating all vertices based on their respective velocity. But I really don't want to do that.

如果所有其他方法都失败了,我可能会根据各自的速度手动更新所有顶点。但我真的不想那样做。

1 个解决方案

#1


0  

geometry.__dirtyVertices = true; is for pre-r49, in later versions you need to use:

geometry .__ dirtyVertices = true;适用于pre-r49,在以后的版本中你需要使用:

geometry.verticesNeedUpdate = true;

Check this How to update things reference document to find more details on how to update things.

检查此如何更新事物参考文档以查找有关如何更新事物的更多详细信息。

#1


0  

geometry.__dirtyVertices = true; is for pre-r49, in later versions you need to use:

geometry .__ dirtyVertices = true;适用于pre-r49,在以后的版本中你需要使用:

geometry.verticesNeedUpdate = true;

Check this How to update things reference document to find more details on how to update things.

检查此如何更新事物参考文档以查找有关如何更新事物的更多详细信息。