I am coming from 2d world, trying now to learn 3d, first thing I found was babylon.js, could someone please explain how a polygon is created in babylon? For example in 2d I can create a shape with points
let points = [
{x: 150, y: 50},
{x: 250, y: 50},
{x: 250, y: 150},
{x: 150, y: 50},
{x: 150, y: 150},
{x: 50, y: 250}
]
I understand that I have to add z point in my points array, but I am a bit confused about x,y, could someone please help me to understand how can I create above 2d points polygon to 3d polygon and create an extrude, lets say z=10? an example code or playground will be big help.
I tried to create here but it doesn’t show anything https://www.babylonjs-playground.com/#PTTMVI#157
Thanks