diff options
author | Nivesh Rajbhandari | 2012-03-29 15:52:08 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-29 17:04:06 -0700 |
commit | 5b4f6b1618cf571a6bce5a631f976a008e04a64e (patch) | |
tree | d073038b08d14884f87c7776e9e192256d414cfb /js/lib/geom/line.js | |
parent | 6b61de58f0733b40f64ed996933ac89927e922a1 (diff) | |
download | ninja-5b4f6b1618cf571a6bce5a631f976a008e04a64e.tar.gz |
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 <mqg734@motorola.com>
Diffstat (limited to 'js/lib/geom/line.js')
-rwxr-xr-x | js/lib/geom/line.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js index e839e229..2b2434f5 100755 --- a/js/lib/geom/line.js +++ b/js/lib/geom/line.js | |||
@@ -137,6 +137,14 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok | |||
137 | this._strokeStyle = jObj.strokeStyle; | 137 | this._strokeStyle = jObj.strokeStyle; |
138 | this._strokeColor = jObj.strokeColor; | 138 | this._strokeColor = jObj.strokeColor; |
139 | var strokeMaterialName = jObj.strokeMat; | 139 | var strokeMaterialName = jObj.strokeMat; |
140 | |||
141 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | ||
142 | if (!strokeMat) { | ||
143 | console.log( "object material not found in library: " + strokeMaterialName ); | ||
144 | strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
145 | } | ||
146 | this._strokeMaterial = strokeMat; | ||
147 | |||
140 | this.importMaterialsJSON( jObj.materials ); | 148 | this.importMaterialsJSON( jObj.materials ); |
141 | }; | 149 | }; |
142 | 150 | ||