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