Sha256: 4260c8ed74fda37359eb0c946b279d5c61727bfa018869ed03cf41d31dc10360

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../lib")
$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../ext")

require 'ray'

Ray.game "Hello world!" do
  register { add_hook :quit, method(:exit!) }

  scene :rotation do
    @text = text "Hello world!", :at => [100, 100], :size => 30
    animations << color_variation(:from => Ray::Color.red, :to => Ray::Color.blue,
                                  :duration => 1).start(@text)

    render { |win| win.draw @text }
  end

  scenes << :rotation
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ray-0.2.1 samples/animation/color.rb
ray-0.2.0 samples/animation/color.rb
ray-0.1.1 samples/animation/color.rb
ray-0.1.0 samples/animation/color.rb