Changeset 96 for trunk/samples

Show
Ignore:
Timestamp:
08/11/2007 19:09:55 (13 months ago)
Author:
why
Message:

* samples/anim.rb: just messing with animating the font size.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/samples/anim.rb

    r94 r96  
    11Shoes.app do 
    2   l = text "0" 
    3   animate(24) do |i| 
    4     l.replace i.inspect 
    5   end 
    6   motion do |x, y| 
    7     Shoes.p [x, y] 
     2  stack :top => 0.5, :left => 0.5 do 
     3    text "Counting up:" 
     4    l = text "0" 
     5    animate(24) do |i| 
     6      f = ['Arial 14px', 'Serif 34px', 'Monospace 18px', 'Arial 48px'][rand(3)] 
     7      l.replace "<span font_desc='#{f}'>#{i}</span>" 
     8    end 
     9    motion do |x, y| 
     10      Shoes.p [x, y] 
     11    end 
    812  end 
    913end