svelte-babylon icon indicating copy to clipboard operation
svelte-babylon copied to clipboard

Create an example where you can build a custom Polygon

Open Myrmod opened this issue 3 years ago • 0 comments

I find it quite difficult to build a <Polygon> with this code:

<Polygon
  options={{
    shape: [
      new BABYLON.Vector3(2, 0, -2),
      new BABYLON.Vector3(2, 0, 0),
      new BABYLON.Vector3(3, 0, 2),
      new BABYLON.Vector3(1, 0, 2),
      new BABYLON.Vector3(-3, 0, 3),
      new BABYLON.Vector3(-3, 0, 1),
      new BABYLON.Vector3(-2, 0, -2),
      new BABYLON.Vector3(-2, 0, -3),
      new BABYLON.Vector3(2, 0, -3),
    ],
    depth: 1,
  }}
/>

So I would like an example where using it is possible to create a custom polygon on the fly.

Myrmod avatar Mar 22 '22 07:03 Myrmod