Last active
September 22, 2018 18:37
-
-
Save jamesmichiemo/1fcdbf8a2d0e302e3fd2605a6959614d to your computer and use it in GitHub Desktop.
02_make::projects:processing
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 'propane' | |
| # ellipses | |
| # propane graffiti by 8mana | |
| # based on code by Casey Reas and Ben Fry | |
| class Ellipse < Propane::App | |
| def settings | |
| size 100, 100 | |
| end | |
| def draw | |
| ellipse(50,50,80,80) | |
| end | |
| end | |
| Ellipse.new |
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
| #!/usr/bin/env jruby | |
| require 'propane' | |
| # make circles | |
| # propane graffiti by 8mana | |
| # based on code by Casey Reas and Ben Fry | |
| class MakeCircles < Propane::App | |
| def settings | |
| size 480,120 | |
| end | |
| def draw | |
| if mouse_pressed? | |
| fill(0) | |
| else | |
| fill(255) | |
| end | |
| ellipse(mouseX, mouseY, 80, 80) | |
| end | |
| end | |
| MakeCircles.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment