Permalink
Browse files

Merge.

  • Loading branch information...
2 parents e176d3e + f3ed9da commit 4b4edc40752a763654126acebc3cc10bf3fbe08a @jeremyckahn committed Apr 1, 2012
Showing with 29 additions and 29 deletions.
  1. +6 −6 dist/rekapi.bundle.min.js
  2. +17 −17 dist/rekapi.js
  3. +5 −5 dist/rekapi.min.js
  4. +1 −1 version.txt
View
12 dist/rekapi.bundle.min.js
@@ -1,5 +1,5 @@
/**
- * Rekapi - Rewritten Kapi. v0.5.0
+ * Rekapi - Rewritten Kapi. v0.5.1
* By Jeremy Kahn - jeremyckahn@gmail.com
* https://github.com/jeremyckahn/rekapi
*
@@ -46,7 +46,7 @@ arguments);return u(this._wrapped,this._chain)}});j(["concat","join","slice"],fu
*/
(function(){var a;(function(b){function f(a,b){var c;for(c in a)a.hasOwnProperty(c)&&b(a,c)}function g(a,b){return f(b,function(b,c){a[c]=b[c]}),a}function h(a,b){return f(b,function(b,c){typeof a[c]=="undefined"&&(a[c]=b[c])}),a}function i(a,b,c){var d,f;f=(a-b.timestamp)/b.duration;for(d in c.current)c.current.hasOwnProperty(d)&&b.to.hasOwnProperty(d)&&(c.current[d]=j(b.originalState[d],b.to[d],e[b.easing[d]],f));return c.current}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){return setTimeout(a,1e3/b)}function l(a,b,c,d){var e;for(e=0;e<b[a].length;e++)b[a][e].apply(c,d)}function m(b,c,d){f(a.prototype.filter,function(a,e){a[e][b]&&a[e][b].apply(c,d)})}function n(a,b){var d=a.timestamp+a.duration,e=Math.min(c(),d),f=e>=d;b.isTweening&&(f||(b.loopId=k(function(){n(a,b)},a.owner.fps)),m("beforeTween",a.owner,[b.current,a.originalState,a.to]),i(e,a,b),m("afterTween",a.owner,[b.current,a.originalState,a.to]),a.hook.step&&l("step",a.hook,a.owner,[b.current]),a.step&&a.step.call(b.current,b.current)),(f||!b.isTweening)&&a.owner.stop(!0)}function o(a,b){var c;return c={},typeof b=="string"?f(a,function(a,d){c[d]=b}):f(a,function(a,e){c[e]||(c[e]=b[e]||d)}),c}var c,d="linear",e;typeof SHIFTY_DEBUG_NOW=="function"?c=SHIFTY_DEBUG_NOW:c=function(){return+(new Date)},typeof SHIFTY_DEBUG_NOW=="function"&&(b.timeoutHandler=n),a=function(a){return a=a||{},this._hook={},this._tweenParams={owner:this,hook:this._hook,data:{}},this._state={},this._state.current=a.initialState||{},this.fps=a.fps||30,this.easing=a.easing||d,this.duration=a.duration||500,this},a.prototype.tween=function(a,b,d,e,f){var i,j,k;if(this._state.isTweening)return;return i=this,j=this._tweenParams,k=this._state,this._state.loopId=0,this._state.pausedAtTime=null,b?(j.to=b||{},j.duration=d||this.duration,j.callback=e,j.easing=f||this.easing,k.current=a||{}):(j.step=a.step,j.callback=a.callback,j.to=a.to||a.target||{},j.duration=a.duration||this.duration,j.easing=a.easing||this.easing,k.current=a.from||{}),j.timestamp=c(),h(k.current,j.to),h(j.to,k.current),j.easing=o(k.current,j.easing),m("tweenCreated",j.owner,[k.current,j.originalState,j.to]),j.originalState=g({},k.current),k.isTweening=!0,this.resume(),a.start&&a.start(),this},a.prototype.to=function(b,c,d,e){return arguments.length===1?"to"in b?(b.from=this.get(),this.tween(b)):this.tween(this.get(),b):this.tween(this.get(),b,c,d,e),this},a.prototype.get=function(){return this._state.current},a.prototype.set=function(a){return this._state.current=a||{},this},a.prototype.stop=function(a){return clearTimeout(this._state.loopId),this._state.isTweening=!1,a&&(g(this._state.current,this._tweenParams.to),m("afterTweenEnd",this,[this._state.current,this._tweenParams.originalState,this._tweenParams.to]),this._tweenParams.callback&&this._tweenParams.callback.call(this._state.current,this._state.current)),this},a.prototype.pause=function(){return clearTimeout(this._state.loopId),this._state.pausedAtTime=c(),this._state.isPaused=!0,this},a.prototype.resume=function(){var a;return a=this,this._state.isPaused&&(this._tweenParams.timestamp+=c()-this._state.pausedAtTime),n(a._tweenParams,a._state),this},a.prototype.hookAdd=function(a,b){this._hook.hasOwnProperty(a)||(this._hook[a]=[]),this._hook[a].push(b)},a.prototype.hookRemove=function(a,b){var c;if(!this._hook.hasOwnProperty(a))return;if(!b){this._hook[a]=[];return}for(c=this._hook[a].length;c>=0;c++)this._hook[a][c]===b&&this._hook[a].splice(c,1)},a.prototype.filter={},a.util={now:c,each:f,tweenProps:i,tweenProp:j,applyFilter:m,simpleCopy:g,weakCopy:h,composeEasingObject:o},e=a.prototype.formula={linear:function(a){return a}},typeof exports=="object"?module.exports=a:typeof define=="function"&&define.amd?define(function(){return a}):typeof b.Tweenable=="undefined"&&(b.Tweenable=a)})(this),function(){a.util.simpleCopy(a.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-0.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-0.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-0.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return a==0?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return a==1?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return a==0?0:a==1?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return(a/=.5)<1?-0.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin((a*6-1)*2*Math.PI/2)+1},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?2-(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-0.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function c(a){a.shift(),a.length?a[0]():a.running=!1}function d(a,b){return function(){a(),c(b)}}function e(a,b,c,d,e,f){return function(){c?a.tween(b,c,d,e,f):(b.callback=e,b.from?a.tween(b):a.to(b))}}var b=function(){};a.prototype.queue=function(a,c,f,g,h){var i;return this._tweenQueue||(this._tweenQueue=[]),g=g||a.callback||b,i=d(g,this._tweenQueue),this._tweenQueue.push(e(this,a,c,f,i,h)),this},a.prototype.queueStart=function(){return!this._tweenQueue.running&&this._tweenQueue.length>0&&(this._tweenQueue[0](),this._tweenQueue.running=!0),this},a.prototype.queueShift=function(){return this._tweenQueue.shift(),this},a.prototype.queuePop=function(){return this._tweenQueue.pop(),this},a.prototype.queueEmpty=function(){return this._tweenQueue.length=0,this},a.prototype.queueLength=function(){return this._tweenQueue.length}}(),function(){function f(a){return parseInt(a,16)}function g(a){return a=a.replace(/#/g,""),a.length===3&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),[f(a.substr(0,2)),f(a.substr(2,2)),f(a.substr(4,2))]}function h(a){var b,c;return b=g(a),c="rgb("+b[0]+","+b[1]+","+b[2]+")",c}function i(a){return typeof a=="string"&&(b.test(a)||c.test(a)||d.test(a))}function j(a){return typeof a=="string"&&(b.test(a)||c.test(a))}function k(b){a.util.each(b,function(a,b){j(a[b])&&(a[b]=h(a[b]))})}function l(b){var c;return c=[],a.util.each(b,function(a,b){i(a[b])&&c.push(b)}),c}function m(a){return a.match(/(\d+)/g)}function n(a,b){var c,d,e;d=b.length;for(c=0;c<d;c++)e=m(a[b[c]]),a["__r__"+b[c]]=+e[0],a["__g__"+b[c]]=+e[1],a["__b__"+b[c]]=+e[2],delete a[b[c]]}function o(a,b){var c,d;d=b.length;for(c=0;c<d;c++)a[b[c]]="rgb("+parseInt(a["__r__"+b[c]],10)+","+parseInt(a["__g__"+b[c]],10)+","+parseInt(a["__b__"+b[c]],10)+")",delete a["__r__"+b[c]],delete a["__g__"+b[c]],delete a["__b__"+b[c]]}function p(a,b){var c,d;d=b.length;for(c=0;c<d;c++)a["__r__"+b[c]]=a[b[c]],a["__g__"+b[c]]=a[b[c]],a["__b__"+b[c]]=a[b[c]]}function q(a,b){var c,d;d=b.length;for(c=0;c<d;c++)delete a["__r__"+b[c]],delete a["__g__"+b[c]],delete a["__b__"+b[c]]}var b=/^#([0-9]|[a-f]){3}$/i,c=/^#([0-9]|[a-f]){6}$/i,d=/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)\s*$/i,e;if(!a)return;a.prototype.filter.color={tweenCreated:function(a,b,c){k(a),k(b),k(c)},beforeTween:function(a,b,c){e=l(b),n(a,e),n(b,e),n(c,e),p(this._tweenParams.easing,e)},afterTween:function(a,b,c){o(a,e),o(b,e),o(c,e),q(this._tweenParams.easing,e)}}}(),function(){function e(a){return typeof a=="string"&&b.test(a)}function f(c){var d;return d={},a.util.each(c,function(a,c){e(a[c])&&(d[c]={suffix:a[c].match(b)[0]})}),d}function g(b,d){a.util.each(d,function(a,d){b[d]=+b[d].replace(c,"")})}function h(b,c){a.util.each(c,function(a,c){b[c]=b[c]+a[c].suffix})}var b=/(px|em|%|pc|pt|mm|cm|in|ex)/i,c=/([a-z]|%)/gi,d;a.prototype.filter.token={beforeTween:function(a,b,c){d=f(b),g(a,d),g(b,d),g(c,d)},afterTween:function(a,b,c){h(a,d),h(b,d),h(c,d)}}}(),function(){function b(b,c,d,e,f){var g;return g=a.util.composeEasingObject(b,f),a.util.tweenProps(e,{originalState:b,to:d,timestamp:0,duration:1,easing:g},{current:c})}if(!a)return;a.util.interpolate=function(c,d,e,f){var g,h,i;return c&&c.from&&(d=c.to,e=c.position,f=c.easing,c=c.from),i=new a,i._tweenParams.easing=f||"linear",g=a.util.simpleCopy({},c),a.util.applyFilter("tweenCreated",i,[g,c,d]),a.util.applyFilter("beforeTween",i,[g,c,d]),h=b(c,g,d,e,i._tweenParams.easing),a.util.applyFilter("afterTween",i,[h,c,d]),h},a.prototype.interpolate=function(b,c,d){var e;return e=a.util.interpolate(this.get(),b,c,d),this.set(e),e}}(),function(){var b=!1;a.util.enableRounding=function(){b=!0},a.util.disableRounding=function(){b=!1},a.util.isRoundingEnabled=function(){return b},a.prototype.filter.round={afterTween:function(c,d,e){b&&a.util.each(c,function(a,b){a[b].replace||(a[b]=Math.round(a[b]))})}}}()})();
/**
- * Rekapi - Rewritten Kapi. v0.5.0
+ * Rekapi - Rewritten Kapi. v0.5.1
* By Jeremy Kahn - jeremyckahn@gmail.com
* https://github.com/jeremyckahn/rekapi
*
@@ -80,9 +80,9 @@ d){this._timelinePropertyCacheIndex[d]=+a},this);h.util.sortNumerically(this._ti
e.prototype.canvas_height=function(g){return j(this.canvas,this._contextType,"height",g)};e.prototype.canvas_width=function(g){return j(this.canvas,this._contextType,"width",g)};e.prototype.canvas_style=function(g,e){"undefined"!==typeof e&&this.canvas.style&&(this.canvas.style[g]=e);return this.canvas.style[g]};e.prototype.canvas_clear=function(){"canvas"===this._contextType&&this.canvas_getContext().clearRect(0,0,this.canvas_width(),this.canvas_height());return this}})(this);
(function(e){e=e.Kapi;e.KeyframeProperty=function(e,g,i,k,m){this.id=_.uniqueId("keyframeProperty_");this.ownerActor=e;this.millisecond=g;this.name=i;this.value=k;this.easing=m||"linear";this.nextProperty=null;return this};e.KeyframeProperty.prototype.modifyWith=function(e){var g={};_.each(["millisecond","easing","value"],function(i){g[i]="undefined"===typeof e[i]?this[i]:e[i]},this);_.extend(this,g)};e.KeyframeProperty.prototype.linkToNext=function(e){this.nextProperty=e||null};e.KeyframeProperty.prototype.getValueAt=
function(e){var g,i,k;g={};i={};this.nextProperty?(g[this.name]=this.value,i[this.name]=this.nextProperty.value,k=this.nextProperty.millisecond-this.millisecond,e=(e-this.millisecond)/k,g=Tweenable.util.interpolate(g,i,e,this.nextProperty.easing)[this.name]):g=null;return g};e.KeyframeProperty.prototype.exportPropertyData=function(){return{id:this.id,millisecond:this.millisecond,name:this.name,value:this.value,easing:this.easing}}})(this);
-(function(e){var j,g;j=e.Kapi;g=["transform","webkitTransform","MozTransform","oTransform","msTransform"];if(e.getComputedStyle)j.DOMActor=function(i){var k;k=new j.Actor({setup:function(){var g=this.kapi.canvas_getContext();"static"===e.getComputedStyle(g).getPropertyValue("position")&&(this.kapi.canvas_getContext().style.position="relative");"static"===e.getComputedStyle(i).getPropertyValue("position")&&(i.style.position="absolute")},draw:function(e,j){var h;h=!1;_.each(j,function(e,a){h=!0;"rotate"===
-a?_.each(g,function(a){i.style[a]="rotate("+e+"deg)"}):i.style[a]=e});i.style.display=h?"block":"none"}});k.show=function(e){j.Actor.prototype.show.call(this,e);i.style.display="block"};k.hide=function(e){j.Actor.prototype.hide.call(this,e);i.style.display="none"};return k}})(this);
+(function(e){var j=e.Kapi,g=["transform","webkitTransform","MozTransform","oTransform","msTransform"];if(e.getComputedStyle)j.DOMActor=function(i){var k;k=new j.Actor({setup:function(){var g=this.kapi.canvas_getContext();"static"===e.getComputedStyle(g).getPropertyValue("position")&&(this.kapi.canvas_getContext().style.position="relative");"static"===e.getComputedStyle(i).getPropertyValue("position")&&(i.style.position="absolute");this.hide()},draw:function(e,j){var h;h=!1;_.each(j,function(e,a){h=
+!0;"rotate"===a?_.each(g,function(a){i.style[a]="rotate("+e+"deg)"}):i.style[a]=e});h?this.show():this.hide()}});i.classList.add(k.getCSSName());k.show=function(e){j.Actor.prototype.show.call(this,e);i.style.display="block"};k.hide=function(e){j.Actor.prototype.hide.call(this,e);i.style.display="none"};return k},e.Kapi.Actor.prototype.getCSSName=function(){return"actor-"+this.id}})(this);
(function(e,j){function g(a){var d=["{"],f;_.each(a.get(),function(a,b){var e;/rgb/.test(a)?e=a:(e=a.match(/\D*$/),e=parseFloat(a).toFixed(2)+e);f=e;d.push(b+":"+f+";")});d.push("}");return d.join("")}function i(a,d,f){var f=f||["w3"],c=[];_.each(f,function(b){b=l(n,[m[b],d,a]);c.push(b)});return c.join("\n")}function k(a,d){var d=d||["w3"],f=[],c;_.each(d,function(b){var d=[],b=m[b],e=a.getStart(),g=a.getEnd()-e,g=l(" %sanimation-duration: %sms;",[b,g]);d.push(g);g=l(" %sanimation-name: %s;",[b,
a.getCSSName()+"-keyframes"]);d.push(g);e=l(" %sanimation-delay: %sms;",[b,e]);d.push(e);b=l(" %sanimation-fill-mode: forwards;",[b]);d.push(b);c=d.join("\n");f.push(c)});return l(h,[a.getCSSName(),f.join("\n")])}var m=e.util.VENDOR_PREFIXES={microsoft:"-ms-",mozilla:"-moz-",opera:"-o-",w3:"",webkit:"-webkit-"},n="@%skeyframes %s-keyframes {\n%s\n}",h=".%s {\n position: absolute;\n%s\n}";j.Kapi.prototype.toCSS=function(a){var a=a||{},d=[],f=this.getActorIds();_.each(f,function(c){d.push(this.getActor(c).toCSS(a))},
-this);return d.join("\n")};j.Kapi.Actor.prototype.toCSS=function(a){var a=a||{},d=[],f=a.granularity||100,c=k(this,a.vendors);d.push(c);for(var c=this.getLength(),b=this.getStart(),e=[],h,j=c/f,l=c/100,f=b;f<=c+b;f+=j)this.calculatePosition(f),h=(f-b)/l,h=0===h?"from ":100===h?"to ":h.toFixed(2)+"% ",e.push(" "+h+g(this));c=e.join("\n");a=i(c,this.getCSSName(),a.vendors);d.push(a);return d.join("\n")};j.Kapi.Actor.prototype.getCSSName=function(){return"actor-"+this.id};var l=e.util.printf=function(a,
-d){var e=a;_.each(d,function(a){e=e.replace("%s",a)});return e}})(this.Rekapi,this);
+this);return d.join("\n")};j.Kapi.Actor.prototype.toCSS=function(a){var a=a||{},d=[],f=a.granularity||100,c=k(this,a.vendors);d.push(c);for(var c=this.getLength(),b=this.getStart(),e=[],h,j=c/f,l=c/100,f=b;f<=c+b;f+=j)this.calculatePosition(f),h=(f-b)/l,h=0===h?"from ":100===h?"to ":h.toFixed(2)+"% ",e.push(" "+h+g(this));c=e.join("\n");a=i(c,this.getCSSName(),a.vendors);d.push(a);return d.join("\n")};var l=e.util.printf=function(a,d){var e=a;_.each(d,function(a){e=e.replace("%s",a)});return e}})(this.Rekapi,
+this);
View
34 dist/rekapi.js
@@ -1,5 +1,5 @@
/**
- * Rekapi - Rewritten Kapi. v0.5.0
+ * Rekapi - Rewritten Kapi. v0.5.1
* By Jeremy Kahn - jeremyckahn@gmail.com
* https://github.com/jeremyckahn/rekapi
*
@@ -1500,12 +1500,8 @@
} (this));
;(function rekapiDOM (global) {
- var gk
- ,getStyle
- ,transforms;
-
- gk = global.Kapi;
- transforms = [
+ var gk = global.Kapi;
+ var transforms = [
'transform'
,'webkitTransform'
,'MozTransform'
@@ -1534,7 +1530,7 @@
/**
* @param {HTMLElement} element
- * @return {Kapi.DOMActor}
+ * @return {Kapi.Actor}
*/
gk.DOMActor = function (element) {
var actor;
@@ -1548,6 +1544,8 @@
if (getStyle(element, 'position') === 'static') {
setStyle(element, 'position', 'absolute');
}
+
+ this.hide();
}
,'draw': function (canvas_context, state) {
@@ -1567,10 +1565,12 @@
}
});
- isShowing ? showElement(element) : hideElement(element);
+ isShowing ? this.show() : this.hide();
}
});
+ element.classList.add(actor.getCSSName());
+
actor.show = function (alsoPersist) {
gk.Actor.prototype.show.call(this, alsoPersist);
showElement(element);
@@ -1584,6 +1584,14 @@
return actor;
};
+
+ /**
+ * @return {string}
+ */
+ global.Kapi.Actor.prototype.getCSSName = function () {
+ return 'actor-' + this.id;
+ };
+
}(this));
;(function (Rekapi, global) {
@@ -1661,14 +1669,6 @@
};
- /**
- * @return {string}
- */
- global.Kapi.Actor.prototype.getCSSName = function () {
- return 'actor-' + this.id;
- };
-
-
// UTILITY FUNCTIONS
//
/**
View
10 dist/rekapi.min.js
@@ -1,5 +1,5 @@
/**
- * Rekapi - Rewritten Kapi. v0.5.0
+ * Rekapi - Rewritten Kapi. v0.5.1
* By Jeremy Kahn - jeremyckahn@gmail.com
* https://github.com/jeremyckahn/rekapi
*
@@ -33,9 +33,9 @@ d){this._timelinePropertyCacheIndex[d]=+a},this);h.util.sortNumerically(this._ti
e.prototype.canvas_height=function(g){return j(this.canvas,this._contextType,"height",g)};e.prototype.canvas_width=function(g){return j(this.canvas,this._contextType,"width",g)};e.prototype.canvas_style=function(g,e){"undefined"!==typeof e&&this.canvas.style&&(this.canvas.style[g]=e);return this.canvas.style[g]};e.prototype.canvas_clear=function(){"canvas"===this._contextType&&this.canvas_getContext().clearRect(0,0,this.canvas_width(),this.canvas_height());return this}})(this);
(function(e){e=e.Kapi;e.KeyframeProperty=function(e,g,i,k,m){this.id=_.uniqueId("keyframeProperty_");this.ownerActor=e;this.millisecond=g;this.name=i;this.value=k;this.easing=m||"linear";this.nextProperty=null;return this};e.KeyframeProperty.prototype.modifyWith=function(e){var g={};_.each(["millisecond","easing","value"],function(i){g[i]="undefined"===typeof e[i]?this[i]:e[i]},this);_.extend(this,g)};e.KeyframeProperty.prototype.linkToNext=function(e){this.nextProperty=e||null};e.KeyframeProperty.prototype.getValueAt=
function(e){var g,i,k;g={};i={};this.nextProperty?(g[this.name]=this.value,i[this.name]=this.nextProperty.value,k=this.nextProperty.millisecond-this.millisecond,e=(e-this.millisecond)/k,g=Tweenable.util.interpolate(g,i,e,this.nextProperty.easing)[this.name]):g=null;return g};e.KeyframeProperty.prototype.exportPropertyData=function(){return{id:this.id,millisecond:this.millisecond,name:this.name,value:this.value,easing:this.easing}}})(this);
-(function(e){var j,g;j=e.Kapi;g=["transform","webkitTransform","MozTransform","oTransform","msTransform"];if(e.getComputedStyle)j.DOMActor=function(i){var k;k=new j.Actor({setup:function(){var g=this.kapi.canvas_getContext();"static"===e.getComputedStyle(g).getPropertyValue("position")&&(this.kapi.canvas_getContext().style.position="relative");"static"===e.getComputedStyle(i).getPropertyValue("position")&&(i.style.position="absolute")},draw:function(e,j){var h;h=!1;_.each(j,function(e,a){h=!0;"rotate"===
-a?_.each(g,function(a){i.style[a]="rotate("+e+"deg)"}):i.style[a]=e});i.style.display=h?"block":"none"}});k.show=function(e){j.Actor.prototype.show.call(this,e);i.style.display="block"};k.hide=function(e){j.Actor.prototype.hide.call(this,e);i.style.display="none"};return k}})(this);
+(function(e){var j=e.Kapi,g=["transform","webkitTransform","MozTransform","oTransform","msTransform"];if(e.getComputedStyle)j.DOMActor=function(i){var k;k=new j.Actor({setup:function(){var g=this.kapi.canvas_getContext();"static"===e.getComputedStyle(g).getPropertyValue("position")&&(this.kapi.canvas_getContext().style.position="relative");"static"===e.getComputedStyle(i).getPropertyValue("position")&&(i.style.position="absolute");this.hide()},draw:function(e,j){var h;h=!1;_.each(j,function(e,a){h=
+!0;"rotate"===a?_.each(g,function(a){i.style[a]="rotate("+e+"deg)"}):i.style[a]=e});h?this.show():this.hide()}});i.classList.add(k.getCSSName());k.show=function(e){j.Actor.prototype.show.call(this,e);i.style.display="block"};k.hide=function(e){j.Actor.prototype.hide.call(this,e);i.style.display="none"};return k},e.Kapi.Actor.prototype.getCSSName=function(){return"actor-"+this.id}})(this);
(function(e,j){function g(a){var d=["{"],f;_.each(a.get(),function(a,b){var e;/rgb/.test(a)?e=a:(e=a.match(/\D*$/),e=parseFloat(a).toFixed(2)+e);f=e;d.push(b+":"+f+";")});d.push("}");return d.join("")}function i(a,d,f){var f=f||["w3"],c=[];_.each(f,function(b){b=l(n,[m[b],d,a]);c.push(b)});return c.join("\n")}function k(a,d){var d=d||["w3"],f=[],c;_.each(d,function(b){var d=[],b=m[b],e=a.getStart(),g=a.getEnd()-e,g=l(" %sanimation-duration: %sms;",[b,g]);d.push(g);g=l(" %sanimation-name: %s;",[b,
a.getCSSName()+"-keyframes"]);d.push(g);e=l(" %sanimation-delay: %sms;",[b,e]);d.push(e);b=l(" %sanimation-fill-mode: forwards;",[b]);d.push(b);c=d.join("\n");f.push(c)});return l(h,[a.getCSSName(),f.join("\n")])}var m=e.util.VENDOR_PREFIXES={microsoft:"-ms-",mozilla:"-moz-",opera:"-o-",w3:"",webkit:"-webkit-"},n="@%skeyframes %s-keyframes {\n%s\n}",h=".%s {\n position: absolute;\n%s\n}";j.Kapi.prototype.toCSS=function(a){var a=a||{},d=[],f=this.getActorIds();_.each(f,function(c){d.push(this.getActor(c).toCSS(a))},
-this);return d.join("\n")};j.Kapi.Actor.prototype.toCSS=function(a){var a=a||{},d=[],f=a.granularity||100,c=k(this,a.vendors);d.push(c);for(var c=this.getLength(),b=this.getStart(),e=[],h,j=c/f,l=c/100,f=b;f<=c+b;f+=j)this.calculatePosition(f),h=(f-b)/l,h=0===h?"from ":100===h?"to ":h.toFixed(2)+"% ",e.push(" "+h+g(this));c=e.join("\n");a=i(c,this.getCSSName(),a.vendors);d.push(a);return d.join("\n")};j.Kapi.Actor.prototype.getCSSName=function(){return"actor-"+this.id};var l=e.util.printf=function(a,
-d){var e=a;_.each(d,function(a){e=e.replace("%s",a)});return e}})(this.Rekapi,this);
+this);return d.join("\n")};j.Kapi.Actor.prototype.toCSS=function(a){var a=a||{},d=[],f=a.granularity||100,c=k(this,a.vendors);d.push(c);for(var c=this.getLength(),b=this.getStart(),e=[],h,j=c/f,l=c/100,f=b;f<=c+b;f+=j)this.calculatePosition(f),h=(f-b)/l,h=0===h?"from ":100===h?"to ":h.toFixed(2)+"% ",e.push(" "+h+g(this));c=e.join("\n");a=i(c,this.getCSSName(),a.vendors);d.push(a);return d.join("\n")};var l=e.util.printf=function(a,d){var e=a;_.each(d,function(a){e=e.replace("%s",a)});return e}})(this.Rekapi,
+this);
View
2 version.txt
@@ -1 +1 @@
-0.5.0
+0.5.1

0 comments on commit 4b4edc4

Please sign in to comment.