Is it possible to implement this in threejs?

Is it possible to implement this in threejs?
This is webgl.
I tried to implement this way.
Only it works very slowly.

I also tried method- setFromPoints

        npoints.push(new THREE.Vector3( x, y, z));
     geometry.__dirtyVertices = true;
     geometry.verticesNeedUpdate = true;
     geometry.attributes.position.needsUpdate = true;

But it still works slowly. I think you need to use shaders. Or can it be accelerated otherwise?

Try not to create Vector3 objects for every vertex in a loop, and certainly not in the render loop. Your JSFiddle with geometry.attributes.position.setXYZ( i, x, y, z ); looks much better. That doesn’t seem too slow to me, what issue are you seeing there?