aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/deform-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/deform-material.js')
-rw-r--r--js/lib/rdge/materials/deform-material.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/deform-material.js b/js/lib/rdge/materials/deform-material.js
index 234f22e4..6145f1a6 100644
--- a/js/lib/rdge/materials/deform-material.js
+++ b/js/lib/rdge/materials/deform-material.js
@@ -98,6 +98,16 @@ var DeformMaterial = function DeformMaterial() {
98 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); 98 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);
99 this.update(0); 99 this.update(0);
100 }; 100 };
101
102 this.resetToDefault = function()
103 {
104 this._propValues[this._propNames[0]] = this._defaultTexMap.slice(0);
105 this._propValues[this._propNames[1]] = 1.0;
106
107 var nProps = this._propNames.length;
108 for (var i=0; i<nProps; i++)
109 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
110 };
101}; 111};
102 112
103/////////////////////////////////////////////////////////////////////////////////////// 113///////////////////////////////////////////////////////////////////////////////////////