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/twist-material.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'js/lib/rdge/materials/twist-material.js') diff --git a/js/lib/rdge/materials/twist-material.js b/js/lib/rdge/materials/twist-material.js index b757afb8..f42a5f02 100644 --- a/js/lib/rdge/materials/twist-material.js +++ b/js/lib/rdge/materials/twist-material.js @@ -67,6 +67,16 @@ var TwistMaterial = function TwistMaterial() { this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); this.update(0); }; + + this.resetToDefault = function() + { + this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); + this._propValues[this._propNames[u_speed_index]] = 1.0; + + var nProps = this._propNames.length; + for (var i=0; i