Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created August 19, 2019 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmichiemo/a6bb6518dd0064d4b4f3930bb39c05b5 to your computer and use it in GitHub Desktop.
Save jamesmichiemo/a6bb6518dd0064d4b4f3930bb39c05b5 to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# load more images
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class LoadImages < Propane::App
def settings
size 480, 120
end
def setup
sketch_title 'load more images'
@img1 = load_image data_path("front.jpg")
@img2 = load_image data_path("cover.jpg")
no_loop
end
def draw
image @img1, -120, 0
image @img1, 130, 0, 240, 120
image @img2, 300, 0, 240, 120
end
end
LoadImages.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment