Hey, i really like the shape stuff
But when i want to have animated lines it seems like i need to recreate the shape every frame completly new (clear and rebuild)
(tell me if not so)
this produces alot of code and i thing also some garbage trashing i think.
so thats why i would like to do this suggest:
shape:moveTo()
and
shape:lineTo()
should return a kind of id (like a vertex id if its a GL_LINESTRIP or something)
and then it should be able to modify this "edge" with something like:
shape:setEdgePosition(id,x,y)
or something
this would not destroy old functionality but would give a nice advantage for animating shapes, and connect sprite with shapes and all similar stuff.
Comments
but i think this could be helpfull in some situations to rearange edges after creating them.
specially on complexer shapes.
a baloon with a string fixed to ground on one site and on the baloon on other side (no need to recreate the shape all time, just set the edge to its new position on baloon side)
or what i just did, a bow where the path simulates the bowstring at the end of the arrow,
its somewhat strange to me to recreate the whole shape all the time when using the bow, instead of just set the middle edge position just to the arrow end.
We're not using GL_LINESTRIPs and instead we're triangulating our own geometry even for the line shapes. Therefore, changing a position of a single vertex would result in retriangulation of the whole shape.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill