aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/line.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/line.js')
-rwxr-xr-xjs/lib/geom/line.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js
index a44026eb..16c40623 100755
--- a/js/lib/geom/line.js
+++ b/js/lib/geom/line.js
@@ -87,8 +87,17 @@ exports.Line = Object.create(GeomObj, {
87 this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; 87 this._materialSpecular = [0.4, 0.4, 0.4, 1.0];
88 88
89 if(strokeMaterial) { 89 if(strokeMaterial) {
90 this._strokeMaterial = strokeMaterial; 90 this._strokeMaterial = strokeMaterial.dup();
91 if (strokeColor && this._strokeMaterial.hasProperty( "color" )) this._strokeMaterial.setProperty( "color", this._strokeColor ); 91 } else {
92 this._strokeMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup();
93 }
94
95 if(strokeColor) {
96 if(this._strokeMaterial.hasProperty("color")) {
97 this._strokeMaterial.setProperty( "color", this._strokeColor );
98 } else if (this._strokeMaterial && (this._strokeMaterial.gradientType === this._strokeColor.gradientMode)) {
99 this._strokeMaterial.setGradientData(this._strokeColor.color);
100 }
92 } 101 }
93 } 102 }
94 }, 103 },