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

Decided to write the documentation "system" in plain HTML.

No markup learning, no compilation process. Just simple HTML.
Still, working on it.
上级 7eab901d
# 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
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
\ No newline at end of file
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`
\ No newline at end of file
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 );
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 );
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
Color - Represents a color
--------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Color(hex)
Represents a color
See also :class:`ColorUtils`
:param integer hex: Hex value to intialize the color
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Color.r
Red channel (float between 0 and 1) (default ``1``)
.. attribute:: Color.g
Green channel (float between 0 and 1) (default ``1``)
.. attribute:: Color.b
Blue channel (float between 0 and 1) (default ``1``)
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Color.clone()
Clones this color
:returns: New instance identical to this color
:rtype: :class:`Color`
.. function:: Color.copy( color )
Copies given ``color`` into this color
:param Color color: Color to copy
:returns: This color
:rtype: :class:`Color`
.. function:: Color.copyGammaToLinear( color )
Copies given ``color`` into this color, making conversion from gamma to linear color space
:param Color color: Color to copy
:returns: This color
:rtype: :class:`Color`
.. function:: Color.copyLinearToGamma(color)
Copies given ``color`` into this color, making conversion from linear to gamma color space
:param Color color: Color to copy
:returns: This color
:rtype: :class:`Color`
.. function:: Color.convertGammaToLinear()
Converts this color from gamma to linear color space
:returns: This color
:rtype: :class:`Color`
.. function:: Color.convertLinearToGamma()
Converts this color from linear to gamma color space
:returns: This color
:rtype: :class:`Color`
.. function:: Color.setRGB( r, g, b )
Sets this color from RGB values
:param float r: Red channel value (between 0 and 1)
:param float g: Green channel value (between 0 and 1)
:param float b: Blue channel value (between 0 and 1)
:returns: This color
:rtype: :class:`Color`
.. function:: Color.setHSV( h, s, v )
Sets this color from HSV values.
Based on MochiKit implementation by Bob Ippolito.
:param float h: Hue channel (between 0 and 1)
:param float s: Saturation channel (between 0 and 1)
:param float v: Value channel (between 0 and 1)
:returns: This color
:rtype: :class:`Color`
.. function:: Color.setHex( hex )
Sets this color from a hex value
:param integer hex: Value of the color in hex (between ``0x000000`` and ``0xffffff``)
:returns: This color
:rtype: :class:`Color`
.. function:: Color.getHex()
Gets the value of this color in hex
:returns: Color value in hex
:rtype: integer
.. function:: Color.getContextStyle()
Returns the value of this color in CSS context style.
Example: ``rgb( r, g, b )``
:returns: CSS-formatted color value
:rtype: string
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var colors = [];
for ( i = 0; i < 5000; i ++ ) {
x = 2000 * Math.random() - 1000;
colors[ i ] = new THREE.Color( 0xffffff );
colors[ i ].setHSV( ( x + 1000 ) / 2000, 1.0, 1.0 );
}
Edge - Edge between two vertices
--------------------------------
.. rubric:: Constructor
.. class:: Edge(v1, v2, vi1, vi2)
//todo:description
:param ? v1: //todo
:param ? v2: //todo
:param ? vi1: //todo
:param ? vi2: //todo
.. rubric:: Attributes
.. attribute:: Edge.vertices
//todo:description
.. attribute:: Edge.vertexIndices
//todo:description
.. attribute:: Edge.faces
//todo:description
.. attribute:: Edge.faceIndices
//todo:description
Face3 - Triangle face
------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Face3( a, b, c, normal, color, materialIndex )
Triangle face
(indices start from zero)
:param integer a: vertex A index
:param integer b: vertex B index
:param integer c: vertex C index
:param varying normal: face normal or array of vertex normals
:param varying color: face color or array of vertex colors
:param integer materialIndex: material index
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Face3.a
Vertex A index
.. attribute:: Face3.b
Vertex B index
.. attribute:: Face3.c
Vertex C index
.. attribute:: Face3.normal
Face normal
:class:`Vector3` - default ``( 0, 0, 0 )``
.. attribute:: Face3.color
Face color
:class:`Color` - default ``white``
.. attribute:: Face3.centroid
Face centroid
:class:`Vector3` - default ``( 0, 0, 0 )``
.. attribute:: Face3.vertexNormals
Array of 3 vertex normals
default ``[]``
.. attribute:: Face3.vertexColors
Array of 3 vertex colors
default ``[]``
.. attribute:: Face3.vertexTangents
Array of 3 vertex tangents
default ``[]``
.. attribute:: Face3.materialIndex
Material index (points to :attr:`Geometry.materials` array)
default ``0``
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var face = new THREE.Face3( 0, 1, 2, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );
\ No newline at end of file
Face4 - Quad face
------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Face4( a, b, c, d, normal, color, materialIndex )
Quad face
(indices start from zero)
:param integer a: vertex index
:param integer b: vertex index
:param integer c: vertex index
:param integer d: vertex index
:param varying normal: face normal or array of vertex normals
:param varying color: face color or array of vertex colors
:param integer materialIndex: material index
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Face4.a
Vertex A index
.. attribute:: Face4.b
Vertex B index
.. attribute:: Face4.c
Vertex C index
.. attribute:: Face4.d
Vertex D index
.. attribute:: Face4.normal
Face normal
:class:`Vector3` - default ``(0,0,0)``
.. attribute:: Face4.color
Face color
:class:`Color` - default ``white``
.. attribute:: Face4.centroid
:class:`Vector3` - default ``(0,0,0)``
.. attribute:: Face4.vertexNormals
Array of 4 vertex normals
default ``[]``
.. attribute:: Face4.vertexColors
Array of 4 vertex colors
default ``[]``
.. attribute:: Face4.vertexTangents
Array of 4 vertex tangents
default ``[]``
.. attribute:: Face4.materialIndex
Material index (points to :attr:`Geometry.materials` array)
default ``0``
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );
Geometry - Base class for geometries
----------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Geometry()
Base class for geometries
Encapsulates unique instances of vertex buffer objects in :class:`WebGLRenderer`
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Geometry.id
Unique number of this geometry instance
.. attribute:: Geometry.boundingBox
Bounding box
::
boundingBox = { min: new THREE.Vector3(), max: new THREE.Vector3() }
.. attribute:: Geometry.boundingSphere
Bounding sphere
::
boundingSphere = { radius: float }
.. attribute:: Geometry.materials
Array of :class:`materials <Material>`
Used with models containing multiple materials in a single geometry (with pass-through :class:`MeshFaceMaterial`)
Face indices index into this array.
.. ...............................................................................
.. rubric:: Attribute buffers
.. ...............................................................................
.. attribute:: Geometry.faces
Array of faces (:class:`Face3`, :class:`Face4`)
.. attribute:: Geometry.vertices
Array of :class:`vertices <Vertex>`
Face indices index into this array.
.. attribute:: Geometry.colors
Array of vertex :class:`colors <Color>`, matching number and order of vertices.
Used in :class:`ParticleSystem`, :class:`Line` and :class:`Ribbon`.
:class:`Meshes <Mesh>` use per-face-use-of-vertex colors embedded directly in faces.
.. attribute:: Geometry.faceUvs
Array of face UV layers.
Each UV layer is an array of :class:`UV` matching order and number of faces.
.. attribute:: Geometry.faceVertexUvs
Array of vertex UV layers.
Each UV layer is an array of :class:`UV` matching order and number of vertices in faces.
.. attribute:: Geometry.morphTargets
Array of morph targets.
Each morph target is JS object:
::
morphTarget = { name: "targetName", vertices: [ new THREE.Vertex(), ... ] }
Morph vertices match number and order of primary vertices.
.. attribute:: Geometry.morphColors
Array of morph colors.
Morph colors have similar structure as morph targets, each color set is JS object:
::
morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }
Morph colors can match either number and order of faces (face colors) or number of vertices (vertex colors).
.. attribute:: Geometry.skinWeights
Array of skinning weights (:class:`Vector4`), matching number and order of vertices.
.. attribute:: Geometry.skinIndices
Array of skinning indices (:class:`Vector4`), matching number and order of vertices.
.. ...............................................................................
.. rubric:: Flags
.. ...............................................................................
.. attribute:: Geometry.hasTangents
True if geometry has tangents. Set in :func:`Geometry.computeTangents`
``default false``
.. attribute:: Geometry.dynamic
Set to `true` if attribute buffers will need to change in runtime (using ``dirty`` flags).
Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.
``default false``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Geometry.applyMatrix( matrix )
Bakes matrix transform directly into vertex coordinates
:param Matrix4 matrix: matrix transform
.. function:: Geometry.computeCentroids()
Computes centroids for all faces
.. function:: Geometry.computeFaceNormals()
Computes face normals
.. function:: Geometry.computeVertexNormals()
Computes vertex normals by averaging face normals.
Face normals must be existing / computed beforehand.
.. function:: Geometry.computeTangents()
Computes vertex tangents
Based on http://www.terathon.com/code/tangent.html
Geometry must have vertex UVs (layer 0 will be used).
.. function:: Geometry.computeBoundingBox()
Computes bounding box of the geometry, updating :attr:`Geometry.boundingBox` attribute.
.. function:: Geometry.computeBoundingSphere()
Computes bounding sphere of the geometry, updating :attr:`Geometry.boundingSphere` attribute.
.. function:: Geometry.mergeVertices()
Checks for duplicate vertices using hashmap.
Duplicated vertices are removed and faces' vertices are updated.
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
// geometry with random points
// (useful for example with ParticleSystem)
var n = 10000;
var geometry = new THREE.Geometry()
for ( var i = 0; i < n; i ++ ) {
var x = THREE.MathUtils.randFloatSpread( 1000 );
var y = THREE.MathUtils.randFloatSpread( 1000 );
var z = THREE.MathUtils.randFloatSpread( 1000 );
var position = new THREE.Vector3( x, y, z );
var vertex = new THREE.Vertex( position );
geometry.vertices.push( vertex );
}
geometry.computeBoundingSphere();
Math - Math utility functions
-----------------------------
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Math.clamp( x, a, b )
Clamps the x to be between a and b
:param float x: value to be clamped
:param float a: minimum value
:param float b: maximum value
:returns: Clamped value
:rtype: float
.. function:: Math.clampBottom( x, a )
Clamps the x to be larger than a
:param float x: value to be clamped
:param float a: minimum value
:returns: Clamped value
:rtype: float
.. function:: Math.mapLinear( x, a1, a2, b1, b2 )
Linear mapping of x from range <a1, a2> to range <b1, b2>
:param float x: value to be mapped
:param float a1: minimum value for range A
:param float a2: maximum value for range A
:param float b1: minimum value for range B
:param float b2: maximum value for range B
:returns: mapped value
:rtype: float
.. function:: Math.random16()
Random float from <0, 1> with 16 bits of randomness
(standard Math.random() creates repetitive patterns when applied over larger space)
:returns: Random float from <0, 1> with 16 bits of randomness
:rtype: float
.. function:: Math.randInt( low, high )
:returns: Random integer from *low* to *high* interval
:rtype: integer
.. function:: Math.randFloat( low, high )
:returns: Random float from *low* to *high* interval
:rtype: float
.. function:: Math.randFloatSpread( range )
:returns: Random float from -range/2 to range/2 interval
:rtype: float
Matrix3 - A 3x3 matrix
----------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Matrix3()
A 3x3 matrix
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Matrix3.m
Array with matrix values
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Matrix3.transpose()
Transposes this matrix in place
:returns: This matrix
:rtype: :class:`Matrix3`
.. function:: Matrix3.transposeIntoArray( r )
Transposes this matrix into supplied array ``r``
This matrix is unmodified
:returns: This matrix
:rtype: :class:`Matrix3`
Matrix4 - A 4x4 Matrix
----------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Matrix4( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 )
A 4x4 Matrix
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Matrix4.n11
.. attribute:: Matrix4.n12
.. attribute:: Matrix4.n13
.. attribute:: Matrix4.n14
.. attribute:: Matrix4.n21
.. attribute:: Matrix4.n22
.. attribute:: Matrix4.n23
.. attribute:: Matrix4.n24
.. attribute:: Matrix4.n31
.. attribute:: Matrix4.n32
.. attribute:: Matrix4.n33
.. attribute:: Matrix4.n34
.. attribute:: Matrix4.n41
.. attribute:: Matrix4.n42
.. attribute:: Matrix4.n43
.. attribute:: Matrix4.n44
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Matrix4.clone( )
Clones this matrix
:returns: New instance identical to this matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 )
Sets all fields of this matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.identity()
Resets this matrix to identity
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.copy( m )
Copies a matrix ``m`` into this matrix
:param Matrix4 m: Matrix to be copied
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.lookAt( eye, center, up )
Constructs rotation matrix, looking from ``eye`` towards ``center`` with defined ``up`` vector
:param Vector3 eye: vector
:param Vector3 center: vector
:param Vector3 up: vector
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.multiply( a, b )
Sets this matrix to ``a * b``
:param Matrix4 a: source matrix A
:param Matrix4 b: source matrix B
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.multiplyToArray( a, b, r )
Sets this matrix to ``a * b`` and sets result into flat array ``r``
Destination array can be regular JS array or Typed Array
:param Matrix4 a: source matrix A
:param Matrix4 b: source matrix B
:param array r: destination array
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.multiplySelf( a )
Multiplies this matrix by ``a``
:param Matrix4 a: matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.multiplyScalar( s )
Multiplies this matrix by ``s``
:param float a: number
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.multiplyVector3( v )
Applies this matrix to a :class:`Vector3`
:param Vector3 v: vector
:returns: Multiplied vector
:rtype: :class:`Vector3`
.. function:: Matrix4.multiplyVector4( v )
Applies this matrix to a :class:`Vector4`
:param Vector4 v: vector
:returns: Multiplied vector
:rtype: :class:`Vector4`
.. function:: Matrix4.rotateAxis( v )
Applies rotation submatrix of this matrix to vector ``v`` and then normalizes it
:param Vector3 v: vector
:returns: Rotated vector
:rtype: :class:`Vector3`
.. function:: Matrix4.crossVector( a )
//todo:description
:param Vector4 a: vector
:rtype: :class:`Vector4`
.. function:: Matrix4.determinant()
Computes determinant of this matrix
Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
:returns: Determinant
:rtype: float
.. function:: Matrix4.transpose()
Transposes this matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.flatten()
Flattens this matrix into internal :attr:`Matrix4.flat` array
:returns: Flat array with this matrix values
:rtype: array
.. function:: Matrix4.flattenToArray( flat )
Flattens this matrix into supplied ``flat`` array
:param array flat: array
:returns: Flat array with this matrix values
:rtype: array
.. function:: Matrix4.flattenToArrayOffset( flat, offset )
Flattens this matrix into supplied ``flat`` array starting from ``offset`` position in the array
:param array flat: array
:param integer offset: offset
:returns: Flat array with this matrix values
:rtype: array
.. function:: Matrix4.setTranslation( x, y, z )
Sets this matrix as translation transform
:param float x: x-translation
:param float y: y-translation
:param float z: z-translation
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setScale( x, y, z )
Sets this matrix as scale transform
:param float x: x-scale
:param float y: y-scale
:param float z: z-scale
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationX( theta )
Sets this matrix as rotation transform around x-axis by ``theta`` radians
:param float theta: Rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationY( theta )
Sets this matrix as rotation transform around y-axis by ``theta`` radians
:param float theta: Rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationZ( theta )
Sets this matrix as rotation transform around z-axis by ``theta`` radians
:param float theta: Rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationAxis( axis, angle )
Sets this matrix as rotation transform around ``axis`` by ``angle`` radians
Based on http://www.gamedev.net/reference/articles/article1199.asp
:param Vector3 axis: Rotation axis
:param float angle: Rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setPosition( v )
Sets just position component for this matrix from vector ``v``
:param Vector3 v: position vector
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.getPosition()
Returns position component from this matrix
Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
:returns: Vector with position
:rtype: :class:`Vector3`
.. function:: Matrix4.getColumnX()
Returns x-column component from this matrix
Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
:returns: Vector with x-column
:rtype: :class:`Vector3`
.. function:: Matrix4.getColumnY()
Returns y-column component from this matrix
Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
:returns: Vector with y-column
:rtype: :class:`Vector3`
.. function:: Matrix4.getColumnZ()
Returns z-column component from this matrix
Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
:returns: Vector with z-column
:rtype: :class:`Vector3`
.. function:: Matrix4.getInverse( m )
Sets this matrix to inverse of matrix ``m``
Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
:param Matrix4 m: source matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationFromEuler( v, order )
Sets rotation submatrix of this matrix to rotation specified by Euler angles
Default order ``XYZ``
:param Vector3 v: Vector3 with all the rotations
:param string order: The order of rotations eg. 'XYZ'
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.setRotationFromQuaternion( q )
Sets rotation submatrix of this matrix to rotation specified by quaternion
:param Quaternion q: rotation
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.scale( v )
Multiplies columns of this matrix by vector ``v``
:param Vector3 v: scale vector
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.compose( translation, rotation, scale )
Sets this matrix to transform composed of ``translation``, ``rotation`` and ``scale``
:param Vector3 translation: vector
:param Quaternion rotation: quaternion
:param Vector3 scale: vector
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.decompose( translation, rotation, scale )
Decomposes this matrix into `translation``, ``rotation`` and ``scale`` components
If parameters are not supplied, new instances will be created
:param Vector3 translation: destination translation vector
:param Quaternion rotation: destination rotation quaternion
:param Vector3 scale: destination scale vector
:returns: Array [ translation, rotation, scale ]
:rtype: Array
.. function:: Matrix4.extractPosition( m )
Copies translation component of supplied matrix ``m`` into this matrix translation
:param Matrix4 m: source matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.extractRotation( m )
Copies rotation component of supplied matrix ``m`` into this matrix rotation
:param Matrix4 m: source matrix
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.rotateByAxis( axis, angle )
Rotates this matrix around supplied ``axis`` by ``angle``
:param Vector3 axis: rotation axis
:param float angle: rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.rotateX( angle )
Rotates this matrix around x-axis by ``angle``
:param float angle: rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.rotateY( angle )
Rotates this matrix around y-axis by ``angle``
:param float angle: rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.rotateZ( angle )
Rotates this matrix around z-axis by ``angle``
:param float angle: rotation angle in radians
:returns: This matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.translate( v )
Translates this matrix by vector ``v``
:param Vector3 v: translation vector
:returns: This matrix
:rtype: :class:`Matrix4`
.. ...............................................................................
.. rubric:: Static methods
.. ...............................................................................
.. function:: Matrix4.makeInvert3x3( m )
Inverts just rotation submatrix of matrix ``m``
Note: this method returns a reference to internal 3x3 matrix, make copy or clone if you don't use it right away.
Based on http://code.google.com/p/webgl-mjs/
:param Matrix4 m: source matrix
:returns: inverted submatrix
:rtype: :class:`Matrix3`
.. function:: Matrix4.makeFrustum( left, right, bottom, top, near, far )
Creates frustum matrix
:param float left: left
:param float right: right
:param float bottom: bottom
:param float top: top
:param float near: near
:param float far: far
:returns: New instance of frustum matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.makePerspective( fov, aspect, near, far )
Creates perspective projection matrix
:param float fov: vertical field of view in degrees
:param float aspect: aspect ratio
:param float near: near plane
:param float far: far plane
:returns: New instance of projection matrix
:rtype: :class:`Matrix4`
.. function:: Matrix4.makeOrtho( left, right, top, bottom, near, far )
Creates orthographic projection matrix
:param float left: left
:param float right: right
:param float top: top
:param float bottom: bottom
:param float near: near plane
:param float far: far plane
:returns: New instance of projection matrix
:rtype: :class:`Matrix4`
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
// simple rig for rotation around 3 axes
var m = new THREE.Matrix4();
var m1 = new THREE.Matrix4();
var m2 = new THREE.Matrix4();
var m3 = new THREE.Matrix4();
var alpha = 0;
var beta = Math.PI;
var gamma = Math.PI/2;
m1.setRotationX( alpha );
m2.setRotationY( beta );
m3.setRotationZ( gamma );
m.multiply( m1, m2 );
m.multiplySelf( m3 );
Object3D - Base class for scene graph objects
---------------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Object3D()
Base class for scene graph objects
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Object3D.id
Unique number of this object instance
.. attribute:: Object3D.name
Optional name of the object (doesn't have to be unique)
.. ...............................................................................
.. rubric:: Scene graph attributes
.. ...............................................................................
.. attribute:: Object3D.parent
Object's parent in scene graph
.. attribute:: Object3D.children
Array with object's children
.. ...............................................................................
.. rubric:: Transform attributes
.. ...............................................................................
.. attribute:: Object3D.position
Object's local position
:class:`Vector3` - default ``( 0, 0, 0 )``
.. attribute:: Object3D.rotation
Object's local rotation (Euler angles)
:class:`Vector3` - default ``( 0, 0, 0 )``
.. attribute:: Object3D.eulerOrder
Order of axis for Euler angles
``string`` - default ``XYZ``
.. attribute:: Object3D.scale
Object's local scale
:class:`Vector3` - default ``( 1, 1, 1 )``
.. attribute:: Object3D.up
Up direction
:class:`Vector3` - default ``( 0, 1, 0 )``
.. attribute:: Object3D.matrix
Local transform
:class:`Matrix4`
.. attribute:: Object3D.matrixWorld
Global transform
:class:`Matrix4`
.. attribute:: Object3D.matrixRotationWorld
Global rotation
:class:`Matrix4`
.. attribute:: Object3D.quaternion
Rotation quaternion
:class:`Quaternion`
.. attribute:: Object3D.useQuaternion
Use quaternion instead of Euler angles for specifying local rotation
boolean - default ``false``
.. attribute:: Object3D.boundRadius
``float`` - default ``0.0``
.. attribute:: Object3D.boundRadiusScale
Maximum scale from X, Y, Z scale components
``float`` - default ``1.0``
.. attribute:: Object3D.renderDepth
Override depth-sorting order if non ``null``
``float`` - default ``null``
.. ...............................................................................
.. rubric:: Appearance flags
.. ...............................................................................
.. attribute:: Object3D.visible
Object gets rendered if ``true``
``boolean`` - default ``true``
.. attribute:: Object3D.doubleSided
Both sides of faces visible if ``true``
default ``false``
.. attribute:: Object3D.flipSided
Backside of face visible
default ``false``
.. attribute:: Object3D.castShadow
Gets rendered into shadow map
``boolean`` - default ``false``
.. attribute:: Object3D.receiveShadow
Material gets baked in shadow receiving
``boolean`` - default ``false``
.. ...............................................................................
.. rubric:: Scene graph flags
.. ...............................................................................
.. attribute:: Object3D.frustumCulled
``boolean`` - default ``true``
.. attribute:: Object3D.matrixAutoUpdate
``boolean`` - default ``true``
.. attribute:: Object3D.matrixWorldNeedsUpdate
``boolean`` - default ``true``
.. attribute:: Object3D.rotationAutoUpdate
``boolean`` - default ``true``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Object3D.translate ( distance, axis )
Translates object along arbitrary axis by distance
:param float distance: distance
:param Vector3 axis: translation direction
.. function:: Object3D.translateX ( distance )
Translates object along X-axis by distance
:param float distance: distance
.. function:: Object3D.translateY ( distance )
Translates object along Y-axis by distance
:param float distance: distance
.. function:: Object3D.translateZ ( distance )
Translates object along Z-axis by distance
:param float distance: distance
.. function:: Object3D.lookAt ( vector )
Rotates object to face point in space
:param Vector3 vector: vector
.. function:: Object3D.add ( object )
Adds child object to this object
:param Object3D object: child
.. function:: Object3D.remove ( object )
Removes child object from this object
:param Object3D object: child
.. function:: Object3D.getChildByName ( name, doRecurse )
Gets first child with name matching the argument (searches whole subgraph recursively if flag is set).
:param string name: child name
:param boolean doRecurse: recurse flag
:returns: child with matching name or ``undefined``
:rtype: :class:`Object3D`
.. function:: Object3D.updateMatrix ( )
Updates local transform
.. function:: Object3D.updateMatrixWorld ( force )
Updates global transform of the object and its children
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
Projector - Utilities for projecting primitives between spaces
--------------------------------------------------------------
.. rubric:: Constructor
.. class:: Projector()
Utilities for projecting primitives between spaces
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Quaternion - Implementation of a quaternion
-------------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Quaternion( x, y, z, w )
Implementation of a quaternion
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
:param float w: w-coordinate
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Quaternion.x
float - default ``0``
.. attribute:: Quaternion.y
float - default ``0``
.. attribute:: Quaternion.z
float - default ``0``
.. attribute:: Quaternion.w
float - default ``1``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Quaternion.clone( )
Clones this quaternion
:returns: New instance identical to this quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.set( x, y, z, w )
Sets value of this vector
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
:param float w: w-coordinate
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.copy( q )
Copies value of ``q`` to this quaternion
:param Quaternion v: source quaternion
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.setFromEuler ( vec3 )
Sets this quaternion from rotation specified by Euler angles
Angles are in degrees
:param Vector3 vec3: Euler angles vector
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.setFromAxisAngle ( axis, angle )
Sets this quaternion from rotation specified by axis and angle
Adapted from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm
Axis have to be normalized, angle is in radians
:param Vector3 axis: axis vector
:param float angle: angle
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.setFromRotationMatrix ( m )
Sets this quaternion from rotation specified by matrix
Adapted from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
:param Matrix4 m: rotation matrix
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.calculateW( )
Calculates ``w`` component of this quaternion
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.inverse( )
Inverts this quaternion
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.length( )
Computes length of this quaternion
:returns: length
:rtype: float
.. function:: Quaternion.normalize( )
Normalizes this quaternion
:returns: This vector
:rtype: :class:`Quaternion`
.. function:: Quaternion.multiplySelf( quat2 )
Multiplies this quaternion by ``quat2``
:param Quaternion quat2: quaternion
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.multiply( q1, q2 )
Sets this quaternion to ``q1 * q2``
Adapted from: http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm
:param Quaternion q1: quaternion 1
:param Quaternion q2: quaternion 2
:returns: This quaternion
:rtype: :class:`Quaternion`
.. function:: Quaternion.multiplyVector3( vec, dest )
Rotates ``vec`` by this quaternion into ``dest``
If ``dest`` is not specified, result goes to ``vec``
:param Vector3 vec: source vector
:param Vector3 dest: destination vector
:returns: Rotated vector
:rtype: :class:`Vector3`
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var q = new THREE.Quaternion();
q.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 );
var v = new THREE.Vector3( 1, 0, 0 );
q.multiplyVector3( v );
Ray - Representation of a ray in space
--------------------------------------
.. rubric:: Constructor
.. class:: Ray()
Representation of a ray in space
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Rectangle - Represents a 2D rectangle
-------------------------------------
.. rubric:: Constructor
.. class:: Rectangle()
Represents a 2D rectangle
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Spline - Represents a spline
----------------------------
.. rubric:: Constructor
.. class:: Spline()
Represents a spline
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
UV - A texture coordinate
------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: UV( u, v )
A texture coordinate
:param float u: u coordinate
:param float v: v coordinate
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: UV.u
.. attribute:: UV.v
.. ...............................................................................
.. rubric:: Method
.. ...............................................................................
.. function:: UV.set( u, v )
.. function:: UV.copy( uv )
.. function:: UV.clone( )
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var uv = new THREE.UV( 0, 1 );
\ No newline at end of file
Vector2 - 2D vector
-------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Vector2( x, y )
2D vector
:param float x: x-coordinate
:param float y: y-coordinate
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Vector2.x
float - default ``0``
.. attribute:: Vector2.y
float - default ``0``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Vector2.clone( )
Clones this vector
:returns: New instance identical to this vector
:rtype: :class:`Vector2`
.. function:: Vector2.set( x, y )
Sets value of this vector
:param float x: x-coordinate
:param float y: y-coordinate
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.copy( v )
Copies value of ``v`` to this vector
:param Vector2 v: source vector
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.add( v1, v2 )
Sets this vector to ``v1 + v2``
:param Vector2 v1: source vector 1
:param Vector2 v2: source vector 2
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.addSelf( v )
Adds ``v`` to this vector
:param Vector2 v: source vector
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.sub( v1, v2 )
Sets this vector to ``v1 - v2``
:param Vector2 v1: source vector 1
:param Vector2 v2: source vector 2
.. function:: Vector2.subSelf( v )
Subtracts ``v`` from this vector
:param Vector2 v: source vector
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.multiplyScalar( s )
Multiplies this vector by scalar ``s``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.divideScalar( s )
Divides this vector by scalar ``s``
Set vector to ``( 0, 0 )`` if ``s == 0``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.negate( )
Inverts this vector
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.dot( v )
Computes dot product of this vector and ``v``
:returns: dot product
:rtype: float
.. function:: Vector2.lengthSq( )
Computes squared length of this vector
:returns: squared length
:rtype: float
.. function:: Vector2.length( )
Computes length of this vector
:returns: length
:rtype: float
.. function:: Vector2.normalize( )
Normalizes this vector
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.distanceTo( v )
Computes distance of this vector to ``v``
:returns: squared distance
:rtype: float
.. function:: Vector2.distanceToSquared( v )
Computes squared distance of this vector to ``v``
:returns: squared distance
:rtype: float
.. function:: Vector2.setLength( l )
Normalizes this vector and multiplies it by ``l``
:returns: This vector
:rtype: :class:`Vector2`
.. function:: Vector2.equals( v )
Checks for strict equality of this vector and ``v``
:returns: true if this vector equals ``v``
:rtype: boolean
.. function:: Vector2.isZero( )
Checks if length of this vector is within small epsilon (``0.0001``)
:returns: true if this vector is zero
:rtype: boolean
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var a = new THREE.Vector2( 0, 1 );
var b = new THREE.Vector2( 1, 0 );
var d = a.distanceTo( b );
Vector3 - 3D vector
-------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Vector3()
3D vector
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Vector3.x
float - default ``0``
.. attribute:: Vector3.y
float - default ``0``
.. attribute:: Vector3.z
float - default ``0``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Vector3.clone( )
Clones this vector
:returns: New instance identical to this vector
:rtype: :class:`Vector3`
.. function:: Vector3.set( x, y, z )
Sets value of this vector
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.setX( x )
Sets x-value of this vector
:param float x: x-coordinate
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.setY( y )
Sets y-value of this vector
:param float y: y-coordinate
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.setZ( z )
Sets z-value of this vector
:param float z: z-coordinate
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.copy( v )
Copies value of ``v`` to this vector
:param Vector3 v: source vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.add( v1, v2 )
Sets this vector to ``v1 + v2``
:param Vector3 v1: source vector 1
:param Vector3 v2: source vector 2
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.addSelf( v )
Adds ``v`` to this vector
:param Vector3 v: source vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.sub( v1, v2 )
Sets this vector to ``v1 - v2``
:param Vector3 v1: source vector 1
:param Vector3 v2: source vector 2
.. function:: Vector3.subSelf( v )
Subtracts ``v`` from this vector
:param Vector3 v: source vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.multiplyScalar( s )
Multiplies this vector by scalar ``s``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.divideScalar( s )
Divides this vector by scalar ``s``
Set vector to ``( 0, 0, 0 )`` if ``s == 0``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.negate( )
Inverts this vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.dot( v )
Computes dot product of this vector and ``v``
:param Vector3 v: vector
:returns: dot product
:rtype: float
.. function:: Vector3.lengthSq( )
Computes squared length of this vector
:returns: squared length
:rtype: float
.. function:: Vector3.length( )
Computes length of this vector
:returns: length
:rtype: float
.. function:: Vector3.lengthManhattan( )
Computes Manhattan length of this vector
http://en.wikipedia.org/wiki/Taxicab_geometry
:returns: length
:rtype: float
.. function:: Vector3.normalize( )
Normalizes this vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.distanceTo( v )
Computes distance of this vector to ``v``
:param Vector3 v: vector
:returns: squared distance
:rtype: float
.. function:: Vector3.distanceToSquared( v )
Computes squared distance of this vector to ``v``
:param Vector3 v: vector
:returns: squared distance
:rtype: float
.. function:: Vector3.setLength( l )
Normalizes this vector and multiplies it by ``l``
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.cross( a, b )
Sets this vector to cross product of ``a`` and ``b``
:param Vector3 a: vector
:param Vector3 b: vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.crossSelf( v )
Sets this vector to cross product of itself and ``v``
:param Vector3 v: vector
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.setPositionFromMatrix( m )
Sets this vector extracting position from matrix transform
:param Matrix4 m: matrix
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.setRotationFromMatrix( m )
Sets this vector extracting Euler angles rotation from matrix transform
:param Matrix4 m: matrix
:returns: This vector
:rtype: :class:`Vector3`
.. function:: Vector3.equals( v )
Checks for strict equality of this vector and ``v``
:param Vector3 v: vector
:returns: true if this vector equals ``v``
:rtype: boolean
.. function:: Vector3.isZero( )
Checks if length of this vector is within small epsilon (``0.0001``)
:returns: true if this vector is zero
:rtype: boolean
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var a = new THREE.Vector3( 1, 0, 0 );
var b = new THREE.Vector3( 0, 1, 0 );
var c = new THREE.Vector3();
c.cross( a, b );
Vector4 - 4D vector
-------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Vector4( x, y, z, w )
4D vector
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
:param float w: w-coordinate
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Vector4.x
float - default ``0``
.. attribute:: Vector4.y
float - default ``0``
.. attribute:: Vector4.z
float - default ``0``
.. attribute:: Vector4.w
float - default ``1``
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: Vector4.clone( )
Clones this vector
:returns: New instance identical to this vector
:rtype: :class:`Vector4`
.. function:: Vector4.set( x, y, z, w )
Sets value of this vector
:param float x: x-coordinate
:param float y: y-coordinate
:param float z: z-coordinate
:param float w: w-coordinate
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.copy( v )
Copies value of ``v`` to this vector
Sets ``w`` to 1 if ``v.w`` is undefined
:param Vector4 v: source vector
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.add( v1, v2 )
Sets this vector to ``v1 + v2``
:param Vector4 v1: source vector 1
:param Vector4 v2: source vector 2
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.addSelf( v )
Adds ``v`` to this vector
:param Vector4 v: source vector
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.sub( v1, v2 )
Sets this vector to ``v1 - v2``
:param Vector4 v1: source vector 1
:param Vector4 v2: source vector 2
.. function:: Vector4.subSelf( v )
Subtracts ``v`` from this vector
:param Vector4 v: source vector
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.multiplyScalar( s )
Multiplies this vector by scalar ``s``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.divideScalar( s )
Divides this vector by scalar ``s``
Set vector to ``( 0, 0, 0, 1 )`` if ``s == 0``
:param float s: scalar
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.negate( )
Inverts this vector
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.dot( v )
Computes dot product of this vector and ``v``
:param Vector4 v: vector
:returns: dot product
:rtype: float
.. function:: Vector4.lengthSq( )
Computes squared length of this vector
:returns: squared length
:rtype: float
.. function:: Vector4.length( )
Computes length of this vector
:returns: length
:rtype: float
.. function:: Vector4.normalize( )
Normalizes this vector
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.setLength( l )
Normalizes this vector and multiplies it by ``l``
:returns: This vector
:rtype: :class:`Vector4`
.. function:: Vector4.lerpSelf( v, alpha )
Linearly interpolate between this vector and ``v`` with ``alpha`` factor
:param Vector4 v: vector
:param float alpha: interpolation factor
:returns: This vector
:rtype: :class:`Vector4`
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var a = new THREE.Vector4( 1, 0, 0, 0 );
\ No newline at end of file
Vertex - Represents a vertex in space
-------------------------------------
.. rubric:: Constructor
.. class:: Vertex()
Represents a vertex in space
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Core
====
.. toctree::
Clock
Color
Edge
Face3
Face4
Geometry
Math
Matrix3
Matrix4
Object3D
Projector
Quaternion
Ray
Rectangle
Spline
UV
Vector2
Vector3
Vector4
Vertex
Curve - Extensible curve object
--------------------------------------
.. rubric:: Constructor
.. class:: Curve()
Extensible curve object
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
CurvePath - Path with connected curves
-------------------------------------------
.. rubric:: Constructor
.. class:: CurvePath()
A Path made with connected set of curves
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Path - A CurvePath with a Drawing API
-------------------------------------------
.. rubric:: Constructor
.. class:: Path()
A CurvePath with convenience Drawing methods
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Shape - A closed 2d path with holes
----------------------------------------
.. rubric:: Constructor
.. class:: Shape()
A closed 2d Path with holes
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
TextPath - Class for turning Text to Shapes
----------------------------------------------
.. rubric:: Constructor
.. class:: TextPath()
Class for turning Text to Shapes
.. rubric:: Attributes
.. rubric:: Method
.. rubric:: Example(s)
\ No newline at end of file
Core Extras
=============
.. toctree::
Curve
CurvePath
Path
Shape
TextPath
\ No newline at end of file
Extras
============
.. toctree::
core/index.rst
\ No newline at end of file
AmbientLight - An ambient light
-------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: AmbientLight( hex )
An ambient light
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: AmbientLight.color
Light :class:`Color`
Material's ambient color gets multiplied by this color.
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
var ambientLight = new THREE.AmbientLight( 0x333333 );
scene.add( ambientLight );
DirectionalLight - A directional light
--------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: DirectionalLight( hex, intensity, distance )
A directional light
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param float intensity: light intensity
:param float distance: distance affected by light
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: DirectionalLight.color
Light :class:`Color`
.. attribute:: DirectionalLight.intensity
Light intensity
``default 1.0``
.. attribute:: DirectionalLight.position
Direction of the light is normalized vector from ``position`` to ``(0,0,0)``.
.. attribute:: DirectionalLight.distance
Modulating directional light by distance not implemented in :class:`WebGLRenderer`
.. ...............................................................................
.. rubric:: Shadow attributes
.. ...............................................................................
.. attribute:: DirectionalLight.castShadow
If set to `true` light will cast dynamic shadows
Warning: this is expensive and requires tweaking to get shadows looking right.
``default false``
.. attribute:: DirectionalLight.onlyShadow
If set to `true` light will only cast shadow but not contribute any lighting (as if intensity was 0 but cheaper to compute)
``default false``
.. attribute:: DirectionalLight.target
:class:`Object3D` target used for shadow camera orientation
.. attribute:: DirectionalLight.shadowCameraNear
Orthographic shadow camera frustum parameter
``default 50``
.. attribute:: DirectionalLight.shadowCameraFar
Orthographic shadow camera frustum parameter
``default 5000``
.. attribute:: DirectionalLight.shadowCameraLeft
Orthographic shadow camera frustum parameter
``default -500``
.. attribute:: DirectionalLight.shadowCameraRight
Orthographic shadow camera frustum parameter
``default 500``
.. attribute:: DirectionalLight.shadowCameraTop
Orthographic shadow camera frustum parameter
``default 500``
.. attribute:: DirectionalLight.shadowCameraBottom
Orthographic shadow camera frustum parameter
``default -500``
.. attribute:: DirectionalLight.shadowCameraVisible
Show debug shadow camera frustum
``default false``
.. attribute:: DirectionalLight.shadowBias
Shadow map bias
``default 0``
.. attribute:: DirectionalLight.shadowDarkness
Darkness of shadow casted by this light (``float`` from 0 to 1)
``default 0.5``
.. attribute:: DirectionalLight.shadowMapWidth
Shadow map texture width in pixels
``default 512``
.. attribute:: DirectionalLight.shadowMapHeight
Shadow map texture height in pixels
``default 512``
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
// white directional light at half intensity shining from the top
var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
directionalLight.position.set( 0, 1, 0 );
scene.add( directionalLight );
Light - Abstract base class for lights
--------------------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: Light( hex )
Abstract base class for lights
Inherits from :class:`Object3D`
:param integer hex: light color
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: Light.color
Light :class:`Color`
PointLight - A point light
--------------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: PointLight( hex, intensity, distance )
A point light
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param float intensity: light intensity
:param float distance: distance affected by light
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: PointLight.color
Light :class:`Color`
.. attribute:: PointLight.intensity
Light intensity
``default 1.0``
.. attribute:: PointLight.position
Position of the light
.. attribute:: PointLight.distance
If non-zero, light will attenuate linearly from maximum intensity at light ``position`` down to zero at ``distance``
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
// red point light shining from the front
var pointLight = new THREE.PointLight( 0xff0000 );
pointLight.position.set( 0, 0, 10 );
scene.add( pointLight );
SpotLight - A spotlight
-----------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: SpotLight( hex, intensity, distance, castShadow )
A point light that can cast shadow in one direction
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param float intensity: light intensity
:param float distance: distance affected by light
:param bool castShadow: shadow casting
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: SpotLight.color
Light :class:`Color`
.. attribute:: SpotLight.intensity
Light intensity
``default 1.0``
.. attribute:: SpotLight.position
Position of the light
.. attribute:: SpotLight.distance
If non-zero, light will attenuate linearly from maximum intensity at light ``position`` down to zero at ``distance``
.. ...............................................................................
.. rubric:: Shadow attributes
.. ...............................................................................
.. attribute:: SpotLight.castShadow
If set to `true` light will cast dynamic shadows
Warning: this is expensive and requires tweaking to get shadows looking right.
``default false``
.. attribute:: SpotLight.onlyShadow
If set to `true` light will only cast shadow but not contribute any lighting (as if intensity was 0 but cheaper to compute)
``default false``
.. attribute:: SpotLight.target
:class:`Object3D` target used for shadow camera orientation
.. attribute:: SpotLight.shadowCameraNear
Perspective shadow camera frustum ``near``
``default 50``
.. attribute:: SpotLight.shadowCameraFar
Perspective shadow camera frustum ``far``
``default 5000``
.. attribute:: SpotLight.shadowCameraFov
Perspective shadow camera frustum ``field-of-view``
``default 50``
.. attribute:: SpotLight.shadowCameraVisible
Show debug shadow camera frustum
``default false``
.. attribute:: SpotLight.shadowBias
Shadow map bias
``default 0``
.. attribute:: SpotLight.shadowDarkness
Darkness of shadow casted by this light (``float`` from 0 to 1)
``default 0.5``
.. attribute:: SpotLight.shadowMapWidth
Shadow map texture width in pixels
``default 512``
.. attribute:: SpotLight.shadowMapHeight
Shadow map texture height in pixels
``default 512``
.. ...............................................................................
.. rubric:: Example
.. ...............................................................................
::
// white spotlight shining from the side, casting shadow
var spotLight = new THREE.SpotLight( 0xffffff );
spotLight.position.set( 100, 1000, 100 );
spotLight.castShadow = true;
spotLight.shadowMapWidth = 1024;
spotLight.shadowMapHeight = 1024;
spotLight.shadowCameraNear = 500;
spotLight.shadowCameraFar = 4000;
spotLight.shadowCameraFov = 30;
scene.add( spotLight );
Lights
======
.. toctree::
Light
AmbientLight
DirectionalLight
PointLight
SpotLight
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
img {
border: 0;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- general body styles --------------------------------------------------- */
a.headerlink {
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
clear: both;
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
background-color: #ffe;
width: 40%;
float: right;
}
p.sidebar-title {
font-weight: bold;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
border: 0;
border-collapse: collapse;
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
dl {
margin-bottom: 15px;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dt:target, .highlighted {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.refcount {
color: #060;
}
.optional {
font-size: 1.3em;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
background-color: transparent;
}
tt.xref, a tt {
background-color: transparent;
font-weight: bold;
}
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilties for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
}
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* small function to check if an array contains
* a given item.
*/
jQuery.contains = function(arr, item) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == item)
return true;
}
return false;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
});
}
}
return this.each(function() {
highlight(this);
});
};
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
.appendTo($('.sidebar .this-page-menu'));
}
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
}
};
// quick alias for translations
_ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
此差异已折叠。
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #303030 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #208050 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
/*
* searchtools.js
* ~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
/**
* Porter Stemmer
*/
var PorterStemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
/**
* Search Module
*/
var Search = {
_index : null,
_queued_query : null,
_pulse_status : -1,
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null, success: null,
dataType: "script", cache: true});
},
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex : function() {
return this._index !== null;
},
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse : function() {
this._pulse_status = 0;
},
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (var i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
};
pulse();
},
/**
* perform a search for something
*/
performSearch : function(query) {
// create the required interface elements
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
// index already loaded, the browser was quick!
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
},
query : function(query) {
var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
'if', 'for', 'no', 'there', 'their', 'was', 'is',
'be', 'to', 'that', 'but', 'they', 'not', 'such',
'with', 'by', 'a', 'on', 'these', 'of', 'will',
'this', 'near', 'the', 'or', 'at'];
// stem the searchterms and add them to the correct list
var stemmer = new PorterStemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
for (var i = 0; i < tmp.length; i++) {
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] == "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase();
// select the correct list
if (word[0] == '-') {
var toAppend = excluded;
word = word.substr(1);
}
else {
var toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
}
// only add if not already in the list
if (!$.contains(toAppend, word))
toAppend.push(word);
};
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
// console.debug('SEARCH: searching for:');
// console.info('required: ', searchterms);
// console.info('excluded: ', excluded);
// prepare search
var filenames = this._index.filenames;
var titles = this._index.titles;
var terms = this._index.terms;
var objects = this._index.objects;
var objtypes = this._index.objtypes;
var objnames = this._index.objnames;
var fileMap = {};
var files = null;
// different result priorities
var importantResults = [];
var objectResults = [];
var regularResults = [];
var unimportantResults = [];
$('#search-progress').empty();
// lookup as object
if (object != null) {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
match = objects[prefix][name];
descr = objnames[match[1]] + _(', in ') + titles[match[0]];
// XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
}
}
}
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
// perform the search on the required terms
for (var i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
// no match but word was a required one
if ((files = terms[word]) == null)
break;
if (files.length == undefined) {
files = [files];
}
// create the mapping
for (var j = 0; j < files.length; j++) {
var file = files[j];
if (file in fileMap)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (var file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
// ensure that none of the excluded terms is in the
// search result.
for (var i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$.contains(terms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it
// to the result list
if (valid)
regularResults.push([filenames[file], titles[file], '', null]);
}
// delete unused variables in order to not waste
// memory until list is retrieved completely
delete filenames, titles, terms;
// now sort the regular results descending by title
regularResults.sort(function(a, b) {
var left = a[1].toLowerCase();
var right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
});
// combine all results
var results = unimportantResults.concat(regularResults)
.concat(objectResults).concat(importantResults);
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
}
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
item[0] + '.txt', function(data) {
if (data != '') {
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem);
}
listItem.slideDown(5, function() {
displayNextItem();
});
}, "text");
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
}
}
$(document).ready(function() {
Search.init();
});
此差异已折叠。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>THREE - Main three.js namespace &mdash; three.js v48dev documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '48dev',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="three.js v48dev documentation" href="../index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li><a href="../index.html">three.js v48dev documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="three-main-three-js-namespace">
<h1>THREE - Main three.js namespace<a class="headerlink" href="#three-main-three-js-namespace" title="Permalink to this headline"></a></h1>
<dl class="data">
<dt id="THREE">
<tt class="descname">THREE</tt><a class="headerlink" href="#THREE" title="Permalink to this definition"></a></dt>
<dd><p>Main namespace for three.js</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/THREE.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li><a href="../index.html">three.js v48dev documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010-2012, three.js Authors.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册