aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/taper-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/taper-material.js
parent855e8727b147771ff7b05e71bed481e65fe4b6b0 (diff)
downloadninja-818582d389f504c915be0c9052fafa33e3e76c92.tar.gz
File IO
Diffstat (limited to 'js/lib/rdge/materials/taper-material.js')
-rw-r--r--js/lib/rdge/materials/taper-material.js6
1 files changed, 4 insertions, 2 deletions
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()
42 // duplcate method requirde 42 // duplcate method requirde
43 this.dup = function() { return new TaperMaterial(); } 43 this.dup = function() { return new TaperMaterial(); }
44 44
45 this.init = function() 45 this.init = function( world )
46 { 46 {
47 this.setWorld( world );
48
47 // set up the shader 49 // set up the shader
48 this._shader = new jshader(); 50 this._shader = new jshader();
49 this._shader.def = taperShaderDef; 51 this._shader.def = taperShaderDef;
@@ -53,7 +55,7 @@ function TaperMaterial()
53 this._shader.colorMe.color.set( this.getColor() ); 55 this._shader.colorMe.color.set( this.getColor() );
54 56
55 // set up the material node 57 // set up the material node
56 this._materialNode = createMaterialNode("taperMaterial"); 58 this._materialNode = createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID());
57 this._materialNode.setShader(this._shader); 59 this._materialNode.setShader(this._shader);
58 60
59 // initialize the taper properties 61 // initialize the taper properties