diff options
Diffstat (limited to 'js/lib/rdge/materials/bump-metal-material.js')
-rwxr-xr-x | js/lib/rdge/materials/bump-metal-material.js | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js index 9c9a189a..a3ef9d37 100755 --- a/js/lib/rdge/materials/bump-metal-material.js +++ b/js/lib/rdge/materials/bump-metal-material.js | |||
@@ -146,33 +146,10 @@ var BumpMetalMaterial = function BumpMetalMaterial() { | |||
146 | var world = this.getWorld(); | 146 | var world = this.getWorld(); |
147 | var tex = new Texture( world ); | 147 | var tex = new Texture( world ); |
148 | this._diffuseTextureObj = tex; | 148 | this._diffuseTextureObj = tex; |
149 | tex.loadFromCanvas( world.getCanvas() ); | 149 | tex.loadFromCanvas( this._diffuseWorld.getCanvas() ); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | this.findWorld = function( id, elt ) | ||
154 | { | ||
155 | if (elt.id && elt.id === id) | ||
156 | { | ||
157 | if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) | ||
158 | { | ||
159 | var world = elt.elementModel.shapeModel.GLWorld; | ||
160 | return world; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | if (elt.children) | ||
165 | { | ||
166 | var nKids = elt.children.length; | ||
167 | for (var i=0; i<nKids; i++) | ||
168 | { | ||
169 | var child = elt.children[i]; | ||
170 | var world = this.findWorld( id, child ); | ||
171 | if (world) return world; | ||
172 | } | ||
173 | } | ||
174 | } | ||
175 | |||
176 | this.updateTexture = function( index ) | 153 | this.updateTexture = function( index ) |
177 | { | 154 | { |
178 | var material = this._materialNode; | 155 | var material = this._materialNode; |