Sha256: 8d8716e68b553ad8766dc604af4bcca4e7c162b738dfb47e5b247c9e0bbd6caa

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

# Setup and Draw. 
# 
# The draw() function creates a structure in which
# to write programs that change with time. 

class SetupDraw < Processing::App

  def setup
    
    size 200, 200
    
    @y = 100
    
    stroke 255
    frame_rate 30
  end
  
  def draw
  
  	background 0
  	
  	@y = @y - 1
  	@y = height if @y < 0
  	
  	line 0, @y, width, @y
  end
  
end

SetupDraw.new :title => "Setup Draw"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-processing-1.0.11 samples/processing_app/basics/structure/setup_draw.rb
ruby-processing-1.0.10.1 samples/processing_app/basics/structure/setup_draw.rb