diff options
author | Nivesh Rajbhandari | 2012-03-26 17:36:27 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-26 17:36:27 -0700 |
commit | 723ea402b74efa0424b96c7e125c8ebb2b72410c (patch) | |
tree | 261ad196fc851ea78359ca2bdb653ccacce535d1 /js/lib/rdge | |
parent | 21ed09eedee336e69ce2e0f9fd254eb989227adf (diff) | |
download | ninja-723ea402b74efa0424b96c7e125c8ebb2b72410c.tar.gz |
Fixed issue with WebGL materials not working after file-save or chrome-preview. Also fixed Raiders material not showing in the PI or working during Chrome Preview.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/lib/rdge')
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index f4a4baa2..fee02a1d 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -282,10 +282,26 @@ var RaidersMaterial = function RaidersMaterial() | |||
282 | this.inheritedFrom(); | 282 | this.inheritedFrom(); |
283 | 283 | ||
284 | this._name = "RaidersMaterial"; | 284 | this._name = "RaidersMaterial"; |
285 | this._shaderName = "radialBlur"; | 285 | this._shaderName = "raiders"; |
286 | 286 | ||
287 | this._texMap = 'assets/images/raiders.png'; | 287 | this._texMap = 'assets/images/raiders.png'; |
288 | this._propValues[ this._propNames[0] ] = this._texMap.slice(0); | 288 | this._propValues[ this._propNames[0] ] = this._texMap.slice(0); |
289 | |||
290 | |||
291 | // duplcate method requirde | ||
292 | this.dup = function( world ) { | ||
293 | // allocate a new uber material | ||
294 | var newMat = new RaidersMaterial(); | ||
295 | |||
296 | // copy over the current values; | ||
297 | var propNames = [], propValues = [], propTypes = [], propLabels = []; | ||
298 | this.getAllProperties( propNames, propValues, propTypes, propLabels); | ||
299 | var n = propNames.length; | ||
300 | for (var i=0; i<n; i++) | ||
301 | newMat.setProperty( propNames[i], propValues[i] ); | ||
302 | |||
303 | return newMat; | ||
304 | }; | ||
289 | } | 305 | } |
290 | 306 | ||
291 | RaidersMaterial.prototype = new Material(); | 307 | RaidersMaterial.prototype = new Material(); |