This is an automated email from the ASF dual-hosted git repository.

alinakazi pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
     new 8e4eec5  Exponential.as Added
8e4eec5 is described below

commit 8e4eec540040ec5627257b7227dd0b0b1bf1a3e5
Author: alinakazi <[email protected]>
AuthorDate: Mon Apr 30 10:26:18 2018 +0500

    Exponential.as Added
---
 .../main/royale/mx/effects/easing/Exponential.as   | 131 +++++++++++++++++++++
 1 file changed, 131 insertions(+)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Exponential.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Exponential.as
new file mode 100644
index 0000000..3e8a0e6
--- /dev/null
+++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Exponential.as
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.easing
+{
+
+/**
+ *  The Exponential class defines three easing functions to implement 
+ *  motion with Flex effect classes, where the motion is defined by 
+ *  an exponentially decaying sine wave.  
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */  
+public class Exponential
+{
+/*     include "../../core/Version.as";
+ */
+       
//--------------------------------------------------------------------------
+       //
+       //  Class methods
+       //
+       
//--------------------------------------------------------------------------
+
+    /**
+     *  The <code>easeIn()</code> method starts motion slowly, 
+     *  and then accelerates motion as it executes. 
+     *
+     *  @param t Specifies time.
+        *
+     *  @param b Specifies the initial position of a component.
+        *
+     *  @param c Specifies the total change in position of the component.
+        *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */  
+       /* public static function easeIn(t:Number, b:Number,
+                                                                 c:Number, 
d:Number):Number
+       {
+               return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
+       } */
+
+    /**
+     *  The <code>easeOut()</code> method starts motion fast, 
+     *  and then decelerates motion as it executes. 
+     *
+     *  @param t Specifies time.
+        *
+     *  @param b Specifies the initial position of a component.
+        *
+     *  @param c Specifies the total change in position of the component.
+        *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */  
+       public static function easeOut(t:Number, b:Number,
+                                                                  c:Number, 
d:Number):Number
+       {
+               return t == d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
+       }
+
+    /**
+     *  The <code>easeInOut()</code> method combines the motion 
+     *  of the <code>easeIn()</code> and <code>easeOut()</code> methods
+        *  to start the motion slowly, accelerate motion, then decelerate. 
+     *
+     *  @param t Specifies time.
+        *
+     *  @param b Specifies the initial position of a component.
+        *
+     *  @param c Specifies the total change in position of the component.
+        *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Royale 0.9.3
+     */  
+       /* public static function easeInOut(t:Number, b:Number,
+                                                                        
c:Number, d:Number):Number
+       {
+               if (t == 0)
+                       return b;
+
+               if (t == d)
+                       return b + c;
+
+               if ((t /= d / 2) < 1)
+                       return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
+
+               return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
+       } */
+}
+
+}

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to