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-vert-material.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'js/lib/rdge/materials/twist-vert-material.js') diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js index 7c2dae5e..870e068d 100644 --- a/js/lib/rdge/materials/twist-vert-material.js +++ b/js/lib/rdge/materials/twist-vert-material.js @@ -81,6 +81,20 @@ var TwistVertMaterial = function TwistVertMaterial() this.setShaderValues(); }; + this.resetToDefault = function() + { + this._propValues[this._propNames[0]] = 0.0; + this._propValues[this._propNames[1]] = 1.0; + this._propValues[this._propNames[2]] = 2.0 * Math.PI; + this._propValues[this._propNames[3]] = this._speed; + this._propValues[this._propNames[4]] = this._tex0.slice(); + this._propValues[this._propNames[5]] = this._tex1.slice(); + + var nProps = this._propNames.length; + for (var i=0; i