Here's a bug when transforming the path from a regular polygon to a star. It animates backwards!
let cx = canvas.width/2
let cy = canvas.height/2
var poly = RegularPolygon()
poly.frame = Rect(0,0,100,100)
poly.center = Point(cx,cy)
poly.fillColor = C4Pink
poly.sides = 10
var star = Star(center: Point(cx,cy), pointCount: 5, innerRadius: 25, outerRadius: 50)
canvas.add(poly)
wait(1.0) {
ViewAnimation(duration: 1.0) {
poly.path = star.path
poly.updatePath()
poly.center = self.canvas.center
}.animate()
}