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 982b581f..45ac2a42 100644
--- a/js/lib/rdge/materials/water-material.js
+++ b/js/lib/rdge/materials/water-material.js
@@ -78,6 +78,19 @@ var WaterMaterial = function WaterMaterial()
78 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); 78 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);
79 this.update(0); 79 this.update(0);
80 }; 80 };
81
82 this.resetToDefault = function()
83 {
84 this._propValues[ this._propNames[u_tex_index ] ] = this._defaultTexMap.slice(0);
85 this._propValues[ this._propNames[u_emboss_index ] ] = 0.3;
86 this._propValues[ this._propNames[u_delta_index ] ] = 20.0;
87 this._propValues[ this._propNames[u_intensity_index ] ] = 3.0;
88 this._propValues[ this._propNames[u_speed_index ] ] = 0.2;
89
90 var nProps = this._propNames.length;
91 for (var i=0; i<nProps; i++)
92 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
93 };
81}; 94};
82 95
83/////////////////////////////////////////////////////////////////////////////////////// 96///////////////////////////////////////////////////////////////////////////////////////