aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/water-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/water-material.js')
-rw-r--r--js/lib/rdge/materials/water-material.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js
index 2c3669c0..18a73915 100644
--- a/js/lib/rdge/materials/water-material.js
+++ b/js/lib/rdge/materials/water-material.js
@@ -37,12 +37,14 @@ var WaterMaterial = function WaterMaterial() {
37 /////////////////////////////////////////////////////////////////////// 37 ///////////////////////////////////////////////////////////////////////
38 // duplcate method requirde 38 // duplcate method requirde
39 this.dup = function (world) { 39 this.dup = function (world) {
40 // allocate a new uber material 40 // get the current values;
41 var newMat = new WaterMaterial();
42
43 // copy over the current values;
44 var propNames = [], propValues = [], propTypes = [], propLabels = []; 41 var propNames = [], propValues = [], propTypes = [], propLabels = [];
45 this.getAllProperties(propNames, propValues, propTypes, propLabels); 42 this.getAllProperties(propNames, propValues, propTypes, propLabels);
43
44 // allocate a new material
45 var newMat = new WaterMaterial();
46
47 // copy over the current values;
46 var n = propNames.length; 48 var n = propNames.length;
47 for (var i = 0; i < n; i++) 49 for (var i = 0; i < n; i++)
48 newMat.setProperty(propNames[i], propValues[i]); 50 newMat.setProperty(propNames[i], propValues[i]);