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 b4bf0972..eabc32ea 100644 --- a/js/lib/rdge/materials/fly-material.js +++ b/js/lib/rdge/materials/fly-material.js | |||
@@ -93,6 +93,16 @@ var FlyMaterial = function FlyMaterial() { | |||
93 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); | 93 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); |
94 | this.update( 0 ); | 94 | this.update( 0 ); |
95 | }; | 95 | }; |
96 | |||
97 | this.resetToDefault = function() | ||
98 | { | ||
99 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); | ||
100 | this._propValues[this._propNames[u_speed_index]] = 1.0; | ||
101 | |||
102 | var nProps = this._propNames.length; | ||
103 | for (var i=0; i<nProps; i++) | ||
104 | this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] ); | ||
105 | }; | ||
96 | }; | 106 | }; |
97 | 107 | ||
98 | /////////////////////////////////////////////////////////////////////////////////////// | 108 | /////////////////////////////////////////////////////////////////////////////////////// |