When developing games, you will usually work with high-level elements, such as sprites, labels, particle systems, or physical bodies. But sometimes you will need to create simple shapes, such as circles, lines, rectangles. For example, you may need to do so to create a prototype for your next game.
SpriteKit provides us with a subclass of
SKShapeNode, which doesn't have much potential. This class allows us to create rectangles (
init(rectOfSize:cornerRadius:)), ellipses (
init(ellipseInRect)), circles (
init(circleOfRadius:)), and other types of shape by providing its vertices (
init(points:count:)) or path (