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/twist-vert-material.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge/materials/twist-vert-material.js') diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js index c2573071..05172a1b 100644 --- a/js/lib/rdge/materials/twist-vert-material.js +++ b/js/lib/rdge/materials/twist-vert-material.js @@ -46,8 +46,10 @@ function TwistVertMaterial() // duplcate method requirde this.dup = function() { return new TwistVertMaterial(); } - this.init = function() + this.init = function( world ) { + this.setWorld( world ); + // set up the shader this._shader = new jshader(); this._shader.def = twistVertShaderDef; @@ -57,7 +59,7 @@ function TwistVertMaterial() this._shader.twistMe.color.set( this.getColor() ); // set up the material node - this._materialNode = createMaterialNode("twistVertMaterial"); + this._materialNode = createMaterialNode("twistVertMaterial" + "_" + world.generateUniqueNodeID()); this._materialNode.setShader(this._shader); // initialize the twist vert properties -- cgit v1.2.3