Przeglądaj źródła

Improved webgl_postprocessing_outline example.

Mr.doob 8 lat temu
rodzic
commit
5e756e4d62
1 zmienionych plików z 2 dodań i 20 usunięć
  1. 2 20
      examples/webgl_postprocessing_outline.html

+ 2 - 20
examples/webgl_postprocessing_outline.html

@@ -1,5 +1,4 @@
 <!DOCTYPE html>
-
 <html lang="en">
 	<head>
 		<title>three.js webgl - post processing - Outline Pass</title>
@@ -311,25 +310,6 @@
 
 				window.addEventListener( 'resize', onWindowResize, false );
 
-				var moved = false;
-
-				controls.addEventListener( 'change', function() {
-
-					moved = true;
-
-				} );
-
-				window.addEventListener( 'mousedown', function () {
-
-					moved = false;
-
-				}, false );
-
-				window.addEventListener( 'mouseup', function() {
-					if(!moved)
-						checkIntersection();
-				} );
-
 				window.addEventListener( 'mousemove', onTouchMove );
 				window.addEventListener( 'touchmove', onTouchMove );
 
@@ -352,6 +332,8 @@
 					mouse.x = ( x / window.innerWidth ) * 2 - 1;
 					mouse.y = - ( y / window.innerHeight ) * 2 + 1;
 
+					checkIntersection();
+
 				}
 
 				function addSelectedObject(object) {