Sha256: a42be2878e5e5ba09a17253369eb1cd559a1e44779cfabfd5fbf68721bdd54f9

Contents?: true

Size: 666 Bytes

Versions: 2

Compression:

Stored size: 666 Bytes

Contents

module Joybox
  module Actions

    class Bezier

      def self.defaults
        {
          duration: 0.3,
          bezier: [[0, 0], [0, 0], [0, 0]]
        }
      end

      def self.by(options = {})

        options = options.nil? ? defaults : defaults.merge!(options)

        CCBezierBy.actionWithDuration(options[:duration], 
                                      bezier: options[:bezier])
      end


      def self.to(options = {})

        options = options.nil? ? defaults : defaults.merge!(options)

        CCBezierTo.actionWithDuration(options[:duration], 
                                      bezier: options[:bezier])
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.0.0 motion/joybox/actions/bezier.rb
joybox-0.0.6 motion/joybox/actions/bezier.rb