Ver código fonte

Removed Projector.

Mr.doob 10 anos atrás
pai
commit
1ee4debf73
3 arquivos alterados com 1 adições e 52 exclusões
  1. 0 38
      docs/api/core/Projector.html
  2. 0 1
      docs/list.js
  3. 1 13
      src/core/Projector.js

+ 0 - 38
docs/api/core/Projector.html

@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../list.js"></script>
-		<script src="../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">Projects points between spaces.</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]()</h3>
-		<div>
-		Creates a new projector Object. It initializes a lot of variables that the projector uses to project the points.
-		</div>
-
-
-		<h2>Properties</h2>
-
-		<h2>Methods</h2>
-
-		<h3>.pickingRay( [page:Vector3 vector], [page:Camera camera] ) [page:Raycaster]</h3>
-		<div>
-		Translates a 2D point from NDC (<em>Normalized Device Coordinates</em>) to a [page:Raycaster] that can be used for picking. NDC range from [-1..1] in x (left to right) and [1.0 .. -1.0] in y (top to bottom).
-		</div>
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 0 - 1
docs/list.js

@@ -29,7 +29,6 @@ var list = {
 			[ "Face3", "api/core/Face3" ],
 			[ "Geometry", "api/core/Geometry" ],
 			[ "Object3D", "api/core/Object3D" ],
-			[ "Projector", "api/core/Projector" ],
 			[ "Raycaster", "api/core/Raycaster" ],
 		],
 

+ 1 - 13
src/core/Projector.js

@@ -7,7 +7,6 @@ THREE.Projector = function () {
 	this.projectVector = function ( vector, camera ) {
 
 		console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
-
 		vector.project( camera );
 
 	};
@@ -15,24 +14,13 @@ THREE.Projector = function () {
 	this.unprojectVector = function ( vector, camera ) {
 
 		console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
-
 		vector.unproject( camera );
 
 	};
 
 	this.pickingRay = function ( vector, camera ) {
 
-		// set two vectors with opposing z values
-		vector.z = - 1.0;
-		var end = new THREE.Vector3( vector.x, vector.y, 1.0 );
-
-		this.unprojectVector( vector, camera );
-		this.unprojectVector( end, camera );
-
-		// find direction from vector to end
-		end.sub( vector ).normalize();
-
-		return new THREE.Raycaster( vector, end );
+		console.error( 'THREE.Projector: .pickingRay() has been removed.' );
 
 	};