diff options
Diffstat (limited to 'js/lib/rdge/materials/radial-blur-material.js')
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index 67ed81af..6e1c024b 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -182,44 +182,6 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
182 | 182 | ||
183 | return rtnStr; | 183 | return rtnStr; |
184 | }; | 184 | }; |
185 | |||
186 | this.export = function () { | ||
187 | // every material needs the base type and instance name | ||
188 | var exportStr = "material: " + this.getShaderName() + "\n"; | ||
189 | exportStr += "name: " + this.getName() + "\n"; | ||
190 | |||
191 | var world = this.getWorld(); | ||
192 | if (!world) | ||
193 | throw new Error("no world in material.export, " + this.getName()); | ||
194 | |||
195 | var texMapName = this._propValues[this._propNames[0]]; | ||
196 | exportStr += "texture: " + texMapName + "\n"; | ||
197 | |||
198 | // every material needs to terminate like this | ||
199 | exportStr += "endMaterial\n"; | ||
200 | |||
201 | return exportStr; | ||
202 | }; | ||
203 | |||
204 | this.import = function (importStr) { | ||
205 | var pu = new MaterialParser(importStr); | ||
206 | var material = pu.nextValue("material: "); | ||
207 | if (material != this.getShaderName()) throw new Error("ill-formed material"); | ||
208 | this.setName(pu.nextValue("name: ")); | ||
209 | |||
210 | var rtnStr; | ||
211 | try { | ||
212 | var endKey = "endMaterial\n"; | ||
213 | var index = importStr.indexOf(endKey); | ||
214 | index += endKey.length; | ||
215 | rtnStr = importStr.substr(index); | ||
216 | } | ||
217 | catch (e) { | ||
218 | throw new Error("could not import material: " + importStr); | ||
219 | } | ||
220 | |||
221 | return rtnStr; | ||
222 | }; | ||
223 | }; | 185 | }; |
224 | 186 | ||
225 | /////////////////////////////////////////////////////////////////////////////////////// | 187 | /////////////////////////////////////////////////////////////////////////////////////// |