Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created August 10, 2019 02:01
Show Gist options
  • Save jamesmichiemo/253861e7b2335a77993a0af9b03d781a to your computer and use it in GitHub Desktop.
Save jamesmichiemo/253861e7b2335a77993a0af9b03d781a to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# tap a key
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class TapKey < Propane::App
def settings
size 240, 120
end
def setup
sketch_title 'tap a key'
end
def draw
background 204
line 20, 20, 220, 100
line 220, 20, 20, 100 if key_pressed?
end
end
TapKey.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment