Browse Source

- UV 1,1 trying to access unexisting pixels on the texture

Mr.doob 15 years ago
parent
commit
c4d39ba6ae
3 changed files with 4 additions and 4 deletions
  1. 0 0
      build/three.js
  2. 0 0
      build/three_debug.js
  3. 4 4
      src/renderers/CanvasRenderer.js

File diff suppressed because it is too large
+ 0 - 0
build/three.js


File diff suppressed because it is too large
+ 0 - 0
build/three_debug.js


+ 4 - 4
src/renderers/CanvasRenderer.js

@@ -266,8 +266,8 @@ THREE.CanvasRenderer = function () {
 					} else if ( material instanceof THREE.MeshBitmapUVMappingMaterial ) {
 
 						bitmap = material.bitmap;
-						bitmapWidth = bitmap.width;
-						bitmapHeight = bitmap.height;
+						bitmapWidth = bitmap.width - 1;
+						bitmapHeight = bitmap.height - 1;
 
 						/* DEBUG
 						if ( !element.uvs[ 0 ] || !element.uvs[ 1 ] || !element.uvs[ 2 ]) {
@@ -406,8 +406,8 @@ THREE.CanvasRenderer = function () {
 					} else if ( material instanceof THREE.MeshBitmapUVMappingMaterial ) {
 
 						bitmap = material.bitmap;
-						bitmapWidth = bitmap.width;
-						bitmapHeight = bitmap.height;
+						bitmapWidth = bitmap.width - 1;
+						bitmapHeight = bitmap.height - 1;
 
 						/* DEBUG
 						if ( !element.uvs[ 0 ] || !element.uvs[ 1 ] || !element.uvs[ 2 ] || !element.uvs[ 3 ]) {

Some files were not shown because too many files changed in this diff