blob: 8fbc1385af7eaab7219f45756db66f7d2dc16f66 [file] [log] [blame]
var ProjectInterface = (function (){
function registerComposition(comp){
this.compositions.push(comp);
}
return function(){
function _thisProjectFunction(name){
var i = 0, len = this.compositions.length;
while(i<len){
if(this.compositions[i].data && this.compositions[i].data.nm === name){
this.compositions[i].prepareFrame(this.currentFrame);
return this.compositions[i].compInterface;
}
i+=1;
}
return this.compositions[0].compInterface;
}
_thisProjectFunction.compositions = [];
_thisProjectFunction.currentFrame = 0;
_thisProjectFunction.registerComposition = registerComposition;
return _thisProjectFunction;
}
}());