actuate
Version:
Actuate is a flexible, fast "tween" library for animations
1,814 lines (1,434 loc) • 167 kB
JavaScript
/*!
* Actuate v1.9.0
* https://github.com/jgranick/actuate
*
* Copyright Joshua Granick
* Released under the MIT license
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("openfl/display/DisplayObject"), require("openfl/geom/ColorTransform"), require("openfl/media/SoundTransform"), require("openfl/Lib"));
else if(typeof define === 'function' && define.amd)
define(["openfl/display/DisplayObject", "openfl/geom/ColorTransform", "openfl/media/SoundTransform", "openfl/Lib"], factory);
else if(typeof exports === 'object')
exports["motion"] = factory(require("openfl/display/DisplayObject"), require("openfl/geom/ColorTransform"), require("openfl/media/SoundTransform"), require("openfl/Lib"));
else
root["motion"] = factory(root["openfl"]["display"]["DisplayObject"], root["openfl"]["geom"]["ColorTransform"], root["openfl"]["media"]["SoundTransform"], root["openfl"]["Lib"]);
})(self, (__WEBPACK_EXTERNAL_MODULE_openfl_display_DisplayObject__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_ColorTransform__, __WEBPACK_EXTERNAL_MODULE_openfl_media_SoundTransform__, __WEBPACK_EXTERNAL_MODULE_openfl_Lib__) => {
return /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./lib/_gen/HxOverrides.js":
/*!*********************************!*\
!*** ./lib/_gen/HxOverrides.js ***!
\*********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: HxOverrides
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
// Constructor
var HxOverrides = function(){}
// Meta
HxOverrides.__name__ = ["HxOverrides"];
HxOverrides.__isInterface__ = false;
HxOverrides.prototype = {
};
HxOverrides.prototype.__class__ = HxOverrides.prototype.constructor = $hxClasses["HxOverrides"] = HxOverrides;
// Init
// Statics
HxOverrides.remove = function(a,obj) {
var i = a.indexOf(obj);
if(i == -1) {
return false;
}
a.splice(i,1);
return true;
}
HxOverrides.iter = function(a) {
return { cur : 0, arr : a, hasNext : function() {
return this.cur < this.arr.length;
}, next : function() {
return this.arr[this.cur++];
}};
}
// Export
exports["default"] = HxOverrides;
/***/ }),
/***/ "./lib/_gen/Reflect.js":
/*!*****************************!*\
!*** ./lib/_gen/Reflect.js ***!
\*****************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Reflect
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
// Constructor
var Reflect = function(){}
// Meta
Reflect.__name__ = ["Reflect"];
Reflect.__isInterface__ = false;
Reflect.prototype = {
};
Reflect.prototype.__class__ = Reflect.prototype.constructor = $hxClasses["Reflect"] = Reflect;
// Init
// Statics
Reflect.hasField = function(o,field) {
return Object.prototype.hasOwnProperty.call(o,field);
}
Reflect.field = function(o,field) {
try {
return o[field];
} catch( e ) {
return null;
}
}
Reflect.setField = function(o,field,value) {
o[field] = value;
}
Reflect.getProperty = function(o,field) {
var tmp;
if(o == null) {
return null;
} else {
var tmp1;
if(o.__properties__) {
tmp = o.__properties__["get_" + field];
tmp1 = tmp;
} else {
tmp1 = false;
}
if(tmp1) {
return o[tmp]();
} else {
return o[field];
}
}
}
Reflect.setProperty = function(o,field,value) {
var tmp;
var tmp1;
if(o.__properties__) {
tmp = o.__properties__["set_" + field];
tmp1 = tmp;
} else {
tmp1 = false;
}
if(tmp1) {
o[tmp](value);
} else {
o[field] = value;
}
}
Reflect.callMethod = function(o,func,args) {
return func.apply(o,args);
}
Reflect.fields = function(o) {
var a = [];
if(o != null) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
for( var f in o ) {
if(f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o,f)) {
a.push(f);
}
}
}
return a;
}
// Export
exports["default"] = Reflect;
/***/ }),
/***/ "./lib/_gen/Std.js":
/*!*************************!*\
!*** ./lib/_gen/Std.js ***!
\*************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Std
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js_Boot() {return __webpack_require__(/*! ./js/Boot */ "./lib/_gen/js/Boot.js");}
// Constructor
var Std = function(){}
// Meta
Std.__name__ = ["Std"];
Std.__isInterface__ = false;
Std.prototype = {
};
Std.prototype.__class__ = Std.prototype.constructor = $hxClasses["Std"] = Std;
// Init
{
String.prototype.__class__ = String
String.__name__ = true;
Array.__name__ = true;
var Int = { __name__ : ["Int"]};
var Dynamic = { __name__ : ["Dynamic"]};
var Float = Number;
Float.__name__ = ["Float"];
var Bool = Boolean;
Bool.__ename__ = ["Bool"];
var Class = { __name__ : ["Class"]};
var Enum = { };
};
// Statics
Std.is = function(v,t) {
return (js_Boot().default).__instanceof(v,t);
}
Std.string = function(s) {
return (js_Boot().default).__string_rec(s,"");
}
// Export
exports["default"] = Std;
/***/ }),
/***/ "./lib/_gen/Type.js":
/*!**************************!*\
!*** ./lib/_gen/Type.js ***!
\**************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Type
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js_Boot() {return __webpack_require__(/*! ./js/Boot */ "./lib/_gen/js/Boot.js");}
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
// Constructor
var Type = function(){}
// Meta
Type.__name__ = ["Type"];
Type.__isInterface__ = false;
Type.prototype = {
};
Type.prototype.__class__ = Type.prototype.constructor = $hxClasses["Type"] = Type;
// Init
// Statics
Type.getClass = function(o) {
if(o == null) {
return null;
} else {
return (js_Boot().default).getClass(o);
}
}
Type.getSuperClass = function(c) {
return c.__super__;
}
Type.createInstance = function(cl,args) {
var _g = args.length;
switch(_g) {
case 0:
return new cl();
case 1:
return new cl(args[0]);
case 2:
return new cl(args[0],args[1]);
case 3:
return new cl(args[0],args[1],args[2]);
case 4:
return new cl(args[0],args[1],args[2],args[3]);
case 5:
return new cl(args[0],args[1],args[2],args[3],args[4]);
case 6:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5]);
case 7:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);
case 8:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
case 9:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);
case 10:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);
case 11:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]);
case 12:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]);
case 13:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12]);
case 14:
return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12],args[13]);
default:
throw new (js__$Boot_HaxeError().default)("Too many arguments");
}
}
// Export
exports["default"] = Type;
/***/ }),
/***/ "./lib/_gen/extend_stub.js":
/*!*********************************!*\
!*** ./lib/_gen/extend_stub.js ***!
\*********************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({value: true}));
exports["default"] = function $extend(from, fields) {
function Inherit() {};
Inherit.prototype = from;
var proto = new Inherit();
for (var name in fields) proto[name] = fields[name];
if(fields.toString !== Object.prototype.toString) proto.toString = fields.toString;
return proto;
};
/***/ }),
/***/ "./lib/_gen/haxe/IMap.js":
/*!*******************************!*\
!*** ./lib/_gen/haxe/IMap.js ***!
\*******************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: haxe.IMap
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
// Constructor
var IMap = function() {}
// Meta
IMap.__name__ = ["haxe","IMap"];
IMap.__isInterface__ = true;
IMap.prototype = {
};
IMap.prototype.__class__ = IMap.prototype.constructor = $hxClasses["haxe.IMap"] = IMap;
// Init
// Statics
// Export
exports["default"] = IMap;
/***/ }),
/***/ "./lib/_gen/haxe/ds/ObjectMap.js":
/*!***************************************!*\
!*** ./lib/_gen/haxe/ds/ObjectMap.js ***!
\***************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: haxe.ds.ObjectMap
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function haxe_IMap() {return __webpack_require__(/*! ./../../haxe/IMap */ "./lib/_gen/haxe/IMap.js");}
function HxOverrides() {return __webpack_require__(/*! ./../../HxOverrides */ "./lib/_gen/HxOverrides.js");}
// Constructor
var ObjectMap = function() {
this.h = { __keys__ : { }};
}
// Meta
ObjectMap.__name__ = ["haxe","ds","ObjectMap"];
ObjectMap.__isInterface__ = false;
ObjectMap.__interfaces__ = [(haxe_IMap().default)];
ObjectMap.prototype = {
set: function(key,value) {
var id = ObjectMap.getId(key) || ObjectMap.assignId(key);
this.h[id] = value;
this.h.__keys__[id] = key;
},
get: function(key) {
return this.h[ObjectMap.getId(key)];
},
exists: function(key) {
return this.h.__keys__[ObjectMap.getId(key)] != null;
},
remove: function(key) {
var id = ObjectMap.getId(key);
if(this.h.__keys__[id] == null) {
return false;
}
delete(this.h[id]);
delete(this.h.__keys__[id]);
return true;
},
keys: function() {
var a = [];
for( var key in this.h.__keys__ ) {
if(this.h.hasOwnProperty(key)) {
a.push(this.h.__keys__[key]);
}
}
return (HxOverrides().default).iter(a);
},
iterator: function() {
return { ref : this.h, it : this.keys(), hasNext : function() {
return this.it.hasNext();
}, next : function() {
var i = this.it.next();
return this.ref[ObjectMap.getId(i)];
}};
}
};
ObjectMap.prototype.__class__ = ObjectMap.prototype.constructor = $hxClasses["haxe.ds.ObjectMap"] = ObjectMap;
// Init
// Statics
ObjectMap.assignId = function(obj) {
return obj.__id__ = ++ObjectMap.count;
}
ObjectMap.getId = function(obj) {
return obj.__id__;
}
ObjectMap.count = 0
// Export
exports["default"] = ObjectMap;
/***/ }),
/***/ "./lib/_gen/hxClasses_stub.js":
/*!************************************!*\
!*** ./lib/_gen/hxClasses_stub.js ***!
\************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({value: true}));
exports["default"] = {
Enum: {}
};
/***/ }),
/***/ "./lib/_gen/import_stub.js":
/*!*********************************!*\
!*** ./lib/_gen/import_stub.js ***!
\*********************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({value: true}));
// exports.default = function $import(obj) {
// if(obj && obj.__esModule) {
// // if(!obj.hasOwnProperty('default')) obj.default = obj;
// return obj;
// } else {
// var newObj = {};
// if (obj != null) {
// for (var key in obj) {
// if (Object.prototype.hasOwnProperty.call(obj, key))
// newObj[key] = obj[key];
// }
// }
// newObj.default = obj;
// return newObj;
// }
// }
exports["default"] = function $import(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/***/ }),
/***/ "./lib/_gen/js/Boot.js":
/*!*****************************!*\
!*** ./lib/_gen/js/Boot.js ***!
\*****************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: js.Boot
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./../js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function Std() {return __webpack_require__(/*! ./../Std */ "./lib/_gen/Std.js");}
// Constructor
var Boot = function(){}
// Meta
Boot.__name__ = ["js","Boot"];
Boot.__isInterface__ = false;
Boot.prototype = {
};
Boot.prototype.__class__ = Boot.prototype.constructor = $hxClasses["js.Boot"] = Boot;
// Init
// Statics
Boot.isClass = function(o) {
return o.__name__;
}
Boot.isEnum = function(e) {
return e.__ename__;
}
Boot.getClass = function(o) {
if((o instanceof Array) && o.__enum__ == null) {
return Array
} else {
var cl = o.__class__;
if(cl != null) {
return cl;
}
var name = Boot.__nativeClassName(o);
if(name != null) {
return Boot.__resolveNativeClass(name);
}
return null;
}
}
Boot.__string_rec = function(o,s) {
if(o == null) {
return "null";
}
if(s.length >= 5) {
return "<...>";
}
var t = typeof(o);
if(t == "function" && (Boot.isClass(o) || Boot.isEnum(o))) {
t = "object";
}
switch(t) {
case "function":
return "<function>";
case "object":
if(o instanceof Array) {
if(o.__enum__) {
if(o.length == 2) {
return o[0];
}
var str = o[0] + "(";
s += "\t";
var _g1 = 2;
var _g = o.length;
while(_g1 < _g) {
var i = _g1++;
if(i != 2) {
str += "," + Boot.__string_rec(o[i],s);
} else {
str += Boot.__string_rec(o[i],s);
}
}
return str + ")";
}
var l = o.length;
var i1;
var str1 = "[";
s += "\t";
var _g11 = 0;
var _g2 = l;
while(_g11 < _g2) {
var i2 = _g11++;
str1 += (i2 > 0 ? "," : "") + Boot.__string_rec(o[i2],s);
}
str1 += "]";
return str1;
}
var tostr;
try {
tostr = o.toString;
} catch( e ) {
return "???";
}
if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
var s2 = o.toString();
if(s2 != "[object Object]") {
return s2;
}
}
var k = null;
var str2 = "{\n";
s += "\t";
var hasp = o.hasOwnProperty != null;
for( var k in o ) {
if(hasp && !o.hasOwnProperty(k)) {
continue;
}
if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
continue;
}
if(str2.length != 2) {
str2 += ", \n";
}
str2 += s + k + " : " + Boot.__string_rec(o[k],s);
}
s = s.substring(1);
str2 += "\n" + s + "}";
return str2;
case "string":
return o;
default:
return String(o);
}
}
Boot.__interfLoop = function(cc,cl) {
if(cc == null) {
return false;
}
if(cc == cl) {
return true;
}
var intf = cc.__interfaces__;
if(intf != null) {
var _g1 = 0;
var _g = intf.length;
while(_g1 < _g) {
var i = _g1++;
var i1 = intf[i];
if(i1 == cl || Boot.__interfLoop(i1,cl)) {
return true;
}
}
}
return Boot.__interfLoop(cc.__super__,cl);
}
Boot.__instanceof = function(o,cl) {
if(cl == null) {
return false;
}
switch(cl) {
case Array:
if((o instanceof Array)) {
return o.__enum__ == null;
} else {
return false;
}
break;
case $hxClasses["Bool"]:
return typeof(o) == "boolean";
case $hxClasses["Dynamic"]:
return true;
case $hxClasses["Float"]:
return typeof(o) == "number";
case $hxClasses["Int"]:
if(typeof(o) == "number") {
return (o|0) === o;
} else {
return false;
}
break;
case String:
return typeof(o) == "string";
default:
if(o != null) {
if(typeof(cl) == "function") {
if(o instanceof cl) {
return true;
}
if(Boot.__interfLoop(Boot.getClass(o),cl)) {
return true;
}
} else if(typeof(cl) == "object" && Boot.__isNativeObj(cl)) {
if(o instanceof cl) {
return true;
}
}
} else {
return false;
}
if(cl == $hxClasses["Class"] ? o.__name__ != null : false) {
return true;
}
if(cl == $hxClasses["Enum"] ? o.__ename__ != null : false) {
return true;
}
return o.__enum__ == cl;
}
}
Boot.__cast = function(o,t) {
if(Boot.__instanceof(o,t)) {
return o;
} else {
throw new (js__$Boot_HaxeError().default)("Cannot cast " + (Std().default).string(o) + " to " + (Std().default).string(t));
}
}
Boot.__nativeClassName = function(o) {
var name = Boot.__toStr.call(o).slice(8,-1);
if(name == "Object" || name == "Function" || name == "Math" || name == "JSON") {
return null;
}
return name;
}
Boot.__isNativeObj = function(o) {
return Boot.__nativeClassName(o) != null;
}
Boot.__resolveNativeClass = function(name) {
return $global[name];
}
Boot.__toStr = ({ }).toString
// Export
exports["default"] = Boot;
/***/ }),
/***/ "./lib/_gen/js/_Boot/HaxeError.js":
/*!****************************************!*\
!*** ./lib/_gen/js/_Boot/HaxeError.js ***!
\****************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: js._Boot.HaxeError
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
var $extend = (__webpack_require__(/*! ./../../extend_stub */ "./lib/_gen/extend_stub.js")["default"]);
// Constructor
var HaxeError = function(val) {
Error.call(this);
this.val = val;
this.message = String(val);
if(Error.captureStackTrace) {
Error.captureStackTrace(this,HaxeError);
}
}
// Meta
HaxeError.__name__ = ["js","_Boot","HaxeError"];
HaxeError.__isInterface__ = false;
HaxeError.__super__ = Error;
HaxeError.prototype = $extend(Error.prototype, {
});
HaxeError.prototype.__class__ = HaxeError.prototype.constructor = $hxClasses["js._Boot.HaxeError"] = HaxeError;
// Init
// Statics
HaxeError.wrap = function(val) {
if((val instanceof Error)) {
return val;
} else {
return new HaxeError(val);
}
}
// Export
exports["default"] = HaxeError;
/***/ }),
/***/ "./lib/_gen/motion/Actuate.js":
/*!************************************!*\
!*** ./lib/_gen/motion/Actuate.js ***!
\************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion.Actuate
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion_actuators_SimpleActuator() {return __webpack_require__(/*! ./../motion/actuators/SimpleActuator */ "./lib/_gen/motion/actuators/SimpleActuator.js");}
function motion_easing_Expo() {return __webpack_require__(/*! ./../motion/easing/Expo */ "./lib/_gen/motion/easing/Expo.js");}
function haxe_ds_ObjectMap() {return __webpack_require__(/*! ./../haxe/ds/ObjectMap */ "./lib/_gen/haxe/ds/ObjectMap.js");}
function Type() {return __webpack_require__(/*! ./../Type */ "./lib/_gen/Type.js");}
function motion__$Actuate_EffectsOptions() {return __webpack_require__(/*! ./../motion/_Actuate/EffectsOptions */ "./lib/_gen/motion/_Actuate/EffectsOptions.js");}
function motion_actuators_MotionPathActuator() {return __webpack_require__(/*! ./../motion/actuators/MotionPathActuator */ "./lib/_gen/motion/actuators/MotionPathActuator.js");}
function Std() {return __webpack_require__(/*! ./../Std */ "./lib/_gen/Std.js");}
function motion_actuators_IGenericActuator() {return __webpack_require__(/*! ./../motion/actuators/IGenericActuator */ "./lib/_gen/motion/actuators/IGenericActuator.js");}
function Reflect() {return __webpack_require__(/*! ./../Reflect */ "./lib/_gen/Reflect.js");}
function js_Boot() {return __webpack_require__(/*! ./../js/Boot */ "./lib/_gen/js/Boot.js");}
function motion__$Actuate_TweenTimer() {return __webpack_require__(/*! ./../motion/_Actuate/TweenTimer */ "./lib/_gen/motion/_Actuate/TweenTimer.js");}
function motion__$Actuate_TransformOptions() {return __webpack_require__(/*! ./../motion/_Actuate/TransformOptions */ "./lib/_gen/motion/_Actuate/TransformOptions.js");}
function HxOverrides() {return __webpack_require__(/*! ./../HxOverrides */ "./lib/_gen/HxOverrides.js");}
function motion_actuators_MethodActuator() {return __webpack_require__(/*! ./../motion/actuators/MethodActuator */ "./lib/_gen/motion/actuators/MethodActuator.js");}
// Constructor
var Actuate = function(){}
// Meta
Actuate.__name__ = ["motion","Actuate"];
Actuate.__isInterface__ = false;
Actuate.prototype = {
};
Actuate.prototype.__class__ = Actuate.prototype.constructor = $hxClasses["motion.Actuate"] = Actuate;
// Init
// Statics
Actuate.apply = function(target,properties,customActuator) {
Actuate.stop(target,properties);
if(customActuator == null) {
customActuator = Actuate.defaultActuator;
}
var actuator = (Type().default).createInstance(customActuator,[target,0,properties]);
actuator.apply();
return actuator;
}
Actuate.effects = function(target,duration,overwrite) {
if(overwrite == null) {
overwrite = true;
}
return new (motion__$Actuate_EffectsOptions().default)(target,duration,overwrite);
}
Actuate.getLibrary = function(target,allowCreation) {
if(allowCreation == null) {
allowCreation = true;
}
if(!Actuate.targetLibraries.exists(target) && allowCreation) {
Actuate.targetLibraries.set(target,[]);
}
return Actuate.targetLibraries.get(target);
}
Actuate.isActive = function() {
var result = false;
var library = Actuate.targetLibraries.iterator();
while(library.hasNext()) {
var library1 = library.next();
result = true;
break;
}
return result;
}
Actuate.motionPath = function(target,duration,properties,overwrite) {
if(overwrite == null) {
overwrite = true;
}
return Actuate.tween(target,duration,properties,overwrite,(motion_actuators_MotionPathActuator().default));
}
Actuate.pause = function(target) {
if((Std().default)["is"](target,(motion_actuators_IGenericActuator().default))) {
var actuator = target;
actuator.pause();
} else {
var library = Actuate.getLibrary(target,false);
if(library != null) {
var _g = 0;
while(_g < library.length) {
var actuator1 = library[_g];
++_g;
actuator1.pause();
}
}
}
}
Actuate.pauseAll = function() {
var library = Actuate.targetLibraries.iterator();
while(library.hasNext()) {
var library1 = library.next();
var _g = 0;
while(_g < library1.length) {
var actuator = library1[_g];
++_g;
actuator.pause();
}
}
}
Actuate.reset = function() {
var library = Actuate.targetLibraries.iterator();
while(library.hasNext()) {
var library1 = library.next();
var i = library1.length - 1;
while(i >= 0) {
library1[i].stop(null,false,false);
--i;
}
}
Actuate.targetLibraries = new (haxe_ds_ObjectMap().default)();
}
Actuate.resume = function(target) {
if((Std().default)["is"](target,(motion_actuators_IGenericActuator().default))) {
var actuator = target;
actuator.resume();
} else {
var library = Actuate.getLibrary(target,false);
if(library != null) {
var _g = 0;
while(_g < library.length) {
var actuator1 = library[_g];
++_g;
actuator1.resume();
}
}
}
}
Actuate.resumeAll = function() {
var library = Actuate.targetLibraries.iterator();
while(library.hasNext()) {
var library1 = library.next();
var _g = 0;
while(_g < library1.length) {
var actuator = library1[_g];
++_g;
actuator.resume();
}
}
}
Actuate.stop = function(target,properties,complete,sendEvent) {
if(sendEvent == null) {
sendEvent = true;
}
if(complete == null) {
complete = false;
}
if(target != null) {
if((Std().default)["is"](target,(motion_actuators_IGenericActuator().default))) {
var actuator = target;
actuator.stop(null,complete,sendEvent);
} else {
var library = Actuate.getLibrary(target,false);
if(library != null) {
if(typeof(properties) == "string") {
var temp = { };
(Reflect().default).setField(temp,properties,null);
properties = temp;
} else if((properties instanceof Array) && properties.__enum__ == null) {
var temp1 = { };
var _g = 0;
var _g1 = (js_Boot().default).__cast(properties , Array);
while(_g < _g1.length) {
var property = _g1[_g];
++_g;
(Reflect().default).setField(temp1,property,null);
}
properties = temp1;
}
var i = library.length - 1;
while(i >= 0) {
library[i].stop(properties,complete,sendEvent);
--i;
}
}
}
}
}
Actuate.timer = function(duration,customActuator) {
return Actuate.tween(new (motion__$Actuate_TweenTimer().default)(0),duration,new (motion__$Actuate_TweenTimer().default)(1),false,customActuator);
}
Actuate.transform = function(target,duration,overwrite) {
if(overwrite == null) {
overwrite = true;
}
if(duration == null) {
duration = 0;
}
return new (motion__$Actuate_TransformOptions().default)(target,duration,overwrite);
}
Actuate.tween = function(target,duration,properties,overwrite,customActuator) {
if(overwrite == null) {
overwrite = true;
}
if(target != null) {
if(duration > 0) {
if(customActuator == null) {
customActuator = Actuate.defaultActuator;
}
var actuator = (Type().default).createInstance(customActuator,[target,duration,properties]);
var library = Actuate.getLibrary(actuator.target);
if(overwrite) {
var i = library.length - 1;
while(i >= 0) {
library[i].stop(actuator.properties,false,false);
--i;
}
library = Actuate.getLibrary(actuator.target);
}
library.push(actuator);
actuator.move();
return actuator;
} else {
return Actuate.apply(target,properties,customActuator);
}
}
return null;
}
Actuate.unload = function(actuator) {
var target = actuator.target;
if(Actuate.targetLibraries.exists(target)) {
(HxOverrides().default).remove(Actuate.targetLibraries.get(target),actuator);
if(Actuate.targetLibraries.get(target).length == 0) {
Actuate.targetLibraries.remove(target);
}
}
}
Actuate.update = function(target,duration,start,end,overwrite) {
if(overwrite == null) {
overwrite = true;
}
var properties = { start : start, end : end};
return Actuate.tween(target,duration,properties,overwrite,(motion_actuators_MethodActuator().default));
}
Actuate.defaultActuator = (motion_actuators_SimpleActuator().default)
Actuate.defaultEase = (motion_easing_Expo().default).easeOut
Actuate.targetLibraries = new (haxe_ds_ObjectMap().default)()
// Export
exports["default"] = Actuate;
/***/ }),
/***/ "./lib/_gen/motion/IComponentPath.js":
/*!*******************************************!*\
!*** ./lib/_gen/motion/IComponentPath.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion.IComponentPath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
// Constructor
var IComponentPath = function() {}
// Meta
IComponentPath.__name__ = ["motion","IComponentPath"];
IComponentPath.__isInterface__ = true;
IComponentPath.prototype = {
};
IComponentPath.prototype.__class__ = IComponentPath.prototype.constructor = $hxClasses["motion.IComponentPath"] = IComponentPath;
// Init
// Statics
// Export
exports["default"] = IComponentPath;
/***/ }),
/***/ "./lib/_gen/motion/MotionPath.js":
/*!***************************************!*\
!*** ./lib/_gen/motion/MotionPath.js ***!
\***************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion.MotionPath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion__$MotionPath_BezierPath() {return __webpack_require__(/*! ./../motion/_MotionPath/BezierPath */ "./lib/_gen/motion/_MotionPath/BezierPath.js");}
function motion__$MotionPath_BezierSplinePath() {return __webpack_require__(/*! ./../motion/_MotionPath/BezierSplinePath */ "./lib/_gen/motion/_MotionPath/BezierSplinePath.js");}
function motion__$MotionPath_RotationPath() {return __webpack_require__(/*! ./../motion/_MotionPath/RotationPath */ "./lib/_gen/motion/_MotionPath/RotationPath.js");}
function motion__$MotionPath_ComponentPath() {return __webpack_require__(/*! ./../motion/_MotionPath/ComponentPath */ "./lib/_gen/motion/_MotionPath/ComponentPath.js");}
// Constructor
var MotionPath = function() {
this._x = new (motion__$MotionPath_ComponentPath().default)();
this._y = new (motion__$MotionPath_ComponentPath().default)();
this._rotation = null;
}
// Meta
MotionPath.__name__ = ["motion","MotionPath"];
MotionPath.__isInterface__ = false;
MotionPath.prototype = {
bezier: function(x,y,controlX,controlY,strength) {
if(strength == null) {
strength = 1;
}
return this.bezierN(x,y,[controlX],[controlY],strength);
},
bezierN: function(x,y,controlX,controlY,strength) {
if(strength == null) {
strength = 1;
}
this._x.addPath(new (motion__$MotionPath_BezierPath().default)(x,controlX,strength));
this._y.addPath(new (motion__$MotionPath_BezierPath().default)(y,controlY,strength));
return this;
},
bezierSpline: function(x,y,strength) {
if(strength == null) {
strength = 1;
}
this._x.addPath(new (motion__$MotionPath_BezierSplinePath().default)(x,strength));
this._y.addPath(new (motion__$MotionPath_BezierSplinePath().default)(y,strength));
return this;
},
line: function(x,y,strength) {
if(strength == null) {
strength = 1;
}
return this.bezierN(x,y,[],[],strength);
},
get_rotation: function() {
if(this._rotation == null) {
this._rotation = new (motion__$MotionPath_RotationPath().default)(this._x,this._y);
}
return this._rotation;
},
get_x: function() {
return this._x;
},
get_y: function() {
return this._y;
}
};
MotionPath.prototype.__class__ = MotionPath.prototype.constructor = $hxClasses["motion.MotionPath"] = MotionPath;
// Init
Object.defineProperties(MotionPath.prototype,{ "rotation" : { get : function () { return this.get_rotation (); }}, "x" : { get : function () { return this.get_x (); }}, "y" : { get : function () { return this.get_y (); }}});
// Statics
// Export
exports["default"] = MotionPath;
/***/ }),
/***/ "./lib/_gen/motion/_Actuate/EffectsOptions.js":
/*!****************************************************!*\
!*** ./lib/_gen/motion/_Actuate/EffectsOptions.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._Actuate.EffectsOptions
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion_Actuate() {return __webpack_require__(/*! ./../../motion/Actuate */ "./lib/_gen/motion/Actuate.js");}
function motion_actuators_FilterActuator() {return __webpack_require__(/*! ./../../motion/actuators/FilterActuator */ "./lib/_gen/motion/actuators/FilterActuator.js");}
// Constructor
var EffectsOptions = function(target,duration,overwrite) {
this.target = target;
this.duration = duration;
this.overwrite = overwrite;
}
// Meta
EffectsOptions.__name__ = ["motion","_Actuate","EffectsOptions"];
EffectsOptions.__isInterface__ = false;
EffectsOptions.prototype = {
filter: function(reference,properties) {
properties.filter = reference;
return (motion_Actuate().default).tween(this.target,this.duration,properties,this.overwrite,(motion_actuators_FilterActuator().default));
}
};
EffectsOptions.prototype.__class__ = EffectsOptions.prototype.constructor = $hxClasses["motion._Actuate.EffectsOptions"] = EffectsOptions;
// Init
// Statics
// Export
exports["default"] = EffectsOptions;
/***/ }),
/***/ "./lib/_gen/motion/_Actuate/TransformOptions.js":
/*!******************************************************!*\
!*** ./lib/_gen/motion/_Actuate/TransformOptions.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._Actuate.TransformOptions
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion_Actuate() {return __webpack_require__(/*! ./../../motion/Actuate */ "./lib/_gen/motion/Actuate.js");}
function motion_actuators_TransformActuator() {return __webpack_require__(/*! ./../../motion/actuators/TransformActuator */ "./lib/_gen/motion/actuators/TransformActuator.js");}
// Constructor
var TransformOptions = function(target,duration,overwrite) {
this.target = target;
this.duration = duration;
this.overwrite = overwrite;
}
// Meta
TransformOptions.__name__ = ["motion","_Actuate","TransformOptions"];
TransformOptions.__isInterface__ = false;
TransformOptions.prototype = {
color: function(value,strength,alpha) {
if(strength == null) {
strength = 1;
}
if(value == null) {
value = 0;
}
var properties = { colorValue : value, colorStrength : strength};
if(alpha != null) {
properties.colorAlpha = alpha;
}
return (motion_Actuate().default).tween(this.target,this.duration,properties,this.overwrite,(motion_actuators_TransformActuator().default));
},
sound: function(volume,pan) {
var properties = { };
if(volume != null) {
properties.soundVolume = volume;
}
if(pan != null) {
properties.soundPan = pan;
}
return (motion_Actuate().default).tween(this.target,this.duration,properties,this.overwrite,(motion_actuators_TransformActuator().default));
}
};
TransformOptions.prototype.__class__ = TransformOptions.prototype.constructor = $hxClasses["motion._Actuate.TransformOptions"] = TransformOptions;
// Init
// Statics
// Export
exports["default"] = TransformOptions;
/***/ }),
/***/ "./lib/_gen/motion/_Actuate/TweenTimer.js":
/*!************************************************!*\
!*** ./lib/_gen/motion/_Actuate/TweenTimer.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._Actuate.TweenTimer
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
// Constructor
var TweenTimer = function(progress) {
this.progress = progress;
}
// Meta
TweenTimer.__name__ = ["motion","_Actuate","TweenTimer"];
TweenTimer.__isInterface__ = false;
TweenTimer.prototype = {
};
TweenTimer.prototype.__class__ = TweenTimer.prototype.constructor = $hxClasses["motion._Actuate.TweenTimer"] = TweenTimer;
// Init
// Statics
// Export
exports["default"] = TweenTimer;
/***/ }),
/***/ "./lib/_gen/motion/_MotionPath/BezierPath.js":
/*!***************************************************!*\
!*** ./lib/_gen/motion/_MotionPath/BezierPath.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._MotionPath.BezierPath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion_IComponentPath() {return __webpack_require__(/*! ./../../motion/IComponentPath */ "./lib/_gen/motion/IComponentPath.js");}
// Constructor
var BezierPath = function(end,control,strength) {
this._end = end;
this.control = control;
this.strength = strength;
}
// Meta
BezierPath.__name__ = ["motion","_MotionPath","BezierPath"];
BezierPath.__isInterface__ = false;
BezierPath.__interfaces__ = [(motion_IComponentPath().default)];
BezierPath.prototype = {
calculate: function(k) {
var l = 1 - k;
var _g = this.control.length;
switch(_g) {
case 0:
return l * this._start + k * this._end;
case 1:
return l * l * this._start + 2 * l * k * this.control[0] + k * k * this._end;
case 2:
return l * l * l * this._start + 3 * l * l * k * this.control[0] + 3 * l * k * k * this.control[1] + k * k * k * this._end;
default:
if(l < 1e-7) {
return this._end;
}
var r = k / l;
var n = this.control.length + 1;
var coeff = Math.pow(l,n);
var res = coeff * this._start;
var _g1 = 1;
var _g2 = n;
while(_g1 < _g2) {
var i = _g1++;
coeff *= r * (n + 1 - i) / i;
res += coeff * this.control[i - 1];
}
coeff *= r / n;
return res + coeff * this._end;
}
},
get_start: function() {
return this._start;
},
set_start: function(value) {
return this._start = value;
},
get_end: function() {
return this._end;
}
};
BezierPath.prototype.__class__ = BezierPath.prototype.constructor = $hxClasses["motion._MotionPath.BezierPath"] = BezierPath;
// Init
// Statics
// Export
exports["default"] = BezierPath;
/***/ }),
/***/ "./lib/_gen/motion/_MotionPath/BezierSplinePath.js":
/*!*********************************************************!*\
!*** ./lib/_gen/motion/_MotionPath/BezierSplinePath.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._MotionPath.BezierSplinePath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
var $extend = (__webpack_require__(/*! ./../../extend_stub */ "./lib/_gen/extend_stub.js")["default"]);
function motion__$MotionPath_ComponentPath() {return __webpack_require__(/*! ./../../motion/_MotionPath/ComponentPath */ "./lib/_gen/motion/_MotionPath/ComponentPath.js");}
function motion__$MotionPath_BezierPath() {return __webpack_require__(/*! ./../../motion/_MotionPath/BezierPath */ "./lib/_gen/motion/_MotionPath/BezierPath.js");}
// Constructor
var BezierSplinePath = function(through,strength) {
(motion__$MotionPath_ComponentPath().default).call(this);
this.through = through;
this.strength = strength;
}
// Meta
BezierSplinePath.__name__ = ["motion","_MotionPath","BezierSplinePath"];
BezierSplinePath.__isInterface__ = false;
BezierSplinePath.__super__ = (motion__$MotionPath_ComponentPath().default);
BezierSplinePath.prototype = $extend((motion__$MotionPath_ComponentPath().default).prototype, {
computeControlPoints: function(start) {
var K = [start].concat(this.through);
var n = K.length;
var _g = [];
var _g2 = 0;
var _g1 = n;
while(_g2 < _g1) {
var _ = _g2++;
_g.push([0.0,0.0]);
}
var control = _g;
var a = [];
var b = [];
var c = [];
var r = [];
a[0] = 0;
b[0] = 2;
c[0] = 1;
r[0] = K[0] + 2 * K[1];
var _g21 = 1;
var _g11 = n - 1;
while(_g21 < _g11) {
var i = _g21++;
a[i] = 1;
b[i] = 4;
c[i] = 1;
r[i] = 4 * K[i] + 2 * K[i + 1];
}
a[n - 1] = 1;
b[n - 1] = 2;
c[n - 1] = 0;
r[n - 1] = 3 * K[n - 1];
var _g22 = 1;
var _g12 = n;
while(_g22 < _g12) {
var i1 = _g22++;
var m = a[i1] / b[i1 - 1];
b[i1] -= m * c[i1 - 1];
r[i1] -= m * r[i1 - 1];
}
control[n - 1][0] = r[n - 1] / b[n - 1];
var i2 = n - 2;
while(i2 >= 0) {
control[i2][0] = (r[i2] - c[i2] * control[i2 + 1][0]) / b[i2];
--i2;
}
var _g23 = 0;
var _g13 = n - 1;
while(_g23 < _g13) {
var i3 = _g23++;
control[i3][1] = 2 * K[i3 + 1] - control[i3 + 1][0];
}
control[n - 1][1] = 0.5 * (K[n] + control[n - 1][0]);
control.pop();
return control;
},
set_start: function(value) {
if(this.paths.length == 0 || Math.abs(value - this.get_start()) > 1e-7) {
var control = this.computeControlPoints(value);
var pathStrength = this.strength / control.length;
this.strength = 0;
this.paths.splice(0,this.paths.length);
var _g1 = 0;
var _g = control.length;
while(_g1 < _g) {
var i = _g1++;
this.addPath(new (motion__$MotionPath_BezierPath().default)(this.through[i],control[i],pathStrength));
}
}
return (motion__$MotionPath_ComponentPath().default).prototype.set_start.call(this,value);
},
get_end: function() {
return this.through[this.through.length - 1];
}
});
BezierSplinePath.prototype.__class__ = BezierSplinePath.prototype.constructor = $hxClasses["motion._MotionPath.BezierSplinePath"] = BezierSplinePath;
// Init
// Statics
// Export
exports["default"] = BezierSplinePath;
/***/ }),
/***/ "./lib/_gen/motion/_MotionPath/ComponentPath.js":
/*!******************************************************!*\
!*** ./lib/_gen/motion/_MotionPath/ComponentPath.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._MotionPath.ComponentPath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
function motion_IComponentPath() {return __webpack_require__(/*! ./../../motion/IComponentPath */ "./lib/_gen/motion/IComponentPath.js");}
// Constructor
var ComponentPath = function() {
this.paths = [];
this.strength = 0;
}
// Meta
ComponentPath.__name__ = ["motion","_MotionPath","ComponentPath"];
ComponentPath.__isInterface__ = false;
ComponentPath.__interfaces__ = [(motion_IComponentPath().default)];
ComponentPath.prototype = {
addPath: function(path) {
if(this.paths.length > 0) {
path.set_start(this.paths[this.paths.length - 1].get_end());
}
this.paths.push(path);
this.strength += path.strength;
},
calculate: function(k) {
if(this.paths.length == 1) {
return this.paths[0].calculate(k);
} else {
var ratio = k * this.strength;
var _g = 0;
var _g1 = this.paths;
while(_g < _g1.length) {
var path = _g1[_g];
++_g;
if(ratio - path.strength > 1e-7) {
ratio -= path.strength;
} else {
return path.calculate(ratio / path.strength);
}
}
}
return 0;
},
get_start: function() {
if(this.paths.length > 0) {
return this.paths[0].get_start();
} else {
return 0;
}
},
set_start: function(value) {
if(this.paths.length > 0) {
return this.paths[0].set_start(value);
} else {
return 0;
}
},
get_end: function() {
if(this.paths.length > 0) {
var path = this.paths[this.paths.length - 1];
return path.get_end();
} else {
return this.get_start();
}
}
};
ComponentPath.prototype.__class__ = ComponentPath.prototype.constructor = $hxClasses["motion._MotionPath.ComponentPath"] = ComponentPath;
// Init
// Statics
// Export
exports["default"] = ComponentPath;
/***/ }),
/***/ "./lib/_gen/motion/_MotionPath/RotationPath.js":
/*!*****************************************************!*\
!*** ./lib/_gen/motion/_MotionPath/RotationPath.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: motion._MotionPath.RotationPath
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function motion_IComponentPath() {return __webpack_require__(/*! ./../../motion/IComponentPath */ "./lib/_gen/motion/IComponentPath.js");}
// Constructor
var RotationPath = function(x,y) {
this.step = 0.01;
this._x = x;
this._y = y;
this.offset = 0;
this.set_start(this.calculate(0.0));
}
// Meta
RotationPath.__name__ = ["motion","_MotionPath","RotationPath"];
RotationPath.__isInterface__ = false;
RotationPath.__interfaces__ = [(motion_IComponentPath().default)];
RotationPath.prototype = {
calculate: function(k) {
var dX = this._x.calculate(k) - this._x.calculate(k + this.step);
var dY = this._y.calculate(k) - this._y.calculate(k + this.step);
var angle = Math.atan2(dY,dX) * (180 / Math.PI);
angle = (angle + this.offset) % 360;
return angle;
},
get_start: function() {
return this._start;
},
set_start: function(value) {
return this._start;
},
get_end: function() {
return this.calculate(1.0);
}
};
Rotati