aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/flag-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/flag-material.js')
-rw-r--r--js/lib/rdge/materials/flag-material.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/flag-material.js b/js/lib/rdge/materials/flag-material.js
index b87013ba..eb5e59df 100644
--- a/js/lib/rdge/materials/flag-material.js
+++ b/js/lib/rdge/materials/flag-material.js
@@ -102,6 +102,18 @@ var FlagMaterial = function FlagMaterial() {
102 this.setShaderValues(); 102 this.setShaderValues();
103 this.update( 0 ); 103 this.update( 0 );
104 } 104 }
105
106 this.resetToDefault = function()
107 {
108 this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
109 this._propValues[ this._propNames[1] ] = this._waveWidth;
110 this._propValues[ this._propNames[2] ] = this._waveHeight;
111 this._propValues[ this._propNames[3] ] = this._speed;
112
113 var nProps = this._propNames.length;
114 for (var i=0; i<nProps; i++)
115 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
116 };
105}; 117};
106 118
107/////////////////////////////////////////////////////////////////////////////////////// 119///////////////////////////////////////////////////////////////////////////////////////