Pass 1 param to set all values of vector

Heya, I was wondering if the vector setting methods could default missing parameters to the x parameter’s value so that, for example, uniform scaling could be set by passing just one value like below? Let me know if sounds good and I’ll make a quick PR for Vector2, 3, and 4. :slight_smile:

mesh.scaling.set(2);

PS, currently they’re set to undefined when missing so I think it wouldn’t be a breaking change…

EDIT, it’s a question now instead of a feature request because @jelster solved it (the ability to set all of the vector’s properties at once already exists it turns out). :beers:

1 Like

Have you looked at Vector.setAll yet?

4 Likes

Excellent, that’s just what I was after - thanks! :beers:

1 Like