examples/clock.rb in rubysketch-0.2.5 vs examples/clock.rb in rubysketch-0.2.6
- old
+ new
@@ -18,48 +18,39 @@
end
draw do
background 0
- begin
- pushMatrix
+ pushMatrix do
translate width / 2, height / 2
- begin
- pushMatrix
+ pushMatrix do
fill COLORS[0]
ellipse 0, 0, 20, 20
rotate (now - start) / 60.0 * 360
stroke COLORS[0]
strokeWeight 5
line 0, 0, 200, 0
fill 1
- popMatrix
end
- begin
- pushMatrix
+ pushMatrix do
strokeWeight 3
60.times do
rotate 6
stroke COLORS[1]
line 200, 0, 210, 0
end
- popMatrix
end
- begin
- pushMatrix
+ pushMatrix do
strokeWeight 5
12.times do
rotate 30
stroke COLORS[3]
line 190, 0, 210, 0
end
- popMatrix
end
-
- popMatrix
end
textSize 20
text "#{frameRate.to_i} FPS", 10, 10
end