Sha256: 64876d49bc87df062deb5a66573e8bf595709005ad1f38c5a63051a55a659ec6

Contents?: true

Size: 496 Bytes

Versions: 2

Compression:

Stored size: 496 Bytes

Contents

# Lights 1. 
# 
# Uses the default lights to show a simple box. The lights() function
# is used to turn on the default lighting.

class Lights1 < Processing::App

  def setup
    
    size 640, 360, P3D
    
    @spin = 0.0
    
    no_stroke
    
  end
  
  def draw
  
  	background 51
  	lights
  	
  	@spin += 0.01
  	
  	push_matrix
  	
  	translate width/2, height/2
  	rotate_x PI/9
  	rotate_y PI/5 + @spin
  	
  	box 150
  	
  	pop_matrix
  
  end
  
end

Lights1.new :title => "Lights1"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-processing-1.0.11 samples/processing_app/3D/lights/lights1.rb
ruby-processing-1.0.10.1 samples/processing_app/3D/lights/lights1.rb