Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/mrdoob/three.js into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Nov 25, 2018
2 parents ddf9406 + 20406bb commit 4b5c8ee
Show file tree
Hide file tree
Showing 1,069 changed files with 59,981 additions and 42,790 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Expand Up @@ -19,7 +19,7 @@ Please also include a live example if possible. You can start from these templat
##### Three.js version

- [ ] Dev
- [ ] r95
- [ ] r98
- [ ] ...

##### Browser
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "8.9.4"
- node
script:
- npm run travis
38 changes: 21 additions & 17 deletions README.md
@@ -1,12 +1,12 @@
three.js
========

[![Latest NPM release][npm-badge]][npm-badge-url]
[![License][license-badge]][license-badge-url]
[![Dependencies][dependencies-badge]][dependencies-badge-url]
[![Dev Dependencies][devDependencies-badge]][devDependencies-badge-url]
[![Build Status](https://travis-ci.org/mrdoob/three.js.svg?branch=dev)](https://travis-ci.org/mrdoob/three.js)
[![Language Grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/mrdoob/three.js.svg?label=code%20quality)](https://lgtm.com/projects/g/mrdoob/three.js/)
[![NPM package][npm]][npm-url]
[![Build Size][build-size]][build-size-url]
[![Build Status][build-status]][build-status-url]
[![Dependencies][dependencies]][dependencies-url]
[![Dev Dependencies][dev-dependencies]][dev-dependencies-url]
[![Language Grade][lgtm]][lgtm-url]

#### JavaScript 3D library ####

Expand Down Expand Up @@ -74,14 +74,18 @@ If everything went well you should see [this](https://jsfiddle.net/f2Lommf5/).

### Change log ###

[releases](https://github.com/mrdoob/three.js/releases)


[npm-badge]: https://img.shields.io/npm/v/three.svg
[npm-badge-url]: https://www.npmjs.com/package/three
[license-badge]: https://img.shields.io/npm/l/three.svg
[license-badge-url]: ./LICENSE
[dependencies-badge]: https://img.shields.io/david/mrdoob/three.js.svg
[dependencies-badge-url]: https://david-dm.org/mrdoob/three.js
[devDependencies-badge]: https://img.shields.io/david/dev/mrdoob/three.js.svg
[devDependencies-badge-url]: https://david-dm.org/mrdoob/three.js#info=devDependencies
[Releases](https://github.com/mrdoob/three.js/releases)


[npm]: https://img.shields.io/npm/v/three.svg
[npm-url]: https://www.npmjs.com/package/three
[build-size]: https://badge-size.herokuapp.com/mrdoob/three.js/master/build/three.min.js.svg?compression=gzip
[build-size-url]: https://github.com/mrdoob/three.js/tree/master/build
[build-status]: https://travis-ci.org/mrdoob/three.js.svg?branch=dev
[build-status-url]: https://travis-ci.org/mrdoob/three.js
[dependencies]: https://img.shields.io/david/mrdoob/three.js.svg
[dependencies-url]: https://david-dm.org/mrdoob/three.js
[dev-dependencies]: https://img.shields.io/david/dev/mrdoob/three.js.svg
[dev-dependencies-url]: https://david-dm.org/mrdoob/three.js#info=devDependencies
[lgtm]: https://img.shields.io/lgtm/grade/javascript/g/mrdoob/three.js.svg?label=code%20quality
[lgtm-url]: https://lgtm.com/projects/g/mrdoob/three.js/
8,654 changes: 4,705 additions & 3,949 deletions build/three.js

Large diffs are not rendered by default.

1,679 changes: 847 additions & 832 deletions build/three.min.js

Large diffs are not rendered by default.

8,652 changes: 4,702 additions & 3,950 deletions build/three.module.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/api/en/audio/Audio.html
Expand Up @@ -73,12 +73,15 @@ <h3>[property:Boolean hasPlaybackControl]</h3>
<p>Whether playback can be controlled using the [page:Audio.play play](),
[page:Audio.pause pause]() etc. methods. Default is *true*.</p>

<h3>[property:Number playbackRate]</h3>
<p>Speed of playback. Default is *1*.</p>

<h3>[property:Boolean isPlaying]</h3>
<p>Whether the audio is currently playing.</p>

<h3>[property:AudioListener listener]</h3>
<p>A reference to the listener object of this audio.</p>

<h3>[property:Number playbackRate]</h3>
<p>Speed of playback. Default is *1*.</p>

<h3>[property:Number startTime]</h3>
<p>The time at which the sound should begin to play. Same as the *when* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.</p>

Expand Down
2 changes: 2 additions & 0 deletions docs/api/en/audio/AudioListener.html
Expand Up @@ -67,6 +67,8 @@ <h3>[property:GainNode gain]</h3>
<h3>[property:AudioNode filter]</h3>
<p>Default is *null*.</p>

<h3>[property:Number timeDelta]</h3>
<p>Time delta value for audio entities. Use in context of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/linearRampToValueAtTime AudioParam.linearRampToValueAtTimeDefault](). Default is *0*.</p>

<h2>Methods</h2>

Expand Down
10 changes: 8 additions & 2 deletions docs/api/en/cameras/CubeCamera.html
Expand Up @@ -43,11 +43,17 @@ <h2>Examples</h2>
<h2>Constructor</h2>


<h3>[name]( [param:Number near], [param:Number far], [param:Number cubeResolution] )</h3>
<h3>[name]( [param:Number near], [param:Number far], [param:Number cubeResolution], [param:Object options] )</h3>
<p>
near -- The near clipping distance. <br />
far -- The far clipping distance <br />
cubeResolution -- Sets the length of the cube's edges.
cubeResolution -- Sets the length of the cube's edges. <br />
options - (optional) object that holds texture parameters passed to the auto-generated WebGLRenderTargetCube.
If not specified, the options default to:
<code>
{ format: RGBFormat, magFilter: LinearFilter, minFilter: LinearFilter }
</code>

</p>
<p>
Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that
Expand Down
1 change: 0 additions & 1 deletion docs/api/en/cameras/OrthographicCamera.html
Expand Up @@ -24,7 +24,6 @@ <h1>[name]</h1>

<h2>Example</h2>

<p>[example:canvas_camera_orthographic camera / orthographic ]</p>
<p>[example:webgl_camera camera ]</p>
<p>[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]</p>
<p>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</p>
Expand Down
2 changes: 0 additions & 2 deletions docs/api/en/cameras/PerspectiveCamera.html
Expand Up @@ -22,8 +22,6 @@ <h1>[name]</h1>

<h2>Example</h2>

<p>[example:canvas_geometry_birds geometry / birds ]</p>
<p>[example:canvas_geometry_cube geometry / cube ]</p>
<p>[example:webgl_animation_skinning_blending animation / skinning / blending ]</p>
<p>[example:webgl_animation_skinning_morph animation / skinning / blending ]</p>
<p>[example:webgl_effects_stereo effects / stereo ]</p>
Expand Down
17 changes: 10 additions & 7 deletions docs/api/en/core/BufferAttribute.html
Expand Up @@ -35,12 +35,12 @@ <h3>[name]( [param:TypedArray array], [param:Integer itemSize], [param:Boolean n
attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
<br /><br />

[page:Boolean normalized] -- (optional) 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
[page:Boolean normalized] -- (optional) Applies to integer data only. 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.
will be converted to floats unmodified, i.e. 32767 becomes 32767.0f.
</p>

<h2>Properties</h2>
Expand Down Expand Up @@ -99,12 +99,12 @@ <h3>[property:Boolean normalized]</h3>

<h3>[property:Function onUploadCallback]</h3>
<p>
A callback function that is executed after the Renderer has transfered the attribute array data to the GPU.
A callback function that is executed after the Renderer has transferred the attribute array data to the GPU.
</p>

<h3>[property:Object updateRange]</h3>
<p>Object containing:<br />
[page:Integer offset]: Default is *0*. Position at whcih to start update.<br />
[page:Integer offset]: Default is *0*. Position at which to start update.<br />
[page:Integer count]: Default is *-1*, which means don't use update ranges. <br /><br />

This can be used to only update some components of stored vectors (for example, just the component
Expand All @@ -120,6 +120,9 @@ <h2>Methods</h2>
<h3>[method:BufferAttribute clone]() </h3>
<p>Return a copy of this bufferAttribute.</p>

<h3>[method:BufferAttribute copy]( [param:BufferAttribute bufferAttribute] )</h3>
<p>Copies another BufferAttribute to this BufferAttribute.</p>

<h3>[method:BufferAttribute copyArray]( array ) </h3>
<p>Copy the array given here (which can be a normal array or TypedArray) into
[page:BufferAttribute.array array].<br /><br />
Expand Down Expand Up @@ -160,7 +163,7 @@ <h3>[method:null onUpload]( [param:Function callback] ) </h3>
Sets the value of the onUploadCallback property.<br /><br />

In the [example:webgl_buffergeometry WebGL / Buffergeometry] this is used to free memory
after the buffer has been transfered to the GPU.
after the buffer has been transferred to the GPU.
</p>

<h3>[method:BufferAttribute set] ( [param:Array value], [param:Integer offset] ) </h3>
Expand Down
12 changes: 7 additions & 5 deletions docs/api/en/core/BufferGeometry.html
Expand Up @@ -119,12 +119,13 @@ <h3>[property:Sphere boundingSphere]</h3>

<h3>[property:Object drawRange]</h3>
<p>
Used to determine what part of the geometry should be rendered. This should not
be set directly, instead use [page:.setDrawRange].<br />
Default is
Determines the part of the geometry to render. This should not
be set directly, instead use [page:.setDrawRange]. Default is
<code>
{ start: 0, count: Infinity }
</code>
For non-indexed BufferGeometry, count is the number of vertices to render.
For indexed BufferGeometry, count is the number of indices to render.
</p>

<h3>[property:Array groups]</h3>
Expand Down Expand Up @@ -232,7 +233,7 @@ <h3>[method:null clearGroups]( )</h3>

<h3>[method:null computeBoundingBox]()</h3>
<p>
Computes bounding box of the geometry, updating [param:.boundingBox] attribute.<br />
Computes bounding box of the geometry, updating [page:.boundingBox] attribute.<br />
Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
</p>

Expand Down Expand Up @@ -316,7 +317,8 @@ <h3>[method:null setIndex] ( [param:BufferAttribute index] )</h3>
<p>Set the [page:.index] buffer.</p>

<h3>[method:null setDrawRange] ( [param:Integer start], [param:Integer count] )</h3>
<p>Set the [page:.drawRange] buffer. See that property for details.</p>
<p>Set the [page:.drawRange] property. For non-indexed BufferGeometry, count is the number of vertices to render.
For indexed BufferGeometry, count is the number of indices to render.</p>

<h3>[method:BufferGeometry setFromObject] ( [param:Object3D object] )</h3>
<p>Sets the attributes for this BufferGeometry from an [page:Object3D].</p>
Expand Down
3 changes: 1 addition & 2 deletions docs/api/en/core/Face3.html
Expand Up @@ -19,7 +19,6 @@ <h1>[name]</h1>

<h2>Examples</h2>

<p>[example:misc_ubiquity_test ubiquity / test ]</p>
<p>[example:svg_sandbox svg / sandbox ]</p>
<p>[example:misc_exporter_obj exporter / obj ]</p>
<p>[example:webgl_shaders_vector WebGL / shaders / vector ]</p>
Expand Down Expand Up @@ -124,7 +123,7 @@ <h3>[method:Face3 clone]()</h3>
<p>Creates a new clone of the Face3 object.</p>

<h3>[method:Face3 copy]( [param:Face3 face3] )</h3>
<p>Copy the paramaters of another Face3 into this.</p>
<p>Copy the parameters of another Face3 into this.</p>


<h2>Source</h2>
Expand Down
4 changes: 3 additions & 1 deletion docs/api/en/core/Geometry.html
Expand Up @@ -266,7 +266,9 @@ <h3>[method:null dispose]()</h3>
</p>

<h3>[method:Geometry fromBufferGeometry]( [param:BufferGeometry geometry] )</h3>
<p>Convert a [page:BufferGeometry] to a Geometry.</p>
<p>Convert a [page:BufferGeometry] to a Geometry. <br />
When converting from BufferGeometry to Geometry, all vertices are preserved, so duplicated vertices may appear.
Use [page:Geometry.mergeVertices] to remove them.</p>

<h3>[method:Geometry lookAt] ( [param:Vector3 vector] )</h3>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/core/InstancedBufferAttribute.html
Expand Up @@ -17,7 +17,7 @@ <h1>[name]</h1>
</p>

<h2>Constructor</h2>
<h3>[name]( [param:TypedArray array], [param:Integer itemSize], [param:Number meshPerAttribute] )</h3>
<h3>[name]( [param:TypedArray array], [param:Integer itemSize], [param:Boolean normalized], [param:Number meshPerAttribute] )</h3>
<p>
</p>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/core/InterleavedBuffer.html
Expand Up @@ -69,12 +69,12 @@ <h3>[property:Integer version]</h3>
A version number, incremented every time the needsUpdate property is set to true.
</p>

<h3>[property:Integer isInterleavedBuffer]</h3>
<h3>[property:Boolean isInterleavedBuffer]</h3>
<p>
Default is *true*.
</p>

<h3>[property:Integer needsUpdate]</h3>
<h3>[property:Boolean needsUpdate]</h3>
<p>
Default is *false*. Setting this to true increments [page:InterleavedBuffer.version version].
</p>
Expand Down
5 changes: 5 additions & 0 deletions docs/api/en/core/Layers.html
Expand Up @@ -21,6 +21,11 @@ <h1>[name]</h1>
All classes that inherit from [page:Object3D] have an [page:Object3D.layers] property which is an instance of this class.
</p>

<h2>Examples</h2>

<p>
[example:webgl_layers WebGL / layers]
</p>

<h2>Constructor</h2>

Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/core/Object3D.html
Expand Up @@ -286,7 +286,7 @@ <h3>[method:null lookAt]( [param:Vector3 vector] )</br>

Rotates the object to face a point in world space.<br /><br />

This method does not support objects with rotated and/or translated parent(s).
This method does not support objects having non-uniformly-scaled parent(s).
</p>

<h3>[method:Array raycast]( [param:Raycaster raycaster], [param:Array intersects] )</h3>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/core/Raycaster.html
Expand Up @@ -147,7 +147,7 @@ <h3>[method:null setFromCamera]( [param:Vector2 coords], [param:Camera camera] )
<h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<p>
[page:Object3D object] — The object to check for intersection with the ray.<br />
[page:Boolean recursive] — If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.<br />
[page:Boolean recursive] — If true, it also checks all descendants. Otherwise it only checks intersection with the object. Default is false.<br />
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
</p>
<p>
Expand All @@ -174,7 +174,7 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
<h3>[method:Array intersectObjects]( [param:Array objects], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<p>
[page:Array objects] — The objects to check for intersection with the ray.<br />
[page:Boolean recursive] — If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is false.<br />
[page:Boolean recursive] — If true, it also checks all descendants of the objects. Otherwise it only checks intersection with the objects. Default is false.<br />
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/core/Uniform.html
Expand Up @@ -201,7 +201,7 @@ <h2>Methods</h2>
<h3>[method:Uniform clone]()</h3>
<p>
Returns a clone of this uniform.<br />
If the uniform's value property is an [page:Object] with a clone() method, this is used, otherwise the value is copied by assigment.
If the uniform's value property is an [page:Object] with a clone() method, this is used, otherwise the value is copied by assignment.
Array values are shared between cloned [page:Uniform]s.<br /><br />
See [example:webgldeferred_animation WebGL deferred animation] for an example of this method in use.
</p>
Expand Down
6 changes: 3 additions & 3 deletions docs/api/en/deprecated/DeprecatedList.html
Expand Up @@ -501,11 +501,11 @@ <h3>[page:Shape]</h3>



<h2>Renderer</h2>
<h2>Renderers</h2>

<h3>[page:Projector]</h3>
<h3>[page:CanvasRenderer]</h3>
<p>
CanvasRenderer has been moved to [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js /examples/js/renderers/CanvasRenderer.js].
CanvasRenderer has been removed.
</p>

<h3>[page:Projector]</h3>
Expand Down
4 changes: 0 additions & 4 deletions docs/api/en/lights/AmbientLight.html
Expand Up @@ -21,10 +21,6 @@ <h1>[name]</h1>

<h2>Example</h2>
<p>
[example:canvas_camera_orthographic camera / orthographic ]<br />
[example:canvas_interactive_voxelpainter interactive / voxelpainter ]<br />
[example:canvas_materials materials ]<br />
[example:canvas_sandbox sandbox ]<br />
[example:webgl_animation_cloth animation / cloth ]<br />
[example:webgl_animation_skinning_blending animation / skinning / blending ]
</p>
Expand Down
2 changes: 0 additions & 2 deletions docs/api/en/lights/DirectionalLight.html
Expand Up @@ -40,9 +40,7 @@ <h2>A Note about Position, Target and rotation</h2>

<h2>Example</h2>
<p>
[example:canvas_morphtargets_horse morphtargets / horse ]<br />
[example:misc_controls_fly controls / fly ]<br />
[example:misc_lights_test lights / test ]<br />
[example:webvr_cubes cubes ]<br />
[example:webgl_effects_parallaxbarrier effects / parallaxbarrier ]<br />
[example:webgl_effects_stereo effects / stereo ]<br />
Expand Down
19 changes: 14 additions & 5 deletions docs/api/en/lights/PointLight.html
Expand Up @@ -23,7 +23,6 @@ <h1>[name]</h1>
<h2>Example</h2>

<p>
[example:canvas_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights2 lights / pointlights2 ]<br />
[example:webgldeferred_animation animation ]<br />
Expand All @@ -45,8 +44,7 @@ <h3>[name]( [param:Integer color], [param:Float intensity], [param:Number distan
<p>
[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<br /><br />
[page:Number distance] - The distance from the light where the intensity is 0.
When set to 0, then the light never stops. Default is 0.<br />
[page:Number distance] - Maximum range of the light. Default is 0 (no limit).<br />
[page:Float decay] - The amount the light dims along the distance of the light. Default is 1.
For [page:WebGLRenderer.physicallyCorrectLights physically correct] lighting, set this to 2.<br /><br />

Expand All @@ -67,8 +65,19 @@ <h3>[property:Float decay]</h3>

<h3>[property:Float distance]</h3>
<p>
If non-zero, light will attenuate linearly from maximum intensity at the light's
position down to zero at this distance from the light. Default is *0.0*.
<em>Default mode</em> — When distance is zero, light does not attenuate. When distance is
non-zero, light will attenuate linearly from maximum intensity at the light's position down to
zero at this distance from the light.
</p>
<p>
<em>[page:WebGLRenderer.physicallyCorrectLights Physically correct] mode</em> — When distance
is zero, light will attenuate according to inverse-square law to infinite distance. When
distance is non-zero, light will attenuate according to inverse-square law until near the
distance cutoff, where it will then attenuate quickly and smoothly to 0. Inherently, cutoffs
are not physically correct.
</p>
<p>
Default is *0.0*.
</p>

<h3>[property:Boolean isPointLight]</h3>
Expand Down

0 comments on commit 4b5c8ee

Please sign in to comment.