Created
August 7, 2019 16:04
-
-
Save jamesmichiemo/e43676bc337e6925a8e3f66564d114ad to your computer and use it in GitHub Desktop.
processing + propane sketch
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 | |
| # frozen_string_literal: false | |
| require 'propane' | |
| # click the mouse | |
| # propane graffiti by 8mana | |
| # based on code by Casey Reas and Ben Fry | |
| class ClickMouse < Propane::App | |
| def settings | |
| size 240, 120 | |
| end | |
| def setup | |
| sketch_title 'click the mouse' | |
| strokeWeight 30 | |
| end | |
| def draw | |
| background 204 | |
| stroke 102 | |
| line 40, 0, 70, height | |
| stroke(0) if mouse_pressed? | |
| line 0, 70, width, 50 | |
| end | |
| end | |
| ClickMouse.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment