Skip to content
Browse files

namespace fix

  • Loading branch information...
1 parent ffe31d7 commit c1dcef444971da8e96ebc050e23f39ef00cbe66f @vatula committed
Showing with 21 additions and 11 deletions.
  1. +7 −5 src/AniConstants.js
  2. +2 −0 src/AniCore.js
  3. +2 −0 src/AniSequence.js
  4. +2 −0 src/AniUtil.js
  5. +8 −6 src/easing/Easing.js
View
12 src/AniConstants.js
@@ -1,19 +1,21 @@
+var Ani = Ani || {};
+
Ani.Constants = Ani.Constants || {
VERSION = "2.0",
-
+
// timeMode
SECONDS = "SECONDS",
FRAMES = "FRAMES",
-
+
// callback, keywords for the property list string parsing
ON_START = "onStart",
ON_END = "onEnd",
-
+
// playMode
FORWARD = "FORWARD",
BACKWARD = "BACKWARD",
YOYO = "YOYO",
-
+
// autoStartMode
AUTOSTART = "AUTOSTART",
NO_AUTOSTART = "NO_AUTOSTART",
@@ -24,7 +26,7 @@ Ani.Constants = Ani.Constants || {
// debug out
ANI_DEBUG_PREFIX = "### Ani Debug -> ",
-
+
// easings mode
IN = 0,
IN_OUT = 2,
View
2 src/AniCore.js
@@ -1,3 +1,5 @@
+var Ani = Ani || {};
+
Ani.AniCore = function(autostart, targetObject, durationEasing, durationDelay, targetObjectFieldName, end, easing, timeMode, callback){
this.targetName = targetObject ? targetObject.toString() : "";
View
2 src/AniSequence.js
@@ -1,3 +1,5 @@
+var Ani = Ani || {};
+
Ani.AniSequence = function(){
this.steps = [];
this.addParallelAnisCollector = [];
View
2 src/AniUtil.js
@@ -1,3 +1,5 @@
+var Ani = Ani || {};
+
Ani.Util = {
map: function(value, istart, istop, ostart, ostop){
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
View
14 src/easing/Easing.js
@@ -1,3 +1,5 @@
+var Ani = Ani || {};
+
Ani.Easings = Ani.Easings || {};
/**
@@ -9,10 +11,10 @@ Ani.Easings.Easing = function(easingMode){
Ani.Easings.Easing.prototype = {
constructor: Ani.Easings.Easing,
-
+
/**
- * Calc easing: map time to position.
- *
+ * Calc easing: map time to position.
+ *
* @param t the time
* @param b the begin
* @param c the change
@@ -22,7 +24,7 @@ Ani.Easings.Easing.prototype = {
calcEasing: function(f, b, c, d){
var out = 0.0,
mode = Ani.Constants;
-
+
switch(easingMode){
case mode.IN:
out = easeIn(t, b, c, d);
@@ -39,7 +41,7 @@ Ani.Easings.Easing.prototype = {
}
return out;
},
-
+
/**
* Set the shape mode
* @param theEasingMode IN, OUT, IN_OUT
@@ -47,7 +49,7 @@ Ani.Easings.Easing.prototype = {
setMode: function(easingMode){
this.easingMode = easingMode;
},
-
+
/**
* All extensions of the Easing class should implement the following methods
*/

0 comments on commit c1dcef4

Please sign in to comment.
Something went wrong with that request. Please try again.