Explorar el Código

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

Mr.doob hace 15 años
padre
commit
c4d39ba6ae
Se han modificado 3 ficheros con 4 adiciones y 4 borrados
  1. 0 0
      build/three.js
  2. 0 0
      build/three_debug.js
  3. 4 4
      src/renderers/CanvasRenderer.js

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 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 ]) {

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio