diff options
Diffstat (limited to 'js/lib/rdge/materials/twist-vert-material.js')
-rw-r--r-- | js/lib/rdge/materials/twist-vert-material.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js index 7c2dae5e..870e068d 100644 --- a/js/lib/rdge/materials/twist-vert-material.js +++ b/js/lib/rdge/materials/twist-vert-material.js | |||
@@ -81,6 +81,20 @@ var TwistVertMaterial = function TwistVertMaterial() | |||
81 | this.setShaderValues(); | 81 | this.setShaderValues(); |
82 | }; | 82 | }; |
83 | 83 | ||
84 | this.resetToDefault = function() | ||
85 | { | ||
86 | this._propValues[this._propNames[0]] = 0.0; | ||
87 | this._propValues[this._propNames[1]] = 1.0; | ||
88 | this._propValues[this._propNames[2]] = 2.0 * Math.PI; | ||
89 | this._propValues[this._propNames[3]] = this._speed; | ||
90 | this._propValues[this._propNames[4]] = this._tex0.slice(); | ||
91 | this._propValues[this._propNames[5]] = this._tex1.slice(); | ||
92 | |||
93 | var nProps = this._propNames.length; | ||
94 | for (var i=0; i<nProps; i++) | ||
95 | this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] ); | ||
96 | }; | ||
97 | |||
84 | this.update = function (time) | 98 | this.update = function (time) |
85 | { | 99 | { |
86 | if (this._shader && this._shader.twistMe) | 100 | if (this._shader && this._shader.twistMe) |