Skip to content

Commit

Permalink
01/22/2012 *0.2 Build 20*
Browse files Browse the repository at this point in the history
--------------------------

* Added dirty rectangles clear support.
  To be enabled a call director.setClear( CAAT.Director.CLEAR_DIRTY_RECTS ); must be performed.
  Every actor which changes affine transformation, either position, rotation or scale, will automatically
  be invalidated. In you want any other actor to be explicitly invalidated, just call actor.invalidate();
* Cleaned some ctx.save/restore code.
* Modified license file to reflect copyright 2012.
* Removed some debug code.
  • Loading branch information
hyperandroid committed Jan 22, 2012
1 parent 72c5a23 commit 0753691
Show file tree
Hide file tree
Showing 59 changed files with 6,508 additions and 4,631 deletions.
4 changes: 2 additions & 2 deletions build/caat-box2d-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/caat-box2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Version: 0.2 build: 18
Version: 0.2 build: 20
Created on:
DATE: 2012-01-22
TIME: 17:57:15
TIME: 18:10:40
*/


Expand Down
32 changes: 16 additions & 16 deletions build/caat-css-min.js

Large diffs are not rendered by default.

36 changes: 30 additions & 6 deletions build/caat-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Version: 0.2 build: 18
Version: 0.2 build: 20
Created on:
DATE: 2012-01-22
TIME: 17:57:15
TIME: 18:10:40
*/


