Skip to content

Commit

Permalink
* Changed Input subsystem (again). Now every event has the right inf…
Browse files Browse the repository at this point in the history
…ormation.

 * Changed Transformation matrix hierarchy. Now Director's transformation is considered to be Projection Matrix.
 * Changed Actor's setScaleAnchored and setRotationAnchored methods so that anchor values are no more
    coordinates in space but proportional values (0..1) representing a percentage (like in behaviors).
    This is a major issue and should be taken into account for previous developments.
  * Fixed tutorials and demos to reflect setScaleAnchored and setRotateAnchored changes.
  • Loading branch information
hyperandroid committed Oct 26, 2011
1 parent b2010ce commit e2b724b
Show file tree
Hide file tree
Showing 78 changed files with 4,936 additions and 4,688 deletions.
6 changes: 3 additions & 3 deletions build/caat-box2d.js

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

89 changes: 44 additions & 45 deletions build/caat-css.js

Large diffs are not rendered by default.

190 changes: 94 additions & 96 deletions build/caat.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions changelog
@@ -1,3 +1,13 @@
10/26/2011
----------

* Changed Input subsystem (again). Now every event has the right information.
* Changed Transformation matrix hierarchy. Now Director's transformation is considered to be Projection Matrix.
* Changed Actor's setScaleAnchored and setRotationAnchored methods so that anchor values are no more
coordinates in space but proportional values (0..1) representing a percentage (like in behaviors).
This is a major issue and should be taken into account for previous developments.
* Fixed tutorials and demos to reflect setScaleAnchored and setRotateAnchored changes.

10/24/2011
----------

Expand Down
2 changes: 1 addition & 1 deletion documentation/demos/demo1/path.html
Expand Up @@ -266,7 +266,7 @@ <h1>Path management</h1>
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues(-Math.PI / 8, Math.PI / 8, 50, 0). // anchor at 50%, 0%
setValues(-Math.PI / 8, Math.PI / 8, .50, 0). // anchor at 50%, 0%
setInterpolator(
new CAAT.Interpolator().createExponentialInOutInterpolator(3, true))
);
Expand Down
2 changes: 1 addition & 1 deletion documentation/demos/demo11/circles.js
Expand Up @@ -28,7 +28,7 @@ function __scene10_text(director, scene) {
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues(-Math.PI / 8, Math.PI / 8, 50, 0).
setValues(-Math.PI / 8, Math.PI / 8, .50, 0).
setInterpolator(
new CAAT.Interpolator().createExponentialInOutInterpolator(3, true)
)
Expand Down
25 changes: 14 additions & 11 deletions documentation/demos/demo16/mask.html
Expand Up @@ -126,24 +126,26 @@ <h1>Masking with arbitrary paths</h1>
setFillStyle(gradient).
cacheAsBitmap();

addMask( director, gr );
scene.addChild(gr);

addMask( director, scene, gr );
createFish(director,scene,gr);

scene.addChild(gr);


}

function addMask(director, gr) {
function addMask(director, scene, gr) {
var path2= new CAAT.Path().
beginPath(100,director.height/2).
beginPath(200,director.height/2).
addCubicTo(
100,10,
200,10,
director.width-200,10,
director.width-200,director.height/2 ).
addCubicTo(
director.width-200,director.height-10,
100, director.height-10,
100, director.height/2 ).
200, director.height-10,
200, director.height/2 ).
closePath();

var path =
Expand Down Expand Up @@ -181,11 +183,11 @@ <h1>Masking with arbitrary paths</h1>
new CAAT.PathBehavior().
setValues( path2 ).
setFrameTime( 0,15000 ).
setCycle( true ).
setTranslation( path2.width/2, path2.height/2 )
setCycle( true )
.setTranslation( path[i].width/2, path[i].height/2 )
).addBehavior(
new CAAT.RotateBehavior().
setValues( 0,Math.PI*2 ).
setValues( 0,Math.PI*2, .5, .5 ).
setFrameTime( 0,5000 ).
setCycle( true )
).addBehavior(
Expand All @@ -196,7 +198,8 @@ <h1>Masking with arbitrary paths</h1>
setInterpolator(
new CAAT.Interpolator().createLinearInterpolator(true, false)
)
);
)
;
}

