Sha256: 392cb01bd59c35d1e03d0958c15011a2e2c693e2bad15f2d20de14e5b1c4f8a6

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 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
    @translation = translation(:of => [150, 200], :duration => 1).start(@text)
    @scale       = scale_variation(:of => [0.5, 0.5], :duration => 0.5).start(@text)

    always do
      @translation.update
      @scale.update
    end

    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/translation.rb
ray-0.2.0 samples/animation/translation.rb
ray-0.1.1 samples/animation/translation.rb
ray-0.1.0 samples/animation/translation.rb