diff options
author | Nivesh Rajbhandari | 2012-03-13 13:05:33 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-13 13:05:33 -0700 |
commit | 92fc2e3c4bca2edb04102431b4959aafe022f329 (patch) | |
tree | d48c090f71ed2cd6bd6ce38ff68c36ab69299985 /js/lib/rdge/materials/radial-gradient-material.js | |
parent | efb92cf52680d31f05fed3757e74862592cc2d4c (diff) | |
parent | f56b8cf4d3316d250c0f0045fb78f0dbd5c56e94 (diff) | |
download | ninja-92fc2e3c4bca2edb04102431b4959aafe022f329.tar.gz |
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'js/lib/rdge/materials/radial-gradient-material.js')
-rwxr-xr-x | js/lib/rdge/materials/radial-gradient-material.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/lib/rdge/materials/radial-gradient-material.js b/js/lib/rdge/materials/radial-gradient-material.js index 13be50f5..d19b44b7 100755 --- a/js/lib/rdge/materials/radial-gradient-material.js +++ b/js/lib/rdge/materials/radial-gradient-material.js | |||
@@ -193,14 +193,17 @@ var RadialGradientMaterial = function RadialGradientMaterial() { | |||
193 | return new RadialGradientMaterial(); | 193 | return new RadialGradientMaterial(); |
194 | }; | 194 | }; |
195 | 195 | ||
196 | this.init = function() { | 196 | this.init = function( world ) |
197 | { | ||
198 | this.setWorld( world ); | ||
199 | |||
197 | // set up the shader | 200 | // set up the shader |
198 | this._shader = new jshader(); | 201 | this._shader = new jshader(); |
199 | this._shader.def = radialGradientMaterialDef; | 202 | this._shader.def = radialGradientMaterialDef; |
200 | this._shader.init(); | 203 | this._shader.init(); |
201 | 204 | ||
202 | // set up the material node | 205 | // set up the material node |
203 | this._materialNode = createMaterialNode("radialGradientMaterial"); | 206 | this._materialNode = createMaterialNode("radialGradientMaterial" + "_" + world.generateUniqueNodeID()); |
204 | this._materialNode.setShader(this._shader); | 207 | this._materialNode.setShader(this._shader); |
205 | 208 | ||
206 | // set the shader values in the shader | 209 | // set the shader values in the shader |