diff options
Diffstat (limited to 'js/lib/rdge/materials/pulse-material.js')
-rw-r--r-- | js/lib/rdge/materials/pulse-material.js | 12 |
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 155bd8a9..199d65c8 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js | |||
@@ -93,6 +93,18 @@ var PulseMaterial = function PulseMaterial() | |||
93 | this.update( 0 ); | 93 | this.update( 0 ); |
94 | }; | 94 | }; |
95 | 95 | ||
96 | this.resetToDefault = function() | ||
97 | { | ||
98 | this._propValues[ this._propNames[ u_tex0_index] ] = this._texMap.slice(0); | ||
99 | this._propValues[ this._propNames[u_xScale_index] ] = 0.5; | ||
100 | this._propValues[ this._propNames[u_yScale_index] ] = 0.4; | ||
101 | this._propValues[ this._propNames[ u_speed_index] ] = 1.0; | ||
102 | |||
103 | var nProps = this._propNames.length; | ||
104 | for (var i=0; i<nProps; i++) | ||
105 | this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] ); | ||
106 | }; | ||
107 | |||
96 | this.update = function( time ) | 108 | this.update = function( time ) |
97 | { | 109 | { |
98 | var material = this._materialNode; | 110 | var material = this._materialNode; |