aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/plasma-material.js
diff options
context:
space:
mode:
authorhwc4872012-03-07 16:48:48 -0800
committerhwc4872012-03-07 16:48:48 -0800
commit818582d389f504c915be0c9052fafa33e3e76c92 (patch)
treeff686f52903d91f27f983b19e18c9909af5957d9 /js/lib/rdge/materials/plasma-material.js
parent855e8727b147771ff7b05e71bed481e65fe4b6b0 (diff)
downloadninja-818582d389f504c915be0c9052fafa33e3e76c92.tar.gz
File IO
Diffstat (limited to 'js/lib/rdge/materials/plasma-material.js')
-rw-r--r--js/lib/rdge/materials/plasma-material.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/lib/rdge/materials/plasma-material.js b/js/lib/rdge/materials/plasma-material.js
index 9ecc2b48..62d0db70 100644
--- a/js/lib/rdge/materials/plasma-material.js
+++ b/js/lib/rdge/materials/plasma-material.js
@@ -54,7 +54,10 @@ var PlasmaMaterial = function PlasmaMaterial() {
54 return new PlasmaMaterial(); 54 return new PlasmaMaterial();
55 }; 55 };
56 56
57 this.init = function() { 57 this.init = function( world)
58 {
59 this.setWorld( world );
60
58 // set up the shader 61 // set up the shader
59 this._shader = new jshader(); 62 this._shader = new jshader();
60 this._shader.def = plasmaShaderDef; 63 this._shader.def = plasmaShaderDef;
@@ -66,7 +69,7 @@ var PlasmaMaterial = function PlasmaMaterial() {
66 this.setProperty( "color", [this._time, 0, 0, 1] ); 69 this.setProperty( "color", [this._time, 0, 0, 1] );
67 70
68 // set up the material node 71 // set up the material node
69 this._materialNode = createMaterialNode("plasmaMaterial"); 72 this._materialNode = createMaterialNode("plasmaMaterial" + "_" + world.generateUniqueNodeID());
70 this._materialNode.setShader(this._shader); 73 this._materialNode.setShader(this._shader);
71 }; 74 };
72 75