Created
March 3, 2020 16:30
-
-
Save ongaeshi/7fdee07f7584ef5adaa12f1ec8459674 to your computer and use it in GitHub Desktop.
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
| script do | |
| (1..360).each do |e| | |
| radian = 32 | |
| rad = e * (Math::PI * 2) / 360 | |
| 0.upto(6) do |y| | |
| y *= 100 | |
| circfill(Window.center.x, y, radian * Math::sin(rad), [Math::sin(rad) * 127 + 128, 64, 64]) | |
| circfill(Window.center.x + 100, y, radian * Math::cos(rad), [64, Math::cos(rad) * 127 + 128, 64]) | |
| circfill(Window.center.x - 100, y, radian * Math::cos(rad), [64, 64, Math::cos(rad) * 127 + 128]) | |
| end | |
| yld | |
| end | |
| end | |
| script do | |
| t = "🐣Hello, " | |
| yld(60) do |i| | |
| text_at(t, Window.center.x, Window.center.y, 7) | |
| end | |
| a = "SketchWaltz!".split("") | |
| a.each do |e| | |
| t += e | |
| yld(4) do | |
| text_at(t, Window.center.x, Window.center.y, 7) | |
| end | |
| end | |
| t += "💃" | |
| yld(64) do | |
| text_at(t, Window.center.x, Window.center.y, 7) | |
| end | |
| yld(120) do | |
| text_at(t, Window.center.x, Window.center.y, 7) | |
| text("指定された obj を引数の最後から順番に配列の\n先頭に挿入します。引数を指定しなければ何も\nしません。", 0, 300, 7) | |
| end | |
| end | |
| draw do | |
| circfill(mouse_x, mouse_y, 30, 1) | |
| circfill(mouse_x, mouse_y, 20, 2) | |
| end | |
| run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment