Skip to content

Commit 4fc4a9c

Browse files
committed
r76
1 parent ed1ee9a commit 4fc4a9c

File tree

458 files changed

+493925
-6720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+493925
-6720
lines changed

build/three.js

Lines changed: 2281 additions & 1442 deletions
Large diffs are not rendered by default.

build/three.min.js

Lines changed: 464 additions & 440 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/cameras/PerspectiveCamera.html

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,72 @@ <h3>[name]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Floa
4242

4343
<h2>Properties</h2>
4444

45-
<h3>[property:number zoom]</h3>
46-
<div>Gets or sets the zoom factor of the camera. </div>
47-
4845
<h3>[property:Float fov]</h3>
4946
<div>Camera frustum vertical field of view, from bottom to top of view, in degrees.</div>
5047

51-
<h3>[property:Float aspect]</h3>
52-
<div>Camera frustum aspect ratio, window width divided by window height.</div>
48+
<h3>[property:number zoom]</h3>
49+
<div>Gets or sets the zoom factor of the camera. </div>
5350

5451
<h3>[property:Float near]</h3>
5552
<div>Camera frustum near plane.</div>
5653

5754
<h3>[property:Float far]</h3>
5855
<div>Camera frustum far plane.</div>
5956

57+
<h3>[property:Float focus]</h3>
58+
<div>Object distance used for stereoscopy and depth-of-field effects. This parameter does not influence the projection matrix unless a StereoCamera is being used.</div>
59+
60+
<h3>[property:Float aspect]</h3>
61+
<div>Camera frustum aspect ratio, window width divided by window height.</div>
62+
63+
<h3>[property:Object view]</h3>
64+
<div>Frustum window specification or null.</div>
65+
66+
<h3>[property:Float filmGauge]</h3>
67+
<div>Film size used for the larger axis. Default is 35 (millimeters). This parameter does not influence the projection matrix unless .filmOffset is set to a nonzero value.</div>
68+
69+
<h3>[property:Float filmOffset]</h3>
70+
<div>Horizontal off-center offset in the same unit as .filmGauge.</div>
6071

6172
<h2>Methods</h2>
6273

63-
<h3>[method:null setLens]( [page:Float focalLength], [page:Float frameSize] )</h3>
74+
<h3>[method:Float getEffectiveFOV]()</h3>
75+
<div>
76+
Returns the current vertical field of view angle in degrees considering .zoom.
77+
</div>
78+
79+
<h3>[method:Float getFocalLength]()</h3>
80+
<div>
81+
Returns the focal length of the current .fov in respect to .filmGauge.
82+
</div>
83+
84+
<h3>[method:Float getFilmWidth]()</h3>
85+
<div>
86+
Returns the width of the image on the film. If .aspect is greater than or equal to one (landscape format), the result equals .filmGauge.
87+
</div>
88+
89+
<h3>[method:Float getFilmHeight]()</h3>
90+
<div>
91+
Returns the height of the image on the film. If .aspect is less than or equal to one (portrait format), the result equals .fimlGauge.
92+
</div>
93+
94+
<h3>[method:null setFocalLength]( [page:Float focalLength] )</h3>
95+
<div>
96+
Sets the FOV by focal length in respect to the current .filmGauge.
97+
</div>
98+
<div>
99+
By default, the focal length is specified for a 35mm (full frame) camera.
100+
</div>
101+
102+
<h3>[method:null setLens]( [page:Float focalLength], [page:Float filmGauge] )</h3>
64103
<div>
65104
focalLength — focal length<br />
66-
frameSizeframe size
105+
frameGaugefilm gauge
67106
</div>
68107

69108
<div>
70-
Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is used if frame size is not specified.<br />
71-
Formula based on [link:http://www.bobatkins.com/photography/technical/field_of_view.html]
109+
Sets .fov by focal length. Optionally also sets .filmGauge.
110+
This method is deprecated, please use .setFocalLength instead.
72111
</div>
73112

74113
<h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>

docs/api/core/BufferAttribute.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ <h1>[name]</h1>
1515
</div>
1616

1717
<h2>Constructor</h2>
18-
<h3>[name]([page:TypedArray array], [page:Integer itemSize])</h3>
18+
<h3>[name]([page:TypedArray array], [page:Integer itemSize], [page:Boolean normalized])</h3>
1919
<div>
2020
Instantiates this attribute with data from the associated buffer.
21-
itemSize gives the number of values of the array that should be associated with a particular vertex.
21+
itemSize gives the number of values of the array that should be associated with a particular vertex. normalized indicates how the underlying data in the buffer maps to the values in the GLSL shader code.
2222
</div>
2323

2424
<h2>Properties</h2>
2525

2626
<h3>[property:TypedArray array]</h3>
2727
<div>
28-
Stores the data associated with this attribute. This element should have <code>itemSize * numVertices</code> elements, where numVertices is the number of vertices in the associated [page:BufferGeometry geometry].
28+
Stores the data associated with this attribute. This element should have <code>itemSize * numVertices</code> elements, where numVertices is the number of vertices in the associated [page:BufferGeometry geometry]. [page:TypedArray array] can be an instance of UInt8Array, Int8Array, UInt16Array, Int16Array, or Float32Array.
2929
</div>
3030

3131
<h3>[property:Integer itemSize]</h3>
@@ -44,6 +44,11 @@ <h3>[property:Boolean needsUpdate]</h3>
4444
Flag to indicate that this attribute has changed and should be re-send to the GPU. Set this to true when you modify the value of the array.
4545
</div>
4646

47+
<h3>[property:Boolean normalized]</h3>
48+
<div>
49+
Indicates how the underlying data in the buffer maps to the values in the GLSL code. For instance, if [page:TypedArray array] is an instance of UInt16Array, and [page:Boolean normalized] is true, the values 0 - +65535 in the array data will be mapped to 0.0f - +1.0f in the GLSL attribute. An Int16Array (signed) would map from -32767 - +32767 to -1.0f - +1.0f. If [page:Boolean normalized] is false, the values will be converted to floats which contain the exact value, i.e. 32767 becomes 32767.0f.
50+
</div>
51+
4752
<h3>[property:Integer version]</h3>
4853
<div>
4954
A version number, incremented every time the needsUpdate property is set to true.

docs/api/core/BufferGeometry.html

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,15 @@ <h3>Example</h3>
2727
var geometry = new THREE.BufferGeometry();
2828
// create a simple square shape. We duplicate the top left and bottom right
2929
// vertices because each vertex needs to appear once per triangle.
30-
var vertexPositions = [
31-
[-1.0, -1.0, 1.0],
32-
[ 1.0, -1.0, 1.0],
33-
[ 1.0, 1.0, 1.0],
34-
35-
[ 1.0, 1.0, 1.0],
36-
[-1.0, 1.0, 1.0],
37-
[-1.0, -1.0, 1.0]
38-
];
39-
var vertices = new Float32Array( vertexPositions.length * 3 ); // three components per vertex
40-
41-
// components of the position vector for each vertex are stored
42-
// contiguously in the buffer.
43-
for ( var i = 0; i < vertexPositions.length; i++ )
44-
{
45-
vertices[ i*3 + 0 ] = vertexPositions[i][0];
46-
vertices[ i*3 + 1 ] = vertexPositions[i][1];
47-
vertices[ i*3 + 2 ] = vertexPositions[i][2];
48-
}
30+
var vertices = new Float32Array( [
31+
-1.0, -1.0, 1.0,
32+
1.0, -1.0, 1.0,
33+
1.0, 1.0, 1.0,
34+
35+
1.0, 1.0, 1.0,
36+
-1.0, 1.0, 1.0,
37+
-1.0, -1.0, 1.0
38+
] );
4939

5040
// itemSize = 3 because there are 3 values (components) per vertex
5141
geometry.addAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );

docs/api/core/Geometry.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ <h3>[property:Object boundingSphere]</h3>
150150
<code>{ radius: float }</code>
151151
</div>
152152

153-
<h3>[property:Boolean dynamic]</h3>
154-
<div>
155-
Set to *true* if attribute buffers will need to change in runtime (using "dirty" flags).<br/>
156-
Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.<br/>
157-
Defaults to true.
158-
</div>
159-
160153
<h3>[property:Boolean verticesNeedUpdate]</h3>
161154
<div>
162155
Set to *true* if the vertices array has been updated.
@@ -179,7 +172,12 @@ <h3>[property:Boolean normalsNeedUpdate]</h3>
179172

180173
<h3>[property:Boolean colorsNeedUpdate]</h3>
181174
<div>
182-
Set to *true* if the colors array has been updated.
175+
Set to *true* if the colors array or a face3 color has been updated.
176+
</div>
177+
178+
<h3>[property:Boolean groupdsNeedUpdate]</h3>
179+
<div>
180+
Set to *true* if a face3 materialIndex has been updated.
183181
</div>
184182

185183
<h3>[property:Boolean lineDistancesNeedUpdate]</h3>
@@ -252,7 +250,10 @@ <h3>[method:null computeFaceNormals]()</h3>
252250
Computes face normals.
253251
</div>
254252

255-
<h3>[method:null computeVertexNormals]()</h3>
253+
<h3>[method:null computeVertexNormals]( [page:Boolean areaWeighted] )</h3>
254+
<div>
255+
areaWeighted - If true the contributution of each face normal to the vertex normal is weighted by the area of the face. Default is true.
256+
</div>
256257
<div>
257258
Computes vertex normals by averaging face normals.<br />
258259
Face normals must be existing / computed beforehand.

docs/api/examples/cameras/CombinedCamera.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ <h3>[method:null setZoom]([page:Number zoom])</h3>
130130
Sets the zoomfactor.
131131
</div>
132132

133-
<h3>[method:null setLens]([page:number focalLength], [page:Number frameHeight])</h3>
133+
<h3>[method:null setLens]([page:number focalLength], [page:Number filmGauge])</h3>
134134
<div>
135135
focalLength -- The focal length of a lens is defined as the distance from the optical center of a lens (or, the secondary principal point for a complex lens like a camera lens) to the focal point (sensor) when the lens is focused on an object at infinity. <br />
136-
frameHeight -- the size of the frame in mm. (default is *35*)
136+
filmGauge -- the size of the frame in mm. (default is *35*)
137137
</div>
138138
<div>
139139
Sets the fov based on lens data.

docs/api/extras/GeometryUtils.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/api/extras/core/Gyroscope.html

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)