Skip to content

Commit

Permalink
r169
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Sep 26, 2024
1 parent 037c05c commit fb0849f
Show file tree
Hide file tree
Showing 214 changed files with 111,291 additions and 25,335 deletions.
498 changes: 368 additions & 130 deletions build/three.cjs

Large diffs are not rendered by default.

498 changes: 368 additions & 130 deletions build/three.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

47,022 changes: 24,630 additions & 22,392 deletions build/three.webgpu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.webgpu.min.js

Large diffs are not rendered by default.

79,926 changes: 79,926 additions & 0 deletions build/three.webgpu.nodes.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions build/three.webgpu.nodes.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/api/en/audio/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ <h3>[method:Float getVolume]()</h3>

<h3>[method:this play]( delay )</h3>
<p>
delay (optional) - The delay, in seconds, at which the audio should start playing.<br />
If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, starts
playback.
</p>
Expand Down Expand Up @@ -244,8 +245,9 @@ <h3>[method:this setPlaybackRate]( [param:Float value] )</h3>
<h3>[method:this setVolume]( [param:Float value] )</h3>
<p>Set the volume.</p>

<h3>[method:this stop]()</h3>
<h3>[method:this stop]( delay )</h3>
<p>
delay (optional) - The delay, in seconds, at which the audio should stop playing.<br />
If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, stops
playback.
</p>
Expand Down
4 changes: 3 additions & 1 deletion docs/api/en/materials/LineBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ <h3>[property:Float linewidth]</h3>
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.
platforms linewidth will always be `1` regardless of the set value.<br /><br />

If you need wider lines, consider using [page:Line2] or [page:LineSegments2] with [page:LineMaterial].
</p>

<h3>[property:String linecap]</h3>
Expand Down
14 changes: 14 additions & 0 deletions docs/api/en/math/Triangle.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ <h3>
triangle. Returns `null` if the triangle is degenerate.
</p>

<h3>
[method:Vector getInterpolatedAttribute]( [param:BufferAttribute attribute], [param:Number i1], [param:Vector3 i2], [param:Number i3], [param:Vector3 barycoord], [param:Vector3 target] )
</h3>
<p>
[page:BufferAttribute attribute] - The attribute to interpolate.<br />
p1 - Index of first vertex.<br />
p2 - Index of second vertex.<br />
p3 - Index of third vertex.<br />
barycoord - The barycoordinate value to use to interpolate.<br />
[page:Vector target] — Result will be copied into this Vector.<br /><br />

Returns the value barycentrically interpolated for the given attribute and indices.
</p>

<h3>[method:Boolean intersectsBox]( [param:Box3 box] )</h3>
<p>
[page:Box3 box] - Box to check for intersection against.<br /><br />
Expand Down
45 changes: 44 additions & 1 deletion docs/api/en/objects/BatchedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,28 @@ <h3>
<p>
[page:Integer instanceId]: The id of an instance to get the visibility state of.
</p>
<p>Get whether the given instance is marked as "visible" or not.</p>
<p>Get whether the given instance is marked as "visible" or not.</p>

<h3>
[method:Object getGeometryRangeAt]( [param:Integer geometryId], [param:Object target] )
</h3>
<p>
[page:Integer geometryId]: The id of the geometry to get the range of.
</p>
<p>
[page:Object target]: Optional target object to copy the range in to.
</p>
<p>Get the range representing the subset of triangles related to the attached geometry, indicating the starting offset and count, or `null` if invalid.</p>
<p>Return an object of the form:</p>
<code>{ start: Integer, count: Integer }</code>

<h3>
[method:Integer getGeometryIdAt]( [param:Integer instanceId] )
</h3>
<p>
[page:Integer instanceId]: The id of an instance to get the geometryIndex of.
</p>
<p>Get the geometryIndex of the defined instance.</p>

<h3>
[method:undefined setColorAt]( [param:Integer instanceId], [param:Color color] )
Expand Down Expand Up @@ -207,6 +228,19 @@ <h3>
Sets the visibility of the instance at the given index.
</p>

<h3>
[method:this setGeometryIdAt]( [param:Integer instanceId], [param:Integer geometryId] )
</h3>
<p>
[page:Integer instanceId]: The id of the instance to set the geometryIndex of.
</p>
<p>
[page:Integer geometryId]: The geometryIndex to be use by the instance.
</p>
<p>
Sets the geometryIndex of the instance at the given index.
</p>

<h3>
[method:Integer addGeometry]( [param:BufferGeometry geometry], [param:Integer reservedVertexRange], [param:Integer reservedIndexRange] )
</h3>
Expand Down Expand Up @@ -237,6 +271,15 @@ <h3>
Adds a new instance to the [name] using the geometry of the given geometryId and returns a new id referring to the new instance to be used
by other functions.
</p>
<h3>
[method:Integer deleteInstance]( [param:Integer instanceId] )
</h3>
<p>
[page:Integer instanceId]: The id of an instance to remove from the [name] that was previously added via "addInstance".
</p>
<p>
Removes an existing instance from the [name] using the given instanceId.
</p>

<h3>
[method:Integer setGeometryAt]( [param:Integer geometryId], [param:BufferGeometry geometry] )
Expand Down
9 changes: 9 additions & 0 deletions docs/api/en/objects/LOD.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ <h3>
Adds a mesh that will display at a certain distance and greater. Typically
the further away the distance, the lower the detail on the mesh.
</p>
<h3>
[method:Boolean removeLevel]( [param:Float distance])
</h3>
<p>
distance - Distance of the level to delete.<br /><br />

Removes an existing level, based on the distance from the camera.
Returns `true` when the level has been removed. Otherwise `false`.
</p>

<h3>[method:Integer getCurrentLevel]()</h3>
<p>Get the currently active LOD level. As index of the levels array.</p>
Expand Down
10 changes: 7 additions & 3 deletions docs/api/en/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ <h3>[name]( [param:Object parameters] )</h3>
[link:https://www.khronos.org/opengl/wiki/Early_Fragment_Test Early Fragment Test]
optimization and can cause a decrease in performance.
Default is `false`. See the [example:webgl_camera_logarithmicdepthbuffer camera / logarithmicdepthbuffer] example.

[page:Boolean reverseDepthBuffer] - whether to use a reverse depth buffer. Requires the `EXT_clip_control` extension.
This is a more faster and accurate version than logarithmic depth buffer. Default is `false`.
</p>

<h2>Properties</h2>
Expand Down Expand Up @@ -119,9 +122,7 @@ <h3>[property:Object capabilities]</h3>
- [page:Boolean isWebGL2]: `true` if the context in use is a
WebGL2RenderingContext object.<br />
- [page:Boolean logarithmicDepthBuffer]: `true` if the [page:parameter logarithmicDepthBuffer]
was set to true in the constructor and the context
supports the
[link:https://developer.mozilla.org/en-US/docs/Web/API/EXT_frag_depth EXT_frag_depth] extension.<br />
was set to true in the constructor.<br />
- [page:Integer maxAttributes]: The value of `gl.MAX_VERTEX_ATTRIBS`.<br />
- [page:Integer maxCubemapSize]: The value of
`gl.MAX_CUBE_MAP_TEXTURE_SIZE`. Maximum height * width of cube map
Expand All @@ -145,6 +146,9 @@ <h3>[property:Object capabilities]</h3>
be used in a vertex shader.<br />
- [page:String precision]: The shader precision currently being used by
the renderer.<br />
- [page:Boolean reverseDepthBuffer]: `true` if the [page:parameter reverseDepthBuffer]
was set to `true` in the constructor and the context
supports the [link:https://registry.khronos.org/webgl/extensions/EXT_clip_control/ EXT_clip_control] extension.<br />
- [page:Boolean vertexTextures]: `true` if [property:Integer maxVertexTextures]
is greater than 0 (i.e. vertex textures can be used).<br />
</p>
Expand Down
42 changes: 42 additions & 0 deletions docs/api/zh/extras/TextureUtils.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>

<p class="desc">包含纹理实用函数的类。</p>

<h2>方法</h2>

<h3>[method:Texture contain]( [param:Texture texture], [param:Number aspect] )</h3>
<p>
在不裁剪或拉伸纹理的情况下,将纹理在其表面内缩放到尽可能大。该方法保留了纹理的原始纵横比。类似于 CSS 中的 `object-fit: contain`。
</p>

<h3>[method:Texture cover]( [param:Texture texture], [param:Number aspect] )</h3>
<p>
将纹理缩放到尽可能小的尺寸以填充表面,不留空白。该方法保留了纹理的原始纵横比。类似于 CSS 中的 `object-fit: cover`。
</p>

<h3>[method:Texture fill]( [param:Texture texture] )</h3>
<p>
将纹理配置为默认转换。类似于 CSS 中的 `object-fit: fill`。
</p>

<h3>[method:Number getByteLength]( [param:Number width], [param:Number height], [param:Number format], [param:Number type] )</h3>
<p>
给定纹理的宽度、高度、格式和类型。确定必须使用多少个字节来表示纹理。
</p>

<h2>源代码</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
50 changes: 39 additions & 11 deletions docs/api/zh/objects/InstancedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3>[name]( [param:BufferGeometry geometry], [param:Material material], [param:I
</p>

<h2>属性</h2>
<p>See the base [page:Mesh] class for common properties.</p>
<p>公共属性请查看基类 [page:Mesh]</p>

<h3>[property:Box3 boundingBox]</h3>
<p>
Expand Down Expand Up @@ -67,14 +67,19 @@ <h3>[property:InstancedBufferAttribute instanceMatrix]</h3>
如果你要通过 [page:.setMatrixAt]() 来修改实例数据,你必须将它的 [page:BufferAttribute.needsUpdate needsUpdate] 标识为 true 。
</p>

<h3>[property:DataTexture morphTexture]</h3>
<p>
用于表示所有实例的变形权重。如果你通过 [page:.setMorphAt]() 修改了实例数据,你必须将 [page:Texture.needsUpdate needsUpdate] 标识设置为 true。
</p>

<h3>[property:Boolean isInstancedMesh]</h3>
<p>
Read-only flag to check if a given object is of type [name].
用来检查对象是否属于 [name] 类型的只读标识。
</p>


<h2>方法</h2>
<p>See the base [page:Mesh] class for common methods.</p>
<p>公共方法请查看基类 [page:Mesh]</p>

<h3>[method:undefined computeBoundingBox]()</h3>
<p>
Expand All @@ -90,18 +95,18 @@ <h3>[method:undefined computeBoundingSphere]()</h3>

<h3>[method:undefined dispose]()</h3>
<p>
Frees the internal resources of this instance.
释放实例的内部资源。
</p>

<h3>[method:undefined getColorAt]( [param:Integer index], [param:Color color] )</h3>
<p>
[page:Integer index]: The index of an instance. Values have to be in the range [0, count].
[page:Integer index]: 实例的索引。 值必须在 [0, count] 区间。
</p>
<p>
[page:Color color]: This color object will be set to the color of the defined instance.
[page:Color color]: 传入的颜色对象将会被设置为指定的实例的颜色。
</p>
<p>
Get the color of the defined instance.
获取已定义实例的颜色。
</p>

<h3>[method:undefined getMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</h3>
Expand All @@ -115,16 +120,26 @@ <h3>[method:undefined getMatrixAt]( [param:Integer index], [param:Matrix4 matrix
获得已定义实例的本地变换矩阵。
</p>

<h3>
[method:undefined getMorphAt]( [param:Integer index], [param:Mesh mesh] )
</h3>
<p>
[page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
</p>
<p>
[page:Mesh mesh]: 网格属性 [page:Mesh.morphTargetInfluences .morphTargetInfluences] 将会被填充为已定义实例的变形权重。
</p>
<p>获取已定义实例的变形权重</p>

<h3>[method:undefined setColorAt]( [param:Integer index], [param:Color color] )</h3>
<p>
[page:Integer index]: The index of an instance. Values have to be in the range [0, count].
[page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
</p>
<p>
[page:Color color]: The color of a single instance.
[page:Color color]: 单个实例的颜色。
</p>
<p>
Sets the given color to the defined instance.
Make sure you set [page:.instanceColor][page:BufferAttribute.needsUpdate .needsUpdate] to true after updating all the colors.
设置已定义实例的颜色。请确保在更新颜色后将 [page:.instanceColor][page:BufferAttribute.needsUpdate .needsUpdate] 标识设置为 true。
</p>

<h3>[method:undefined setMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</h3>
Expand All @@ -139,6 +154,19 @@ <h3>[method:undefined setMatrixAt]( [param:Integer index], [param:Matrix4 matrix
请确保在更新所有矩阵后将 [page:.instanceMatrix][page:BufferAttribute.needsUpdate .needsUpdate] 设置为true。
</p>

<h3>
[method:undefined setMorphAt]( [param:Integer index], [param:Mesh mesh] )
</h3>
<p>
[page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
</p>
<p>
[page:Mesh mesh]: 网格属性 [page:Mesh.morphTargetInfluences .morphTargetInfluences] 包含了单个实例的变形权重。
</p>
<p>
设置已定义实例的变形权重。请确保在更新所有变形数据后将 [page:.morphTexture][page:Texture.needsUpdate .needsUpdate] 设置为 true。
</p>

<h2>源代码</h2>

<p>
Expand Down
15 changes: 0 additions & 15 deletions docs/examples/en/controls/DragControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,6 @@ <h2>Methods</h2>

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

<h3>[method:undefined connect] ()</h3>
<p>
Adds the event listeners of the controls.
</p>

<h3>[method:undefined disconnect] ()</h3>
<p>
Removes the event listeners of the controls.
</p>

<h3>[method:undefined dispose] ()</h3>
<p>
Should be called if the controls is no longer required.
</p>

<h2>Source</h2>

<p>
Expand Down
Loading

0 comments on commit fb0849f

Please sign in to comment.