diff options
Diffstat (limited to 'js/lib/rdge/materials/plasma-material.js')
-rw-r--r-- | js/lib/rdge/materials/plasma-material.js | 7 |
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 | ||