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 7e3c17f9..d0a22454 100644
--- a/js/lib/rdge/materials/flag-material.js
+++ b/js/lib/rdge/materials/flag-material.js
@@ -78,6 +78,18 @@ var FlagMaterial = function FlagMaterial() {
78 this.setShaderValues(); 78 this.setShaderValues();
79 this.update( 0 ); 79 this.update( 0 );
80 } 80 }
81
82 this.resetToDefault = function()
83 {
84 this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
85 this._propValues[ this._propNames[1] ] = this._waveWidth;
86 this._propValues[ this._propNames[2] ] = this._waveHeight;
87 this._propValues[ this._propNames[3] ] = this._speed;
88
89 var nProps = this._propNames.length;
90 for (var i=0; i<nProps; i++)
91 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
92 };
81}; 93};
82 94
83/////////////////////////////////////////////////////////////////////////////////////// 95///////////////////////////////////////////////////////////////////////////////////////