Skip to content

Commit

Permalink
Merge branch 'mrdoob:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
duzeng authored Apr 5, 2024
2 parents 549942b + f21c099 commit adb06d7
Show file tree
Hide file tree
Showing 281 changed files with 4,352 additions and 4,626 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml
queries: security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3
uses: github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2 # v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3
with:
category: "/language:${{matrix.language}}"
236 changes: 159 additions & 77 deletions build/three.cjs

Large diffs are not rendered by default.

236 changes: 158 additions & 78 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.

2 changes: 2 additions & 0 deletions docs/api/ar/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ <h2>الأنواع (Types)</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
للاستخدام مع خاصية [page:Texture.type type] للقوام ، التي يجب
Expand All @@ -139,6 +140,7 @@ <h2>التنسيقات (Formats)</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
9 changes: 8 additions & 1 deletion docs/api/ar/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ <h3>[property:Object defines]</h3>

يستخدم هذا بواسطة [page:WebGLRenderer] لتحديد المُظَهِّرات.
</p>


<h3>[property:Float dispersion]</h3>
<p>
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume.
Any value zero or larger is valid, the typical range of realistic values is `[0, 1]`.
Default is `0` (no dispersion).
This property can be only be used with transmissive objects, see [page:.transmission].
</p>

<h3>[property:Float ior]</h3>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ar/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>[name]( [param:Object parameters] )</h3>

