Skip to content

Commit

Permalink
three.js: updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 21, 2012
1 parent 34e0813 commit ed4d640
Show file tree
Hide file tree
Showing 101 changed files with 26,588 additions and 0 deletions.
4 changes: 4 additions & 0 deletions three.js/docs/48/.buildinfo
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ec7cda4681a3e83d81b3b7a6c57cd16a
tags: fbb0d17656682115ca4d033fb2f83ba1
12 changes: 12 additions & 0 deletions three.js/docs/48/_sources/api/THREE.txt
@@ -0,0 +1,12 @@
THREE - Main three.js namespace
===============================

.. toctree::
cameras/index.rst
core/index.rst
lights/index.rst
extras/index.rst

.. js:data:: THREE

Main namespace for three.js
39 changes: 39 additions & 0 deletions three.js/docs/48/_sources/api/cameras/Camera.txt
@@ -0,0 +1,39 @@
Camera - Abstract base class for cameras
----------------------------------------

.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................

.. class:: Camera()

Abstract base class for cameras

Inherits from :class:`Object3D`


.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................

.. attribute:: Camera.matrixWorldInverse

:class:`Matrix4`

.. attribute:: Camera.projectionMatrix

:class:`Matrix4`

.. attribute:: Camera.projectionMatrixInverse

:class:`Matrix4`



.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................

.. function:: Camera.lookAt( vector )

Orient camera to look at :class:`Vector3`
69 changes: 69 additions & 0 deletions three.js/docs/48/_sources/api/cameras/OrthographicCamera.txt
@@ -0,0 +1,69 @@
OrthographicCamera - Camera with orthographic projection
------------------------------------------------------------

.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................

.. class:: OrthographicCamera( left, right, top, bottom, near, far )

Camera with orthographic projection

Part of scene graph

Inherits from :class:`Object3D` :class:`Camera`

:param float left: left
:param float right: right
:param float top: top
:param float bottom: bottom
:param float near: near
:param float far: far


.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................

.. attribute:: OrthographicCamera.left

Camera frustum left plane

.. attribute:: OrthographicCamera.right

Camera frustum right plane

.. attribute:: OrthographicCamera.top

Camera frustum top plane

.. attribute:: OrthographicCamera.bottom

Camera frustum bottom plane

.. attribute:: OrthographicCamera.near

Camera frustum near plane

.. attribute:: OrthographicCamera.far

Camera frustum far plane


.. ...............................................................................
.. rubric:: Method
.. ...............................................................................

.. function:: OrthographicCamera.updateProjectionMatrix()

Updates camera's projection matrix. Must be called after change of parameters.


.. ...............................................................................
.. rubric:: Example
.. ...............................................................................

::

var camera = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 1000 );
scene.add( camera );
125 changes: 125 additions & 0 deletions three.js/docs/48/_sources/api/cameras/PerspectiveCamera.txt
@@ -0,0 +1,125 @@
PerspectiveCamera - Camera with perspective projection
---------------------------------------------------------

.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................

.. class:: PerspectiveCamera( fov, aspect, near, far )

Camera with perspective projection

Part of scene graph

Inherits from :class:`Object3D` :class:`Camera`

:param float fov: field of view
:param float aspect: aspect ratio
:param float near: near
:param float far: far


.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................

.. attribute:: PerspectiveCamera.fov

Camera frustum vertical field of view

.. attribute:: PerspectiveCamera.aspect

Camera frustum aspect ratio

.. attribute:: PerspectiveCamera.near

Camera frustum near plane

.. attribute:: PerspectiveCamera.far

Camera frustum far plane

.. ...............................................................................
.. rubric:: Multi-view attributes
.. ...............................................................................

.. attribute:: PerspectiveCamera.fullWidth
.. attribute:: PerspectiveCamera.fullHeight
.. attribute:: PerspectiveCamera.x
.. attribute:: PerspectiveCamera.y
.. attribute:: PerspectiveCamera.width
.. attribute:: PerspectiveCamera.height


.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................

.. function:: PerspectiveCamera.updateProjectionMatrix()

Updates camera's projection matrix. Must be called after change of parameters.

.. function:: PerspectiveCamera.setLens ( focalLength, frameSize )

Uses focal length (in mm) to estimate and set FOV
35mm (fullframe) camera is used if frame size is not specified.

Formula based on http://www.bobatkins.com/photography/technical/field_of_view.html

:param float focalLength: focal length
:param float frameSize: frame size

.. function:: PerspectiveCamera.setViewOffset ( fullWidth, fullHeight, x, y, width, height )

Sets an offset in a larger frustum. This is useful for multi-window or
multi-monitor/multi-machine setups.

For example, if you have 3x2 monitors and each monitor is 1920x1080 and
the monitors are in grid like this:

+---+---+---+
| A | B | C |
+---+---+---+
| D | E | F |
+---+---+---+

then for each monitor you would call it like this:

::

var w = 1920;
var h = 1080;
var fullWidth = w * 3;
var fullHeight = h * 2;

// --A--
camera.setOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
//--B--
camera.setOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
//--C--
camera.setOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
//--D--
camera.setOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
//--E--
camera.setOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
//--F--
camera.setOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );

Note there is no reason monitors have to be the same size or in a grid.

:param float fullWidth: full width of multi-view setup
:param float fullHeight: full height of multi-view setup
:param float x: x-offset of subcamera
:param float y: y-offset of subcamera
:param float width: width of subcamera
:param float height: height of subcamera


.. ...............................................................................
.. rubric:: Example
.. ...............................................................................

::

var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
scene.add( camera );
8 changes: 8 additions & 0 deletions three.js/docs/48/_sources/api/cameras/index.txt
@@ -0,0 +1,8 @@
Cameras
=======

.. toctree::

Camera
OrthographicCamera
PerspectiveCamera
55 changes: 55 additions & 0 deletions three.js/docs/48/_sources/api/core/Clock.txt
@@ -0,0 +1,55 @@
Clock - Keeps track of time
---------------------------

.. rubric:: Constructor

.. class:: Clock(autoStart)

//todo:description

.. rubric:: Attributes

.. attribute:: Clock.autoStart

//todo:description

.. attribute:: Clock.startTime

//todo:description

.. attribute:: Clock.oldTime

//todo:description

.. attribute:: Clock.elapsedTime

//todo:description

.. attribute:: Clock.running

//todo:description

.. rubric:: Methods

.. function:: Clock.start()

//todo:description

.. function:: Clock.stop()

//todo:description

.. function:: Clock.getElapsedTime()

//todo:description
:returns: //todo
:rtype: //todo

.. function:: Clock.getDelta()

//todo:description
:returns: //todo
:rtype: //todo

.. rubric:: Example

0 comments on commit ed4d640

Please sign in to comment.