diff options
author | John Mayhew | 2012-04-03 13:39:32 -0700 |
---|---|---|
committer | John Mayhew | 2012-04-03 13:39:32 -0700 |
commit | 18609d375e7aab9cb48c9b3f5b291f85cbd28683 (patch) | |
tree | deca3dc7277c154782f451fbd5b960c3d5c9dba7 /js/lib/rdge/materials/cloud-material.js | |
parent | d5d4dcac78ebf8ba3163a8c7055d783b6397a435 (diff) | |
download | ninja-18609d375e7aab9cb48c9b3f5b291f85cbd28683.tar.gz |
removed old unused import and export functions.
Diffstat (limited to 'js/lib/rdge/materials/cloud-material.js')
-rw-r--r-- | js/lib/rdge/materials/cloud-material.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js index 092553ce..bde42ac3 100644 --- a/js/lib/rdge/materials/cloud-material.js +++ b/js/lib/rdge/materials/cloud-material.js | |||
@@ -191,47 +191,6 @@ var CloudMaterial = function CloudMaterial() { | |||
191 | throw new Error("could not import material: " + jObj); | 191 | throw new Error("could not import material: " + jObj); |
192 | } | 192 | } |
193 | }; | 193 | }; |
194 | |||
195 | |||
196 | this.export = function () { | ||
197 | // every material needs the base type and instance name | ||
198 | var exportStr = "material: " + this.getShaderName() + "\n"; | ||
199 | exportStr += "name: " + this.getName() + "\n"; | ||
200 | |||
201 | var world = this.getWorld(); | ||
202 | if (!world) | ||
203 | throw new Error("no world in material.export, " + this.getName()); | ||
204 | |||
205 | var texMapName = this._propValues[this._propNames[0]]; | ||
206 | exportStr += "texture: " + texMapName + "\n"; | ||
207 | |||
208 | // every material needs to terminate like this | ||
209 | exportStr += "endMaterial\n"; | ||
210 | |||
211 | return exportStr; | ||
212 | }; | ||
213 | |||
214 | this.import = function (importStr) { | ||
215 | var pu = new MaterialParser(importStr); | ||
216 | var material = pu.nextValue("material: "); | ||
217 | if (material != this.getShaderName()) throw new Error("ill-formed material"); | ||
218 | this.setName(pu.nextValue("name: ")); | ||
219 | |||
220 | var rtnStr; | ||
221 | try { | ||
222 | this._propValues[this._propNames[0]] = pu.nextValue("texture: "); | ||
223 | |||
224 | var endKey = "endMaterial\n"; | ||
225 | var index = importStr.indexOf(endKey); | ||
226 | index += endKey.length; | ||
227 | rtnStr = importStr.substr(index); | ||
228 | } | ||
229 | catch (e) { | ||
230 | throw new Error("could not import material: " + importStr); | ||
231 | } | ||
232 | |||
233 | return rtnStr; | ||
234 | }; | ||
235 | }; | 194 | }; |
236 | 195 | ||
237 | /////////////////////////////////////////////////////////////////////////////////////// | 196 | /////////////////////////////////////////////////////////////////////////////////////// |