Sha256: d184df5aafb698fc58c47b309c38357b02e364f6f8e93ece821be9bf876ac8b6
Contents?: true
Size: 584 Bytes
Versions: 1
Compression:
Stored size: 584 Bytes
Contents
=begin { from: 0.0, to: 0.8 } =end module Walt module Operation class FadeOperation < Base PROPERTIES = [:from, :to] attr_accessor *PROPERTIES def initialize(params = {}) super params.each do |key, value| if PROPERTIES.include?(key.to_sym) self.send("#{key}=", value) end end end def setup(view, animation) if self.from view.alpha = self.from end end def finalize(view, animation) view.alpha = self.to end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
walt-0.1 | lib/walt/operation/fade.rb |