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 4354408d..c2275b24 100644
--- a/js/lib/rdge/materials/deform-material.js
+++ b/js/lib/rdge/materials/deform-material.js
@@ -74,6 +74,16 @@ var DeformMaterial = function DeformMaterial() {
74 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); 74 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);
75 this.update(0); 75 this.update(0);
76 }; 76 };
77
78 this.resetToDefault = function()
79 {
80 this._propValues[this._propNames[0]] = this._defaultTexMap.slice(0);
81 this._propValues[this._propNames[1]] = 1.0;
82
83 var nProps = this._propNames.length;
84 for (var i=0; i<nProps; i++)
85 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
86 };
77}; 87};
78 88
79/////////////////////////////////////////////////////////////////////////////////////// 89///////////////////////////////////////////////////////////////////////////////////////