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/pulse-material.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/lib/rdge/materials/pulse-material.js') diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 155bd8a9..199d65c8 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -93,6 +93,18 @@ var PulseMaterial = function PulseMaterial() this.update( 0 ); }; + this.resetToDefault = function() + { + this._propValues[ this._propNames[ u_tex0_index] ] = this._texMap.slice(0); + this._propValues[ this._propNames[u_xScale_index] ] = 0.5; + this._propValues[ this._propNames[u_yScale_index] ] = 0.4; + this._propValues[ this._propNames[ u_speed_index] ] = 1.0; + + var nProps = this._propNames.length; + for (var i=0; i