Sha256: 67af40f9285bdc7e4b2991294f0843c33d581f333eaace17959e2ca829c54320

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 Bytes

Contents

# Description:
# This is a full-screen demo 
# Since processing-2.0 it is opengl

#full_screen # not working correctly in processing-2.1+?


def setup
  size displayWidth, displayHeight, P3D
  no_stroke
end

def draw
  lights
  background 0
  fill 120, 160, 220
  (width/100).times do |x|
    (height/100).times do |y|
      new_x, new_y = x * 100, y * 100
      push_matrix
      translate new_x + 50, new_y + 50
      rotate_y(((mouse_x.to_f + new_x) / width) * Math::PI)
      rotate_x(((mouse_y.to_f + new_y) / height) * Math::PI)
      box 90
      pop_matrix
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-processing-2.4.4 samples/contributed/full_screen.rb
ruby-processing-2.4.3 samples/contributed/full_screen.rb