diff options
author | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
commit | f6b958360d82854bdaf51848e7fd715d1f633179 (patch) | |
tree | 80f6c08bb730089bdd3f26310df8d2363f9ba863 /js/lib/rdge/materials/radial-blur-material.js | |
parent | c24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff) | |
parent | 4d7b86f55c504ee4e8c2460cf6b60cb9a2cf18f0 (diff) | |
download | ninja-f6b958360d82854bdaf51848e7fd715d1f633179.tar.gz |
Merge pull request #105 from joseeight/FileIO-Build-Candidate
File I/O adding webGL/canvas data functionality
Diffstat (limited to 'js/lib/rdge/materials/radial-blur-material.js')
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index 41e68182..46cdda74 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -94,7 +94,7 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
94 | this._shader.init(); | 94 | this._shader.init(); |
95 | 95 | ||
96 | // set up the material node | 96 | // set up the material node |
97 | this._materialNode = createMaterialNode("radialBlurMaterial"); | 97 | this._materialNode = createMaterialNode("radialBlurMaterial" + "_" + world.generateUniqueNodeID()); |
98 | this._materialNode.setShader(this._shader); | 98 | this._materialNode.setShader(this._shader); |
99 | 99 | ||
100 | this._time = 0; | 100 | this._time = 0; |
@@ -161,6 +161,13 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
161 | // every material needs the base type and instance name | 161 | // every material needs the base type and instance name |
162 | var exportStr = "material: " + this.getShaderName() + "\n"; | 162 | var exportStr = "material: " + this.getShaderName() + "\n"; |
163 | exportStr += "name: " + this.getName() + "\n"; | 163 | exportStr += "name: " + this.getName() + "\n"; |
164 | |||
165 | var world = this.getWorld(); | ||
166 | if (!world) | ||
167 | throw new Error( "no world in material.export, " + this.getName() ); | ||
168 | |||
169 | var texMapName = this._propValues[this._propNames[0]]; | ||
170 | exportStr += "texture: " + texMapName + "\n"; | ||
164 | 171 | ||
165 | // every material needs to terminate like this | 172 | // every material needs to terminate like this |
166 | exportStr += "endMaterial\n"; | 173 | exportStr += "endMaterial\n"; |