Skip to content

Commit

Permalink
Merge branch 'dev' into feature/ContextMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
Temdog007 committed Mar 17, 2019
2 parents 7d36a02 + f74563d commit 3c91d3a
Show file tree
Hide file tree
Showing 328 changed files with 15,931 additions and 6,971 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,ts,html}]
charset = utf-8
indent_style = tab
indent_size = 2

[*.{js,ts}]
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Please also include a live example if possible. You can start from these templat
##### Three.js version

- [ ] Dev
- [ ] r101
- [ ] r102
- [ ] ...

##### Browser
Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
examples/*
!examples/js/
src/
test/
utils/
docs/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ three.js

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

The aim of the project is to create an easy to use, lightweight, 3D library. The library provides Canvas 2D, SVG, CSS3D and WebGL renderers.
The aim of the project is to create an easy to use, lightweight, 3D library with a default WebGL renderer. The library also provides Canvas 2D, SVG and CSS3D renderers in the examples.

[Examples](http://threejs.org/examples/) —
[Documentation](http://threejs.org/docs/) —
Expand Down
874 changes: 672 additions & 202 deletions build/three.js

Large diffs are not rendered by default.

1,622 changes: 816 additions & 806 deletions build/three.min.js

Large diffs are not rendered by default.

866 changes: 667 additions & 199 deletions build/three.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/en/audio/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>[name]</h1>
<h2>Example</h2>

<p>
[example:webaudio_sandbox webaudio / sandbox ]</br>
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/audio/AudioAnalyser.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>[name]</h1>
<h2>Example</h2>

<p>
[example:webaudio_sandbox webaudio / sandbox ]</br>
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>

Expand Down
8 changes: 4 additions & 4 deletions docs/api/en/audio/AudioListener.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
<h1>[name]</h1>

<p class="desc">
The [name] represents a virtual [link:https://developer.mozilla.org/de/docs/Web/API/AudioListener listener] of the all positional and non-positional audio effects in the scene.</br>
A three.js application usually creates a single instance of [name]. It is a mandatory construtor parameter for audios entities like [page:Audio Audio] and [page:PositionalAudio PositionalAudio].</br>
The [name] represents a virtual [link:https://developer.mozilla.org/de/docs/Web/API/AudioListener listener] of the all positional and non-positional audio effects in the scene.<br />
A three.js application usually creates a single instance of [name]. It is a mandatory construtor parameter for audios entities like [page:Audio Audio] and [page:PositionalAudio PositionalAudio].<br />
In most cases, the listener object is a child of the camera. So the 3D transformation of the camera represents the 3D transformation of the listener.
</p>


<h2>Example</h2>

<p>
[example:webaudio_sandbox webaudio / sandbox ]</br>
[example:webaudio_timing webaudio / timing ]</br>
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_timing webaudio / timing ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/audio/PositionalAudio.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ <h1>[name]</h1>
<h2>Example</h2>

<p>
[example:webaudio_orientation webaudio / orientation ]</br>
[example:webaudio_sandbox webaudio / sandbox ]</br>
[example:webaudio_orientation webaudio / orientation ]<br />
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_timing webaudio / timing ]
</p>

Expand Down
1 change: 1 addition & 0 deletions docs/api/en/constants/Renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h2>Tone Mapping</h2>
THREE.ReinhardToneMapping
THREE.Uncharted2ToneMapping
THREE.CineonToneMapping
THREE.ACESFilmicToneMapping
</code>
<p>
These define the WebGLRenderer's [page:WebGLRenderer.toneMapping toneMapping] property.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/core/Object3D.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ <h3>[method:Vector3 localToWorld]( [param:Vector3 vector] )</h3>
Converts the vector from local space to world space.
</p>

<h3>[method:null lookAt]( [param:Vector3 vector] )</br>
<h3>[method:null lookAt]( [param:Vector3 vector] )<br />
[method:null lookAt]( [param:Float x], [param:Float y], [param:Float z] )</h3>
<p>
vector - A vector representing a position in world space.<br /><br />
Expand Down
5 changes: 4 additions & 1 deletion docs/api/en/extras/core/ShapePath.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ <h3>[property:array currentPath]</h3>
The current [page:Path] that is being generated.
</p>

<h3>[property:Color color]</h3>
<p>[page:Color] of the shape, by default set to white (0xffffff).</p>

<h2>Methods</h2>

<h3>[method:null moveTo]( [param:Float x], [param:Float y] )</h3>
Expand Down Expand Up @@ -86,6 +89,6 @@ <h3>[method:Array toShapes]( [param:Boolean isCCW], [param:Boolean noHoles] )</h

<h2>Source</h2>

[link:https://github.com/mrdoob/three.js/blob/master/src/extras/core/Path.js src/extras/core/Path.js]
[link:https://github.com/mrdoob/three.js/blob/master/src/extras/core/ShapePath.js src/extras/core/ShapePath.js]
</body>
</html>
73 changes: 73 additions & 0 deletions docs/api/en/helpers/PositionalAudioHelper.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Object3D] &rarr;

<h1>[name]</h1>

<p class="desc">This helper displays the directional cone of a [page:PositionalAudio].</p>

<h2>Example</h2>

<div>[example:webaudio_orientation webaudio / orientation ]</div>

<h2>Code Example</h2>
<code>
var positionalAudio = new THREE.PositionalAudio( listener );
positionalAudio.setDirectionalCone( 180, 230, 0.1 );

var helper = new PositionalAudioHelper( positionalAudio );
positionalAudio.add( helper );
</code>


<h2>Constructor</h2>

<h3>[name]( [param:PositionalAudio audio], [param:Number range] )</h3>
<p>
[page:PositionalAudio audio] -- The [page:PositionalAudio] to be visualized. <br /><br/>

[page:Number range] -- (optional) The range of the directional cone. <br /><br/>

[page:Number divisionsInnerAngle] -- (optional) The amount of divisions of the inner part of the directional cone. <br /><br/>

[page:Number divisionsOuterAngle] -- (optional) The amount of divisions of the outer part of the directional cone. <br /><br/>
</p>


<h2>Properties</h2>
<p>See the base [page:Object3D] class for common properties.</p>

<h3>[property:PositionalAudio audio]</h3>
<p>[page:PositionalAudio] to be visualized.</p>

<h3>[property:Number range]</h3>
<p>The range of the directional cone.</p>

<h3>[property:Number divisionsInnerAngle]</h3>
<p>The amount of divisions of the inner part of the directional cone.</p>

<h3>[property:Number divisionsOuterAngle]</h3>
<p>The amount of divisions of the outer part of the directional cone.</p>

<h2>Methods</h2>
<p>See the base [page:Object3D] class for common methods.</p>

<h3>[method:null dispose]()</h3>
<p>Disposes of the helper.</p>

<h3>[method:null update]()</h3>
<p>Updates the helper.</p>

<h2>Source</h2>

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
9 changes: 4 additions & 5 deletions docs/api/en/loaders/AnimationLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,18 @@ <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Func
<p>
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Animation animation].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:AnimationClip animation clips].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
[page:Function onError] — Will be called if load errors.<br /><br />

Begin loading from url and pass the loaded animation to onLoad.
</p>

<h3>[method:null parse]( [param:JSON json], [param:Function onLoad] )</h3>
<h3>[method:Array parse]( [param:JSON json] )</h3>
<p>
[page:JSON json] — required<br />
[page:Function onLoad] — Will be called when parsing completes. <br /><br />
[page:JSON json] — required<br /><br />

Parse the JSON object and pass the result to onLoad. Individual clips in the object will
Parse the JSON object and return an array of animation clips. Individual clips in the object will
be parsed with [page:AnimationClip.parse].
</p>

Expand Down
10 changes: 10 additions & 0 deletions docs/api/en/loaders/ImageBitmapLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ <h1>[name]</h1>
Unlike [page:FileLoader], [name] does not avoid multiple concurrent requests to the same URL.
</p>

<p>
Note that [page:Texture.flipY] and [page:Texture.premultiplyAlpha] with [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] are ignored.
[link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] needs these configuration on bitmap creation
unlike regular images need them on uploading to GPU. You need to set the equivalent options via [page:ImageBitmapLoader.setOptions]
instead. Refer to [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.10 WebGL specification] for the detail.
</p>

<h2>Example</h2>

<p>
Expand All @@ -26,6 +33,9 @@ <h2>Example</h2>
// instantiate a loader
var loader = new THREE.ImageBitmapLoader();

// set options if needed
loader.setOptions( { imageOrientation: 'flipY' } );

// load a image resource
loader.load(
// resource URL
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/loaders/ImageLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>[name]</h1>

<p class="desc">
A loader for loading an [page:Image].
This uses the [page:FileLoader] internally for loading files, and is used internally by the
This is used internally by the
[page:CubeTextureLoader], [page:ObjectLoader] and [page:TextureLoader].
</p>

Expand Down
24 changes: 24 additions & 0 deletions docs/api/en/loaders/Loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ <h3>[method:Array initMaterials]( [param:Array materials], [param:string texture
Creates an array of [page:Material] based on the array of parameters m. The index of the parameters decide the correct index of the materials.
</p>

<h2>Handlers</h2>

<p>
*[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
is to overwrite the default loader for textures.<br /><br />

Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
</p>

<h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
<p>
[page:Object regex] — A regular expression.<br />
[page:Loader loader] — The loader.
<p>
Registers a loader with the given regular expression.
</p>

<h3>[method:null get]( [param:String file] )</h3>
<p>
[page:String file] — The file path.
<p>
Can be used to retrieve the registered loader for the given file path.
</p>

<h2>Source</h2>

Expand Down
9 changes: 8 additions & 1 deletion docs/api/en/materials/Material.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ <h3>[property:Integer vertexColors]</h3>
Other options are [page:Materials THREE.VertexColors] and [page:Materials THREE.FaceColors].
</p>

<h3>[property:Boolean vertexTangents]</h3>
<p>
Defines whether precomputed vertex tangents, which must be provided in a vec4 "tangent" attribute,
are used. When disabled, tangents are derived automatically. Using precomputed tangents will give
more accurate normal map details in some cases, such as with mirrored UVs. Default is false.
</p>

<h3>[property:Boolean visible]</h3>
<p>
Defines whether this material is visible. Default is *true*.
Expand Down Expand Up @@ -288,7 +295,7 @@ <h3>[method:null dispose]()</h3>
These needs to be disposed by [page:Texture Texture].
</p>

<h3>[method:null onBeforeCompile]( [param:Object shader], [param:WebGLRenderer renderer] )</h3>
<h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
<p>
An optional callback that is executed immediately before the shader program is compiled.
This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/math/Matrix3.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h3>[name]()</h3>

<h2>Properties</h2>

<h3>[property:Float32Array elements]</h3>
<h3>[property:Array elements]</h3>
<p>
A [link:https://en.wikipedia.org/wiki/Row-_and_column-major_order column-major]
list of matrix values.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/math/Matrix4.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h3>[name]()</h3>

<h2>Properties</h2>

<h3>[property:Float32Array elements]</h3>
<h3>[property:Array elements]</h3>
<p>
A [link:https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order column-major]
list of matrix values.
Expand Down
7 changes: 7 additions & 0 deletions docs/api/en/math/Quaternion.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ <h3>[name]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )

<h2>Properties</h2>

<h3>[property:Boolean isQuaternion]</h3>
<p>
Used to check whether this or derived classes are Quaternions. Default is *true*.<br /><br />

You should not change this, as it is used internally for optimisation.
</p>

<h3>[property:Float x]</h3>
<p>Changing this property will result in [page:.onChangeCallback onChangeCallback] being called.</p>

Expand Down
6 changes: 0 additions & 6 deletions docs/api/en/renderers/WebGLRenderTargetCube.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ <h3>[name]([param:Number width], [param:Number height], [param:Object options])<

<h2>Properties</h2>

<h3>[property:integer activeCubeFace]</h3>
<p>
The activeCubeFace property corresponds to a cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) and is
used and set internally by the [page:CubeCamera].
</p>

<h3>See [page:WebGLRenderTarget] for inherited properties</h3>


Expand Down
Loading

0 comments on commit 3c91d3a

Please sign in to comment.