From 86770d0dba6b137e651cbf5c8d240856be65857c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 23 Mar 2012 14:59:51 -0700 Subject: Fixed a problem switching from 3D to 2D and back to 3D. --- js/lib/geom/geom-obj.js | 2 +- js/lib/geom/rectangle.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'js/lib/geom') diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index dbef4859..a87bdbf5 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js @@ -248,7 +248,7 @@ var GeomObj = function GLGeomObj() { this.exportMaterialsJSON = function() { var jObj; - if (this._materialArray && this._materialNodeArray) + if (this._materialArray && this._materialNodeArray && this.getWorld().isWebGL()) { var nMats = this._materialArray.length; if (nMats > 0) diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js index 38e428bd..e511d5f4 100755 --- a/js/lib/geom/rectangle.js +++ b/js/lib/geom/rectangle.js @@ -187,7 +187,8 @@ var Rectangle = function GLRectangle() { /////////////////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////////////////// - this.export = function() { + /* + this.export = function() { var rtnStr = "type: " + this.geomType() + "\n"; ///////////////////////////////////////////////////////////////////////// @@ -243,6 +244,7 @@ var Rectangle = function GLRectangle() { return rtnStr; }; + */ // JSON export this.exportJSON = function() -- cgit v1.2.3