diff options
author | Jose Antonio Marquez | 2012-02-29 15:15:51 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-29 15:15:51 -0800 |
commit | b0b4a1ee6792d98f06cbd8ecf5291e66db8a4eef (patch) | |
tree | 5978eb8742df65de0e0b98454bfc04c2b4cac6e7 /js/controllers/elements | |
parent | 3a25881b3a463e4f695be2f663f141710ba1d1c1 (diff) | |
parent | b09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff) | |
download | ninja-b0b4a1ee6792d98f06cbd8ecf5291e66db8a4eef.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Conflicts:
js/controllers/elements/shapes-controller.js
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index a4c31c3e..749a1dd9 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -19,23 +19,51 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
19 | this.setShapeProperty(el, "strokeSize", value); | 19 | this.setShapeProperty(el, "strokeSize", value); |
20 | el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(val); | 20 | el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(val); |
21 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 21 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
22 | el.elementModel.shapeModel.GLWorld.render(); | ||
22 | break; | 23 | break; |
23 | case "innerRadius": | 24 | case "innerRadius": |
24 | this.setShapeProperty(el, "innerRadius", value); | 25 | this.setShapeProperty(el, "innerRadius", value); |
25 | el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); | 26 | el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); |
26 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 27 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
28 | el.elementModel.shapeModel.GLWorld.render(); | ||
29 | break; | ||
30 | case "tlRadius": | ||
31 | this.setShapeProperty(el, "tlRadius", value); | ||
32 | el.elementModel.shapeModel.GLGeomObj.setTLRadius(val); | ||
33 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
34 | el.elementModel.shapeModel.GLWorld.render(); | ||
35 | break; | ||
36 | case "trRadius": | ||
37 | this.setShapeProperty(el, "trRadius", value); | ||
38 | el.elementModel.shapeModel.GLGeomObj.setTRRadius(val); | ||
39 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
40 | el.elementModel.shapeModel.GLWorld.render(); | ||
41 | break; | ||
42 | case "blRadius": | ||
43 | this.setShapeProperty(el, "blRadius", value); | ||
44 | el.elementModel.shapeModel.GLGeomObj.setBLRadius(val); | ||
45 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
46 | el.elementModel.shapeModel.GLWorld.render(); | ||
47 | break; | ||
48 | case "brRadius": | ||
49 | this.setShapeProperty(el, "brRadius", value); | ||
50 | el.elementModel.shapeModel.GLGeomObj.setBRRadius(val); | ||
51 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
52 | el.elementModel.shapeModel.GLWorld.render(); | ||
27 | break; | 53 | break; |
28 | case "width": | 54 | case "width": |
29 | el.elementModel.shapeModel.GLGeomObj.setWidth(val); | 55 | el.elementModel.shapeModel.GLGeomObj.setWidth(val); |
30 | CanvasController.setProperty(el, p, value); | 56 | CanvasController.setProperty(el, p, value); |
31 | el.elementModel.shapeModel.GLWorld.setViewportFromCanvas(el); | 57 | el.elementModel.shapeModel.GLWorld.setViewportFromCanvas(el); |
32 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 58 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
59 | el.elementModel.shapeModel.GLWorld.render(); | ||
33 | break; | 60 | break; |
34 | case "height": | 61 | case "height": |
35 | el.elementModel.shapeModel.GLGeomObj.setHeight(val); | 62 | el.elementModel.shapeModel.GLGeomObj.setHeight(val); |
36 | CanvasController.setProperty(el, p, value); | 63 | CanvasController.setProperty(el, p, value); |
37 | el.elementModel.shapeModel.GLWorld.setViewportFromCanvas(el); | 64 | el.elementModel.shapeModel.GLWorld.setViewportFromCanvas(el); |
38 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 65 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
66 | el.elementModel.shapeModel.GLWorld.render(); | ||
39 | break; | 67 | break; |
40 | case "useWebGl": | 68 | case "useWebGl": |
41 | var canvas = njModule.NJUtils.makeNJElement("canvas", "Canvas", "shape", el.className, true); | 69 | var canvas = njModule.NJUtils.makeNJElement("canvas", "Canvas", "shape", el.className, true); |
@@ -56,6 +84,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
56 | el.elementModel.shapeModel.GLGeomObj.setStrokeMaterial(sm); | 84 | el.elementModel.shapeModel.GLGeomObj.setStrokeMaterial(sm); |
57 | el.elementModel.shapeModel.strokeMaterial = sm; | 85 | el.elementModel.shapeModel.strokeMaterial = sm; |
58 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 86 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
87 | el.elementModel.shapeModel.GLWorld.render(); | ||
59 | } | 88 | } |
60 | break; | 89 | break; |
61 | case "fillMaterial": | 90 | case "fillMaterial": |
@@ -65,12 +94,12 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
65 | el.elementModel.shapeModel.GLGeomObj.setFillMaterial(fm); | 94 | el.elementModel.shapeModel.GLGeomObj.setFillMaterial(fm); |
66 | el.elementModel.shapeModel.fillMaterial = fm; | 95 | el.elementModel.shapeModel.fillMaterial = fm; |
67 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 96 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
97 | el.elementModel.shapeModel.GLWorld.render(); | ||
68 | } | 98 | } |
69 | break; | 99 | break; |
70 | default: | 100 | default: |
71 | CanvasController.setProperty(el, p, value); | 101 | CanvasController.setProperty(el, p, value); |
72 | } | 102 | } |
73 | el.elementModel.shapeModel.GLWorld.render(); | ||
74 | } | 103 | } |
75 | }, | 104 | }, |
76 | 105 | ||