aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/line.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 12:15:26 -0700
committerValerio Virgillito2012-07-09 12:15:26 -0700
commit1839f24e8dcbad38d1381bbcd65c17a9caa45987 (patch)
tree516a29ca99d4aae0d5228223fff438c1a3c4e0d3 /js/lib/geom/line.js
parentaedd14b18695d031f695d27dfbd94df5614495bb (diff)
parentfebfdb18042d1c73ac58ee4e35c5f176428dee00 (diff)
downloadninja-1839f24e8dcbad38d1381bbcd65c17a9caa45987.tar.gz
Merge pull request #346 from mqg734/MaterialsUI
UI support for preview, edit, duplicate and delete of WebGL Materials.
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 },