From 5a1965bf2ed9a54601ca16fd67555335c510ce08 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 26 Apr 2012 16:40:05 -0700 Subject: Update materials to the new texture model. Create local world for deleted source canvases --- js/lib/rdge/materials/relief-tunnel-material.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'js/lib/rdge/materials/relief-tunnel-material.js') diff --git a/js/lib/rdge/materials/relief-tunnel-material.js b/js/lib/rdge/materials/relief-tunnel-material.js index cb433562..4587b3fd 100644 --- a/js/lib/rdge/materials/relief-tunnel-material.js +++ b/js/lib/rdge/materials/relief-tunnel-material.js @@ -32,16 +32,17 @@ var ReliefTunnelMaterial = function ReliefTunnelMaterial() /////////////////////////////////////////////////////////////////////// // duplcate method requirde this.dup = function (world) { - // allocate a new uber material - var newMat = new ReliefTunnelMaterial(); - - // copy over the current values; + // get the current values; var propNames = [], propValues = [], propTypes = [], propLabels = []; this.getAllProperties(propNames, propValues, propTypes, propLabels); + + // allocate a new material + var newMat = new ReliefTunnelMaterial(); + + // copy over the current values; var n = propNames.length; - for (var i = 0; i < n; i++) { + for (var i = 0; i < n; i++) newMat.setProperty(propNames[i], propValues[i]); - } return newMat; }; -- cgit v1.2.3