Sha256: 4ffc49745b232378d23df9ea29801aa6a48d54344e4da25c6a7a92363846fc10

Contents?: true

Size: 399 Bytes

Versions: 4

Compression:

Stored size: 399 Bytes

Contents

require 'ruby-processing'

class RotatingOneSquareSketch < Processing::App

  def setup
    render_mode P3D
    rect_mode CENTER
    @theta1 = 0
  end

  def draw
    background 255
    stroke 0
    fill 175

    translate 50, 50
    rotate_z @theta1
    rect 0, 0, 60, 60
    @theta1 += 0.02
  end

end

RotatingOneSquareSketch.new :title => "Rotating One Square",  :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/12_rotating_one_square.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_14/12_rotating_one_square.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_14/12_rotating_one_square.rb
ruby-processing-1.0.4 samples/learning_processing/chapter_14/12_rotating_one_square.rb