aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/water-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/water-material.js')
-rw-r--r--js/lib/rdge/materials/water-material.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js
index 5e63ea2c..0b8c8235 100644
--- a/js/lib/rdge/materials/water-material.js
+++ b/js/lib/rdge/materials/water-material.js
@@ -102,6 +102,19 @@ var WaterMaterial = function WaterMaterial()
102 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); 102 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);
103 this.update(0); 103 this.update(0);
104 }; 104 };
105
106 this.resetToDefault = function()
107 {
108 this._propValues[ this._propNames[u_tex_index ] ] = this._defaultTexMap.slice(0);
109 this._propValues[ this._propNames[u_emboss_index ] ] = 0.3;
110 this._propValues[ this._propNames[u_delta_index ] ] = 20.0;
111 this._propValues[ this._propNames[u_intensity_index ] ] = 3.0;
112 this._propValues[ this._propNames[u_speed_index ] ] = 0.2;
113
114 var nProps = this._propNames.length;
115 for (var i=0; i<nProps; i++)
116 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
117 };
105}; 118};
106 119
107/////////////////////////////////////////////////////////////////////////////////////// 120///////////////////////////////////////////////////////////////////////////////////////