aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/pulse-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/pulse-material.js')
-rw-r--r--js/lib/rdge/materials/pulse-material.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js
index 4d5a158d..a5d17fcb 100644
--- a/js/lib/rdge/materials/pulse-material.js
+++ b/js/lib/rdge/materials/pulse-material.js
@@ -117,6 +117,18 @@ var PulseMaterial = function PulseMaterial()
117 this.update( 0 ); 117 this.update( 0 );
118 }; 118 };
119 119
120 this.resetToDefault = function()
121 {
122 this._propValues[ this._propNames[ u_tex0_index] ] = this._texMap.slice(0);
123 this._propValues[ this._propNames[u_xScale_index] ] = 0.5;
124 this._propValues[ this._propNames[u_yScale_index] ] = 0.4;
125 this._propValues[ this._propNames[ u_speed_index] ] = 1.0;
126
127 var nProps = this._propNames.length;
128 for (var i=0; i<nProps; i++)
129 this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] );
130 };
131
120 this.update = function( time ) 132 this.update = function( time )
121 { 133 {
122 var material = this._materialNode; 134 var material = this._materialNode;