Sha256: 1c81e78958fbe18f897a36fdb8d265979beb71ed5e3d426908adfd503f045da8

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 Bytes

Contents

require 'ruby-processing'

class RotateAllSketch < Processing::App

  def setup
    render_mode P3D
    rect_mode CENTER
  end

  def draw
    background 255
    stroke 0
    fill 175

    translate width/2, height/2
    rotate_x PI * mouse_x / height
    rotate_y PI * mouse_x / height
    rect 0, 0, 100, 100
  end

end

RotateAllSketch.new :title => "Rotate All",  :width => 200,  :height => 200

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-processing-1.0.1 samples/learning_processing/chapter_14/09_rotate_all.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_14/09_rotate_all.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_14/09_rotate_all.rb
ruby-processing-1.0.4 samples/learning_processing/chapter_14/09_rotate_all.rb