I am attempting to create a shape using threeJS that consists of both straight and curved edges. Here is what I currently have:
https://i.sstatic.net/9pK3g.jpg
My goal is to connect the two top corners with a semicircle in order to achieve a square shape with a semicircle cut out of the top, similar to this:
https://i.sstatic.net/8irT4.jpg
What would be the best approach for achieving this? I have experimented with bezier curves and arcs without success. The circle needs to be perfectly aligned with the object below it.
Here is my current code:
var Shape = new THREE.Shape();
Shape.lineTo(0, 4);
Shape.lineTo(2, 2);
Shape.lineTo(4, 4);
Shape.lineTo(4, 0);
Shape.lineTo(0, 0);