From 7b9b1e6dab88875b85230fc6f4fa0fca94e8b82f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 16:21:39 -0800 Subject: PulseMaterial and RadialBlurMaterial had typos in their import code. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/RDGE/Materials/PulseMaterial.js | 12 +++++++++++- js/helper-classes/RDGE/Materials/RadialBlurMaterial.js | 11 +++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'js/helper-classes') diff --git a/js/helper-classes/RDGE/Materials/PulseMaterial.js b/js/helper-classes/RDGE/Materials/PulseMaterial.js index 6f7e9fe0..d76b9966 100644 --- a/js/helper-classes/RDGE/Materials/PulseMaterial.js +++ b/js/helper-classes/RDGE/Materials/PulseMaterial.js @@ -200,7 +200,17 @@ function PulseMaterial() this.setName( pu.nextValue( "name: ") ); var rtnStr; - + try + { + 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; } } diff --git a/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js b/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js index 732800cf..a5fb134c 100644 --- a/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js +++ b/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js @@ -192,6 +192,17 @@ function RadialBlurMaterial() this.setName( pu.nextValue( "name: ") ); var rtnStr; + try + { + 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