Sha256: 9bf74c8440a037406d1a60823cd14223b7c1c7d9c4de6f5fcf6f023f6176ba13
Contents?: true
Size: 647 Bytes
Versions: 2
Compression:
Stored size: 647 Bytes
Contents
trails = [[0, 0]] * 60 Shoes.app width: 200, height: 200, resizable: false do nostroke fill rgb(0x3, 0x1, 0x3, 0.6) # animation at 100 frames per second animate(60) do trails.shift trails << self.mouse[1, 2] clear do # change the background based on where the pointer is background rgb( 20 + (70 * (trails.last[0].to_f / self.width)).to_i, 20 + (70 * (trails.last[1].to_f / self.height)).to_i, 51) # draw circles progressively bigger trails.each_with_index do |(x, y), i| i += 1 oval left: x, top: y, radius: (i*0.5), center: true end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.pre2 | samples/good-follow.rb |
shoes-4.0.0.pre1 | samples/good-follow.rb |