Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created August 7, 2019 16:01
Show Gist options
  • Save jamesmichiemo/92ef210f72b748ca6ae6393a3e6cdcad to your computer and use it in GitHub Desktop.
Save jamesmichiemo/92ef210f72b748ca6ae6393a3e6cdcad to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# map values to a range
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class MapRange < Propane::App
def settings
size 240, 120
end
def setup
sketch_title 'map values to a range'
strokeWeight 12
end
def draw
background 204
stroke 255
line 120, 60, mouseX, mouseY
stroke 0
mx = mouseX/2 + 60
line 120, 60, mx, mouseY
end
end
MapRange.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment