aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/mandel-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/mandel-material.js')
-rw-r--r--js/lib/rdge/materials/mandel-material.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/js/lib/rdge/materials/mandel-material.js b/js/lib/rdge/materials/mandel-material.js
index 35ac8ec4..e75d74ba 100644
--- a/js/lib/rdge/materials/mandel-material.js
+++ b/js/lib/rdge/materials/mandel-material.js
@@ -39,18 +39,19 @@ var MandelMaterial = function MandelMaterial() {
39 /////////////////////////////////////////////////////////////////////// 39 ///////////////////////////////////////////////////////////////////////
40 // duplcate method requirde 40 // duplcate method requirde
41 this.dup = function( world ) { 41 this.dup = function( world ) {
42 // allocate a new uber material 42 // get the current values;
43 var newMat = new MandelMaterial(); 43 var propNames = [], propValues = [], propTypes = [], propLabels = [];
44 this.getAllProperties(propNames, propValues, propTypes, propLabels);
45
46 // allocate a new material
47 var newMat = new MandelMaterial();
44 48
45 // copy over the current values; 49 // copy over the current values;
46 var propNames = [], propValues = [], propTypes = [], propLabels = []; 50 var n = propNames.length;
47 this.getAllProperties( propNames, propValues, propTypes, propLabels); 51 for (var i = 0; i < n; i++)
48 var n = propNames.length; 52 newMat.setProperty(propNames[i], propValues[i]);
49 for (var i=0; i<n; i++) {
50 newMat.setProperty( propNames[i], propValues[i] );
51 }
52 53
53 return newMat; 54 return newMat;
54 }; 55 };
55 56
56 this.init = function( world ) { 57 this.init = function( world ) {