Last active
May 4, 2020 23:25
-
-
Save obelisk68/48cda36a782d227013895803ce0d55eb to your computer and use it in GitHub Desktop.
GTK+ で落書き 15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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