Three.js: How to Update BufferGeometry Vertices

后端 未结 1 1559
暗喜
暗喜 2020-12-31 09:38

I just have to update a line that have 2 vertices, and i trying to use these things above that are changed in r58, but the lines cant move, i just made this to initialize:

1条回答
  •  萌比男神i
    2020-12-31 10:21

    In your case, you need to add the following in your render loop when you update vertices:

    this.model.geometry.attributes.position.needsUpdate = true;
    

    You can remove the line position.needsUpdate = true when you create the geometry.

    I would also suggest that you update to the current version.

    three.js r.63

    0 讨论(0)
提交回复
热议问题