Created
August 7, 2019 16:01
-
-
Save jamesmichiemo/92ef210f72b748ca6ae6393a3e6cdcad to your computer and use it in GitHub Desktop.
processing + propane sketch
This file contains 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' | |
# 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