aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/z-invert-material.js
diff options
context:
space:
mode:
authorhwc4872012-04-26 16:40:05 -0700
committerhwc4872012-04-26 16:40:05 -0700
commit5a1965bf2ed9a54601ca16fd67555335c510ce08 (patch)
tree7fa2419c8a194e7b0265b58f0f4d10d02a0d66f4 /js/lib/rdge/materials/z-invert-material.js
parentee07f71e9e6c9219e02738c77fb038bece2e03b6 (diff)
downloadninja-5a1965bf2ed9a54601ca16fd67555335c510ce08.tar.gz
Update materials to the new texture model.
Create local world for deleted source canvases
Diffstat (limited to 'js/lib/rdge/materials/z-invert-material.js')
-rw-r--r--js/lib/rdge/materials/z-invert-material.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/lib/rdge/materials/z-invert-material.js b/js/lib/rdge/materials/z-invert-material.js
index c35b7d7f..e1149f8b 100644
--- a/js/lib/rdge/materials/z-invert-material.js
+++ b/js/lib/rdge/materials/z-invert-material.js
@@ -32,16 +32,17 @@ var ZInvertMaterial = function ZInvertMaterial() {
32 /////////////////////////////////////////////////////////////////////// 32 ///////////////////////////////////////////////////////////////////////
33 // duplicate method required 33 // duplicate method required
34 this.dup = function (world) { 34 this.dup = function (world) {
35 // allocate a new uber material 35 // get the current values;
36 var newMat = new ZInvertMaterial();
37
38 // copy over the current values;
39 var propNames = [], propValues = [], propTypes = [], propLabels = []; 36 var propNames = [], propValues = [], propTypes = [], propLabels = [];
40 this.getAllProperties(propNames, propValues, propTypes, propLabels); 37 this.getAllProperties(propNames, propValues, propTypes, propLabels);
38
39 // allocate a new material
40 var newMat = new ZInvertMaterial();
41
42 // copy over the current values;
41 var n = propNames.length; 43 var n = propNames.length;
42 for (var i = 0; i < n; i++) { 44 for (var i = 0; i < n; i++)
43 newMat.setProperty(propNames[i], propValues[i]); 45 newMat.setProperty(propNames[i], propValues[i]);
44 }
45 46
46 return newMat; 47 return newMat;
47 }; 48 };