diff options
author | Jon Reid | 2012-04-10 14:52:23 -0700 |
---|---|---|
committer | Jon Reid | 2012-04-10 14:52:23 -0700 |
commit | c19987997758cf47ac9b93a2a767a0e2a9072745 (patch) | |
tree | eb68491c5d04a5cf5ab75bedf2d6bbed3c7a3603 /js/lib/geom/line.js | |
parent | 03a3b32b9b0fd2dc8e4b54bfd5282fd1f8fb6ed6 (diff) | |
parent | 422b14fc60be84c116115f2e71e3499e232f3f05 (diff) | |
download | ninja-c19987997758cf47ac9b93a2a767a0e2a9072745.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/lib/geom/line.js')
-rwxr-xr-x | js/lib/geom/line.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js index 1b2dd4fc..8ee39098 100755 --- a/js/lib/geom/line.js +++ b/js/lib/geom/line.js | |||
@@ -44,7 +44,7 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok | |||
44 | 44 | ||
45 | this._slope = slope; | 45 | this._slope = slope; |
46 | this._strokeWidth = strokeSize; | 46 | this._strokeWidth = strokeSize; |
47 | if (strokeColor) this._strokeColor = strokeColor.slice(); | 47 | this._strokeColor = strokeColor; |
48 | 48 | ||
49 | this._strokeStyle = strokeStyle; | 49 | this._strokeStyle = strokeStyle; |
50 | this._scaleX = (world.getViewportWidth())/(world.getViewportHeight()); | 50 | this._scaleX = (world.getViewportWidth())/(world.getViewportHeight()); |
@@ -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 | ||