From 5b4f6b1618cf571a6bce5a631f976a008e04a64e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 29 Mar 2012 15:52:08 -0700 Subject: Updated shapes to always check for its stroke and fill colors and materials instead of relying on the shapeModel cache because it can get out of sync. Signed-off-by: Nivesh Rajbhandari --- js/lib/drawing/world.js | 2 +- js/lib/geom/circle.js | 15 +++++++++ js/lib/geom/geom-obj.js | 82 +++++++++++++++++++++++++----------------------- js/lib/geom/line.js | 8 +++++ js/lib/geom/rectangle.js | 15 +++++++++ 5 files changed, 81 insertions(+), 41 deletions(-) (limited to 'js/lib') diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index fec6a478..1bf8c2e5 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js @@ -930,7 +930,7 @@ World.prototype.importObjectsJSON = function( jObj, parentGeomObj ) // determine if we have children if (jObj.children) { - var nKids = ojObjbj.chilodren.length; + var nKids = jObj.children.length; for (var i=0; i 4) { - len = 4; - } + var len = colors.length; + // TODO - Current shaders only support 4 color stops + if(len > 4) { + len = 4; + } - for(var n=0; n