Expand Down Expand Up @@ -7563,6 +7563,7 @@ var cp1= proxy(

CAAT.Director.CLEAR_DIRTY_RECTS= 1;
CAAT.Director.CLEAR_ALL= true;
CAAT.Director.CLEAR_NONE= false;

CAAT.Director.prototype = {

Expand Down Expand Up @@ -8014,7 +8015,12 @@ var cp1= proxy(
return this;
},


/**
*
* Reset statistics information.
*
* @private
*/
resetStats : function() {
this.statistics.size_total= 0;
this.statistics.size_active=0;
Expand All @@ -8027,6 +8033,9 @@ var cp1= proxy(
* This virtual timeline will provide each Scene with its own virtual timeline, and will only
* feed time when the Scene is the current Scene, or is being switched.
*
* If dirty rectangles are enabled and canvas is used for rendering, the dirty rectangles will be
* set up as a single clip area.
*
* @param time {number} integer indicating the elapsed time between two consecutive frames of the
* Director.
*/
Expand Down Expand Up @@ -8087,7 +8096,6 @@ var cp1= proxy(
if ( this.dirtyRectsEnabled ) {

ctx.beginPath();
ctx.rect(0,0,100,40);
var dr= this.cDirtyRects;
for( i=0; i<dr.length; i++ ) {
var drr= dr[i];
Expand Down Expand Up @@ -8165,8 +8173,17 @@ ctx.rect(0,0,100,40);
return this;
},
/**
* Add a rectangle to the list of dirty screen areas which should be redrawn.
* This is the opposite method to clear the whole screen and repaint everything again.
* Despite i'm not very fond of dirty rectangles because it needs some extra calculations, this
* procedure has shown to be speeding things up under certain situations. Nevertheless it doesn't or
* even lowers performance under others, so it is a developer choice to activate them via a call to
* setClear( CAAT.Director.CLEAR_DIRTY_RECTS ).
*
* This function, not only tracks a list of dirty rectangles, but tries to optimize the list. Overlapping
* rectangles will be removed and intersecting ones will be unioned.
*
* Before calling this method, check if this.dirtyRectsEnabled is true.
*
* @param rectangle {CAAT.Rectangle}
*/
Expand Down Expand Up @@ -8823,7 +8840,14 @@ ctx.rect(0,0,100,40);
/**
* This method states whether the director must clear background before rendering
* each frame.
* @param clear {boolean} a boolean indicating whether to clear the screen before scene draw.
*
* The clearing method could be:
* + CAAT.Director.CLEAR_ALL. previous to draw anything on screen the canvas will have clearRect called on it.
* + CAAT.Director.CLEAR_DIRTY_RECTS. Actors marked as invalid, or which have been moved, rotated or scaled
* will have their areas redrawn.
* + CAAT.Director.CLEAR_NONE. clears nothing.
*
* @param clear {CAAT.Director.CLEAR_ALL |ÊCAAT.Director.CLEAR_NONE | CAAT.Director.CLEAR_DIRTY_RECTS}
* @return this.
*/
setClear : function(clear) {
Expand Down
30 changes: 15 additions & 15 deletions build/caat-min.js

Large diffs are not rendered by default.

38 changes: 31 additions & 7 deletions build/caat.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Version: 0.2 build: 18
Version: 0.2 build: 20

Created on:
DATE: 2012-01-22
TIME: 17:57:14
TIME: 18:10:39
*/


Expand Down Expand Up @@ -6245,7 +6245,7 @@ var cp1= proxy(
}

//if ( (CAAT.DEBUGAABB || glEnabled) && (this.dirty || this.wdirty ) ) {
// BUGBUG no hacer cuando no sea necesario.
// screen bounding boxes will always be calculated.
if ( this.dirty || this.wdirty || this.invalid ) {
if ( director.dirtyRectsEnabled ) {
director.addDirtyRect( this.AABB );
Expand Down Expand Up @@ -8620,6 +8620,7 @@ var cp1= proxy(

CAAT.Director.CLEAR_DIRTY_RECTS= 1;
CAAT.Director.CLEAR_ALL= true;
CAAT.Director.CLEAR_NONE= false;

CAAT.Director.prototype = {

Expand Down Expand Up @@ -9071,7 +9072,12 @@ var cp1= proxy(
return this;
},


/**
*
* Reset statistics information.
*
* @private
*/
resetStats : function() {
this.statistics.size_total= 0;
this.statistics.size_active=0;
Expand All @@ -9084,6 +9090,9 @@ var cp1= proxy(
* This virtual timeline will provide each Scene with its own virtual timeline, and will only
* feed time when the Scene is the current Scene, or is being switched.
*
* If dirty rectangles are enabled and canvas is used for rendering, the dirty rectangles will be
* set up as a single clip area.
*
* @param time {number} integer indicating the elapsed time between two consecutive frames of the
* Director.
*/
Expand Down Expand Up @@ -9144,7 +9153,6 @@ var cp1= proxy(
if ( this.dirtyRectsEnabled ) {

ctx.beginPath();
ctx.rect(0,0,100,40);
var dr= this.cDirtyRects;
for( i=0; i<dr.length; i++ ) {
var drr= dr[i];
Expand Down Expand Up @@ -9222,8 +9230,17 @@ ctx.rect(0,0,100,40);
return this;
},
/**
* Add a rectangle to the list of dirty screen areas which should be redrawn.
* This is the opposite method to clear the whole screen and repaint everything again.
* Despite i'm not very fond of dirty rectangles because it needs some extra calculations, this
* procedure has shown to be speeding things up under certain situations. Nevertheless it doesn't or
* even lowers performance under others, so it is a developer choice to activate them via a call to
* setClear( CAAT.Director.CLEAR_DIRTY_RECTS ).
*
* This function, not only tracks a list of dirty rectangles, but tries to optimize the list. Overlapping
* rectangles will be removed and intersecting ones will be unioned.
*
* Before calling this method, check if this.dirtyRectsEnabled is true.

*
* @param rectangle {CAAT.Rectangle}
*/
Expand Down Expand Up @@ -9880,7 +9897,14 @@ ctx.rect(0,0,100,40);
/**
* This method states whether the director must clear background before rendering
* each frame.
* @param clear {boolean} a boolean indicating whether to clear the screen before scene draw.
*
* The clearing method could be:
* + CAAT.Director.CLEAR_ALL. previous to draw anything on screen the canvas will have clearRect called on it.
* + CAAT.Director.CLEAR_DIRTY_RECTS. Actors marked as invalid, or which have been moved, rotated or scaled
* will have their areas redrawn.
* + CAAT.Director.CLEAR_NONE. clears nothing.
*
* @param clear {CAAT.Director.CLEAR_ALL |�CAAT.Director.CLEAR_NONE | CAAT.Director.CLEAR_DIRTY_RECTS}
* @return this.
*/
setClear : function(clear) {
Expand Down
3 changes: 2 additions & 1 deletion changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
01/22/2012 *0.2 Build 18*
01/22/2012 *0.2 Build 20*
--------------------------

* Removed some debug code.
* Added dirty rectangles clear support.
To be enabled a call director.setClear( CAAT.Director.CLEAR_DIRTY_RECTS ); must be performed.
Every actor which changes affine transformation, either position, rotation or scale, will automatically
Expand Down
2 changes: 1 addition & 1 deletion documentation/jsdoc/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ <h2><a href="symbols/src/_Users_ibon_js_CAAT_src_webgl_ShaderUtil.js.html">/User
</div>
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:51 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:09 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ <h2><a href="symbols/Function.html">Function</a></h2>
</div>
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:51 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:09 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Actor.html
Original file line number Diff line number Diff line change
Expand Up @@ -4570,7 +4570,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:45 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.ActorContainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.AudioManager.html
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DBodyActor.html
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DCircularBody.html
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Bezier.html
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.CatmullRom.html
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Color.RGB.html
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Color.html
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:46 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Curve.html
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:47 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.CurvePath.html
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">

Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 17:57:47 GMT+0100 (CET)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun Jan 22 2012 18:11:06 GMT+0100 (CET)
</div>
</body>
</html>
Loading

0 comments on commit 0753691

Please sign in to comment.