diff options
Diffstat (limited to 'js/lib/rdge/materials/fly-material.js')
-rw-r--r-- | js/lib/rdge/materials/fly-material.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/fly-material.js b/js/lib/rdge/materials/fly-material.js index 4e8bd9b5..b6cf2ba1 100644 --- a/js/lib/rdge/materials/fly-material.js +++ b/js/lib/rdge/materials/fly-material.js | |||
@@ -69,6 +69,16 @@ var FlyMaterial = function FlyMaterial() { | |||
69 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); | 69 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); |
70 | this.update( 0 ); | 70 | this.update( 0 ); |
71 | }; | 71 | }; |
72 | |||
73 | this.resetToDefault = function() | ||
74 | { | ||
75 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); | ||
76 | this._propValues[this._propNames[u_speed_index]] = 1.0; | ||
77 | |||
78 | var nProps = this._propNames.length; | ||
79 | for (var i=0; i<nProps; i++) | ||
80 | this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] ); | ||
81 | }; | ||
72 | }; | 82 | }; |
73 | 83 | ||
74 | /////////////////////////////////////////////////////////////////////////////////////// | 84 | /////////////////////////////////////////////////////////////////////////////////////// |