Skip to content

Commit

Permalink
updated to be both flash and javascript compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsj committed Jan 19, 2016
1 parent 0f7b9f1 commit c5e25e1
Show file tree
Hide file tree
Showing 30 changed files with 140 additions and 86 deletions.
1 change: 1 addition & 0 deletions extraParams.hxml
@@ -0,0 +1 @@
-swf-lib greensock.swc
2 changes: 2 additions & 0 deletions src/com/greensock/TimelineLite.hx
Expand Up @@ -7,7 +7,9 @@ import com.greensock.core.SimpleTimeline;
*
*/

#if (js)
@:native("TimelineLite")
#end
extern class TimelineLite extends SimpleTimeline
{

Expand Down
2 changes: 2 additions & 0 deletions src/com/greensock/TimelineMax.hx
Expand Up @@ -5,7 +5,9 @@ import com.greensock.core.Animation;
* TimelineMax extends TimelineLite, offering exactly the same functionality plus useful (but non-essential) features like repeat, repeatDelay, yoyo, currentLabel(), addCallback(), removeCallback(), tweenTo(), tweenFromTo(), getLabelAfter(), getLabelBefore(), getActive() (and probably more in the future). It is the ultimate sequencing tool that acts like a container for tweens and other timelines, making it simple to control them as a whole and precisely manage their timing.
*/

#if (js)
@:native("TimelineMax")
#end
extern class TimelineMax extends TimelineLite
{

Expand Down
4 changes: 3 additions & 1 deletion src/com/greensock/TweenLite.hx
Expand Up @@ -7,7 +7,9 @@ import com.greensock.easing.Ease;
* TweenLite is an extremely fast, lightweight, and flexible animation tool that serves as the foundation of the GreenSock Animation Platform (GSAP). A TweenLite instance handles tweening one or more properties of any object (or array of objects) over time. TweenLite can be used on its own to accomplish most animation chores with minimal file size or it can be used in conjunction with advanced sequencing tools like TimelineLite or TimelineMax to make complex tasks much simpler.
*/

@:native("TweenLite")
#if (js)
@:native("TweenLite")
#end
extern class TweenLite extends Animation
{

Expand Down
4 changes: 3 additions & 1 deletion src/com/greensock/TweenMax.hx
Expand Up @@ -6,7 +6,9 @@ import com.greensock.TweenLite;
* TweenMax extends TweenLite, adding many useful (but non-essential) features like repeat(), repeatDelay(), yoyo(), and more. It also includes many extra plugins by default, making it extremely full-featured. Any of the plugins can work with TweenLite too, but TweenMax saves you the step of loading the common ones like CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin as well as EasePack, TimelineLite, and TimelineMax. Since TweenMax extends TweenLite, it can do ANYTHING TweenLite can do plus more. The syntax is identical. You can mix and match TweenLite and TweenMax in your project as you please, but if file size is a concern it is best to stick with TweenLite unless you need a particular TweenMax-only feature.
*/

@:native("TweenMax")
#if (js)
@:native("TweenMax")
#end
extern class TweenMax extends TweenLite {

/**
Expand Down
3 changes: 3 additions & 0 deletions src/com/greensock/core/Animation.hx
Expand Up @@ -3,7 +3,10 @@ package com.greensock.core;
/**
* Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/functionality, but there is no reason to create an instance of this class directly.
*/

#if (js)
@:native("Animation")
#end
extern class Animation {

/**
Expand Down
3 changes: 3 additions & 0 deletions src/com/greensock/core/SimpleTimeline.hx
Expand Up @@ -3,7 +3,10 @@ package com.greensock.core;
/**
* SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline functionality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight.
*/

#if (js)
@:native("SimpleTimeline")
#end
extern class SimpleTimeline extends Animation {

/**
Expand Down
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Back.hx
Expand Up @@ -3,16 +3,19 @@ package com.greensock.easing;
/**
* Back
*/

#if (js)
@:native("Back")
#end
extern class Back extends Ease
{

public function new();

static public function easeIn () : Back;
static public var easeIn : Back;

static public function easeInOut () : Back;
static public var easeInOut : Back;

static public function easeOut () : Back;
static public var easeOut : Back;

}
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Bounce.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Bounce
*/

#if (js)
@:native("Bounce")
#end
extern class Bounce extends Ease
{

public function new();

static public function easeIn () : Bounce;
static public var easeIn : Bounce;

static public function easeInOut () : Bounce;
static public var easeInOut : Bounce;

static public function easeOut () : Bounce;
static public var easeOut : Bounce;


}
8 changes: 5 additions & 3 deletions src/com/greensock/easing/Circ.hx
Expand Up @@ -4,17 +4,19 @@ package com.greensock.easing;
* Circ
*/

#if (js)
@:native("Circ")
#end
extern class Circ extends Ease
{

public function new();

static public function easeIn () : Circ;
static public var easeIn : Circ;

static public function easeInOut () : Circ;
static public var easeInOut : Circ;

static public function easeOut () : Circ;
static public var easeOut : Circ;


}
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Cubic.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Cubic
*/

#if (js)
@:native("Cubic")
#end
extern class Cubic extends Ease
{

public function new();

static public function easeIn () : Cubic;
static public var easeIn : Cubic;

static public function easeInOut () : Cubic;
static public var easeInOut : Cubic;

static public function easeOut () : Cubic;
static public var easeOut : Cubic;


}
2 changes: 2 additions & 0 deletions src/com/greensock/easing/Ease.hx
Expand Up @@ -4,7 +4,9 @@ package com.greensock.easing;
* Base class for all GreenSock easing equations. In its simplest form, an Ease is responsible for translating linear time (typically represented as a number between 0 and 1 where 0 is the beginning, 0.5 is halfway complete, and 1 is the end) into a value that has a different rate of change but still starts at 0 and ends at 1. In the GreenSock platform, eases are used to give tweens/animations the look and feel that the animator desires. For example, a ball rolling to a stop would decelerate over time (easeOut) rather than using a linear velocity. An Elastic ease could be used to make an object appear as though it is loosely attached somewhere and is snapping into place with loose (or tight) tension.
*/

#if (js)
@:native("Ease")
#end
extern class Ease
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/com/greensock/easing/EaseLookup.hx
Expand Up @@ -4,7 +4,9 @@ package com.greensock.easing;
* EaseLookup
*/

#if (js)
@:native("EaseLookup")
#end
extern class EaseLookup
{

Expand Down
21 changes: 6 additions & 15 deletions src/com/greensock/easing/Elastic.hx
Expand Up @@ -3,28 +3,19 @@ package com.greensock.easing;
/**
* Elastic
*/

#if (js)
@:native("Elastic")
#end
extern class Elastic extends Ease
{

public function new();

/**
*
* @return
*/
static public function easeIn () : Elastic;
static public var easeIn : Elastic;

/**
*
* @return
*/
static public function easeInOut () : Elastic;
static public var easeInOut : Elastic;

/**
*
* @return
*/
static public function easeOut () : Elastic;
static public var easeOut : Elastic;

}
21 changes: 6 additions & 15 deletions src/com/greensock/easing/Expo.hx
Expand Up @@ -3,28 +3,19 @@ package com.greensock.easing;
/**
* Expo
*/

#if (js)
@:native("Expo")
#end
extern class Expo extends Ease
{

public function new();

/**
*
* @return
*/
static public function easeIn () : Expo;
static public var easeIn : Expo;

/**
*
* @return
*/
static public function easeInOut () : Expo;
static public var easeInOut : Expo;

/**
*
* @return
*/
static public function easeOut () : Expo;
static public var easeOut : Expo;

}
23 changes: 13 additions & 10 deletions src/com/greensock/easing/Linear.hx
Expand Up @@ -3,20 +3,23 @@ package com.greensock.easing;
/**
* Linear
*/

#if (js)
@:native("Linear")
#end
extern class Linear extends Ease
{

public function new();
public function new();

static public var ease : Linear;

static public var easeIn : Linear;

static public var easeInOut : Linear;

static public var easeNone : Linear;

static public function ease () : Linear;

static public function easeIn () : Linear;
static public var easeOut : Linear;

static public function easeInOut () : Linear;

static public function easeNone () : Linear;

static public function easeOut () : Linear;

}
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Power0.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Power0
*/

#if (js)
@:native("Power0")
#end
extern class Power0 extends Ease
{

public function new();

static public function easeIn () : Power0;
static public var easeIn : Power0;

static public function easeInOut () : Power0;
static public var easeInOut : Power0;

static public function easeOut () : Power0;
static public var easeOut : Power0;


}
Expand Down
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Power1.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Power1
*/

#if (js)
@:native("Power1")
#end
extern class Power1 extends Ease
{

public function new();

static public function easeIn () : Power1;
static public var easeIn : Power1;

static public function easeInOut () : Power1;
static public var easeInOut : Power1;

static public function easeOut () : Power1;
static public var easeOut : Power1;


}
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Power2.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Power2
*/

#if (js)
@:native("Power2")
#end
extern class Power2 extends Ease
{

public function new();

static public function easeIn () : Power2;
static public var easeIn : Power2;

static public function easeInOut () : Power2;
static public var easeInOut : Power2;

static public function easeOut () : Power2;
static public var easeOut : Power2;


}
Expand Down
9 changes: 6 additions & 3 deletions src/com/greensock/easing/Power3.hx
Expand Up @@ -3,17 +3,20 @@ package com.greensock.easing;
/**
* Power3
*/

#if (js)
@:native("Power3")
#end
extern class Power3 extends Ease
{

public function new();

static public function easeIn () : Power3;
static public var easeIn : Power3;

static public function easeInOut () : Power3;
static public var easeInOut : Power3;

static public function easeOut () : Power3;
static public var easeOut : Power3;


}

0 comments on commit c5e25e1

Please sign in to comment.