Sha256: ad078ec1a4651ab5740dc97c0c73ee1ab4afc9c0ee64e3e538b99240abd428cc

Contents?: true

Size: 415 Bytes

Versions: 10

Compression:

Stored size: 415 Bytes

Contents

# Moving the mouse changes the position and size of each box. 


def setup
  size 640, 360
  no_stroke
  color_mode RGB, 255, 255, 255, 100
  rect_mode CENTER
end

def draw
  background 51
  fill 255, 80
  rect mouse_x, height / 2, mouse_y / 2 + 10, mouse_y / 2 + 10
  fill 255, 80
  inverse_x = width - mouse_x
  inverse_y = height - mouse_y
  rect inverse_x, height / 2, inverse_y / 2 + 10, inverse_y/ 2 + 10
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.6.2 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.6.1 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.6.0 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.5.1 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.5.0 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.4.4 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.4.3 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.4.2 samples/processing_app/basics/input/mouse_2d.rb
ruby-processing-2.4.1 samples/processing_app/basics/input/mouse_2d.rb