Skip to content

Commit

Permalink
Merge pull request #4 from GunioRobot/clean
Browse files Browse the repository at this point in the history
Automatically Removed Whitespace
  • Loading branch information
kig committed Jan 31, 2012
2 parents b7d0403 + fea50ff commit 025fbb3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
20 changes: 10 additions & 10 deletions JSARToolKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ NyARRgbPixelReader_Canvas2D = ASKlass("NyARRgbPixelReader_Canvas2D", INyARRgbPix
{
this._ref_canvas = i_canvas;
},

getData : function() {
if (this._ref_canvas.changed || !this._data) {
var canvas = this._ref_canvas;
Expand Down Expand Up @@ -4034,15 +4034,15 @@ NyARParam = ASKlass('NyARParam',
var size = this.getScreenSize();
var width = size.w;
var height = size.h;

this.getPerspectiveProjectionMatrix().decompMat(icpara_mat, trans_mat);

var icpara = icpara_mat.getArray();
var trans = trans_mat.getArray();
for (i = 0; i < 4; i++) {
icpara[1][i] = (height - 1) * (icpara[2][i]) - icpara[1][i];
}

for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) {
p[i][j] = icpara[i][j] / icpara[2][2];
Expand All @@ -4052,22 +4052,22 @@ NyARParam = ASKlass('NyARParam',
q[0][1] = (2.0 * p[0][1] / (width - 1));
q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0);
q[0][3] = 0.0;

q[1][0] = 0.0;
q[1][1] = -(2.0 * p[1][1] / (height - 1));
q[1][2] = -((2.0 * p[1][2] / (height - 1)) - 1.0);
q[1][3] = 0.0;

q[2][0] = 0.0;
q[2][1] = 0.0;
q[2][2] = -(FAR_CLIP + NEAR_CLIP) / (NEAR_CLIP - FAR_CLIP);
q[2][3] = 2.0 * FAR_CLIP * NEAR_CLIP / (NEAR_CLIP - FAR_CLIP);

q[3][0] = 0.0;
q[3][1] = 0.0;
q[3][2] = 1.0;
q[3][3] = 0.0;

for (i = 0; i < 4; i++) { // Row.
// First 3 columns of the current row.
for (j = 0; j < 3; j++) { // Column.
Expand Down Expand Up @@ -6904,7 +6904,7 @@ NyARTransMat = ASKlass('NyARTransMat',INyARTransMat,
o_result_conv.error=min_err;
return;
},

optimize : function(io_rotmat,io_transvec,i_solver,i_offset_3d,i_2d_vertex,i_err_threshold)
{
//System.out.println("START");
Expand Down Expand Up @@ -8817,7 +8817,7 @@ NyIdMarkerPickup = ASKlass('NyIdMarkerPickup',
return;
}
/**
* Initialize the marker pickup for a new frame.
* Initialize the marker pickup for a new frame.
* Clears out old values from perspective reader motion cache.
*/
,init : function()
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Copyright (C)2008-2010 Saqoosha, Ryo Iizuka

あなたはこのプログラムと共に、GNU 一般公衆利用許諾書のコピーを一部受け取って
いるはずです。もし受け取っていなければ、<http://www.gnu.org/licenses/> を
ご覧ください。
ご覧ください。
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The license is GPL 3 as was the original library.

All the hard work was done by the ARToolKit/NyARToolKit/FLARToolKit people,
a huge thank you to them. This port was quite mechanical, though it has some
major JS optimizations and a tracking robustness hack or two. And some
major JS optimizations and a tracking robustness hack or two. And some
uninformed bogus hacks in FLARParam to sort-of make it work on 16:9 video.

See demos/AR_simple_webgl.html for an example of integrating JSARToolKit
output with a WebGL program.

I've only tested the ID markers and square detection paths, so you may
encounter problems working with custom markers. In which case, filing a bug
encounter problems working with custom markers. In which case, filing a bug
report on GitHub would be very much appreciated.


Expand Down
2 changes: 1 addition & 1 deletion src/NyARIdMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ NyIdMarkerPickup = ASKlass('NyIdMarkerPickup',
return;
}
/**
* Initialize the marker pickup for a new frame.
* Initialize the marker pickup for a new frame.
* Clears out old values from perspective reader motion cache.
*/
,init : function()
Expand Down
14 changes: 7 additions & 7 deletions src/NyARParam.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ NyARParam = ASKlass('NyARParam',
var size = this.getScreenSize();
var width = size.w;
var height = size.h;

this.getPerspectiveProjectionMatrix().decompMat(icpara_mat, trans_mat);

var icpara = icpara_mat.getArray();
var trans = trans_mat.getArray();
for (i = 0; i < 4; i++) {
icpara[1][i] = (height - 1) * (icpara[2][i]) - icpara[1][i];
}

for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) {
p[i][j] = icpara[i][j] / icpara[2][2];
Expand All @@ -479,22 +479,22 @@ NyARParam = ASKlass('NyARParam',
q[0][1] = (2.0 * p[0][1] / (width - 1));
q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0);
q[0][3] = 0.0;

q[1][0] = 0.0;
q[1][1] = -(2.0 * p[1][1] / (height - 1));
q[1][2] = -((2.0 * p[1][2] / (height - 1)) - 1.0);
q[1][3] = 0.0;

q[2][0] = 0.0;
q[2][1] = 0.0;
q[2][2] = -(FAR_CLIP + NEAR_CLIP) / (NEAR_CLIP - FAR_CLIP);
q[2][3] = 2.0 * FAR_CLIP * NEAR_CLIP / (NEAR_CLIP - FAR_CLIP);

q[3][0] = 0.0;
q[3][1] = 0.0;
q[3][2] = 1.0;
q[3][3] = 0.0;

for (i = 0; i < 4; i++) { // Row.
// First 3 columns of the current row.
for (j = 0; j < 3; j++) { // Column.
Expand Down
2 changes: 1 addition & 1 deletion src/NyARRasterReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ NyARRgbPixelReader_Canvas2D = ASKlass("NyARRgbPixelReader_Canvas2D", INyARRgbPix
{
this._ref_canvas = i_canvas;
},

getData : function() {
if (this._ref_canvas.changed || !this._data) {
var canvas = this._ref_canvas;
Expand Down
2 changes: 1 addition & 1 deletion src/NyARTransMat.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ NyARTransMat = ASKlass('NyARTransMat',INyARTransMat,
o_result_conv.error=min_err;
return;
},

optimize : function(io_rotmat,io_transvec,i_solver,i_offset_3d,i_2d_vertex,i_err_threshold)
{
//System.out.println("START");
Expand Down

0 comments on commit 025fbb3

Please sign in to comment.