Sha256: 8234a511f0178babd098b97d800856b682be5b5efad6782087640fcbf4f79794

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 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.1.1 motion/joybox/actions/bezier.rb
joybox-1.1.0 motion/joybox/actions/bezier.rb