aboutsummaryrefslogtreecommitdiff
path: root/js/lib/NJUtils.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-04-09 10:33:35 -0700
committerValerio Virgillito2012-04-09 10:33:35 -0700
commitbd43ce383b050d03b0f92cc923c517febc66ca28 (patch)
tree91b95c6c9aef779a743b710105546a8ae74bff12 /js/lib/NJUtils.js
parent86b98ea086b133f4efb247c39fc6200dcf383a65 (diff)
parentc62c5c4287a1ee8a276b32dc61f06abbc24818ec (diff)
downloadninja-bd43ce383b050d03b0f92cc923c517febc66ca28.tar.gz
Merge pull request #159 from mqg734/WebGLMaterials
3D tools, eyedropper, fill, ink-bucket, gradients and shape fixes.
Diffstat (limited to 'js/lib/NJUtils.js')
-rwxr-xr-xjs/lib/NJUtils.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js
index 904aa41e..67bb59c4 100755
--- a/js/lib/NJUtils.js
+++ b/js/lib/NJUtils.js
@@ -94,7 +94,10 @@ exports.NJUtils = Object.create(Object.prototype, {
94 ///// TODO: find a different place for this function 94 ///// TODO: find a different place for this function
95 makeElementModel: { 95 makeElementModel: {
96 value: function(el, selection, controller, isShape) { 96 value: function(el, selection, controller, isShape) {
97 var p3d = Montage.create(Properties3D).init(el); 97 var p3d = Montage.create(Properties3D);
98 if(selection === "Stage") {
99 p3d.init(el, true);
100 }
98 var shapeProps = null; 101 var shapeProps = null;
99 var pi = controller + "Pi"; 102 var pi = controller + "Pi";
100 103
@@ -136,7 +139,8 @@ exports.NJUtils = Object.create(Object.prototype, {
136 controller: { value: ControllerFactory.getController(controller)}, 139 controller: { value: ControllerFactory.getController(controller)},
137 pi: { value: pi}, 140 pi: { value: pi},
138 props3D: { value: p3d}, 141 props3D: { value: p3d},
139 shapeModel: { value: shapeProps} 142 shapeModel: { value: shapeProps},
143 isShape: { value: isShape}
140 }); 144 });
141 145
142 } 146 }
@@ -168,6 +172,7 @@ exports.NJUtils = Object.create(Object.prototype, {
168 // TODO - Need more info about the shape 172 // TODO - Need more info about the shape
169 selection = "canvas"; 173 selection = "canvas";
170 controller = "shape"; 174 controller = "shape";
175 isShape = true;
171 } 176 }
172 else 177 else
173 { 178 {
@@ -179,6 +184,9 @@ exports.NJUtils = Object.create(Object.prototype, {
179 break; 184 break;
180 } 185 }
181 this.makeElementModel(el, selection, controller, isShape); 186 this.makeElementModel(el, selection, controller, isShape);
187 if(el.elementModel && el.elementModel.props3D) {
188 el.elementModel.props3D.init(el, (selection === "Stage"));
189 }
182 } 190 }
183 }, 191 },
184 192