Sha256: cad725d3f79e8a1456515fe42006d823a5a7721cbfd25d563f02cbcdcd5f8779
Contents?: true
Size: 555 Bytes
Versions: 4
Compression:
Stored size: 555 Bytes
Contents
$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../lib") $:.unshift File.expand_path(File.dirname(__FILE__) + "/../../ext") require 'ray' Ray.game "input", :resizable => true do register { add_hook :quit, method(:exit!) } scene :main do @obj = Ray::Polygon.rectangle [0, 0, 100, 50], Ray::Color.red always do @obj.pos = mouse_pos end on :window_resize do window.view = window.default_view end render do window.clear Ray::Color.green window.draw @obj end end scenes << :main end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ray-0.2.1 | samples/window/input.rb |
ray-0.2.0 | samples/window/input.rb |
ray-0.1.1 | samples/window/input.rb |
ray-0.1.0 | samples/window/input.rb |