diff options
author | hwc487 | 2012-07-10 09:16:12 -0700 |
---|---|---|
committer | hwc487 | 2012-07-10 09:16:12 -0700 |
commit | 7e5c17d1732606b3e32da054e73fe42813cf7326 (patch) | |
tree | 7cb9956882e482eb3cbe5a9e542433e510225037 /js/helper-classes/3D | |
parent | 5085d0f67df89a21715308956004164597a6ba79 (diff) | |
download | ninja-7e5c17d1732606b3e32da054e73fe42813cf7326.tar.gz |
Grid drawing fixes
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/StageLine.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/helper-classes/3D/StageLine.js b/js/helper-classes/3D/StageLine.js index c358108f..a9149f56 100755 --- a/js/helper-classes/3D/StageLine.js +++ b/js/helper-classes/3D/StageLine.js | |||
@@ -270,11 +270,11 @@ var StageLine = exports.StageLine = Object.create(Object.prototype, { | |||
270 | var planeEq = plane.getPlaneEq(); | 270 | var planeEq = plane.getPlaneEq(); |
271 | var bNormal = vecUtils.vecCross(3, planeEq, bVec); | 271 | var bNormal = vecUtils.vecCross(3, planeEq, bVec); |
272 | var dot = vecUtils.vecDot(3, bNormal, lVec); | 272 | var dot = vecUtils.vecDot(3, bNormal, lVec); |
273 | if (MathUtils.fpSign(dot) > 0) | 273 | if (MathUtils.fpSign(dot) < 0) |
274 | { | 274 | { |
275 | var d = vecUtils.vecDot(3, lPt1, planeEq) + planeEq[3]; | 275 | var d = vecUtils.vecDot(3, lPt1, planeEq) + planeEq[3]; |
276 | if (plane.isBackFacing()) d = -d; | 276 | if (plane.isBackFacing()) d = -d; |
277 | if (MathUtils.fpSign(d) > 0) rtnVal = true; | 277 | if (MathUtils.fpSign(d) < 0) rtnVal = true; |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||