diff options
author | hwc487 | 2012-04-04 16:32:53 -0700 |
---|---|---|
committer | hwc487 | 2012-04-04 16:32:53 -0700 |
commit | 6ee8b65742fbe61b4429dc8c7dc9ca33a3e43600 (patch) | |
tree | f267e05f623ed90d1cc841b8c79a338d6d8e807c /js/lib/rdge/materials/radial-gradient-material.js | |
parent | 16f62ca09cc428043e8fef8bdeea11a989e62bc0 (diff) | |
parent | 17ca01f54591187f5c0812c0fd2cb7260afa9639 (diff) | |
download | ninja-6ee8b65742fbe61b4429dc8c7dc9ca33a3e43600.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping
Conflicts:
js/panels/presets/animations-presets.reel/animations-presets.js
js/panels/presets/style-presets.reel/style-presets.js
js/panels/presets/transitions-presets.reel/transitions-presets.js
Diffstat (limited to 'js/lib/rdge/materials/radial-gradient-material.js')
-rwxr-xr-x | js/lib/rdge/materials/radial-gradient-material.js | 438 |
1 files changed, 185 insertions, 253 deletions
diff --git a/js/lib/rdge/materials/radial-gradient-material.js b/js/lib/rdge/materials/radial-gradient-material.js index 87e20ad4..dd40d31d 100755 --- a/js/lib/rdge/materials/radial-gradient-material.js +++ b/js/lib/rdge/materials/radial-gradient-material.js | |||
@@ -1,8 +1,8 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | 2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> |
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | 3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> |
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var MaterialParser = require("js/lib/rdge/materials/material-parser").MaterialParser; | 7 | var MaterialParser = require("js/lib/rdge/materials/material-parser").MaterialParser; |
8 | var Material = require("js/lib/rdge/materials/material").Material; | 8 | var Material = require("js/lib/rdge/materials/material").Material; |
@@ -11,46 +11,46 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
11 | /////////////////////////////////////////////////////////////////////// | 11 | /////////////////////////////////////////////////////////////////////// |
12 | // Instance variables | 12 | // Instance variables |
13 | /////////////////////////////////////////////////////////////////////// | 13 | /////////////////////////////////////////////////////////////////////// |
14 | this._name = "RadialGradientMaterial"; | 14 | this._name = "RadialGradientMaterial"; |
15 | this._shaderName = "radialGradient"; | 15 | this._shaderName = "radialGradient"; |
16 | 16 | ||
17 | this._color1 = [1,0,0,1]; | 17 | this._color1 = [1, 0, 0, 1]; |
18 | this._color2 = [0,1,0,1]; | 18 | this._color2 = [0, 1, 0, 1]; |
19 | this._color3 = [0,0,1,1]; | 19 | this._color3 = [0, 0, 1, 1]; |
20 | this._color4 = [0,1,1,1]; | 20 | this._color4 = [0, 1, 1, 1]; |
21 | this._colorStop1 = 0.0; | 21 | this._colorStop1 = 0.0; |
22 | this._colorStop2 = 0.3; | 22 | this._colorStop2 = 0.3; |
23 | this._colorStop3 = 0.6; | 23 | this._colorStop3 = 0.6; |
24 | this._colorStop4 = 1.0; | 24 | this._colorStop4 = 1.0; |
25 | // this._colorCount = 4; | 25 | // this._colorCount = 4; |
26 | 26 | ||
27 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
28 | // Property Accessors | 28 | // Property Accessors |
29 | /////////////////////////////////////////////////////////////////////// | 29 | /////////////////////////////////////////////////////////////////////// |
30 | this.getName = function() { | 30 | this.getName = function () { |
31 | return this._name; | 31 | return this._name; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | this.getShaderName = function() { | 34 | this.getShaderName = function () { |
35 | return this._shaderName; | 35 | return this._shaderName; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | this.getColor1 = function() { | 38 | this.getColor1 = function () { |
39 | return this._color1; | 39 | return this._color1; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | this.setColor1 = function(c) { | 42 | this.setColor1 = function (c) { |
43 | this._color1 = c.slice(); | 43 | this._color1 = c.slice(); |
44 | if (this._shader && this._shader['default']) { | 44 | if (this._shader && this._shader['default']) { |
45 | this._shader['default'].u_color1.set(c); | 45 | this._shader['default'].u_color1.set(c); |
46 | } | 46 | } |
47 | }; | 47 | }; |
48 | 48 | ||
49 | this.getColor2 = function() { | 49 | this.getColor2 = function () { |
50 | return this._color2; | 50 | return this._color2; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | this.setColor2 = function(c) { | 53 | this.setColor2 = function (c) { |
54 | this._color2 = c.slice(); | 54 | this._color2 = c.slice(); |
55 | if (this._shader && this._shader['default']) { | 55 | if (this._shader && this._shader['default']) { |
56 | this._shader['default'].u_color2.set(c); | 56 | this._shader['default'].u_color2.set(c); |
@@ -58,84 +58,84 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
58 | 58 | ||
59 | }; | 59 | }; |
60 | 60 | ||
61 | this.getColor3 = function() { | 61 | this.getColor3 = function () { |
62 | return this._color3; | 62 | return this._color3; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | this.setColor3 = function(c) { | 65 | this.setColor3 = function (c) { |
66 | this._color3 = c.slice(); | 66 | this._color3 = c.slice(); |
67 | if (this._shader && this._shader['default']) { | 67 | if (this._shader && this._shader['default']) { |
68 | this._shader['default'].u_color3.set(c); | 68 | this._shader['default'].u_color3.set(c); |
69 | } | 69 | } |
70 | }; | 70 | }; |
71 | 71 | ||
72 | this.getColor4 = function() { | 72 | this.getColor4 = function () { |
73 | return this._color4; | 73 | return this._color4; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | this.setColor4 = function(c) { | 76 | this.setColor4 = function (c) { |
77 | this._color4 = c.slice(); | 77 | this._color4 = c.slice(); |
78 | if (this._shader && this._shader['default']) { | 78 | if (this._shader && this._shader['default']) { |
79 | this._shader['default'].u_color4.set(c); | 79 | this._shader['default'].u_color4.set(c); |
80 | } | 80 | } |
81 | }; | 81 | }; |
82 | 82 | ||
83 | this.getColorStop1 = function() { | 83 | this.getColorStop1 = function () { |
84 | return this._colorStop1; | 84 | return this._colorStop1; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | this.setColorStop1 = function(s) { | 87 | this.setColorStop1 = function (s) { |
88 | this._colorStop1 = s; | 88 | this._colorStop1 = s; |
89 | if (this._shader && this._shader['default']) { | 89 | if (this._shader && this._shader['default']) { |
90 | this._shader['default'].u_colorStop1.set([s]); | 90 | this._shader['default'].u_colorStop1.set([s]); |
91 | } | 91 | } |
92 | }; | 92 | }; |
93 | 93 | ||
94 | this.getColorStop2 = function() { | 94 | this.getColorStop2 = function () { |
95 | return this._colorStop2; | 95 | return this._colorStop2; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | this.setColorStop2 = function(s) { | 98 | this.setColorStop2 = function (s) { |
99 | this._colorStop2 = s; | 99 | this._colorStop2 = s; |
100 | if (this._shader && this._shader['default']) { | 100 | if (this._shader && this._shader['default']) { |
101 | this._shader['default'].u_colorStop2.set([s]); | 101 | this._shader['default'].u_colorStop2.set([s]); |
102 | } | 102 | } |
103 | }; | 103 | }; |
104 | 104 | ||
105 | this.getColorStop3 = function() { | 105 | this.getColorStop3 = function () { |
106 | return this._colorStop3; | 106 | return this._colorStop3; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | this.setColorStop3 = function(s) { | 109 | this.setColorStop3 = function (s) { |
110 | this._colorStop3 = s; | 110 | this._colorStop3 = s; |
111 | if (this._shader && this._shader['default']) { | 111 | if (this._shader && this._shader['default']) { |
112 | this._shader['default'].u_colorStop3.set([s]); | 112 | this._shader['default'].u_colorStop3.set([s]); |
113 | } | 113 | } |
114 | }; | 114 | }; |
115 | 115 | ||
116 | this.getColorStop4 = function() { | 116 | this.getColorStop4 = function () { |
117 | return this._colorStop4; | 117 | return this._colorStop4; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | this.setColorStop4 = function(s) { | 120 | this.setColorStop4 = function (s) { |
121 | this._colorStop4 = s; | 121 | this._colorStop4 = s; |
122 | if (this._shader && this._shader['default']) { | 122 | if (this._shader && this._shader['default']) { |
123 | this._shader['default'].u_colorStop4.set([s]); | 123 | this._shader['default'].u_colorStop4.set([s]); |
124 | } | 124 | } |
125 | }; | 125 | }; |
126 | 126 | ||
127 | this.getColorCount = function() { | 127 | this.getColorCount = function () { |
128 | return this._colorCount; | 128 | return this._colorCount; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | this.setColorCount = function(c) { | 131 | this.setColorCount = function (c) { |
132 | this._colorCount = c; | 132 | this._colorCount = c; |
133 | if (this._shader && this._shader['default']) { | 133 | if (this._shader && this._shader['default']) { |
134 | this._shader['default'].u_co |