Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 19 lines (17 sloc) 0.542 kb
c48e7468 »
2012-02-29 Added sample 40 and 44.
1 # For Christmas
d21f624e »
2012-03-25 Revised README. Changed the path in all samples.
2 require 'purple_shoes'
c48e7468 »
2012-02-29 Added sample 40 and 44.
3
4 Shoes.app width: 330, height: 300 do
5 nostroke
6 background black
7 data, stars = [], []
8 5.times{data << [30+rand(10), 20+rand(200), 20+rand(200)]}
9 5.times{|j| stars << star(data[j][1], data[j][2], 5, data[j][0], data[j][0]/2.0, fill: gold..white, angle: 45)}
10 msg = para fg(strong('Merry Christmas'), white), size: 48
11 msg.hide
12
13 a = animate do |i|
14 rotate i*5
15 stars.each_with_index{|s, j| s.rotate = [i*5, data[j][1], data[j][2]]}
16 msg.show if i > 30
17 a.stop if i > 50
18 end
19 end
Something went wrong with that request. Please try again.