From b6a8f72f670a8edee35554a4ca3a0618c526d651 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 5 Apr 2012 05:30:55 -0700 Subject: Re-added taper and twist-vert materials. --- js/lib/rdge/texture.js | 45 ++------------------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) (limited to 'js/lib/rdge/texture.js') 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 ) return; } - /* - var srcCtx; - if (!this._is3D) - { - srcCtx = srcCanvas.getContext("2d"); - imageData = srcCtx.getImageData( 0, 0, width, height ); - renderCtx.putImageData( imageData, 0, 0 ); - } - else - { - srcCtx = srcCanvas.getContext("experimental-webgl"); - if (srcCtx) - { - renderCtx.drawImage(srcCanvas, 0, 0); - } - } - */ + // copy the source canvas to the context to be used in the texture renderCtx.drawImage(srcCanvas, 0, 0); ///////////////// @@ -240,7 +224,7 @@ function Texture( dstWorld, texMapName, wrap, mips ) renderer.commitTexture( tex ); return tex; -} + } this.isPowerOfTwo = function(x) { @@ -278,31 +262,6 @@ function Texture( dstWorld, texMapName, wrap, mips ) } } - /* - this.findWorld = function( id, elt ) - { - if (elt.id && elt.id === id) - { - if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) - { - var world = elt.elementModel.shapeModel.GLWorld; - return world; - } - } - - if (elt.children) - { - var nKids = elt.children.length; - for (var i=0; i