Sha256: 0394e0a30f071a002ff7aada63cda4ea3092912502f7d2899c25821fd89b72ae

Contents?: true

Size: 388 Bytes

Versions: 10

Compression:

Stored size: 388 Bytes

Contents

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



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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.6.2 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.6.1 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.6.0 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.5.1 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.5.0 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.4.4 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.4.3 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.4.2 samples/processing_app/basics/lights/lights1.rb
ruby-processing-2.4.1 samples/processing_app/basics/lights/lights1.rb