diff options
author | hwc487 | 2012-06-28 11:44:15 -0700 |
---|---|---|
committer | hwc487 | 2012-06-28 11:44:15 -0700 |
commit | 22cbc9644b79df60b3f6336f9563debd47fb3ea1 (patch) | |
tree | f32687a920a039e0f048fab74627e0dc4ad6a8f1 /js/lib/rdge/materials/pulse-material.js | |
parent | 2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff) | |
download | ninja-22cbc9644b79df60b3f6336f9563debd47fb3ea1.tar.gz |
Added capability to split a mesh into multiiple parts to avoid buffer overflow situations.
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; |