Point cloud geometry modification working in r69 but not r105

Has there been some modification in three.js that does not allow updating point clouds anymore ?

I’ve created 2 JS fiddles:
Working version with r69: https://jsfiddle.net/eklavya_1/t4xh3byn/13/
Non working version with r105: https://jsfiddle.net/eklavya_1/5dpgysw7/13/

Apart from updating some simple functions because they went obsolete (like THREE.PointCloudMaterial to THREE.PointsMaterial), the only other significant change is in the usage of the THREE.ParametricGeometry() function, which has also been updated.

Modifying geometry does not work anymore in the old way. Is there some other way to achieve this ? I tried using ParametricBufferGeometry but either my implementation was incorrect or possibly even that does not allow modifying vertices.

If anyone could suggest a possible solution or point me in the correct direction, it would be really helpful.

Hi!
Add
geom.verticesNeedUpdate = true;
at the end of the explode() function of the version with r105.

Here is a version with a buffer geometry, using current revision (r107): https://jsfiddle.net/prisoner849/znw45fa1/

4 Likes

Thanks a lot for both the solutions. I had used the verticesNeedUpdate property (incorrectly) with ParametricBufferGeometry and missed trying it out with ParametricGeometry. Thanks once again.

You’re welcome :beers: