diff options
author | Valerio Virgillito | 2012-07-09 14:16:17 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-09 14:18:36 -0700 |
commit | 1bbba17e8605434356de0a477710d6a0136986fc (patch) | |
tree | 7cdc80226b776c6fb2250e250acdbcd53fdb1ddd /js/lib/rdge/materials/uber-material.js | |
parent | dc5b7a479a185dda8e9a09f4bbe26bd290641624 (diff) | |
parent | ab80aa9c7da912db384ec48c656f84fd673b5253 (diff) | |
download | ninja-1bbba17e8605434356de0a477710d6a0136986fc.tar.gz |
Merge branch 'Taper' of https://github.com/ericmueller/ninja-internal
Conflicts:
js/lib/geom/circle.js
js/lib/rdge/materials/linear-gradient-material.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/lib/rdge/materials/uber-material.js')
-rwxr-xr-x | js/lib/rdge/materials/uber-material.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 416cb980..d242f8f5 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js | |||
@@ -86,6 +86,23 @@ var UberMaterial = function UberMaterial() { | |||
86 | this._propValues[this._propNames[7]] = this._environmentMapOb['texture']; | 86 | this._propValues[this._propNames[7]] = this._environmentMapOb['texture']; |
87 | this._propValues[this._propNames[8]] = this._environmentMapOb['envReflection']; | 87 | this._propValues[this._propNames[8]] = this._environmentMapOb['envReflection']; |
88 | 88 | ||
89 | this.resetToDefault = function() | ||
90 | { | ||
91 | this._propValues[this._propNames[0]] = this._ambientColor.slice(0); | ||
92 | this._propValues[this._propNames[1]] = this._diffuseColor.slice(0); | ||
93 | this._propValues[this._propNames[2]] = this._specularColor.slice(0); | ||
94 | this._propValues[this._propNames[3]] = this._specularPower; | ||
95 | this._propValues[this._propNames[4]] = this._diffuseMapOb['texture']; | ||
96 | this._propValues[this._propNames[5]] = this._normalMapOb['texture']; | ||
97 | this._propValues[this._propNames[6]] = this._specularMapOb['texture']; | ||
98 | this._propValues[this._propNames[7]] = this._environmentMapOb['texture']; | ||
99 | this._propValues[this._propNames[8]] = this._environmentMapOb['envReflection']; | ||
100 | |||
101 | var nProps = this._propNames.length; | ||
102 | for (var i=0; i<nProps; i++) | ||
103 | this.setProperty( this._propNames[i], this._propValues[this._propNames[i]] ); | ||
104 | }; | ||
105 | |||
89 | this.setProperty = function (prop, value) { | 106 | this.setProperty = function (prop, value) { |
90 | if (prop == "color") prop = "ambientColor"; | 107 | if (prop == "color") prop = "ambientColor"; |
91 | var valid = this.validateProperty(prop, value); | 108 | var valid = this.validateProperty(prop, value); |