ソースを参照

Merge remote-tracking branch 'paulmasson/master' into dev

Mr.doob 10 年 前
コミット
d7337a8b1b

+ 4 - 0
docs/api/textures/Texture.html

@@ -52,6 +52,10 @@
 		<div>
 		<div>
 		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
 		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
 		</div>
 		</div>
+		
+		<div>
+		NOTE: tiling of images in textures only functions if image dimensions are powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels. Individual dimensions need not be equal, but each must be a power of two. This is a limitation of WebGL, not Three.js.
+		</div>
 
 
 		<h3>[property:number magFilter]</h3>
 		<h3>[property:number magFilter]</h3>
 		<div>
 		<div>

+ 11 - 0
examples/canvas_interactive_cubes.html

@@ -106,6 +106,7 @@
 				container.appendChild( stats.domElement );
 				container.appendChild( stats.domElement );
 
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
+				document.addEventListener( 'touchstart', onDocumentTouchStart, false );
 
 
 				//
 				//
 
 
@@ -121,6 +122,16 @@
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 
 			}
 			}
+			
+			function onDocumentTouchStart( event ) {
+				
+				event.preventDefault();
+				
+				event.clientX = event.touches[0].clientX;
+				event.clientY = event.touches[0].clientY;
+				onDocumentMouseDown( event );
+
+			}	
 
 
 			function onDocumentMouseDown( event ) {
 			function onDocumentMouseDown( event ) {
 
 

+ 11 - 0
examples/canvas_interactive_cubes_tween.html

@@ -86,6 +86,7 @@
 				container.appendChild( stats.domElement );
 				container.appendChild( stats.domElement );
 
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
+				document.addEventListener( 'touchstart', onDocumentTouchStart, false );
 
 
 				//
 				//
 
 
@@ -101,6 +102,16 @@
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 
 			}
 			}
+			
+			function onDocumentTouchStart( event ) {
+				
+				event.preventDefault();
+				
+				event.clientX = event.touches[0].clientX;
+				event.clientY = event.touches[0].clientY;
+				onDocumentMouseDown( event );
+
+			}	
 
 
 			function onDocumentMouseDown( event ) {
 			function onDocumentMouseDown( event ) {