Skip to content

Commit

Permalink
Merge pull request #4 from mrdoob/dev
Browse files Browse the repository at this point in the history
merge the commit from upstream
  • Loading branch information
gogoend authored Oct 30, 2018
2 parents 02f80c1 + 0df99a8 commit 307808e
Show file tree
Hide file tree
Showing 451 changed files with 16,713 additions and 30,306 deletions.
7,153 changes: 3,626 additions & 3,527 deletions build/three.js

Large diffs are not rendered by default.

1,605 changes: 800 additions & 805 deletions build/three.min.js

Large diffs are not rendered by default.

7,154 changes: 3,626 additions & 3,528 deletions build/three.module.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/api/en/audio/Audio.html
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion docs/api/en/core/BufferGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,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
3 changes: 2 additions & 1 deletion docs/api/en/core/Geometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ <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 />
The array used to store the vertices in the bufferGeometry is a non indexed array, so the resultant geometry may contain duplicated vertices. Use [page:mergeVertices] to remove them.</p>

<h3>[method:Geometry lookAt] ( [param:Vector3 vector] )</h3>
<p>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/core/InterleavedBuffer.html
Original file line number Diff line number Diff line change
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
6 changes: 3 additions & 3 deletions docs/api/en/deprecated/DeprecatedList.html
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
1 change: 0 additions & 1 deletion docs/api/en/lights/DirectionalLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ <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 />
Expand Down
1 change: 0 additions & 1 deletion docs/api/en/lights/PointLight.html
Original file line number Diff line number Diff line change
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 Down
3 changes: 1 addition & 2 deletions docs/api/en/loaders/JSONLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ <h1>[name]</h1>
<h2>Example</h2>

<p>
[example:webgl_loader_json WebGL / loader / json]<br />
[example:webgl_loader_json_objconverter WebGL / loader / json / objconverter]
[example:webgl_loader_json WebGL / loader / json]
</p>

<code>
Expand Down
1 change: 0 additions & 1 deletion docs/api/en/materials/LineDashedMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ <h2>Examples</h2>

<p>
[example:webgl_lines_dashed WebGL / lines / dashed]<br />
[example:canvas_lines_dashed Canvas / lines /dashed]
</p>

<code>
Expand Down
7 changes: 0 additions & 7 deletions docs/api/en/materials/Material.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,6 @@ <h3>[property:Float opacity]</h3>
Default is *1.0*.
</p>

<h3>[property:Float overdraw]</h3>
<p>
Amount of triangle expansion at draw time.
This is a workaround for cases when gaps appear between triangles when using [page:CanvasRenderer].
*0.5* tends to give good results across browsers. Default is *0*.
</p>

<h3>[property:Boolean polygonOffset]</h3>
<p>
Whether to use polygon offset. Default is *false*. This corresponds to the *GL_POLYGON_OFFSET_FILL* WebGL feature.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/materials/ShaderMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ <h3>[property:Boolean wireframe]</h3>
<h3>[property:Float wireframeLinewidth]</h3>
<p>Controls wireframe thickness. Default is 1.<br /><br />

Due to limitations of the [link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile)
Due to limitations of the [link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
with the [page:WebGLRenderer WebGL] renderer on most platforms linewidth will
always be 1 regardless of the set value.
</p>
Expand Down
1 change: 0 additions & 1 deletion docs/api/en/materials/SpriteMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ <h2>Examples</h2>
<div>
[example:webgl_sprites WebGL / sprites]<br />
[example:misc_ubiquity_test misc / ubiquity / test]<br />
[example:misc_ubiquity_test2 misc / ubiquity / test2]<br />
[example:software_sandbox software / sandbox]<br />
[example:svg_sandbox svg / sandbox]<br />
[example:webgl_materials_cubemap_dynamic webgl / materials / cubemap / dynamic]
Expand Down
3 changes: 3 additions & 0 deletions docs/api/zh/audio/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ <h3>[property:Number playbackRate]</h3>
<h3>[property:Boolean isPlaying]</h3>
<p>是否正在播放</p>

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

<h3>[property:Number startTime]</h3>
<p>开始播放的时间. 和[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start]()的*when*参数一样. 默认为 *0*.</p>

Expand Down
2 changes: 2 additions & 0 deletions docs/api/zh/audio/AudioListener.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ <h3>[property:GainNode gain]</h3>
<h3>[property:AudioNode filter]</h3>
<p>默认为*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>方法</h2>

Expand Down
5 changes: 0 additions & 5 deletions docs/api/zh/materials/Material.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@ <h3>[property:Float opacity]</h3>

</p>

<h3>[property:Float overdraw]</h3>
<p>绘制时的三角形扩展量。对于使用[page:CanvasRenderer]时三角形之间出现间隙的情况,这是一种解决方法。
*0.5*往往会在浏览器中有良好的结果。默认值为*0*。
</p>

<h3>[property:Boolean polygonOffset]</h3>
<p> 是否使用多边形偏移。默认值为*false*。这对应于WebGL的*GL_POLYGON_OFFSET_FILL*功能。
</p>
Expand Down
1 change: 0 additions & 1 deletion docs/api/zh/materials/SpriteMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ <h2>例子(Examples)</h2>
<div>
[example:webgl_sprites WebGL / sprites]<br />
[example:misc_ubiquity_test misc / ubiquity / test]<br />
[example:misc_ubiquity_test2 misc / ubiquity / test2]<br />
[example:software_sandbox software / sandbox]<br />
[example:svg_sandbox svg / sandbox]<br />
[example:webgl_materials_cubemap_dynamic webgl / materials / cubemap / dynamic]
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Lut.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ <h3>.setLegendLabels [parameters, callback]</h3>
Sets the labels of the legend of this Lut.
</p>

<h3>[method:Lut setminV]( [param:Float minV] )</h3>
<h3>[method:Lut setMin]( [param:Float minV] )</h3>
<p>
minV — The minimum value to be represented with the lookup table.<br />
</p>
<p>
Sets this Lut with the minimum value to be represented.
</p>

<h3>[method:Lut setmaxV]( [param:Float maxV] )</h3>
<h3>[method:Lut setMax]( [param:Float maxV] )</h3>
<p>
maxV — The maximum value to be represented with the lookup table.<br />
</p>
Expand Down
61 changes: 0 additions & 61 deletions docs/examples/SpriteCanvasMaterial.html

This file was deleted.

24 changes: 18 additions & 6 deletions docs/examples/loaders/GLTFLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,20 @@ <h2>Extensions</h2>
<li>KHR_materials_pbrSpecularGlossiness</li>
<li>KHR_materials_unlit</li>
<li>KHR_lights_punctual (experimental)</li>
<li>KHR_texture_transform<sup>*</sup></li>
<li>MSFT_texture_dds</li>
</ul>

<p><i>
<sup>*</sup>UV transforms are supported, with several key limitations. Transforms applied to
a texture using the first UV slot (all textures except aoMap and lightMap) must share the same
transform, or no transfor at all. The aoMap and lightMap textures cannot be transformed. No
more than one transform may be used per material. Each use of a texture with a unique
transform will result in an additional GPU texture upload. See
#[link:https://github.com/mrdoob/three.js/pull/13831 13831] and
#[link:https://github.com/mrdoob/three.js/issues/12788 12788].
</i></p>

<h2>Example</h2>

<code>
Expand Down Expand Up @@ -85,30 +97,30 @@ <h2>Browser compatibility</h2>
providing a Promise replacement.</p>

<h2>Textures</h2>

<p>Textures containing color information (.map, .emissiveMap, and .specularMap) always use sRGB colorspace in
glTF, while vertex colors and material properties (.color, .emissive, .specular) use linear colorspace. In a
typical rendering workflow, textures are converted to linear colorspace by the renderer, lighting calculations
are made, then final output is converted back to sRGB and displayed on screen. Unless you need post-processing
in linear colorspace, always configure [page:WebGLRenderer] as follows when using glTF:</p>

<code>
renderer.gammaOutput = true;
renderer.gammaFactor = 2.2;
</code>

<p>GLTFLoader will automatically configure textures referenced from a .gltf or .glb file correctly, with the
assumption that the renderer is set up as shown above. When loading textures externally (e.g., using
[page:TextureLoader]) and applying them to a glTF model, colorspace and orientation must be given:</p>

<code>
// If texture is used for color information, set colorspace.
texture.encoding = THREE.sRGBEncoding;

// UVs use the convention that (0, 0) corresponds to the upper left corner of a texture.
texture.flipY = false;
</code>
</code>

<h2>Custom extensions</h2>

<p>
Expand Down
9 changes: 9 additions & 0 deletions docs/examples/loaders/LoaderSupport.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,15 @@ <h3>[method:null setContent]( [param:Object content )</h3>
<p>
Set the content of this resource
</p>


<h3>[method:null setResourcePath] ( [param:String resourcePath] )</h3>
<p>
[page:String resourcePath] - URL
</p>
<p>
Allows to specify resourcePath for dependencies of specified resource.
</p>
<br>
<br>

Expand Down
9 changes: 9 additions & 0 deletions docs/examples/loaders/OBJLoader2.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ <h3>[method:null setPath] ( [param:String path] )</h3>
</p>


<h3>[method:null setResourcePath] ( [param:String resourcePath] )</h3>
<p>
[page:String resourcePath] - URL
</p>
<p>
Allows to specify resourcePath for dependencies of specified resource.
</p>


<h3>[method:null setStreamMeshesTo] ( [param:Object3D streamMeshesTo] )</h3>
<p>
[page:Object3D streamMeshesTo] - Object already attached to scenegraph where new meshes will be attached to
Expand Down
Loading

0 comments on commit 307808e

Please sign in to comment.