X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=blobdiff_plain;f=src%2Fyuu%2Fce.js;fp=src%2Fyuu%2Fce.js;h=d604e7065fb4ae3fab29be83565d036a4e889bdd;hp=8cca5227ecc30428bca408dfec12cf36e8ebc3a4;hb=f7850752cb4d643d906f4723008b507961b434ca;hpb=de6ca4453d2a81955bba2436f69be912fd70efb0 diff --git a/src/yuu/ce.js b/src/yuu/ce.js index 8cca522..d604e70 100644 --- a/src/yuu/ce.js +++ b/src/yuu/ce.js @@ -147,7 +147,9 @@ }); - yuu.Animation = yT(yuu.C, { + var animationOps = []; + + var Animation = yuu.Animation = yT(yuu.C, { constructor: function (timeline, params, completionHandler, delay) { this.timeline = yf.mapValues(yf.arrayify, timeline); this.params = params; @@ -262,6 +264,10 @@ this.tweenAll(instr.tweenAll, instr); if (instr.event) this.event(instr.event); + animationOps.forEach(function (f) { + if (instr[f.name]) + f.call(this, instr[f.name], instr); + }, this); }, tick: function () { @@ -293,6 +299,10 @@ TAPS: ["tick", "tock"] }); + Animation.registerOperation = function (f) { + animationOps.push(f); + }; + yuu.Tween = yT({ /** Tween object properties over time