Last active
August 3, 2019 16:47
-
-
Save jamesmichiemo/ae780e9f3c396566a548dfc805379fbc 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' | |
# set thickness on the fly | |
# propane graffiti by 8mana | |
# based on code by Casey Reas and Ben Fry | |
class SetThickness < Propane::App | |
def settings | |
size 480, 120 | |
end | |
def setup | |
sketch_title 'set thickness on the fly' | |
stroke 0, 102 | |
end | |
def draw | |
weight = dist mouseX, mouseY, pmouseX, pmouseY | |
stroke_weight weight | |
line mouseX, mouseY, pmouseX, pmouseY | |
end | |
end | |
SetThickness.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment