提交 2037af0e 编写于 作者: R Ricardo Cabello

Merge pull request #6673 from sukhwant/cameraDoc

Camera Documentation
......@@ -34,6 +34,14 @@
<h2>Methods</h2>
<h3>[method:Vector3 getWorldDirection]([page:Vector3 vector])</h3>
<div>
vector — (optional)<br />
<br />
It returns a vector representing the direction in which the camera is looking, in world space.
</div>
<h3>[method:null lookAt]( [page:Vector3 vector] )</h3>
<div>
......@@ -41,6 +49,13 @@
<br />
This makes the camera look at the vector position in the global space as long as the parent of this camera is the scene or at position (0,0,0).
</div>
<h3>[method:Camera clone]( [page:Camera camera] )</h3>
<div>
camera — camera to clone<br />
<br />
It returns a clone of camera.
</div>
<h2>Source</h2>
......
......@@ -17,7 +17,7 @@
<div>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</div>
<div>[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]</div>
<div>[example:webgl_materials_cubemap_dynamic2 shading / physical ]</div>
<div>[example:webgl_shading_physical shading / physical ]</div>
<code>//Create cube camera
var cubeCamera = new THREE.CubeCamera( 1, 100000, 128 );
......
......@@ -15,7 +15,21 @@
<h2>Example</h2>
<div>[example:canvas_camera_orthographic camera / orthographic ]</div>
<div>[example:canvas_camera_orthographic2 camera / orthographic2 ]</div>
<div>[example:webgl_camera camera ]</div>
<div>[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]</div>
<div>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</div>
<div>[example:webgl_materials_normaldisplacementmap materials / normaldisplacementmap ]</div>
<div>[example:webgl_postprocessing_advanced postprocessing / advanced ]</div>
<div>[example:webgl_postprocessing_dof2 postprocessing / dof2 ]</div>
<div>[example:webgl_postprocessing_godrays postprocessing / godrays ]</div>
<div>[example:webgl_rtt rtt ]</div>
<div>[example:webgl_shaders_tonemapping shaders / tonemapping ]</div>
<div>[example:webgl_shadowmap shadowmap ]</div>
<div>[example:webgl_terrain_dynamic terrain / dynamic ]</div>
<code>var camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
scene.add( camera );</code>
......@@ -36,6 +50,9 @@ scene.add( camera );</code>
<h2>Properties</h2>
<h3>[property:number zoom]</h3>
<div>Gets or sets the zoom factor of the camera. </div>
<h3>[property:Float left]</h3>
<div>Camera frustum left plane.</div>
......@@ -61,6 +78,18 @@ scene.add( camera );</code>
<div>
Updates the camera projection matrix. Must be called after change of parameters.
</div>
<h3>[method:OrthographicCamera clone]()</h3>
<div>
<br />
It returns a clone of OrthographicCamera.
</div>
<h3>[method:JSON toJSON]()</h3>
<div>
Return camera data in JSON format.
</div>
<h2>Source</h2>
......
......@@ -15,7 +15,15 @@
<h2>Example</h2>
<div>[example:canvas_effects_stereo effects / stereo ]</div>
<div>[example:canvas_geometry_birds geometry / birds ]</div>
<div>[example:canvas_geometry_cube geometry / cube ]</div>
<div>[example:webgl_animation_skinning_blending animation / skinning / blending ]</div>
<div>[example:webgl_animation_skinning_morph animation / skinning / blending ]</div>
<div>[example:webgl_interactive_cubes interactive / cubes ]</div>
<div>[example:webgl_loader_collada_skinning loader / collada / skinning ]</div>
<code>var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
scene.add( camera );</code>
......@@ -33,6 +41,9 @@ scene.add( camera );</code>
<h2>Properties</h2>
<h3>[property:number zoom]</h3>
<div>Gets or sets the zoom factor of the camera. </div>
<h3>[property:Float fov]</h3>
<div>Camera frustum vertical field of view, from bottom to top of view, in degrees.</div>
......@@ -110,7 +121,17 @@ camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
<div>
Updates the camera projection matrix. Must be called after change of parameters.
</div>
<h3>[method:PerspectiveCamera clone]()</h3>
<div>
<br />
It returns a clone of PerspectiveCamera.
</div>
<h3>[method:JSON toJSON]()</h3>
<div>
Return camera data in JSON format.
</div>
<h2>Source</h2>
......
......@@ -16,7 +16,14 @@
Use this only if you do not wish to manage
both an Orthographic and Perspective Camera</div>
<h2>Examples</h2>
<div>[example:canvas_camera_orthographic2 camera / orthographic2 ]</div>
<code>//Create combined camera
camera = new THREE.CombinedCamera( window.innerWidth / 2, window.innerHeight / 2, 70, 1, 1000, - 500, 1000 );
</code>
<h2>Constructor</h2>
......@@ -79,6 +86,11 @@
Gets camera frustum far plane.
</div>
<h3>[property:Matrix4 projectionMatrix]</h3>
<div>
This is the matrix which contains the projection.
</div>
<h3>[property:OrthographicCamera cameraO]</h3>
<div>
Gets or sets the internal OrthographicCamera used as camera.
......@@ -182,6 +194,6 @@
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/cameras/CombinedCamera.js examples/cameras/CombinedCamera.js]
</body>
</html>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册