Relative Content

Tag Archive for javascriptp5.jsvertex

How do I change the size of a custom shape using vertexes in p5.js, without changing the placement of my shape?

I am making a game project in JavaScript using p5.js. I made a star shape using the beginShape() function, where vertexes are singular point on the screen that are connected using lines. Currently, I am trying to figure out a way to change the size of my star by manipulating the x and y coordinates of the vertex points without changing the location of my star. Could you please help me figure out how to do this? Thank you in advance:))