aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-14 15:37:09 -0700
committerPushkar Joshi2012-03-14 15:37:09 -0700
commit23baa44e0bc7bfb24e42702c1ef58bf62da083d8 (patch)
tree6efae3071b1b09e859fdefdbdac848063a22c355 /js/controllers
parent6023f7c8258e660388ee33730601f1161f9299e9 (diff)
downloadninja-23baa44e0bc7bfb24e42702c1ef58bf62da083d8.tar.gz
PI for pen and brush strokes
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index d72d9c14..b273350a 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -100,6 +100,31 @@ exports.ShapesController = Montage.create(CanvasController, {
100 el.elementModel.shapeModel.GLWorld.render(); 100 el.elementModel.shapeModel.GLWorld.render();
101 } 101 }
102 break; 102 break;
103 case "strokeHardness":
104 this.setShapeProperty(el, "strokeHardness", value);
105 el.elementModel.shapeModel.GLGeomObj.setStrokeHardness(val);
106 el.elementModel.shapeModel.GLWorld.render();
107 break;
108 case "strokeSmoothing":
109 this.setShapeProperty(el, "strokeSmoothing", value);
110 el.elementModel.shapeModel.GLGeomObj.setSmoothingAmount(val);
111 el.elementModel.shapeModel.GLWorld.render();
112 break;
113 case "doSmoothing":
114 this.setShapeProperty(el, "doSmoothing", value);
115 el.elementModel.shapeModel.GLGeomObj.setDoSmoothing(value);
116 el.elementModel.shapeModel.GLWorld.render();
117 break;
118 case "isCalligraphic":
119 this.setShapeProperty(el, "isCalligraphic", value);
120 el.elementModel.shapeModel.GLGeomObj.setStrokeUseCalligraphic(value);
121 el.elementModel.shapeModel.GLWorld.render();
122 break;
123 case "strokeAngle":
124 this.setShapeProperty(el, "strokeAngle", value);
125 el.elementModel.shapeModel.GLGeomObj.setStrokeAngle(Math.PI * -val/180);
126 el.elementModel.shapeModel.GLWorld.render();
127 break;
103 default: 128 default:
104 CanvasController.setProperty(el, p, value); 129 CanvasController.setProperty(el, p, value);
105 } 130 }