aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/deform-material.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 14:16:17 -0700
committerValerio Virgillito2012-07-09 14:18:36 -0700
commit1bbba17e8605434356de0a477710d6a0136986fc (patch)
tree7cdc80226b776c6fb2250e250acdbcd53fdb1ddd /js/lib/rdge/materials/deform-material.js
parentdc5b7a479a185dda8e9a09f4bbe26bd290641624 (diff)
parentab80aa9c7da912db384ec48c656f84fd673b5253 (diff)
downloadninja-1bbba17e8605434356de0a477710d6a0136986fc.tar.gz
Merge branch 'Taper' of https://github.com/ericmueller/ninja-internal
Conflicts: js/lib/geom/circle.js js/lib/rdge/materials/linear-gradient-material.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
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///////////////////////////////////////////////////////////////////////////////////////