diff options
author | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
commit | fd4af6d81725dfa0630ac5e52ba95405336f4074 (patch) | |
tree | 868197f79862e98b9c7f5a1f296d64832c68d48f /js/helper-classes/3D/draw-utils.js | |
parent | de25d2b7d05476d4f0d385b5e910db189f682d21 (diff) | |
parent | 70ff8dd670bc37c14caf850e06791d1e293b1e4b (diff) | |
download | ninja-fd4af6d81725dfa0630ac5e52ba95405336f4074.tar.gz |
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 79be5c14..871b832d 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -127,7 +127,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
127 | this._eltArray = []; | 127 | this._eltArray = []; |
128 | this._planesArray = []; | 128 | this._planesArray = []; |
129 | this.setDrawingSurfaceElement(stage.canvas); | 129 | this.setDrawingSurfaceElement(stage.canvas); |
130 | this.setSourceSpaceElement( this.application.ninja.currentDocument.documentRoot); | 130 | this.setSourceSpaceElement( this.application.ninja.currentDocument.model.documentRoot); |
131 | this.setWorkingPlane( [0,0,1,0] ); | 131 | this.setWorkingPlane( [0,0,1,0] ); |
132 | 132 | ||
133 | //Loop through all the top-level children of the current document and call drawUtils.addElement on them | 133 | //Loop through all the top-level children of the current document and call drawUtils.addElement on them |
@@ -700,7 +700,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
700 | this._lineColor = saveColor; | 700 | this._lineColor = saveColor; |
701 | this._drawingContext.lineWidth = saveLineWidth; | 701 | this._drawingContext.lineWidth = saveLineWidth; |
702 | 702 | ||
703 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { | 703 | if(this.application.ninja.currentDocument.model.documentRoot.id !== "UserContent") { |
704 | // draw an outline around the body | 704 | // draw an outline around the body |
705 | var stagePt = MathUtils.getPointOnPlane([0,0,1,0]); | 705 | var stagePt = MathUtils.getPointOnPlane([0,0,1,0]); |
706 | var stageMat = this.getPlaneToWorldMatrix([0,0,1], stagePt); | 706 | var stageMat = this.getPlaneToWorldMatrix([0,0,1], stagePt); |
@@ -818,7 +818,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
818 | // draw the lines | 818 | // draw the lines |
819 | var line, | 819 | var line, |
820 | nLines = this._gridLineArray.length; | 820 | nLines = this._gridLineArray.length; |
821 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { | 821 | if(this.application.ninja.currentDocument.model.documentRoot.id !== "UserContent") { |
822 | nLines = this._gridLineArray.length-4; | 822 | nLines = this._gridLineArray.length-4; |
823 | } | 823 | } |
824 | 824 | ||
@@ -827,7 +827,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
827 | this.drawIntersectedLine(line, this._drawingContext); | 827 | this.drawIntersectedLine(line, this._drawingContext); |
828 | } | 828 | } |
829 | 829 | ||
830 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { | 830 | if(this.application.ninja.currentDocument.model.documentRoot.id !== "UserContent") { |
831 | this._lineColor = "red"; | 831 | this._lineColor = "red"; |
832 | i = nLines; | 832 | i = nLines; |
833 | nLines += 4; | 833 | nLines += 4; |
@@ -926,7 +926,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
926 | // if all of the planes are aligned, check if they are aligned with the view direction | 926 | // if all of the planes are aligned, check if they are aligned with the view direction |
927 | if (flat) | 927 | if (flat) |
928 | { | 928 | { |
929 | var stage = this.application.ninja.currentDocument.documentRoot; | 929 | var stage = this.application.ninja.currentDocument.model.documentRoot; |
930 | var stageMat = this.viewUtils.getMatrixFromElement(stage); | 930 | var stageMat = this.viewUtils.getMatrixFromElement(stage); |
931 | var viewDir = [ stageMat[8], stageMat[9], stageMat[10] ]; | 931 | var viewDir = [ stageMat[8], stageMat[9], stageMat[10] ]; |
932 | viewDir = vecUtils.vecNormalize( 3, viewDir ); | 932 | viewDir = vecUtils.vecNormalize( 3, viewDir ); |
@@ -1216,7 +1216,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
1216 | value: function() { | 1216 | value: function() { |
1217 | // set the element to be the viewport object - temporarily | 1217 | // set the element to be the viewport object - temporarily |
1218 | var tmpCanvas = this.application.ninja.stage.canvas; | 1218 | var tmpCanvas = this.application.ninja.stage.canvas; |
1219 | var tmpStage = this.application.ninja.currentDocument.documentRoot; | 1219 | var tmpStage = this.application.ninja.currentDocument.model.documentRoot; |
1220 | this.viewUtils.pushViewportObj( tmpCanvas ); | 1220 | this.viewUtils.pushViewportObj( tmpCanvas ); |
1221 | 1221 | ||
1222 | // save the source space object and set to the target object | 1222 | // save the source space object and set to the target object |