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/taper-material.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge/materials/taper-material.js') diff --git a/js/lib/rdge/materials/taper-material.js b/js/lib/rdge/materials/taper-material.js index eeb08aec..bd89f08f 100644 --- a/js/lib/rdge/materials/taper-material.js +++ b/js/lib/rdge/materials/taper-material.js @@ -42,8 +42,10 @@ function TaperMaterial() // duplcate method requirde this.dup = function() { return new TaperMaterial(); } - this.init = function() + this.init = function( world ) { + this.setWorld( world ); + // set up the shader this._shader = new jshader(); this._shader.def = taperShaderDef; @@ -53,7 +55,7 @@ function TaperMaterial() this._shader.colorMe.color.set( this.getColor() ); // set up the material node - this._materialNode = createMaterialNode("taperMaterial"); + this._materialNode = createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID()); this._materialNode.setShader(this._shader); // initialize the taper properties -- cgit v1.2.3