Sha256: d61f7ce21e86071f1b28d002f1eda6256b4e38d2c8e4762f465342c26b1578ce

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

class AppDelegate
  attr_reader :animation, :asset
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)

    @window.makeKeyAndVisible

    Walt.animate(
      assets: [{
        id: :blue,
        url: "http://upload.wikimedia.org/wikipedia/commons/3/30/Googlelogo.png",
        size: [300,100]
      }, {
        id: :red,
        text: "Hello World",
        text_color: "white",
        position: [20, 50]
      }],
      animations:[{
        duration: 3,
        operations:[{
          fade: :red,
          from: 0.0,
          to: 1.0
        }, {
          scale: :blue,
          from: 1.0,
          to: 2.0
        }, {
          move: :blue,
          to: 100
        }, {
          fade: :blue,
          from: 0.0,
          to: 0.5
        }],
        after: {
          duration: 2,
          operations:[{
            rotate: :blue,
            to: 40
          },{
            scale: :blue,
            to: 1.0
          }, {
            move: :blue,
            to: 50
          }, {
            fade: :blue,
            from: 0.5,
            to: 1.0
          }],
          after: {
            duration: 2,
            operations: [{
              rotate: :blue,
              to: 0
            },{
              move: :blue,
              axis: :y,
              to: 150
            }]
          }
        }
      }],
      in: @window
    )

    true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
walt-0.1.2 app/app_delegate.rb
walt-0.1 app/app_delegate.rb