π»
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // OptimisedTriangleAnim.swift | |
| // ShapesFun | |
| // | |
| // Created by Vishal Paliwal on 22/01/23. | |
| // | |
| import SwiftUI | |
| struct OptimisedTriangleAnim: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // MultiTriangleAnimView.swift | |
| // ShapesFun | |
| // | |
| // Created by Vishal Paliwal on 09/04/23. | |
| // | |
| import SwiftUI | |
| struct MultiTriangleAnimView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // SingleTriangleAnimation.swift | |
| // ShapesFun | |
| // | |
| // Created by Vishal Paliwal on 09/04/23. | |
| // | |
| import SwiftUI | |
| struct SingleTriangleAnimation: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Triangle: Shape { | |
| func path(in rect: CGRect) -> Path { | |
| var path = Path() | |
| path.move(to: CGPoint(x: rect.midX, y: rect.minY)) | |
| path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY)) | |
| path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY)) | |
| path.addLine(to: CGPoint(x: rect.midX, y: rect.minY)) | |
| return path |
NewerOlder