aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/texture.js
diff options
context:
space:
mode:
authorhwc4872012-04-05 05:30:55 -0700
committerhwc4872012-04-05 05:30:55 -0700
commitb6a8f72f670a8edee35554a4ca3a0618c526d651 (patch)
treeca10bd5b870bd318270ad32093c87e768612d830 /js/lib/rdge/texture.js
parent32c973351bc6f4d682205b788dc6235fc9452e07 (diff)
downloadninja-b6a8f72f670a8edee35554a4ca3a0618c526d651.tar.gz
Re-added taper and twist-vert materials.
Diffstat (limited to 'js/lib/rdge/texture.js')
-rw-r--r--js/lib/rdge/texture.js45
1 files changed, 2 insertions, 43 deletions
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js
index 2e76f2c0..d2f66efa 100644
--- a/js/lib/rdge/texture.js
+++ b/js/lib/rdge/texture.js
@@ -216,23 +216,7 @@ function Texture( dstWorld, texMapName, wrap, mips )
216 return; 216 return;
217 } 217 }
218 218
219 /* 219 // copy the source canvas to the context to be used in the texture
220 var srcCtx;
221 if (!this._is3D)
222 {
223 srcCtx = srcCanvas.getContext("2d");
224 imageData = srcCtx.getImageData( 0, 0, width, height );
225 renderCtx.putImageData( imageData, 0, 0 );
226 }
227 else
228 {
229 srcCtx = srcCanvas.getContext("experimental-webgl");
230 if (srcCtx)
231 {
232 renderCtx.drawImage(srcCanvas, 0, 0);
233 }
234 }
235 */
236 renderCtx.drawImage(srcCanvas, 0, 0); 220 renderCtx.drawImage(srcCanvas, 0, 0);
237 221
238 ///////////////// 222 /////////////////
@@ -240,7 +224,7 @@ function Texture( dstWorld, texMapName, wrap, mips )
240 renderer.commitTexture( tex ); 224 renderer.commitTexture( tex );
241 225
242 return tex; 226 return tex;
243} 227 }
244 228
245 this.isPowerOfTwo = function(x) 229 this.isPowerOfTwo = function(x)
246 { 230 {
@@ -278,31 +262,6 @@ function Texture( dstWorld, texMapName, wrap, mips )
278 } 262 }
279 } 263 }
280 264
281 /*
282 this.findWorld = function( id, elt )
283 {
284 if (elt.id && elt.id === id)
285 {
286 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld)
287 {
288 var world = elt.elementModel.shapeModel.GLWorld;
289 return world;
290 }
291 }
292
293 if (elt.children)
294 {
295 var nKids = elt.children.length;
296 for (var i=0; i<nKids; i++)
297 {
298 var child = elt.children[i];
299 var world = this.findWorld( id, child );
300 if (world) return world;
301 }
302 }
303 }
304 */
305
306 // initialize the object 265 // initialize the object
307 this.init(); 266 this.init();
308} 267}