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/julia-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/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 ) { |