aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/flag-material.js
diff options
context:
space:
mode:
authorhwc4872012-06-28 11:44:15 -0700
committerhwc4872012-06-28 11:44:15 -0700
commit22cbc9644b79df60b3f6336f9563debd47fb3ea1 (patch)
treef32687a920a039e0f048fab74627e0dc4ad6a8f1 /js/lib/rdge/materials/flag-material.js
parent2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff)
downloadninja-22cbc9644b79df60b3f6336f9563debd47fb3ea1.tar.gz
Added capability to split a mesh into multiiple parts to avoid buffer overflow situations.
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///////////////////////////////////////////////////////////////////////////////////////