From 818582d389f504c915be0c9052fafa33e3e76c92 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 7 Mar 2012 16:48:48 -0800 Subject: File IO --- js/lib/rdge/materials/plasma-material.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge/materials/plasma-material.js') 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() { return new PlasmaMaterial(); }; - this.init = function() { + this.init = function( world) + { + this.setWorld( world ); + // set up the shader this._shader = new jshader(); this._shader.def = plasmaShaderDef; @@ -66,7 +69,7 @@ var PlasmaMaterial = function PlasmaMaterial() { this.setProperty( "color", [this._time, 0, 0, 1] ); // set up the material node - this._materialNode = createMaterialNode("plasmaMaterial"); + this._materialNode = createMaterialNode("plasmaMaterial" + "_" + world.generateUniqueNodeID()); this._materialNode.setShader(this._shader); }; -- cgit v1.2.3