Sha256: cb056511ca7cbf526f30dadd9162205b143131359a52d3dde5152cbfe3ea0bdc

Contents?: true

Size: 377 Bytes

Versions: 4

Compression:

Stored size: 377 Bytes

Contents

require 'ruby-processing'

class RotateZSketch < Processing::App

  def setup
    rect_mode CENTER
    render_mode P3D
    @theta = 0
  end

  def draw
    background 255
    stroke 0
    fill 175

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

end

RotateZSketch.new :title => "Rotate Z",  :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/06_rotate_z.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_14/06_rotate_z.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_14/06_rotate_z.rb
ruby-processing-1.0.4 samples/learning_processing/chapter_14/06_rotate_z.rb