@@ -230,7 +230,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
230230
231231 //purge?
232232 this . _purgeDirecotorInNextLoop = false ;
233- this . _winSizeInPixels = this . _winSizeInPoints = cc . SizeMake ( cc . canvas . width , cc . canvas . height ) ;
233+ this . _winSizeInPixels = this . _winSizeInPoints = cc . size ( cc . canvas . width , cc . canvas . height ) ;
234234
235235 this . _openGLView = null ;
236236 this . _contentScaleFactor = 1.0 ;
@@ -322,7 +322,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
322322 if ( ! this . _paused ) {
323323 this . _scheduler . update ( this . _deltaTime ) ;
324324 }
325- //this._fullRect = new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height);
325+ //this._fullRect = cc.rect (0, 0, cc.canvas.width, cc.canvas.height);
326326 //cc.renderContext.clearRect(this._fullRect.origin.x, this._fullRect.origin.y, this._fullRect.size.width, -this._fullRect.size.height);
327327 cc . renderContext . clearRect ( 0 , 0 , cc . canvas . width , - cc . canvas . height ) ;
328328
@@ -333,7 +333,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
333333 if (this._dirtyRegion) {
334334 //cc.renderContext.clearRect(0, 0, cc.canvas.width, -cc.canvas.height);
335335
336- var fullRect = new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height);
336+ var fullRect = cc.rect (0, 0, cc.canvas.width, cc.canvas.height);
337337 this._dirtyRegion = cc.Rect.CCRectIntersection(this._dirtyRegion, fullRect);
338338
339339 if(cc.Rect.CCRectEqualToRect(cc.RectZero(), this._dirtyRegion)){
@@ -412,11 +412,11 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
412412 return ;
413413
414414 if ( ! this . _dirtyRegion ) {
415- this . _dirtyRegion = new cc . Rect ( rect . origin . x , rect . origin . y , rect . size . width , rect . size . height ) ;
415+ this . _dirtyRegion = cc . rect ( rect . origin . x , rect . origin . y , rect . size . width , rect . size . height ) ;
416416 return ;
417417 }
418418 this . _dirtyRegion = cc . Rect . CCRectUnion ( this . _dirtyRegion ,
419- new cc . Rect ( rect . origin . x , rect . origin . y , rect . size . width , rect . size . height ) ) ;
419+ cc . rect ( rect . origin . x , rect . origin . y , rect . size . width , rect . size . height ) ) ;
420420 } ,
421421
422422 rectIsInDirtyRegion :function ( rect ) {
@@ -547,7 +547,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
547547 popScene :function ( ) {
548548 cc . Assert ( this . _runningScene != null , "running scene should not null" ) ;
549549
550- //this.addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
550+ //this.addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
551551
552552 this . _scenesStack . pop ( ) ;
553553 var c = this . _scenesStack . length ;
@@ -627,7 +627,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
627627 pushScene :function ( scene ) {
628628 cc . Assert ( scene , "the scene should not null" ) ;
629629
630- //this.addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
630+ //this.addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
631631
632632 this . _sendCleanupToScene = false ;
633633
@@ -642,7 +642,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
642642 replaceScene :function ( scene ) {
643643 cc . Assert ( scene != null , "the scene should not be null" ) ;
644644
645- //this.addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
645+ //this.addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
646646 var i = this . _scenesStack . length ;
647647
648648 this . _sendCleanupToScene = true ;
@@ -657,7 +657,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
657657 reshapeProjection :function ( newWindowSize ) {
658658 if ( this . _openGLView ) {
659659 this . _winSizeInPoints = this . _openGLView . getSize ( ) ;
660- this . _winSizeInPixels = cc . SizeMake ( this . _winSizeInPoints . width * this . _contentScaleFactor ,
660+ this . _winSizeInPixels = cc . size ( this . _winSizeInPoints . width * this . _contentScaleFactor ,
661661 this . _winSizeInPoints . height * this . _contentScaleFactor ) ;
662662
663663 this . setProjection ( this . _projection ) ;
@@ -671,7 +671,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
671671 if ( ! this . _paused ) {
672672 return ;
673673 }
674- //this.addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
674+ //this.addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
675675
676676 this . setAnimationInterval ( this . _oldAnimationInterval ) ;
677677 this . _lastUpdate = cc . Time . gettimeofdayCocos2d ( ) ;
@@ -695,7 +695,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
695695 cc . Assert ( scene != null , "running scene should not be null" ) ;
696696 cc . Assert ( this . _runningScene == null , "_runningScene should be null" ) ;
697697
698- //this.addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
698+ //this.addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
699699
700700 this . pushScene ( scene ) ;
701701 this . startAnimation ( ) ;
@@ -728,7 +728,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
728728 setContentScaleFactor :function ( scaleFactor ) {
729729 if ( scaleFactor != this . _contentScaleFactor ) {
730730 this . _contentScaleFactor = scaleFactor ;
731- this . _winSizeInPixels = cc . SizeMake ( this . _winSizeInPoints . width * scaleFactor , this . _winSizeInPoints . height * scaleFactor ) ;
731+ this . _winSizeInPixels = cc . size ( this . _winSizeInPoints . width * scaleFactor , this . _winSizeInPoints . height * scaleFactor ) ;
732732
733733 if ( this . _openGLView ) {
734734 this . updateContentScaleFactor ( ) ;
@@ -834,7 +834,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
834834
835835 // set size
836836 this . _winSizeInPoints = this . _openGLView . getSize ( ) ;
837- this . _winSizeInPixels = cc . SizeMake ( this . _winSizeInPoints . width * this . _contentScaleFactor , this . _winSizeInPoints . height * this . _contentScaleFactor ) ;
837+ this . _winSizeInPixels = cc . size ( this . _winSizeInPoints . width * this . _contentScaleFactor , this . _winSizeInPoints . height * this . _contentScaleFactor ) ;
838838
839839 this . _createStatsLabel ( ) ;
840840
@@ -1132,9 +1132,9 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
11321132 } ,
11331133
11341134 _createStatsLabel :function ( ) {
1135- this . _FPSLabel = cc . LabelTTF . create ( "00.0" , "Arial" , 18 , cc . SizeMake ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
1136- this . _SPFLabel = cc . LabelTTF . create ( "0.000" , "Arial" , 18 , cc . SizeMake ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
1137- this . _drawsLabel = cc . LabelTTF . create ( "000" , "Arial" , 18 , cc . SizeMake ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
1135+ this . _FPSLabel = cc . LabelTTF . create ( "00.0" , "Arial" , 18 , cc . size ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
1136+ this . _SPFLabel = cc . LabelTTF . create ( "0.000" , "Arial" , 18 , cc . size ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
1137+ this . _drawsLabel = cc . LabelTTF . create ( "000" , "Arial" , 18 , cc . size ( 60 , 16 ) , cc . TEXT_ALIGNMENT_RIGHT ) ;
11381138
11391139 this . _drawsLabel . setPosition ( cc . pAdd ( cc . p ( 20 , 48 ) , cc . DIRECTOR_STATS_POSITION ) ) ;
11401140 this . _SPFLabel . setPosition ( cc . pAdd ( cc . p ( 20 , 30 ) , cc . DIRECTOR_STATS_POSITION ) ) ;
@@ -1244,7 +1244,7 @@ cc.defaultFPS = 60;
12441244/*
12451245 window.onfocus = function () {
12461246 if (!cc.firstRun) {
1247- cc.Director.getInstance().addRegionToDirtyRegion(new cc.Rect (0, 0, cc.canvas.width, cc.canvas.height));
1247+ cc.Director.getInstance().addRegionToDirtyRegion(cc.rect (0, 0, cc.canvas.width, cc.canvas.height));
12481248 }
12491249 };
12501250 */
0 commit comments