Scaling custom geometries with a RawShaderMaterial

Hello, I have a custom geometry that includes vertices for drawing little stick figures:

I’d like to set the size of each stick figure by setting a size uniform that’s passed to my RawShaderMaterial. However, I’m not quite sure of the best way to do this.

My plan at the moment is so send a buffer that includes the midpoint of each skeleton’s vertices. Then inside the vertex shader, I planned to scale each vertex’s distance from that midpoint by the size uniform.

But is there a better way to accomplish this sizing task? Can I do so without passing the midpoint buffer? Any suggestions on this question would be super helpful!

Just to follow up on this, the method described above worked out. I sent the geometric centroid of teach stick figure as an attribute, and scaled each vertex’s x and y position attributes with respect to that centroid.