svnno****@sourc*****
svnno****@sourc*****
2009年 12月 12日 (土) 23:27:06 JST
Revision: 1459 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1459 Author: dhrname Date: 2009-12-12 23:27:06 +0900 (Sat, 12 Dec 2009) Log Message: ----------- タイムライン開始時の処理を一つの関数にまとめて、軽量化 Modified Paths: -------------- branches/05x/056/sie.js Modified: branches/05x/056/sie.js =================================================================== --- branches/05x/056/sie.js 2009-12-12 12:53:22 UTC (rev 1458) +++ branches/05x/056/sie.js 2009-12-12 14:27:06 UTC (rev 1459) @@ -334,20 +334,7 @@ } catch(e) {stlog.add(e,185);this.next();} } else { //全要素の読み込みが終われば _ie_svgfont(); - if (NAIBU.Clip.length > 0) { - NAIBU.stop = setInterval( (function(){ - var ntc = NAIBU.Time.currentFrame++; - var nc = NAIBU.Clip; - for (var i=0,ncli=nc.length;i<ncli;++i) { - nc[i]._frame(ntc); - } - if (ntc > 7000) { - clearInterval(NAIBU.stop); - } - }), - 41 - ); - } + NAIBU.Time.start(); } } catch(e) {stlog.add(e,293);this.onumber++;this.next();} }; @@ -373,20 +360,7 @@ s.set(); } } - if (NAIBU.Clip.length > 0) { - NAIBU.stop = setInterval( (function(){ - var ntc = NAIBU.Time.currentFrame++; - var nc = NAIBU.Clip; - for (var i=0,ncli=nc.length;i<ncli;++i) { - nc[i]._frame(ntc); - } - if (ntc > 7000) { - clearInterval(NAIBU.stop); - } - }), - 41 - ); - } + NAIBU.Time.start(); } catch(e) {stlog.add(e,294);} }; @@ -2204,7 +2178,23 @@ }; NAIBU.Time = { - currentFrame : 0 + currentFrame : 0, + start : function () { + if (NAIBU.Clip.length > 0) { + NAIBU.stop = setInterval( (function(){ + var ntc = NAIBU.Time.currentFrame++; + var nc = NAIBU.Clip; + for (var i=0,ncli=nc.length;i<ncli;++i) { + nc[i]._frame(ntc); + } + if (ntc > 7000) { + clearInterval(NAIBU.stop); + } + }), + 41 + ); + } + } }; NAIBU.Clip = []; function STSetElement(/*Element*/ ele, /*Matrix*/ matrix, /*float*/w, h) {