Skip to content

Commit

Permalink
Update README.md how to use
Browse files Browse the repository at this point in the history
  • Loading branch information
cruisediary committed Aug 3, 2019
1 parent 34d9fba commit 6370fce
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,32 @@ let width = view.bounds.width
let height = view.bounds.height
let comets = [Comet(startPoint: CGPoint(x: 100, y: 0),
endPoint: CGPoint(x: 0, y: 100),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: 0.4 * width, y: 0),
endPoint: CGPoint(x: width, y: 0.8 * width),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: 0.8 * width, y: 0),
endPoint: CGPoint(x: width, y: 0.2 * width),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: width, y: 0.2 * height),
endPoint: CGPoint(x: 0, y: 0.25 * height),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: 0, y: height - 0.8 * width),
endPoint: CGPoint(x: 0.6 * width, y: height),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: width - 100, y: height),
endPoint: CGPoint(x: width, y: height - 100),
lineColor: UIColor.white.withAlphaComponent(0.2)),
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white),
Comet(startPoint: CGPoint(x: 0, y: 0.8 * height),
endPoint: CGPoint(x: width, y: 0.75 * height),
lineColor: UIColor.white.withAlphaComponent(0.2))]
lineColor: UIColor.white.withAlphaComponent(0.2),
cometColor: UIColor.white)]

// draw line track and animate
for comet in comets {
Expand Down

0 comments on commit 6370fce

Please sign in to comment.