diff options
Diffstat (limited to 'js/lib/rdge/materials/deform-material.js')
-rw-r--r-- | js/lib/rdge/materials/deform-material.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/js/lib/rdge/materials/deform-material.js b/js/lib/rdge/materials/deform-material.js index a7a0c178..c7f9cadc 100644 --- a/js/lib/rdge/materials/deform-material.js +++ b/js/lib/rdge/materials/deform-material.js | |||
@@ -37,13 +37,16 @@ var DeformMaterial = function DeformMaterial() { | |||
37 | // Methods | 37 | // Methods |
38 | /////////////////////////////////////////////////////////////////////// | 38 | /////////////////////////////////////////////////////////////////////// |
39 | // duplcate method requirde | 39 | // duplcate method requirde |
40 | this.dup = function (world) { | 40 | this.dup = function (world) |
41 | // allocate a new uber material | 41 | { |
42 | var newMat = new DeformMaterial(); | 42 | // get the current values; |
43 | |||
44 | // copy over the current values; | ||
45 | var propNames = [], propValues = [], propTypes = [], propLabels = []; | 43 | var propNames = [], propValues = [], propTypes = [], propLabels = []; |
46 | this.getAllProperties(propNames, propValues, propTypes, propLabels); | 44 | this.getAllProperties(propNames, propValues, propTypes, propLabels); |
45 | |||
46 | // allocate a new material | ||
47 | var newMat = new DeformMaterial(); | ||
48 | |||
49 | // copy over the current values; | ||
47 | var n = propNames.length; | 50 | var n = propNames.length; |
48 | for (var i = 0; i < n; i++) | 51 | for (var i = 0; i < n; i++) |
49 | newMat.setProperty(propNames[i], propValues[i]); | 52 | newMat.setProperty(propNames[i], propValues[i]); |