diff options
author | Eric Guzman | 2012-03-27 10:22:42 -0700 |
---|---|---|
committer | Eric Guzman | 2012-03-27 10:22:42 -0700 |
commit | 309b201017da2a4094df4f06adeeff9d396b193a (patch) | |
tree | 92257b32855bcd31dd74967b085a6632fd7dbe9b /js/ninja.reel/ninja.js | |
parent | da03585a0b03220281f6d54d9acf0ae0fafaef16 (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-309b201017da2a4094df4f06adeeff9d396b193a.tar.gz |
Merge branch 'refs/heads/master' into PresetsPI
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-x | js/ninja.reel/ninja.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 2a6e49f7..c76c7d46 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -166,6 +166,27 @@ exports.Ninja = Montage.create(Component, { | |||
166 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); | 166 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); |
167 | this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); | 167 | this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); |
168 | 168 | ||
169 | this._toggleWebGlAnimation(this.appModel.livePreview); | ||
170 | } | ||
171 | }, | ||
172 | |||
173 | // Turn on WebGL animation during preview | ||
174 | _toggleWebGlAnimation: { | ||
175 | value: function(inLivePreview) { | ||
176 | var glCanvases = this.currentDocument.iframe.contentWindow.document.querySelectorAll('[data-RDGE-id]'), | ||
177 | glShapeModel; | ||
178 | if(glCanvases) { | ||
179 | for(var i = 0, len = glCanvases.length; i<len; i++) { | ||
180 | glShapeModel = glCanvases[i].elementModel.shapeModel; | ||
181 | if(inLivePreview) { | ||
182 | glShapeModel.GLWorld._previewAnimation = true; | ||
183 | glShapeModel.GLWorld.restartRenderLoop(); | ||
184 | } else if (!glShapeModel.animate ) { | ||
185 | glShapeModel.GLWorld._previewAnimation = false; | ||
186 | glShapeModel.GLWorld._canvas.task.stop(); | ||
187 | } | ||
188 | } | ||
189 | } | ||
169 | } | 190 | } |
170 | }, | 191 | }, |
171 | 192 | ||