Skip to content

Commit

Permalink
Remove whitespace [WhitespaceBot]
Browse files Browse the repository at this point in the history
  • Loading branch information
Gun.io Whitespace Robot committed Jan 31, 2012
1 parent b7d0403 commit fea50ff
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 Original file line Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ NyARRgbPixelReader_Canvas2D = ASKlass("NyARRgbPixelReader_Canvas2D", INyARRgbPix
{ {
this._ref_canvas = i_canvas; this._ref_canvas = i_canvas;
}, },

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

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

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

for(i = 0; i < 3; i++) { for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) { for(j = 0; j < 3; j++) {
p[i][j] = icpara[i][j] / icpara[2][2]; 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][1] = (2.0 * p[0][1] / (width - 1));
q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0); q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0);
q[0][3] = 0.0; q[0][3] = 0.0;

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

q[2][0] = 0.0; q[2][0] = 0.0;
q[2][1] = 0.0; q[2][1] = 0.0;
q[2][2] = -(FAR_CLIP + NEAR_CLIP) / (NEAR_CLIP - FAR_CLIP); 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[2][3] = 2.0 * FAR_CLIP * NEAR_CLIP / (NEAR_CLIP - FAR_CLIP);

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

for (i = 0; i < 4; i++) { // Row. for (i = 0; i < 4; i++) { // Row.
// First 3 columns of the current row. // First 3 columns of the current row.
for (j = 0; j < 3; j++) { // Column. 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; o_result_conv.error=min_err;
return; return;
}, },

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


あなたはこのプログラムと共に、GNU 一般公衆利用許諾書のコピーを一部受け取って あなたはこのプログラムと共に、GNU 一般公衆利用許諾書のコピーを一部受け取って
いるはずです。もし受け取っていなければ、<http://www.gnu.org/licenses/> を いるはずです。もし受け取っていなければ、<http://www.gnu.org/licenses/> を
ご覧ください。 ご覧ください。
4 changes: 2 additions & 2 deletions README
Original file line number Original file line 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, 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 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. 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 See demos/AR_simple_webgl.html for an example of integrating JSARToolKit
output with a WebGL program. output with a WebGL program.


I've only tested the ID markers and square detection paths, so you may 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. report on GitHub would be very much appreciated.




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

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

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

for(i = 0; i < 3; i++) { for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) { for(j = 0; j < 3; j++) {
p[i][j] = icpara[i][j] / icpara[2][2]; 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][1] = (2.0 * p[0][1] / (width - 1));
q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0); q[0][2] = -((2.0 * p[0][2] / (width - 1)) - 1.0);
q[0][3] = 0.0; q[0][3] = 0.0;

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

q[2][0] = 0.0; q[2][0] = 0.0;
q[2][1] = 0.0; q[2][1] = 0.0;
q[2][2] = -(FAR_CLIP + NEAR_CLIP) / (NEAR_CLIP - FAR_CLIP); 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[2][3] = 2.0 * FAR_CLIP * NEAR_CLIP / (NEAR_CLIP - FAR_CLIP);

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

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

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

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

0 comments on commit fea50ff

Please sign in to comment.