diff options
author | hwc487 | 2012-04-26 16:40:05 -0700 |
---|---|---|
committer | hwc487 | 2012-04-26 16:40:05 -0700 |
commit | 5a1965bf2ed9a54601ca16fd67555335c510ce08 (patch) | |
tree | 7fa2419c8a194e7b0265b58f0f4d10d02a0d66f4 /js/lib/rdge/materials/keleidoscope-material.js | |
parent | ee07f71e9e6c9219e02738c77fb038bece2e03b6 (diff) | |
download | ninja-5a1965bf2ed9a54601ca16fd67555335c510ce08.tar.gz |
Update materials to the new texture model.
Create local world for deleted source canvases
Diffstat (limited to 'js/lib/rdge/materials/keleidoscope-material.js')
-rw-r--r-- | js/lib/rdge/materials/keleidoscope-material.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/js/lib/rdge/materials/keleidoscope-material.js b/js/lib/rdge/materials/keleidoscope-material.js index db325eaa..e9f1b10e 100644 --- a/js/lib/rdge/materials/keleidoscope-material.js +++ b/js/lib/rdge/materials/keleidoscope-material.js | |||
@@ -38,17 +38,19 @@ var KeleidoscopeMaterial = function KeleidoscopeMaterial() { | |||
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 | // get the current values; |
42 | var newMat = new KeleidoscopeMaterial(); | 42 | var propNames = [], propValues = [], propTypes = [], propLabels = []; |
43 | this.getAllProperties(propNames, propValues, propTypes, propLabels); | ||
44 | |||
45 | // allocate a new material | ||
46 | var newMat = new KeleidoscopeMaterial(); | ||
43 | 47 | ||
44 | // copy over the current values; | 48 | // copy over the current values; |
45 | var propNames = [], propValues = [], propTypes = [], propLabels = []; | 49 | var n = propNames.length; |
46 | this.getAllProperties( propNames, propValues, propTypes, propLabels); | 50 | for (var i = 0; i < n; i++) |
47 | var n = propNames.length; | 51 | newMat.setProperty(propNames[i], propValues[i]); |
48 | for (var i=0; i<n; i++) | ||
49 | newMat.setProperty( propNames[i], propValues[i] ); | ||
50 | 52 | ||
51 | return newMat; | 53 | return newMat; |
52 | }; | 54 | }; |
53 | 55 | ||
54 | this.init = function( world ) { | 56 | this.init = function( world ) { |