Sha256: 99273ad57d9ca7b7637baa4271be5b68884e25d40d24d7417be0809f8a1f4f0a
Contents?: true
Size: 743 Bytes
Versions: 2
Compression:
Stored size: 743 Bytes
Contents
# Lights 2 # by Simon Greenwold. # # Display a box with three different kinds of lights. class Lights2 < Processing::App def setup size 640, 360, P3D no_stroke end def draw background 0 translate width/2, height/2 point_light 150, 100, 0, #color 200, -150, 0 #position directional_light 0, 102, 255, #color 1, 0, 0 #x-,y-,z-axis direction spot_light 255, 255, 109, #color 0, 40, 200, #position 0,-0.5,-0.5, #direction PI/2, 2 #angle, concentration rotate_y map( mouse_x, 0, width, 0, PI ) rotate_x map( mouse_y, 0, height, 0, PI ) box 150 end end Lights2.new :title => "Lights2"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby-processing-1.0.11 | samples/processing_app/3D/lights/lights2.rb |
ruby-processing-1.0.10.1 | samples/processing_app/3D/lights/lights2.rb |