I created a 12*12 plane in three.js, and I tried to edit it's verticles between 2 rendering, but it doesn't work.
I added this code, but nothing changed:
ground.geometry.dynamic = true;
ground.geometry.__dirtyVertices = true;
ground.geometry.computeCentroids();
Code here: http://jsfiddle.net/vpBEG/2/
Thanks in advance,
You have to reset your flags after each render:
ground.geometry.verticesNeedUpdate = true;
See the update to your fiddle
For Three.js r.49 you need to use
ground.geometry.verticesNeedUpdate = true;
See the wiki: https://github.com/mrdoob/three.js/wiki/Updates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With