提交 45e7b2a6 编写于 作者: M Mr.doob

Docs: Updated Projector and Vector3.

上级 7fa03cf6
......@@ -19,49 +19,17 @@
<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>.projectVector( [page:Vector3 vector], [page:Camera camera] ) [page:Vector3]</h3>
<div>
[page:Vector3 vector] — vector to project.<br />
[page:Camera camera] — camera to use in the projection.<br />
</div>
<div>
Projects a vector with the camera. Caution, this method changes 'vector'.
</div>
<h3>.unprojectVector( [page:Vector3 vector], [page:Camera camera] ) [page:Vector3]</h3>
<div>
[page:Vector3 vector] — vector to unproject.<br />
[page:Camera camera] — camera to use in the projection.<br />
</div>
<div>
Unprojects a vector with the camera. Caution, this method changes 'vector'.
</div>
<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>
<h3>.projectScene( [page:Scene scene], [page:Camera camera], [page:Boolean sort] ) [page:Object]</h3>
<div>
[page:Scene scene] — scene to project.<br />
[page:Camera camera] — camera to use in the projection.<br />
[page:Boolean sort] — select whether to sort elements using the <a href="http://en.wikipedia.org/wiki/Painter%27s_algorithm">Painter's algorithm</a>.
</div>
<div>
Transforms a 3D [page:Scene scene] object into 2D render data that can be rendered in a screen with your renderer of choice, projecting and clipping things out according to the used camera.
</div>
<div>
If the <em>scene</em> were a real scene, this method would be the equivalent of taking a picture with the <em>camera</em> (and developing the film would be the next step, using a Renderer).
</div>
<h2>Source</h2>
......
......@@ -316,9 +316,9 @@
index -- [page:Integer] 0, 1, or 2
</div>
<div>
Returns the value of the vector component x, y, or z by an index. <br /><br />
Index 0: x <br />
Index 1: y <br />
Index 2: z <br />
......@@ -415,6 +415,22 @@
Applies a [page:Quaternion] transform to this vector.
</div>
<h3>.projectCamera( [page:Camera camera] ) [page:Vector3]</h3>
<div>
[page:Camera camera] — camera to use in the projection.<br />
</div>
<div>
Projects the vector with the camera.
</div>
<h3>.unprojectCamera( [page:Camera camera] ) [page:Vector3]</h3>
<div>
[page:Camera camera] — camera to use in the projection.<br />
</div>
<div>
Unprojects the vector with the camera.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册