Change points on drawPolygon

polygon = new PIXI.Graphics()polygon.beginFill(0xf1c40f);polygon.drawPolygon(0,0, 0,128, 128,0);polygon.endFill();SceneManager._scene.addChild(polygon);I used that to draw a polygon on the map scene but how do I add more points and turn it into other shapes?

I thought I could do it by changing the points here:

polygon.graphicsData[0].points

but nothing happens.

http://www.html5gamedevs.com/topic/9374-change-the-style-of-line-that-is-already-drawn/ 

I tried changing dirty and Cleardirty like this article but nothing happens.

Original thread: https://forums.rpgmakerweb.com/threads/change-points-on-drawpolygon.54505/