From 8e9ac98ea1001289cb3834b262200eee253cb408 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 23 Mar 2012 11:41:11 -0700 Subject: Respect play/pause WebGL animation when saving files and re-rendering caused by geometry changes. Signed-off-by: Nivesh Rajbhandari --- js/lib/drawing/world.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/lib/drawing/world.js') diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index 07a2c3ae..b87c6272 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js @@ -117,6 +117,8 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) { this.getRenderer = function() { return this.renderer; }; + // Flag to play/pause animation at authortime + this._previewAnimation = true; //////////////////////////////////////////////////////////////////////////////////// // RDGE // local variables @@ -475,6 +477,10 @@ World.prototype.restartRenderLoop = function() { if (this._allMapsLoaded) { //console.log( "starting task" ); this._canvas.task.start(); + if(!this._previewAnimation) { + //render only once if authortime animation is turned off + this._canvas.task.stop(); + } } else { //console.log( "stopping task" ); this._canvas.task.stop(); -- cgit v1.2.3