var pathIndex=0;
Expand Down
2 changes: 1 addition & 1 deletion documentation/demos/demo4/coordinates.html
Expand Up @@ -302,7 +302,7 @@ <h1>Homogeneous coordinates</h1>
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime( 0, 4000 ).
setValues( -Math.PI/8, Math.PI/8, 50, 0 ). // anchor at 50%, 0%
setValues( -Math.PI/8, Math.PI/8, .50, 0 ). // anchor at 50%, 0%
setInterpolator(
new CAAT.Interpolator().createCubicBezierInterpolator(
{x:0,y:0},
Expand Down
2 changes: 1 addition & 1 deletion documentation/demos/demo5/text-on-path.html
Expand Up @@ -180,7 +180,7 @@ <h1>Text on Path</h1>
var rb = new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues( -Math.PI / 8, Math.PI / 8, 50, 0 ).
setValues( -Math.PI / 8, Math.PI / 8, .50, 0 ).
setInterpolator(
new CAAT.Interpolator().createCubicBezierInterpolator(
{x:0,y:0},
Expand Down
2 changes: 1 addition & 1 deletion documentation/demos/demo6/accelerometer.html
Expand Up @@ -288,7 +288,7 @@ <h1>Accelerometer</h1>
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues(-Math.PI / 8, Math.PI / 8, 50, 0).
setValues(-Math.PI / 8, Math.PI / 8, .50, 0).
setInterpolator(
new CAAT.Interpolator().createExponentialInOutInterpolator(3, true)
)
Expand Down
8 changes: 4 additions & 4 deletions documentation/demos/demo7/anchors.html
Expand Up @@ -156,9 +156,9 @@ <h1>Affine transformation anchors</h1>
cimages.push( new CAAT.SpriteImage().initialize( director.getImage('fish4'), 1, 3) );

var anchor= [
0,0, 50, 0, 100, 0,
0,50, 50, 50, 100, 50,
0,100, 50, 100, 100, 100], i;
0,0, .50, 0, 1.00, 0,
0,.50, .50, .50, 1.00, .50,
0,1.00, .50, 1.00, 1.00, 1.00], i;
for( i=0; i<9; i++ ) {
actor= createElement(
cimages[0],
Expand Down Expand Up @@ -203,7 +203,7 @@ <h1>Affine transformation anchors</h1>
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues(-Math.PI / 8,Math.PI / 8, 50, 0).
setValues(-Math.PI / 8,Math.PI / 8, .50, 0).
setInterpolator(
new CAAT.Interpolator().createCubicBezierInterpolator(
{x:0,y:0},
Expand Down
5 changes: 3 additions & 2 deletions documentation/demos/demo8/hierarchy.html
Expand Up @@ -129,7 +129,8 @@ <h1>Hierarchical affine transforms</h1>
setFrameTime(0, rotationTime).
setValues(0, 2 * Math.PI).
setCycle(true).
setAnchor( planet, -x, -y )
//setAnchor( planet, -x, -y )
setAnchor( planet, -x, -y )
);

parent.addChild(planet);
Expand Down Expand Up @@ -213,7 +214,7 @@ <h1>Hierarchical affine transforms</h1>
new CAAT.RotateBehavior().
setCycle(true).
setFrameTime(0, 4000).
setValues(-Math.PI / 8, Math.PI / 8, 50, 0).
setValues(-Math.PI / 8, Math.PI / 8, .50, 0).
setInterpolator(
new CAAT.Interpolator().
createExponentialInOutInterpolator(3, true)
Expand Down
2 changes: 1 addition & 1 deletion documentation/jsdoc/files.html
Expand Up @@ -688,7 +688,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 Wed Oct 26 2011 02:39:44 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:07 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/index.html
Expand Up @@ -580,7 +580,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 Wed Oct 26 2011 02:39:44 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:07 GMT+0200 (CEST)
</div>
</body>
</html>
8 changes: 4 additions & 4 deletions documentation/jsdoc/symbols/CAAT.Actor.html
Expand Up @@ -3893,19 +3893,19 @@ <h1 class="classTitle">
<b>angle</b>

</dt>
<dd>a float indicating the angle in radians to rotate the Actor.</dd>
<dd>{number} indicating the angle in radians to rotate the Actor.</dd>

<dt>
<b>rx</b>

</dt>
<dd></dd>
<dd>{number} value in the range 0..1</dd>

<dt>
<b>ry</b>

</dt>
<dd></dd>
<dd>{number} value in the range 0..1</dd>

</dl>

Expand Down Expand Up @@ -4358,7 +4358,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.ActorContainer.html
Expand Up @@ -1372,7 +1372,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.AudioManager.html
Expand Up @@ -1131,7 +1131,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DBodyActor.html
Expand Up @@ -1231,7 +1231,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DCircularBody.html
Expand Up @@ -636,7 +636,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html
Expand Up @@ -718,7 +718,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:03 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Bezier.html
Expand Up @@ -1026,7 +1026,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Button.html
Expand Up @@ -816,7 +816,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.CatmullRom.html
Expand Up @@ -601,7 +601,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Color.RGB.html
Expand Up @@ -474,7 +474,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Color.html
Expand Up @@ -698,7 +698,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.CompoundImage.html
Expand Up @@ -1015,7 +1015,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.Curve.html
Expand Up @@ -973,7 +973,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 Wed Oct 26 2011 02:39:41 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion documentation/jsdoc/symbols/CAAT.CurvePath.html
Expand Up @@ -1203,7 +1203,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 Wed Oct 26 2011 02:39:42 GMT+0200 (CEST)
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Oct 27 2011 00:48:04 GMT+0200 (CEST)
</div>
</body>
</html>

0 comments on commit e2b724b

Please sign in to comment.