[page:Boolean stencil] - ما إذا كانت ذاكرة التخزين المؤقت للرسم لديها
[link:https://en.wikipedia.org/wiki/Stencil_buffer stencil buffer] من على
الأقل 8 بت. الافتراضي هو `true`. <br />
الأقل 8 بت. الافتراضي هو `false`. <br />

[page:Boolean preserveDrawingBuffer] - ما إذا كان سيتم الحفاظ على المخابئ
حتى يتم مسحها يدويًا أو استبدالها. الافتراضي هو `false`. <br />
Expand Down
3 changes: 2 additions & 1 deletion docs/api/en/animation/AnimationMixer.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ <h3>[method:undefined uncacheRoot]([param:Object3D root])</h3>
<p>
Deallocates all memory resources for a root object. Before using this
method make sure to call [page:AnimationAction.stop]() for all related
actions.
actions or alternatively [page:.stopAllAction]() when the mixer operates
on a single root.
</p>

<h3>[method:undefined uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
Expand Down
2 changes: 2 additions & 0 deletions docs/api/en/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ <h2>Types</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
For use with a texture's [page:Texture.type type] property, which must
Expand All @@ -151,6 +152,7 @@ <h2>Formats</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/materials/Material.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ <h3>[property:Integer side]</h3>
<h3>[property:Boolean toneMapped]</h3>
<p>
Defines whether this material is tone mapped according to the renderer's
[page:WebGLRenderer.toneMapping toneMapping] setting. It is ignored when rendering to a render target.
[page:WebGLRenderer.toneMapping toneMapping] setting. It is ignored when rendering to a render target or using post processing.
Default is `true`.
</p>

Expand Down
8 changes: 8 additions & 0 deletions docs/api/en/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ <h3>[property:Object defines]</h3>
This is used by the [page:WebGLRenderer] for selecting shaders.
</p>

<h3>[property:Float dispersion]</h3>
<p>
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume.
Any value zero or larger is valid, the typical range of realistic values is `[0, 1]`.
Default is `0` (no dispersion).
This property can be only be used with transmissive objects, see [page:.transmission].
</p>

<h3>[property:Float ior]</h3>
<p>
Index-of-refraction for non-metallic materials, from `1.0` to `2.333`.
Expand Down
7 changes: 0 additions & 7 deletions docs/api/en/objects/BatchedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,6 @@ <h3>
Replaces the geometry at `index` with the provided geometry. Throws an error if there is not enough space reserved for geometry at the index.
</p>

<h3>
[method:this deleteGeometry]( [param:Integer index] )
</h3>
<p>
Marks the geometry at the given index as deleted and to not be rendered anymore.
</p>

<h2>Source</h2>

<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/objects/InstancedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h3>
range [0, count].
</p>
<p>
[page:Matrix4 matrix]: A mesh with [page:Mesh.morphTargetInfluences .morphTargetInfluences] property containing the morph target weights
[page:Mesh mesh]: A mesh with [page:Mesh.morphTargetInfluences .morphTargetInfluences] property containing the morph target weights
of a single instance.
</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3>[name]( [param:Object parameters] )</h3>

[page:Boolean stencil] - whether the drawing buffer has a
[link:https://en.wikipedia.org/wiki/Stencil_buffer stencil buffer] of at
least 8 bits. Default is `true`.<br />
least 8 bits. Default is `false`.<br />

[page:Boolean preserveDrawingBuffer] - whether to preserve the buffers
until manually cleared or overwritten. Default is `false`.<br />
Expand Down
6 changes: 6 additions & 0 deletions docs/api/en/scenes/Scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ <h3>[property:Texture environment]</h3>
[page:MeshStandardMaterial.envMap]. Default is `null`.
</p>

<h3>[property:Float environmentIntensity]</h3>
<p>
Attenuates the color of the environment. Only influences environment maps
assigned to [page:Scene.environment]. Default is `1`.
</p>

<h3>[property:Euler environmentRotation]</h3>
<p>
The rotation of the environment map in radians. Only influences physical materials
Expand Down
2 changes: 2 additions & 0 deletions docs/api/fr/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ <h2>Types</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
À utiliser avec la propriété [page:Texture.type type] d'une texture, qui doit correspondre au format correct. Voir ci-dessous pour plus de détails.<br /><br />
Expand All @@ -143,6 +144,7 @@ <h2>Formats</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
8 changes: 8 additions & 0 deletions docs/api/fr/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ <h3>[property:Object defines]</h3>
Est utilisé par [page:WebGLRenderer] pour sélectionner les shaders.
</p>

<h3>[property:Float dispersion]</h3>
<p>
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume.
Any value zero or larger is valid, the typical range of realistic values is `[0, 1]`.
Default is `0` (no dispersion).
This property can be only be used with transmissive objects, see [page:.transmission].
</p>

<h3>[property:Float ior]</h3>
<p>
Indice de réfraction pour les matériaux non métalliques, de "1,0" à "2,333". La valeur par défaut est `1.5`.<br />
Expand Down
2 changes: 2 additions & 0 deletions docs/api/it/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ <h2>Tipi</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
Da usare con la proprietà [page:Texture.type type] della texture, la quale deve corrispondere al formato corretto. Vedi sotto per i dettagli.<br /><br />
Expand All @@ -139,6 +140,7 @@ <h2>Formati</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
8 changes: 8 additions & 0 deletions docs/api/it/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ <h3>[property:Object defines]</h3>
Questo viene utilizzato dal [page:WebGLRenderer] per selezionare gli shader.
</p>

<h3>[property:Float dispersion]</h3>
<p>
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume.
Any value zero or larger is valid, the typical range of realistic values is `[0, 1]`.
Default is `0` (no dispersion).
This property can be only be used with transmissive objects, see [page:.transmission].
</p>

<h3>[property:Float ior]</h3>
<p>
Indice di rifrazione per materiali non metallici, da `1.0` a `2.333`. Il valore predefinito è `1.5`.<br />
Expand Down
2 changes: 1 addition & 1 deletion docs/api/it/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>[name]( [param:Object parameters] )</h3>

[page:Boolean stencil] - Indica se il buffer di disegno ha un
[link:https://en.wikipedia.org/wiki/Stencil_buffer buffer stencil] di almeno 8 bit.
Il valore predefinito è `true`.<br />
Il valore predefinito è `false`.<br />

[page:Boolean preserveDrawingBuffer] - Indica se conservare i buffer finché non verranno cancellati
o sovrascritti manualmente. Il valore predefinito è `false`.<br />
Expand Down
2 changes: 2 additions & 0 deletions docs/api/ko/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ <h2>타입</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
텍스쳐의 [page:Texture.type type] 프로퍼티와 함께 사용되며, 정확한 포맷이어야 합니다. 아래 세부 사항을 확인하세요.<br /><br />
Expand All @@ -140,6 +141,7 @@ <h2>포맷</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
2 changes: 2 additions & 0 deletions docs/api/pt-br/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ <h2>Tipos</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
Para uso com a propriedade [page:Texture.type type] de uma textura, que deve corresponder ao formato correto. Veja abaixo para detalhes.<br /><br />
Expand All @@ -143,6 +144,7 @@ <h2>Formatos</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
2 changes: 1 addition & 1 deletion docs/api/zh/cameras/PerspectiveCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h3>[property:Float fov]</h3>

<h3>[property:Boolean isPerspectiveCamera]</h3>
<p>
Read-only flag to check if a given object is of type [name].
只读属性,用于检查给定的对象是否为 [name]
</p>


Expand Down
2 changes: 2 additions & 0 deletions docs/api/zh/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ <h2>类型</h2>
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedInt248Type
THREE.UnsignedInt5999Type
</code>
<p>
这些常量用于纹理的[page:Texture.type type]属性,这些属性必须与正确的格式相对应。详情请查看下方。<br /><br />
Expand All @@ -133,6 +134,7 @@ <h2>格式</h2>
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
Expand Down
4 changes: 2 additions & 2 deletions docs/api/zh/core/Raycaster.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
[page:Integer faceIndex] —— 相交的面的索引<br />
[page:Object3D object] —— 相交的物体<br />
[page:Vector2 uv] —— 相交部分的点的UV坐标。<br />
[page:Vector2 uv1] —— Second set of U,V coordinates at point of intersection<br />
[page:Vector2 uv1] —— 相交部分的点的第二组UV坐标<br />
[page:Vector3 normal] - 交点处的内插法向量<br />
[page:Integer instanceId] – The index number of the instance where the ray intersects the InstancedMesh
[page:Integer instanceId] – 与InstancedMesh物体相交时的instance索引
</p>
<p>
当计算这条射线是否和物体相交的时候,*Raycaster*将传入的对象委托给[page:Object3D.raycast raycast]方法。
Expand Down
8 changes: 8 additions & 0 deletions docs/api/zh/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ <h3>[property:Object defines]</h3>
[page:WebGLRenderer]使用它来选择shaders。
</p>

<h3>[property:Float dispersion]</h3>
<p>
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume.
Any value zero or larger is valid, the typical range of realistic values is `[0, 1]`.
Default is `0` (no dispersion).
This property can be only be used with transmissive objects, see [page:.transmission].
</p>

<h3>[property:Float ior]</h3>
<p>
为非金属材质所设置的折射率,范围由*1.0*到*2.333*。默认为*1.5*。
Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/objects/BatchedMesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ <h3>
用提供的几何图形替换 `index` 的几何图形。如果索引处没有为几何体保留足够的空间,则会引发错误。
</p>

<h3>
[method:this deleteGeometry]( [param:Integer index] )
</h3>
<p>
将给定索引处的几何体标记为已删除并且不再渲染。
</p>

<h2>源代码</h2>

<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/zh/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h3>[name]( [param:Object parameters] )</h3>

[page:Boolean antialias] - 是否执行抗锯齿。默认为*false*.<br />

[page:Boolean stencil] - 绘图缓存是否有一个至少8位的模板缓存([link:https://en.wikipedia.org/wiki/Stencil_buffer stencil buffer])。默认为*true*<br />
[page:Boolean stencil] - 绘图缓存是否有一个至少8位的模板缓存([link:https://en.wikipedia.org/wiki/Stencil_buffer stencil buffer])。默认为*false*<br />

[page:Boolean preserveDrawingBuffer] -是否保留缓直到手动清除或被覆盖。 默认*false*.<br />

Expand Down
1 change: 1 addition & 0 deletions docs/examples/en/exporters/GLTFExporter.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ <h2>Extensions</h2>
<ul>
<li>KHR_lights_punctual</li>
<li>KHR_materials_clearcoat</li>
<li>KHR_materials_dispersion</li>
<li>KHR_materials_emissive_strength</li>
<li>KHR_materials_ior</li>
<li>KHR_materials_iridescence</li>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/en/geometries/TextGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2>Code Example</h2>
const geometry = new TextGeometry( 'Hello three.js!', {
font: font,
size: 80,
height: 5,
depth: 5,
curveSegments: 12,
bevelEnabled: true,
bevelThickness: 10,
Expand All @@ -64,7 +64,7 @@ <h3>[name]([param:String text], [param:Object parameters])</h3>
<ul>
<li>font — an instance of THREE.Font.</li>
<li>size — Float. Size of the text. Default is 100.</li>
<li>height — Float. Thickness to extrude text. Default is 50.</li>
<li>depth — Float. Thickness to extrude text. Default is 50.</li>
<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/en/loaders/3DMLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h3>[method:Object3D load]( [param:String url], [param:Function onLoad], [param:
// Specify path to a folder containing WASM/JS libraries or a CDN.
// For example, /jsm/libs/rhino3dm/ is the location of the library inside the three.js repository
// loader.setLibraryPath( '/path_to_library/rhino3dm/' );
loader.setLibraryPath( 'https://unpkg.com/rhino3dm@8.4.0/' );
loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0/' );

// Load a 3DM file
loader.load(
Expand Down Expand Up @@ -205,13 +205,13 @@ <h3>[method:Object3D parse]( [param:ArrayBuffer buffer], [param:Function onLoad]
</p>

<code>
import rhino3dm from 'https://unpkg.com/rhino3dm@8.4.0'
import rhino3dm from 'https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0'

// Instantiate a loader
const loader = new Rhino3dmLoader();

// Specify path to a folder containing WASM/JS libraries or a CDN.
loader.setLibraryPath( 'https://unpkg.com/rhino3dm@8.4.0' );
loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0' );

const rhino = await rhino3dm();
console.log('Loaded rhino3dm.');
Expand Down Expand Up @@ -244,7 +244,7 @@ <h3>[method:this setLibraryPath]( [param:String value] )</h3>
// Specify path to a folder containing the WASM/JS library:
loader.setLibraryPath( '/path_to_library/rhino3dm/' );
// or from a CDN:
loader.setLibraryPath( 'https://unpkg.com/rhino3dm@8.4.0' );
loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0' );
</code>

<h3>[method:this setWorkerLimit]( [param:Number workerLimit] )</h3>
Expand Down
Loading

0 comments on commit adb06d7

Please sign in to comment.