When a sphere falls I would like to put images inside but it doesn't work with the fillStyle render I can only color, now with sprite I can but they don't fit the circle unless the image is rounded, how could I round the image with javascript and matter.js
the code:
return Matter.Bodies.circle(280, 40, 11, {
restitution: 0.5,
render: {
// fillStyle: '#F00',
// strokeStyle: 'black',
// lineWidth: 3,
sprite: {
texture: img,
xScale: 0.3,
yScale: 0.3,
}
}
});
img
get square images from ticktok, which I don't know how to make the round