aboutsummaryrefslogtreecommitdiff
path: root/js/lib/drawing
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-20 13:47:03 -0700
committerNivesh Rajbhandari2012-03-20 13:47:03 -0700
commit49eba848c3006045c6096d21fd8262c9d98a35d8 (patch)
tree6db9c35a736725606b6fb6c8159234b5d9951c96 /js/lib/drawing
parent634358d2697d9668bb9406ac7a029aafae542285 (diff)
downloadninja-49eba848c3006045c6096d21fd8262c9d98a35d8.tar.gz
IKNINJA-1370 - Toggle WebGL on/off is no longer working in the PI.
This bug was injected by some changes in GLWorld.import. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/lib/drawing')
-rwxr-xr-xjs/lib/drawing/world.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js
index 049145ce..c1ee0cd0 100755
--- a/js/lib/drawing/world.js
+++ b/js/lib/drawing/world.js
@@ -810,14 +810,17 @@ World.prototype.findTransformNodeByMaterial = function( materialNode, trNode )
810 return rtnNode; 810 return rtnNode;
811}; 811};
812 812
813World.prototype.import = function( importStr ) { 813World.prototype.import = function( importStr, fromToggle ) {
814 // import the worldattributes - not currently used 814 // import the worldattributes - not currently used
815 815
816 // determine if the data was written for export (no Ninja objects) 816 // determine if the data was written for export (no Ninja objects)
817 // or for save/restore 817 // or for save/restore
818 //var index = importStr.indexOf( "scenedata: " ); 818 //var index = importStr.indexOf( "scenedata: " );
819 var index = importStr.indexOf( "webGL: " ); 819 // Skip if we are toggling between canvas2d and WebGL since importStr doesn't have the correct webGL value yet
820 this._useWebGL = (index >= 0) 820 if(!fromToggle) {
821 var index = importStr.indexOf( "webGL: " );
822 this._useWebGL = (index >= 0)
823 }
821 if (this._useWebGL) 824 if (this._useWebGL)
822 { 825 {
823 // start RDGE 826 // start RDGE