diff options
Diffstat (limited to 'js/lib/geom/line.js')
-rwxr-xr-x | js/lib/geom/line.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js index 51a6fa98..4a935de8 100755 --- a/js/lib/geom/line.js +++ b/js/lib/geom/line.js | |||
@@ -112,7 +112,14 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok | |||
112 | rtnStr += "xAdj: " + this._xAdj + "\n"; | 112 | rtnStr += "xAdj: " + this._xAdj + "\n"; |
113 | rtnStr += "yAdj: " + this._yAdj + "\n"; | 113 | rtnStr += "yAdj: " + this._yAdj + "\n"; |
114 | rtnStr += "strokeWidth: " + this._strokeWidth + "\n"; | 114 | rtnStr += "strokeWidth: " + this._strokeWidth + "\n"; |
115 | rtnStr += "strokeColor: " + String(this._strokeColor) + "\n"; | 115 | |
116 | if(this._strokeColor.gradientMode) { | ||
117 | rtnStr += "strokeGradientMode: " + this._strokeColor.gradientMode + "\n"; | ||
118 | rtnStr += "strokeColor: " + this.gradientToString(this._strokeColor.color) + "\n"; | ||
119 | } else { | ||
120 | rtnStr += "strokeColor: " + String(this._strokeColor) + "\n"; | ||
121 | } | ||
122 | |||
116 | rtnStr += "strokeStyle: " + this._strokeStyle + "\n"; | 123 | rtnStr += "strokeStyle: " + this._strokeStyle + "\n"; |
117 | rtnStr += "slope: " + String(this._slope) + "\n"; | 124 | rtnStr += "slope: " + String(this._slope) + "\n"; |
118 | 125 | ||
@@ -145,7 +152,15 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok | |||
145 | 152 | ||
146 | var strokeMaterialName = this.getPropertyFromString( "strokeMat: ", importStr ); | 153 | var strokeMaterialName = this.getPropertyFromString( "strokeMat: ", importStr ); |
147 | this._strokeStyle = this.getPropertyFromString( "strokeStyle: ", importStr ); | 154 | this._strokeStyle = this.getPropertyFromString( "strokeStyle: ", importStr ); |
148 | this._strokeColor = eval( "[" + this.getPropertyFromString( "strokeColor: ", importStr ) + "]" ); | 155 | |
156 | if(importStr.indexOf("strokeGradientMode: ") < 0) | ||
157 | { | ||
158 | this._strokeColor = eval( "[" + this.getPropertyFromString( "strokeColor: ", importStr ) + "]" ); | ||
159 | } else { | ||
160 | this._strokeColor = {}; | ||
161 | this._strokeColor.gradientMode = this.getPropertyFromString( "strokeGradientMode: ", importStr ); | ||
162 | this._strokeColor.color = this.stringToGradient(this.getPropertyFromString( "strokeColor: ", importStr )); | ||
163 | } | ||
149 | 164 | ||
150 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | 165 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); |
151 | if (!strokeMat) { | 166 | if (!strokeMat) { |