I'm trying to find a way to build a circular area with borders and put rigid bodies inside
Didn't find an easy way to make it.
There's one example of a terrain built from an SVG:
if (typeof $ !== 'undefined') { $.get('./svg/terrain.svg').done(function(data) { var vertexSets = []; $(data).find('path').each(function(i, path) { vertexSets.push(Svg.pathToVertices(path, 30)); }); terrain = Bodies.fromVertices(400, 350, vertexSets, { isStatic: true, render: { fillStyle: '#2e2b44', strokeStyle: '#2e2b44', lineWidth: 1 } }, true); World.add(world, terrain); }); }
Am I right that I will have to use the same logic and add a lot of bodies (an approximation of PI) to build a circular area?