Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created August 7, 2019 16:04
Show Gist options
  • Select an option

  • Save jamesmichiemo/48cbc39308d413a16c964f1537aeced6 to your computer and use it in GitHub Desktop.

Select an option

Save jamesmichiemo/48cbc39308d413a16c964f1537aeced6 to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# detect when not clicked
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class DetectClick < Propane::App
def settings
size 240, 120
end
def setup
sketch_title 'detect when not clicked'
strokeWeight 30
end
def draw
background 204
stroke 102
line 40, 0, 70, height
mouse_pressed? ? stroke(0) : stroke(255)
line 0, 70, width, 50
end
end
DetectClick.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment