From 7b6e8194b91168abdeb94702eb350d14f147858b Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 8 Mar 2012 17:29:18 -0800 Subject: Canvas IO --- js/lib/rdge/materials/pulse-material.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge/materials/pulse-material.js') diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 1e3137eb..8ad78bd4 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -179,8 +179,12 @@ var PulseMaterial = function PulseMaterial() { var exportStr = "material: " + this.getShaderName() + "\n"; exportStr += "name: " + this.getName() + "\n"; - var texMapName = this._propValues[this._propNames[0]]; - exportStr += "texture: " + texMapName + "\n"; + var world = this.getWorld(); + if (!world) + throw new Error( "no world in material.export, " + this.getName() ); + + var texMapName = world.cleansePath( this._propValues[this._propNames[0]] ); + exportStr += "texture: " +texMapName + "\n"; // every material needs to terminate like this exportStr += "endMaterial\n"; -- cgit v1.2.3 From e92a6da7b84c58803489d70efedf74837ddfe4cd Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 9 Mar 2012 13:34:09 -0800 Subject: Removed asset path replacement at authortime. --- js/lib/rdge/materials/pulse-material.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/lib/rdge/materials/pulse-material.js') diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 8ad78bd4..81db36c6 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -183,7 +183,7 @@ var PulseMaterial = function PulseMaterial() { if (!world) throw new Error( "no world in material.export, " + this.getName() ); - var texMapName = world.cleansePath( this._propValues[this._propNames[0]] ); + var texMapName = this._propValues[this._propNames[0]]; exportStr += "texture: " +texMapName + "\n"; // every material needs to terminate like this -- cgit v1.2.3