aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-12 15:47:04 -0700
committerPushkar Joshi2012-04-12 15:47:04 -0700
commit276926133022577344d0e4934d1ff44da2ac18aa (patch)
tree43e768ffc102219b644a6c4ae39f628da903bf05 /js/lib/geom
parent9a518896ed98022f589f06276197c160431bdda0 (diff)
downloadninja-276926133022577344d0e4934d1ff44da2ac18aa.tar.gz
Use local coordinates for rendering and hit testing only when the path canvas exists....AND...good state for code that works in 3D as long as the path was originally created in XY plane of the stage
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/sub-path.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/lib/geom/sub-path.js b/js/lib/geom/sub-path.js
index 87840bdc..765316b1 100755
--- a/js/lib/geom/sub-path.js
+++ b/js/lib/geom/sub-path.js
@@ -1354,6 +1354,7 @@ GLSubpath.prototype.buildLocalCoord = function () {
1354 var localPoint = [this._samples[3*i],this._samples[3*i+1],this._samples[3*i+2]]; 1354 var localPoint = [this._samples[3*i],this._samples[3*i+1],this._samples[3*i+2]];
1355 localPoint[0]-= stageWorldCenter[0]; 1355 localPoint[0]-= stageWorldCenter[0];
1356 localPoint[1]-= stageWorldCenter[1]; 1356 localPoint[1]-= stageWorldCenter[1];
1357 localPoint[2]-= stageWorldCenter[2];
1357 1358
1358 // ***** unproject all the centered points and convert them to 2D (plane space)***** 1359 // ***** unproject all the centered points and convert them to 2D (plane space)*****
1359 // (undo the projection step performed by the browser) 1360 // (undo the projection step performed by the browser)