diff options
Diffstat (limited to 'js/lib/rdge/materials/julia-material.js')
-rw-r--r-- | js/lib/rdge/materials/julia-material.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/js/lib/rdge/materials/julia-material.js b/js/lib/rdge/materials/julia-material.js index e35062a0..a06b1771 100644 --- a/js/lib/rdge/materials/julia-material.js +++ b/js/lib/rdge/materials/julia-material.js | |||
@@ -29,17 +29,19 @@ var JuliaMaterial = function JuliaMaterial() { | |||
29 | /////////////////////////////////////////////////////////////////////// | 29 | /////////////////////////////////////////////////////////////////////// |
30 | // duplcate method requirde | 30 | // duplcate method requirde |
31 | this.dup = function( world ) { | 31 | this.dup = function( world ) { |
32 | // allocate a new uber material | 32 | // get the current values; |
33 | var newMat = new JuliaMaterial(); | 33 | var propNames = [], propValues = [], propTypes = [], propLabels = []; |
34 | this.getAllProperties(propNames, propValues, propTypes, propLabels); | ||
35 | |||
36 | // allocate a new material | ||
37 | var newMat = new JuliaMaterial(); | ||
34 | 38 | ||
35 | // copy over the current values; | 39 | // copy over the current values; |
36 | var propNames = [], propValues = [], propTypes = [], propLabels = []; | 40 | var n = propNames.length; |
37 | this.getAllProperties( propNames, propValues, propTypes, propLabels); | 41 | for (var i = 0; i < n; i++) |
38 | var n = propNames.length; | 42 | newMat.setProperty(propNames[i], propValues[i]); |
39 | for (var i=0; i<n; i++) | ||
40 | newMat.setProperty( propNames[i], propValues[i] ); | ||
41 | 43 | ||
42 | return newMat; | 44 | return newMat; |
43 | }; | 45 | }; |
44 | 46 | ||
45 | this.init = function( world ) { | 47 | this.init = function( world ) { |