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/flag-material.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'js/lib/rdge/materials/flag-material.js') diff --git a/js/lib/rdge/materials/flag-material.js b/js/lib/rdge/materials/flag-material.js index 8d4d1ee3..312ca1c1 100644 --- a/js/lib/rdge/materials/flag-material.js +++ b/js/lib/rdge/materials/flag-material.js @@ -5,6 +5,7 @@ */ +var Material = require("js/lib/rdge/materials/material").Material; var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; var Texture = require("js/lib/rdge/texture").Texture; @@ -47,19 +48,21 @@ var FlagMaterial = function FlagMaterial() { // Methods /////////////////////////////////////////////////////////////////////// // duplcate method requirde - this.dup = function( world ) { - // allocate a new uber material - var newMat = new FlagMaterial(); + this.dup = function( world ) + { + // get the current values; + var propNames = [], propValues = [], propTypes = [], propLabels = []; + this.getAllProperties(propNames, propValues, propTypes, propLabels); + + // allocate a new uber material + var newMat = new FlagMaterial(); // copy over the current values; - var propNames = [], propValues = [], propTypes = [], propLabels = []; - this.getAllProperties( propNames, propValues, propTypes, propLabels); - var n = propNames.length; - for (var i=0; i