Skip to content

Instantly share code, notes, and snippets.

@monkstone
Last active June 9, 2017 06:40
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 monkstone/fefb635ac0fb1a9f29f25719ed28aa27 to your computer and use it in GitHub Desktop.
Save monkstone/fefb635ac0fb1a9f29f25719ed28aa27 to your computer and use it in GitHub Desktop.
A template sketch for exploring jirb
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
class Fred < Propane::App
attr_accessor :back # we can set this variable dynamically
def settings
size 300, 300
end
def setup
sketch_title 'Fred'
@back = 0
no_loop
end
def draw
background back
save_frame(data_path("fred###.png")) # save sequentially numbered frames
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment