aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index d72d9c14..b5e63514 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 }
@@ -119,6 +144,43 @@ exports.ShapesController = Montage.create(CanvasController, {
119 case "background": 144 case "background":
120 case "useWebGl": 145 case "useWebGl":
121 return this.getShapeProperty(el, p); 146 return this.getShapeProperty(el, p);
147 case "strokeHardness":
148 if (el.elementModel && el.elementModel.shapeModel){
149 return el.elementModel.shapeModel.GLGeomObj.getStrokeHardness();;
150 } else {
151 return null;
152 }
153 break;
154 case "doSmoothing":
155 if (el.elementModel && el.elementModel.shapeModel){
156 return el.elementModel.shapeModel.GLGeomObj.getDoSmoothing();;
157 } else {
158 return null;
159 }
160 break;
161 case "strokeSmoothing":
162 if (el.elementModel && el.elementModel.shapeModel){
163 return el.elementModel.shapeModel.GLGeomObj.getSmoothingAmount();;
164 } else {
165 return null;
166 }
167 break;
168 case "isCalligraphic":
169 if (el.elementModel && el.elementModel.shapeModel){
170 return el.elementModel.shapeModel.GLGeomObj.getStrokeUseCalligraphic();;
171 } else {
172 return null;
173 }
174 break;
175 case "strokeAngle":
176 if (el.elementModel && el.elementModel.shapeModel){
177 return el.elementModel.shapeModel.GLGeomObj.getStrokeAngle();;
178 } else {
179 return null;
180 }
181 break;
182
183
122 case "strokeMaterial": 184 case "strokeMaterial":
123 case "fillMaterial": 185 case "fillMaterial":
124 var m = this.getShapeProperty(el, p); 186 var m = this.getShapeProperty(el, p);