diff options
Diffstat (limited to 'js/lib/rdge/materials/radial-gradient-material.js')
-rwxr-xr-x | js/lib/rdge/materials/radial-gradient-material.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/radial-gradient-material.js b/js/lib/rdge/materials/radial-gradient-material.js index b0b63cee..67a85041 100755 --- a/js/lib/rdge/materials/radial-gradient-material.js +++ b/js/lib/rdge/materials/radial-gradient-material.js | |||
@@ -44,6 +44,7 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
44 | 44 | ||
45 | this.setColor1 = function (c) { | 45 | this.setColor1 = function (c) { |
46 | this._color1 = c.slice(); | 46 | this._color1 = c.slice(); |
47 | this._propValues[this._propNames[0]] = this._color1.slice(0); | ||
47 | if (this._shader && this._shader['default']) { | 48 | if (this._shader && this._shader['default']) { |
48 | this._shader['default'].u_color1.set(c); | 49 | this._shader['default'].u_color1.set(c); |
49 | } | 50 | } |
@@ -55,6 +56,7 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
55 | 56 | ||
56 | this.setColor2 = function (c) { | 57 | this.setColor2 = function (c) { |
57 | this._color2 = c.slice(); | 58 | this._color2 = c.slice(); |
59 | this._propValues[this._propNames[1]] = this._color2.slice(0); | ||
58 | if (this._shader && this._shader['default']) { | 60 | if (this._shader && this._shader['default']) { |
59 | this._shader['default'].u_color2.set(c); | 61 | this._shader['default'].u_color2.set(c); |
60 | } | 62 | } |
@@ -67,6 +69,7 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
67 | 69 | ||
68 | this.setColor3 = function (c) { | 70 | this.setColor3 = function (c) { |
69 | this._color3 = c.slice(); | 71 | this._color3 = c.slice(); |
72 | this._propValues[this._propNames[2]] = this._color3.slice(0); | ||
70 | if (this._shader && this._shader['default']) { | 73 | if (this._shader && this._shader['default']) { |
71 | this._shader['default'].u_color3.set(c); | 74 | this._shader['default'].u_color3.set(c); |
72 | } | 75 | } |
@@ -78,6 +81,7 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
78 | 81 | ||
79 | this.setColor4 = function (c) { | 82 | this.setColor4 = function (c) { |
80 | this._color4 = c.slice(); | 83 | this._color4 = c.slice(); |
84 | this._propValues[this._propNames[3]] = this._color4.slice(0); | ||
81 | if (this._shader && this._shader['default']) { | 85 | if (this._shader && this._shader['default']) { |
82 | this._shader['default'].u_color4.set(c); | 86 | this._shader['default'].u_color4.set(c); |
83 | } | 87 | } |
@@ -179,7 +183,6 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
179 | case "colorStop2": this.setColorStop2(value); break; | 183 | case "colorStop2": this.setColorStop2(value); break; |
180 | case "colorStop3": this.setColorStop3(value); break; | 184 | case "colorStop3": this.setColorStop3(value); break; |
181 | case "colorStop4": this.setColorStop4(value); break; | 185 | case "colorStop4": this.setColorStop4(value); break; |
182 | case "angle": this.setAngle(value); break; | ||
183 | } | 186 | } |
184 | 187 | ||
185 | //this.updateValuesInShader(); | 188 | //this.updateValuesInShader(); |