diff options
author | Nivesh Rajbhandari | 2012-03-06 14:09:44 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-06 14:09:44 -0800 |
commit | 792793cd3991032b4840ade67f98ae8eae2d30a0 (patch) | |
tree | 69d3df003d2bb58fa1ab562fbd1058ff91851f01 /js/helper-classes/3D/view-utils.js | |
parent | 2346d8ab9db06573d8672c64988c46b6c672e015 (diff) | |
parent | 1cd89d4d06e3a8f2c221628b19cf26a2c69f5d3f (diff) | |
download | ninja-792793cd3991032b4840ade67f98ae8eae2d30a0.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index c1f59397..5a820fc2 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -214,7 +214,7 @@ exports.ViewUtils = Montage.create(Component, { | |||
214 | { | 214 | { |
215 | var bounds = this.getViewportBounds(); | 215 | var bounds = this.getViewportBounds(); |
216 | cop = bounds.getCenter(); | 216 | cop = bounds.getCenter(); |
217 | //cop = Vector.create( [bounds.getRight(), bounds.getBottom()] ); | 217 | //cop = [bounds.getRight(), bounds.getBottom()]; |
218 | } | 218 | } |
219 | 219 | ||
220 | return cop; | 220 | return cop; |
@@ -547,8 +547,8 @@ exports.ViewUtils = Montage.create(Component, { | |||
547 | pt = this.screenToView( pt[0], pt[1], pt[2] ); | 547 | pt = this.screenToView( pt[0], pt[1], pt[2] ); |
548 | 548 | ||
549 | var eyePt = this.getEyePoint(); | 549 | var eyePt = this.getEyePoint(); |
550 | //var eyePt = Vector.create( [0, 0, 0] ); | 550 | //var eyePt = [0, 0, 0]; |
551 | //var vec = Vector.create( [pt[0], pt[1], pt[2]] ).subtract( eyePt ); | 551 | //var vec = [pt[0], pt[1], pt[2]].subtract( eyePt ); |
552 | var vec = vecUtils.vecSubtract(3, [pt[0], pt[1], pt[2]], eyePt); | 552 | var vec = vecUtils.vecSubtract(3, [pt[0], pt[1], pt[2]], eyePt); |
553 | vec = vecUtils.vecNormalize( 3, vec ); | 553 | vec = vecUtils.vecNormalize( 3, vec ); |
554 | 554 | ||
@@ -1251,9 +1251,9 @@ exports.ViewUtils = Montage.create(Component, { | |||
1251 | // the input zoomFactor is the total zoom for the resulting matrix, so we need to | 1251 | // the input zoomFactor is the total zoom for the resulting matrix, so we need to |
1252 | // get the current scale from the existing userContent matrix | 1252 | // get the current scale from the existing userContent matrix |
1253 | // we assume a uniform scale. | 1253 | // we assume a uniform scale. |
1254 | var ucX = Vector.create([userContentMat[0], userContentMat[1+0], userContentMat[2+0]]); | 1254 | var ucX = [userContentMat[0], userContentMat[1+0], userContentMat[2+0]]; |
1255 | var ucY = Vector.create([userContentMat[4], userContentMat[1+4], userContentMat[2+4]]); | 1255 | var ucY = [userContentMat[4], userContentMat[1+4], userContentMat[2+4]]; |
1256 | var ucZ = Vector.create([userContentMat[8], userContentMat[1+8], userContentMat[2+8]]); | 1256 | var ucZ = [userContentMat[8], userContentMat[1+8], userContentMat[2+8]]; |
1257 | var sx = vecUtils.vecMag(3, ucX), | 1257 | var sx = vecUtils.vecMag(3, ucX), |
1258 | sy = vecUtils.vecMag(3, ucY), | 1258 | sy = vecUtils.vecMag(3, ucY), |
1259 | sz = vecUtils.vecMag(3, ucZ); | 1259 | sz = vecUtils.vecMag(3, ucZ); |