diff options
author | Valerio Virgillito | 2012-03-22 17:17:48 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-22 17:17:48 -0700 |
commit | f6afc520f357dec8daeb9b9e748f99c8d8508f7c (patch) | |
tree | e227e049aacac52cfb75354e5f1d44e2a13c3617 /js/controllers/elements | |
parent | c38309949f9d84f86e769ea827950cc88440603f (diff) | |
parent | ccbbf1318fcf21409f0b1841119b49fadd92f83d (diff) | |
download | ninja-f6afc520f357dec8daeb9b9e748f99c8d8508f7c.tar.gz |
Merge pull request #133 from mqg734/WebGL-Animation-CheckBox
Web gl animation check box
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index b3ac9ddb..9b2fa618 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -105,6 +105,18 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
105 | case "editFillMaterial": | 105 | case "editFillMaterial": |
106 | NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.fillMaterial.getName()}); | 106 | NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.fillMaterial.getName()}); |
107 | break; | 107 | break; |
108 | case "animate": | ||
109 | if(value) | ||
110 | { | ||
111 | el.elementModel.shapeModel.animate = true; | ||
112 | el.elementModel.shapeModel.GLWorld.restartRenderLoop(); | ||
113 | } | ||
114 | else | ||
115 | { | ||
116 | el.elementModel.shapeModel.animate = false; | ||
117 | el.elementModel.shapeModel.GLWorld._canvas.task.stop(); | ||
118 | } | ||
119 | break; | ||
108 | default: | 120 | default: |
109 | CanvasController.setProperty(el, p, value); | 121 | CanvasController.setProperty(el, p, value); |
110 | } | 122 | } |
@@ -123,6 +135,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
123 | case "border": | 135 | case "border": |
124 | case "background": | 136 | case "background": |
125 | case "useWebGl": | 137 | case "useWebGl": |
138 | case "animate": | ||
126 | return this.getShapeProperty(el, p); | 139 | return this.getShapeProperty(el, p); |
127 | case "strokeMaterial": | 140 | case "strokeMaterial": |
128 | case "fillMaterial": | 141 | case "fillMaterial": |