aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorhwc4872012-03-23 17:15:28 -0700
committerhwc4872012-03-23 17:15:28 -0700
commit62f4327f9b83760e52a1f6bf1e689b1e0a780fbb (patch)
tree082e7903e8d06d36a3854cc782b12030e497c2e7 /js/lib
parent8fa51b9d8c37896dfd13a5b238cf990fcbdb0c96 (diff)
downloadninja-62f4327f9b83760e52a1f6bf1e689b1e0a780fbb.tar.gz
textures
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/rdge/texture.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js
index 28dc868a..c72864b8 100644
--- a/js/lib/rdge/texture.js
+++ b/js/lib/rdge/texture.js
@@ -207,6 +207,7 @@ function Texture( dstWorld )
207 width = this.nextHighestPowerOfTwo( width ); 207 width = this.nextHighestPowerOfTwo( width );
208 height = this.nextHighestPowerOfTwo( height ); 208 height = this.nextHighestPowerOfTwo( height );
209 } 209 }
210 width = 64; height = 64;
210 211
211 // create a canvas to be used as the image for the texture map 212 // create a canvas to be used as the image for the texture map
212 var doc = srcCanvas.ownerDocument; 213 var doc = srcCanvas.ownerDocument;
@@ -246,6 +247,10 @@ function Texture( dstWorld )
246 var nBytes = width*height*4; 247 var nBytes = width*height*4;
247 for (var i=0; i<nBytes; i++) 248 for (var i=0; i<nBytes; i++)
248 imageData.data[i] = data[i]; 249 imageData.data[i] = data[i];
250 var nPrint = nBytes;
251 if (nPrint > 1000) nPrint = 1000;
252 for (var i=0; i<nPrint; i++)
253 console.log( " " + data[i] );
249 } 254 }
250 } 255 }
251 renderCtx.putImageData( imageData, 0, 0 ); 256 renderCtx.putImageData( imageData, 0, 0 );