Skip to content

Instantly share code, notes, and snippets.

@obelisk68
Last active May 4, 2020 23:25
Show Gist options
  • Save obelisk68/48cda36a782d227013895803ce0d55eb to your computer and use it in GitHub Desktop.
Save obelisk68/48cda36a782d227013895803ce0d55eb to your computer and use it in GitHub Desktop.
GTK+ で落書き 15
require 'oekaki'
Oekaki.app width: 500, height: 500 do
draw { clear(color(0x1694, 0x3447, 0x8d60)) }
t = Oekaki::Turtle.new
t.color(0xfe5f, 0xaa9a, 0x212a)
ln = 10
e = Enumerator.new do |y|
60.times do
4.times do
y << proc {
t.forward(ln)
t.left(90)
}
end
t.left(6)
ln += 4
end
end
id = timer(150) do
e.next.call rescue timer_stop(id)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment