Sha256: b4c6bbe79d10a974a1738c6992c7d805ebae04808412f39b2d7af977e53865e8

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

# repeat

b=box({x:300, y: 33})
t=text({content: "click me to kill the repeat process"})
countdown=text("")
countdown.y(66)
repeater= repeat 0.1, 300 do |evt|
  unless evt
    evt=0
  end
  b.x(evt)
  b.smooth(evt/10)
  b.color({red: -(evt-300)/100/3})
  content=-(evt-300)/100/3
  countdown.content(content)
end
t.touch do
  t.clear({repeat: repeater})
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
atome-0.4.7.0 vendor/assets/build/medias/rubies/examples/Old_examples/repeat.rb
atome-0.4.5.4 vendor/assets/build/medias/rubies/examples/Old_examples/repeat.rb