diff options
Diffstat (limited to 'js/panels/Materials/materials-popup.reel/materials-popup.js')
-rwxr-xr-x | js/panels/Materials/materials-popup.reel/materials-popup.js | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index bd10f7a5..9220659e 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -164,8 +164,10 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
164 | var index = value.lastIndexOf( "/" ); | 164 | var index = value.lastIndexOf( "/" ); |
165 | if (index < 0) index = value.lastIndexOf( "\\" ); | 165 | if (index < 0) index = value.lastIndexOf( "\\" ); |
166 | if (index >= 0) | 166 | if (index >= 0) |
167 | { | ||
167 | value = value.substr( index+1 ); | 168 | value = value.substr( index+1 ); |
168 | value = "assets\\images\\" + value; | 169 | value = "assets\\images\\" + value; |
170 | } | ||
169 | rtnValue = value.slice(0); | 171 | rtnValue = value.slice(0); |
170 | } | 172 | } |
171 | break; | 173 | break; |
@@ -214,30 +216,48 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
214 | enumerable: true, | 216 | enumerable: true, |
215 | value: function(materialID) | 217 | value: function(materialID) |
216 | { | 218 | { |
217 | //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. | 219 | //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. |
218 | this.materialsData = []; | 220 | this.materialsData = []; |
219 | 221 | ||
220 | this._materialName = materialID; | 222 | this._materialName = materialID; |
221 | if( | 223 | if( |
222 | (materialID === "UberMaterial") || | 224 | (materialID === "BumpMetalMaterial") || |
223 | (materialID === "FlatMaterial") || | 225 | (materialID === "DeformMaterial") || |
224 | (materialID === "BumpMetalMaterial") || | 226 | (materialID === "FlatMaterial") || |
225 | (materialID === "LinearGradientMaterial") || | 227 | (materialID === "FlagMaterial") || |
226 | (materialID === "RadialGradientMaterial") | 228 | (materialID === "FlyMaterial") || |
229 | (materialID === "JuliaMaterial") || | ||
230 | (materialID === "KeleidoscopeMaterial") || | ||
231 | (materialID === "LinearGradientMaterial") || | ||
232 | (materialID === "MandelMaterial") || | ||
233 | (materialID === "PlasmaMaterial") || | ||
234 | (materialID === "PulseMaterial") || | ||
235 | (materialID === "RadialBlurMaterial") || | ||
236 | (materialID === "RadialGradientMaterial") || | ||
237 | (materialID === "ReliefTunnelMaterial") || | ||
238 | (materialID === "SquareTunnelMaterial") || | ||
239 | (materialID === "StarMaterial") || | ||
240 | (materialID === "TaperMaterial") || | ||
241 | (materialID === "TunnelMaterial") || | ||
242 | (materialID === "TwistMaterial") || | ||
243 | (materialID === "TwistVertMaterial") || | ||
244 | (materialID === "UberMaterial") || | ||
245 | (materialID === "WaterMaterial") || | ||
246 | (materialID === "ZInvertMaterial") | ||
227 | ) | 247 | ) |
228 | { | 248 | { |
229 | var material = MaterialsModel.getMaterial( materialID ); | 249 | var material = MaterialsModel.getMaterial( materialID ); |
230 | if (material) | 250 | if (material) |
231 | { | 251 | { |
232 | this._material = material; | 252 | this._material = material; |
233 | this.materialsData = this.getMaterialData( material ); | 253 | this.materialsData = this.getMaterialData( material ); |
234 | } | 254 | } |
235 | } | 255 | } |
236 | else | 256 | else |
237 | { | 257 | { |
238 | this.materialsData = this[materialID]; | 258 | this.materialsData = this[materialID]; |
239 | } | 259 | } |
240 | this.needsDraw = true; | 260 | this.needsDraw = true; |
241 | } | 261 | } |
242 | }, | 262 | }, |
243 | 263 | ||