Sha256: 329fa7aca39b8df348e77f84a945ffbe9f4b55fd4852f2da7c7af8a3db162c80

Contents?: true

Size: 375 Bytes

Versions: 4

Compression:

Stored size: 375 Bytes

Contents

require 'ruby-processing'

class RotateXSketch < Processing::App

  def setup
    render_mode P3D
    rect_mode CENTER
    @theta = 0
  end

  def draw
    background 255
    stroke 0
    fill 175

    translate width/2, height/2
    rotate_x @theta
    rect 0, 0, 100, 100
    @theta += 0.02
  end

end

RotateXSketch.new :title => "Rotate X", :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/07_rotate_x.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_14/07_rotate_x.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_14/07_rotate_x.rb
ruby-processing-1.0.4 samples/learning_processing/chapter_14/07_rotate_x.rb