From 22cbc9644b79df60b3f6336f9563debd47fb3ea1 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 28 Jun 2012 11:44:15 -0700 Subject: Added capability to split a mesh into multiiple parts to avoid buffer overflow situations. --- js/lib/rdge/materials/flag-material.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/lib/rdge/materials/flag-material.js') 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() { this.setShaderValues(); this.update( 0 ); } + + this.resetToDefault = function() + { + this._propValues[ this._propNames[0] ] = this._texMap.slice(0); + this._propValues[ this._propNames[1] ] = this._waveWidth; + this._propValues[ this._propNames[2] ] = this._waveHeight; + this._propValues[ this._propNames[3] ] = this._speed; + + var nProps = this._propNames.length; + for (var i=0; i