diff options
author | Valerio Virgillito | 2012-05-22 14:51:35 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-22 14:51:35 -0700 |
commit | 862ee363584dfba4bdd9abacbc3a3244c7ec66b5 (patch) | |
tree | 2411bd4bf3478621a16c83ead914670e0d143372 /js/helper-classes/3D/view-utils.js | |
parent | c37a876b373ddc7cb19277aaeaa6bb2d2d5a50ac (diff) | |
parent | 6b03f357f45d76733ae7bf5ff52ffe2fb2a84fda (diff) | |
download | ninja-862ee363584dfba4bdd9abacbc3a3244c7ec66b5.tar.gz |
Merge pull request #221 from ericmueller/3DBugs
3 d bugs
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 919f7c50..00124900 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -156,14 +156,6 @@ exports.ViewUtils = Montage.create(Component, { | |||
156 | viewDir = MathUtils.transformVector( [0,0,1], stageInv ); | 156 | viewDir = MathUtils.transformVector( [0,0,1], stageInv ); |
157 | } | 157 | } |
158 | 158 | ||
159 | /* | ||
160 | if (elt === stage) | ||
161 | { | ||
162 | xVec = [1,0,0]; | ||
163 | yVec = [0,1,0]; | ||
164 | } | ||
165 | */ | ||
166 | |||
167 | var plane; | 159 | var plane; |
168 | var xDot, yDot, zDot; | 160 | var xDot, yDot, zDot; |
169 | switch (axis) | 161 | switch (axis) |
@@ -288,6 +280,11 @@ exports.ViewUtils = Montage.create(Component, { | |||
288 | value: function( localPt, elt ) { | 280 | value: function( localPt, elt ) { |
289 | this.pushViewportObj( elt ); | 281 | this.pushViewportObj( elt ); |
290 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); | 282 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); |
283 | if ((elt == null) || (elt === this._stageElement)) | ||
284 | { | ||
285 | this.popViewportObj(); | ||
286 | return viewPt; | ||
287 | } | ||
291 | var mat = this.getMatrixFromElement( elt ); | 288 | var mat = this.getMatrixFromElement( elt ); |
292 | var worldPt = MathUtils.transformPoint( viewPt, mat ); | 289 | var worldPt = MathUtils.transformPoint( viewPt, mat ); |
293 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); | 290 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); |