Cylinder Motion trails

Hi, I’m a beginner to threejs, recently I read this article on how to make trails of typographic motions, and I wanted to apply the same implementation on CylinderGeometry, but the result it’s just a strange 2d cylinder on the plane.
this is the article.