From 18609d375e7aab9cb48c9b3f5b291f85cbd28683 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 3 Apr 2012 13:39:32 -0700 Subject: removed old unused import and export functions. --- js/lib/rdge/materials/bump-metal-material.js | 54 ---------------------------- 1 file changed, 54 deletions(-) (limited to 'js/lib/rdge/materials/bump-metal-material.js') diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js index d764de66..27d5793c 100755 --- a/js/lib/rdge/materials/bump-metal-material.js +++ b/js/lib/rdge/materials/bump-metal-material.js @@ -193,60 +193,6 @@ var BumpMetalMaterial = function BumpMetalMaterial() { return; }; - - this.export = function() - { - // every material needs the base type and instance name - var exportStr = "material: " + this.getShaderName() + "\n"; - exportStr += "name: " + this.getName() + "\n"; - - var world = this.getWorld(); - if (!world) - throw new Error( "no world in material.export, " + this.getName() ); - - exportStr += "lightDiff: " + this.getLightDiff() + "\n"; - exportStr += "diffuseTexture: " + this.getDiffuseTexture() + "\n"; - exportStr += "specularTexture: " + this.getSpecularTexture() + "\n"; - exportStr += "normalMap: " + this.getNormalTexture() + "\n"; - - // every material needs to terminate like this - exportStr += "endMaterial\n"; - - return exportStr; - }; - - this.import = function( importStr ) - { - var pu = new MaterialParser( importStr ); - var material = pu.nextValue( "material: " ); - if (material != this.getShaderName()) throw new Error( "ill-formed material" ); - this.setName( pu.nextValue( "name: ") ); - - var rtnStr; - try - { - var lightDiff = eval( "[" + pu.nextValue( "lightDiff: " ) + "]" ), - dt = pu.nextValue( "diffuseTexture: " ), - st = pu.nextValue( "specularTexture: " ), - nt = pu.nextValue( "normalMap: " ); - - this.setProperty( "lightDiff", lightDiff); - this.setProperty( "diffuseTexture", dt ); - this.setProperty( "specularTexture", st ); - this.setProperty( "normalMap", nt ); - - var endKey = "endMaterial\n"; - var index = importStr.indexOf( endKey ); - index += endKey.length; - rtnStr = importStr.substr( index ); - } - catch (e) - { - throw new Error( "could not import material: " + importStr ); - } - - return rtnStr; - }; }; /////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3