aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/linear-gradient-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/linear-gradient-material.js')
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/linear-gradient-material.js b/js/lib/rdge/materials/linear-gradient-material.js
index 51a7430c..2d8e6ca7 100755
--- a/js/lib/rdge/materials/linear-gradient-material.js
+++ b/js/lib/rdge/materials/linear-gradient-material.js
@@ -200,7 +200,23 @@ var LinearGradientMaterial = function LinearGradientMaterial() {
200 // Methods 200 // Methods
201 /////////////////////////////////////////////////////////////////////// 201 ///////////////////////////////////////////////////////////////////////
202 // duplcate method requirde 202 // duplcate method requirde
203 this.dup = function () { return new LinearGradientMaterial(); }; 203 this.dup = function ()
204 {
205 // get the current values;
206 var propNames = [], propValues = [], propTypes = [], propLabels = [];
207 this.getAllProperties(propNames, propValues, propTypes, propLabels);
208
209 // allocate a new material
210 var newMat = new LinearGradientMaterial();
211
212 // copy over the current values;
213 var n = propNames.length;
214 for (var i = 0; i < n; i++)
215 newMat.setProperty(propNames[i], propValues[i]);
216
217 return newMat;
218 }
219
204 220
205 this.init = function (world) { 221 this.init = function (world) {
206 this.setWorld(world); 222 this.setWorld(world);