Sha256: 208b98d6a390fb3f7ff2ce155c864264e36f03f785d64dfb00bd61fb7e4ba3b1

Contents?: true

Size: 472 Bytes

Versions: 10

Compression:

Stored size: 472 Bytes

Contents

attr_reader :pg

def setup
  size(400, 400, P3D)
  @pg = createGraphics(400, 400, P3D)
  pg.smooth(4)
end

def draw
  background(0)
  pg.begin_draw
  pg.background(255, 0, 0)
  pg.ellipse(mouse_x, mouse_y, 100, 100)
  pg.end_draw
  image(pg, 0, 0, 400, 400)
end

def key_pressed 
  case key
  when '1'
    pg.smooth(1)
  when '2'
    pg.smooth(2)
  when '3'
    pg.smooth(4)
  when '4'
    pg.smooth(8)
  when '5'
    pg.smooth(16)
  when '6'
    pg.smooth(32)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.6.2 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.6.1 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.6.0 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.5.1 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.5.0 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.4.4 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.4.3 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.4.2 samples/processing_app/demos/tests/offscreen_test.rb
ruby-processing-2.4.1 samples/processing_app/demos/tests/offscreen_test.rb