View data.yml
---
bubbles:
- xpos: 20
ypos: 50
diameter: 200
emotion: happy
- xpos: 80
ypos: 60
diameter: 210
emotion: sad
View environment.txt
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
Linux tux-PC-2163 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
jruby 9.2.0.0-SNAPSHOT (2.4.1) 2017-10-31 94484f7 Java HotSpot(TM) 64-Bit Server VM 9+181 on 9+181 +jit [linux-x86_64]
View generator.rb
require 'propane'
require 'fileutils'
require 'digest/sha1'
require 'active_support/all'
require 'erb'
require 'fileutils'
class Generator < Propane::App
def self.get_class_name
self.name.to_s
end
View class_instance_variable.rb
require 'propane'
class MyApp < Propane::App
def self.code
@code
end
def self.path
@path
end
View jtoy.rb
#!/usr/bin/env jruby
require 'propane'
class MyApp < Propane::App
def self.run code,path
@@code = code
@@path = path
MyApp.new
end
View grid_demo.rb
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
class GridDemo < Propane::App
attr_reader :tile # attr_accessor is frowned on in ruby circles
def settings
size(700, 100)
end
View fred.rb
#!/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
View lib_path.rb
# frozen_string_literal: true
module BuildPath
def library_path(base, name, ext)
File.join(base, 'library', name, "#{name}.#{ext}")
end
def processing_library_path(base, name, ext)
File.join(base, name, 'library', "#{name}.#{ext}")
end
end
View control_panel.md

Inspired by Nodebox, JRubyArt (copied from ruby-processing) provides a way to control the instance variables of your sketch with a control panel. You can create sliders, buttons, menus and checkboxes that set instance variables on your sketch. Since ruby-processing-2.0 you need to explicitly set the panel visible from the processing sketch (see included examples). Start by loading in the control_panel library, and then define your panel like so:

  load_library :control_panel
  attr_reader :panel, :hide

  def setup
    size(200, 200)
    @hide = false
View simple_capture.rb
load_library :glvideo
include_package 'gohai.glvideo'
attr_reader :video
def settings
size(320, 240, P2D)
end
def setup