Skip to content

Commit 4bba481

Browse files
committed
r170
1 parent f9fc1fd commit 4bba481

File tree

318 files changed

+30245
-22810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+30245
-22810
lines changed

build/three.cjs

+972-560
Large diffs are not rendered by default.

build/three.module.js

+973-557
Large diffs are not rendered by default.

build/three.module.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.webgpu.js

+8,398-9,842
Large diffs are not rendered by default.

build/three.webgpu.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.webgpu.nodes.js

+8,398-9,842
Large diffs are not rendered by default.

build/three.webgpu.nodes.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/ar/loaders/ImageLoader.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>مثال الكود</h2>
2525
// load a image resource
2626
loader.load(
2727
// resource URL
28-
'textures/skyboxsun25degtest.png',
28+
'image.png',
2929

3030
// onLoad callback
3131
function ( image ) {

docs/api/en/core/BufferGeometry.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,12 @@ <h3>[method:undefined setDrawRange] ( [param:Integer start], [param:Integer coun
335335
</p>
336336

337337
<h3>[method:this setFromPoints] ( [param:Array points] )</h3>
338-
<p>Sets the attributes for this BufferGeometry from an array of points.</p>
338+
<p>
339+
Defines a geometry by creating a `position` attribute based on the given array of points. The array can hold
340+
instances of [page:Vector2] or [page:Vector3]. When using two-dimensional data, the `z` coordinate for all vertices is set to `0`.<br />
341+
If the method is used with an existing `position` attribute, the vertex data are overwritten with the data from the array. The length of the
342+
array must match the vertex count.
343+
</p>
339344

340345
<h3>[method:this setIndex] ( [param:BufferAttribute index] )</h3>
341346
<p>Set the [page:.index] buffer.</p>

docs/api/en/core/Object3D.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ <h3>[property:Boolean DEFAULT_MATRIX_AUTO_UPDATE]</h3>
275275

276276
<h3>[property:Boolean DEFAULT_MATRIX_WORLD_AUTO_UPDATE]</h3>
277277
<p>
278-
The default setting for [page:.matrixWorldAutoUpdate
279-
matrixWorldAutoUpdate] for newly created Object3Ds.<br />
278+
The default setting for [page:.matrixWorldAutoUpdate matrixWorldAutoUpdate]
279+
for newly created Object3Ds.<br />
280280
</p>
281281

282282
<h2>Methods</h2>
@@ -311,7 +311,7 @@ <h3>[method:this attach]( [param:Object3D object] )</h3>
311311
Note: This method does not support scene graphs having
312312
non-uniformly-scaled nodes(s).
313313
</p>
314-
314+
315315
<h3>[method:this clear]()</h3>
316316
<p>Removes all child objects.</p>
317317

@@ -325,7 +325,7 @@ <h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
325325

326326
<h3>[method:this copy]( [param:Object3D object], [param:Boolean recursive] )</h3>
327327
<p>
328-
recursive -- If set to `true`, descendants of the object are copied next to the existing ones.
328+
recursive -- If set to `true`, descendants of the object are copied next to the existing ones.
329329
If set to `false`, descendants are left unchanged. Default is `true`.<br /><br />
330330

331331
Copies the given object into this object. Note: Event listeners and

docs/api/en/loaders/ImageBitmapLoader.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h2>Code Example</h2>
4141
// load a image resource
4242
loader.load(
4343
// resource URL
44-
'textures/skyboxsun25degtest.png',
44+
'image.png',
4545

4646
// onLoad callback
4747
function ( imageBitmap ) {

docs/api/en/loaders/ImageLoader.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>Code Example</h2>
2525
// load a image resource
2626
loader.load(
2727
// resource URL
28-
'textures/skyboxsun25degtest.png',
28+
'image.png',
2929

3030
// onLoad callback
3131
function ( image ) {

docs/api/en/math/Color.html

+51-17
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,41 @@ <h1>[name]</h1>
1212
<p class="desc">Class representing a color.</p>
1313

1414
<p>
15-
Iterating through a [name] instance will yield its components (r, g, b) in
15+
A Color instance is represented by RGB components in the linear <i>working
16+
color space</i>, which defaults to `LinearSRGBColorSpace`. Inputs
17+
conventionally using `SRGBColorSpace` (such as hexadecimals and CSS
18+
strings) are converted to the working color space automatically.
19+
</p>
20+
21+
<p>
22+
<code>
23+
// converted automatically from SRGBColorSpace to LinearSRGBColorSpace
24+
const color = new THREE.Color().setHex( 0x112233 );
25+
</code>
26+
</p>
27+
28+
<p>
29+
Source color spaces may be specified explicitly, to ensure correct
30+
conversions.
31+
</p>
32+
33+
<p>
34+
<code>
35+
// assumed already LinearSRGBColorSpace; no conversion
36+
const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5 );
37+
38+
// converted explicitly from SRGBColorSpace to LinearSRGBColorSpace
39+
const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5, SRGBColorSpace );
40+
</code>
41+
</p>
42+
43+
<p>
44+
If THREE.ColorManagement is disabled, no conversions occur. For details,
45+
see <i>Color management</i>.
46+
</p>
47+
48+
<p>
49+
Iterating through a Color instance will yield its components (r, g, b) in
1650
the corresponding order.
1751
</p>
1852

@@ -50,15 +84,15 @@ <h3>
5084
[page:Color_Hex_or_String r] - (optional) If arguments [page:Float g] and
5185
[page:Float b] are defined, the red component of the color. If they are
5286
not defined, it can be a
53-
[link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] (recommended),
87+
[link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] (recommended),
5488
a CSS-style string, or another `Color` instance.<br />
5589
[page:Float g] - (optional) If it is defined, the green component of the
5690
color.<br />
5791
[page:Float b] - (optional) If it is defined, the blue component of the
5892
color.<br /><br />
5993

6094
Note that standard method of specifying color in three.js is with a
61-
[link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet],
95+
[link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet],
6296
and that method is used throughout the rest of the
6397
documentation.<br /><br />
6498

@@ -91,13 +125,13 @@ <h3>[property:Boolean isColor]</h3>
91125
<p>Read-only flag to check if a given object is of type [name].</p>
92126

93127
<h3>[property:Float r]</h3>
94-
<p>Red channel value between `0` and `1`. Default is `1`.</p>
128+
<p>Red channel value between `0.0` and `1.0`. Default is `1`.</p>
95129

96130
<h3>[property:Float g]</h3>
97-
<p>Green channel value between `0` and `1`. Default is `1`.</p>
131+
<p>Green channel value between `0.0` and `1.0`. Default is `1`.</p>
98132

99133
<h3>[property:Float b]</h3>
100-
<p>Blue channel value between `0` and `1`. Default is `1`.</p>
134+
<p>Blue channel value between `0.0` and `1.0`. Default is `1`.</p>
101135

102136
<h2>Methods</h2>
103137

@@ -134,25 +168,25 @@ <h3>[method:this copy]( [param:Color color] )</h3>
134168
</p>
135169

136170
<h3>[method:this convertLinearToSRGB]()</h3>
137-
<p>Converts this color from linear space to sRGB space.</p>
171+
<p>Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`.</p>
138172

139173
<h3>[method:this convertSRGBToLinear]()</h3>
140-
<p>Converts this color from sRGB space to linear space.</p>
174+
<p>Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.</p>
141175

142176
<h3>[method:this copyLinearToSRGB]( [param:Color color] )</h3>
143177
<p>
144178
[page:Color color] — Color to copy.<br />
145179

146180
Copies the given color into this color, and then converts this color from
147-
linear space to sRGB space.
181+
`LinearSRGBColorSpace` to `SRGBColorSpace`.
148182
</p>
149183

150184
<h3>[method:this copySRGBToLinear]( [param:Color color] )</h3>
151185
<p>
152186
[page:Color color] — Color to copy.<br />
153187

154188
Copies the given color into this color, and then converts this color from
155-
sRGB space to linear space.
189+
`SRGBColorSpace` to `LinearSRGBColorSpace`.
156190
</p>
157191

158192
<h3>[method:Boolean equals]( [param:Color color] )</h3>
@@ -208,11 +242,11 @@ <h3>
208242
object of the form:
209243

210244
<code>
211-
{
212-
h: 0,
213-
s: 0,
214-
l: 0
215-
}
245+
{
246+
h: 0,
247+
s: 0,
248+
l: 0
249+
}
216250
</code>
217251
</p>
218252

@@ -253,9 +287,9 @@ <h3>
253287
[page:Float alpha] - interpolation factor, typically in the closed
254288
interval `[0, 1]`.<br /><br />
255289

256-
Sets this color to be the color linearly interpolated between [page:Color color1]
290+
Sets this color to be the color linearly interpolated between [page:Color color1]
257291
and [page:Color color2] where alpha is the percent distance along
258-
the line connecting the two colors - alpha = 0 will be [page:Color color1],
292+
the line connecting the two colors - alpha = 0 will be [page:Color color1],
259293
and alpha = 1 will be [page:Color color2].
260294
</p>
261295

docs/api/en/math/Vector4.html

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ <h3>[method:this copy]( [param:Vector4 v] )</h3>
157157
[page:.z z] and [page:.w w] properties to this Vector4.
158158
</p>
159159

160+
<h3>[method:this divide]( [param:Vector4 v] )</h3>
161+
<p>Divides this vector by [page:Vector4 v].</p>
162+
160163
<h3>[method:this divideScalar]( [param:Float s] )</h3>
161164
<p>Divides this vector by scalar [page:Float s].</p>
162165

docs/api/en/objects/BatchedMesh.html

+37-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,13 @@ <h3>
260260
<p>
261261
Adds the given geometry to the [name] and returns the associated geometry id referring to it to be used in other functions.
262262
</p>
263-
263+
<h3>
264+
[method:Integer deleteGeometry]( [param:Integer geometryId] )
265+
</h3>
266+
<p>
267+
[page:Integer geometryId]: The id of a geometry to remove from the [name] that was previously added via "addGeometry". Any instances referencing
268+
this geometry will also be removed as a side effect.
269+
</p>
264270
<h3>
265271
[method:Integer addInstance]( [param:Integer geometryId] )
266272
</h3>
@@ -295,6 +301,36 @@ <h3>
295301
Calling this will change all instances that are rendering that geometry.
296302
</p>
297303

304+
<h3>
305+
[method:this optimize]()
306+
</h3>
307+
<p>
308+
Repacks the sub geometries in [name] to remove any unused space remaining from previously deleted geometry, freeing up space to add new geometry.
309+
</p>
310+
311+
<h3>
312+
[method:this setGeometrySize]( maxVertexCount, maxIndexCount )
313+
</h3>
314+
<p>
315+
Resizes the available space in [name]'s vertex and index buffer attributes to the provided sizes. If the provided arguments shrink the geometry buffers
316+
but there is not enough unused space at the end of the geometry attributes then an error is thrown.
317+
</p>
318+
<p>
319+
[page:Integer maxVertexCount] - the max number of vertices to be used by all unique geometries to resize to.<br />
320+
[page:Integer maxIndexCount] - the max number of indices to be used by all unique geometries to resize to.<br />
321+
</p>
322+
323+
<h3>
324+
[method:this setInstanceCount]( maxInstanceCount )
325+
</h3>
326+
<p>
327+
Resizes the necessary buffers to support the provided number of instances. If the provided arguments shrink the number of instances but there are not enough
328+
unused ids at the end of the list then an error is thrown.
329+
</p>
330+
<p>
331+
[page:Integer maxInstanceCount] - the max number of individual instances that can be added and rendered by the [name].<br />
332+
</p>
333+
298334
<!--
299335
<h3>
300336
[method:Integer getInstanceCountAt]( [param:Integer index] )

docs/api/en/renderers/WebGLRenderer.html

+5-15
Original file line numberDiff line numberDiff line change
@@ -380,23 +380,13 @@ <h3>
380380
</p>
381381

382382
<h3>
383-
[method:undefined copyTextureToTexture]( [param:Texture srcTexture], [param:Texture dstTexture], [param:Box2 srcRegion], [param:Vector2 dstPosition], [param:Number level] )
383+
[method:undefined copyTextureToTexture]( [param:Texture srcTexture], [param:Texture dstTexture], [param:Box2 srcRegion] | [param:Box3 srcRegion], [param:Vector2 dstPosition] | [param:Vector3 dstPosition], [param:Number dstLevel] )
384384
</h3>
385385
<p>
386-
Copies the pixels of a texture in the bounds '[page:Box2 srcRegion]' in
387-
the destination texture starting from the given position. Enables access
388-
to
389-
[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2D WebGLRenderingContext.texSubImage2D].
390-
</p>
391-
392-
<h3>
393-
[method:undefined copyTextureToTexture3D]( [param:Texture srcTexture], [param:Texture dstTexture], [param:Box3 srcRegion], [param:Vector3 dstPosition], [param:Number level] )
394-
</h3>
395-
<p>
396-
Copies the pixels of a texture in the bounds '[page:Box3 srcRegion]' in
397-
the destination texture starting from the given position. Enables access
398-
to
399-
[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texSubImage3D WebGL2RenderingContext.texSubImage3D].
386+
Copies the pixels of a texture in the bounds '[page:Box3 srcRegion]' in the destination texture starting from the given position.
387+
2D Texture, 3D Textures, or a mix of the two can be used as source and destination texture arguments for copying between layers of 3d textures.</br>
388+
The `depthTexture` and `texture` property of render targets are supported as well.<br />
389+
When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are initialized e.g. via [page:.initRenderTarget]().
400390
</p>
401391

402392
<h3>[method:undefined dispose]( )</h3>

docs/api/fr/animation/AnimationAction.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h3>[name]( [param:AnimationMixer mixer], [param:AnimationClip clip], [param:Obj
2929
[page:AnimationClip clip] - l`AnimationClip` qui contient les données d'animation pour cette action.<br />
3030
[page:Object3D localRoot] - l'objet racine sur lequel est appliqué l'action.<br /><br />
3131

32-
Note: Au lieu d'appeler ce constructeur directement, vous devriez instantier un AnimationAction avec
32+
Note: Au lieu d'appeler ce constructeur directement, vous devriez instancier un AnimationAction avec
3333
[page:AnimationMixer.clipAction] étant donné que cette méthode applique une mise en cache pour obtenir de meilleures performances.
3434
</p>
3535

@@ -42,7 +42,7 @@ <h3>[property:Boolean clampWhenFinished]</h3>
4242
Si `clampWhenFinished` est mis à true l'animation sera automatiquement [page:.paused mise en pause]
4343
à son dernier frame.<br /><br />
4444

45-
Si `clampWhenFinished` est mis à false, [page:.enabled enabled] sera automatiquement reglé sur
45+
Si `clampWhenFinished` est mis à false, [page:.enabled enabled] sera automatiquement réglé sur
4646
false quand la dernière boucle de l'action sera terminée, afin que cette action n'ai pas plus
4747
d'impact.<br /><br />
4848

@@ -68,14 +68,14 @@ <h3>[property:Boolean enabled]</h3>
6868

6969
<h3>[property:Number loop]</h3>
7070
<p>
71-
Le mode répeter (peut-être changé avec [page:.setLoop setLoop]). Sa valeur par défaut est
71+
Le mode répéter (peut-être changé avec [page:.setLoop setLoop]). Sa valeur par défaut est
7272
[page:Animation THREE.LoopRepeat] (avec un nombre infini de répétitions [page:.repetitions repetitions])<br /><br />
7373

7474
Doit être une de ces constantes:<br /><br />
7575
[page:Animation THREE.LoopOnce] - joue le clip une fois,<br />
76-
[page:Animation THREE.LoopRepeat] - joue le clip le nombre choisi de `répetitions`,
76+
[page:Animation THREE.LoopRepeat] - joue le clip le nombre choisi de `répétitions`,
7777
en sautant à chaque fois de la fin du clip à son début,<br />
78-
[page:Animation THREE.LoopPingPong] - joue le clip le nombre choisi de `répetitions`,
78+
[page:Animation THREE.LoopPingPong] - joue le clip le nombre choisi de `répétitions`,
7979
alternant entre lecture du début vers la fin et lecture de la fin vers le début.
8080
</p>
8181

@@ -223,13 +223,13 @@ <h3>[method:Boolean isRunning]()</h3>
223223
([page:.startAt startAt]).<br /><br />
224224

225225
Note: le fait que `isRunning` soit à true n'indique pas nécessairement que l'action est visible.
226-
C'est seulement le cas si le [page:.weight weight] est reglé sur une valeur non-nulle.
226+
C'est seulement le cas si le [page:.weight weight] est réglé sur une valeur non-nulle.
227227
</p>
228228

229229
<h3>[method:Boolean isScheduled]()</h3>
230230
<p>
231231
Renvoie true, si cette action est activée dans le mixer.<br /><br />
232-
Note: Cela n'indique pas nécessairement que l'action est en cours d'éxécution (voir les conditions additionnelles
232+
Note: Cela n'indique pas nécessairement que l'action est en cours d'éxecution (voir les conditions additionnelles
233233
pour [page:.isRunning isRunning]).
234234
</p>
235235

@@ -240,7 +240,7 @@ <h3>[method:this play]()</h3>
240240
Note: Activer cette action ne signifie pas nécessairement que l'animation démarrera directement:
241241
Si l'action s'était déjà terminée avant (en atteignant la fin de sa dernière boucle), ou si une durée
242242
pour un départ différé a été renseignée (via [page:.startAt startAt]), un [page:.reset reset] doit être
243-
éxécuté avant. Quelques autres paramètres ([page:.paused paused]=true, [page:.enabled enabled]=false,
243+
exécuté avant. Quelques autres paramètres ([page:.paused paused]=true, [page:.enabled enabled]=false,
244244
[page:.weight weight]=0, [page:.timeScale timeScale]=0) peuvent empêcher cette animation d'être jouée,
245245
également.
246246
</p>
@@ -267,7 +267,7 @@ <h3>[method:this setEffectiveTimeScale]( [param:Number timeScale] )</h3>
267267
<p>
268268
Renseigne le [page:.timeScale timeScale] et stoppe tous les warpings programmés. Cette méthode peut être chaînée.<br /><br />
269269

270-
Si [page:.paused paused] est à false, l'échelle temporelle effective (propriété interne) sera également
270+
Si [page:.paused paused] est à false, l'échelle temporelle effective (propriété interne) sera également
271271
mise à cette valeur; par ailleurs l'échelle temporelle effective (affectant directement l'animation à
272272
cet instant) sera mis à `0`.<br /><br />
273273

@@ -332,7 +332,7 @@ <h3>[method:this syncWith]( [param:AnimationAction otherAction] )</h3>
332332
La synchronisation est faite en dupliquant les valeurs du [page:.time time] et du [page:.timeScale timeScale] de l'autre action
333333
(stoppant tous les warpings programmés).<br /><br />
334334

335-
Note: Les changements futurs du `time` et du `timeScale` de l'autre action ne seront pas détéctés.
335+
Note: Les changements futurs du `time` et du `timeScale` de l'autre action ne seront pas détectés.
336336
</p>
337337

338338
<h3>[method:this warp]( [param:Number startTimeScale], [param:Number endTimeScale], [param:Number durationInSeconds] )</h3>

docs/api/fr/animation/AnimationClip.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h3>[method:this resetDuration]()</h3>
8484

8585
<h3>[method:Object toJSON]()</h3>
8686
<p>
87-
Renvoie un objet JSON représentant le clip d'animation serialisé.
87+
Renvoie un objet JSON représentant le clip d'animation sérialisé.
8888
</p>
8989

9090
<h3>[method:this trim]()</h3>

docs/api/fr/animation/AnimationMixer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h3>[method:Object3D getRoot]()</h3>
7474

7575
<h3>[method:this stopAllAction]()</h3>
7676
<p>
77-
Désactive toutes les actions précedemment programmées pour ce mixer.
77+
Désactive toutes les actions précédemment programmées pour ce mixer.
7878
</p>
7979

8080
<h3>[method:this update]([param:Number deltaTimeInSeconds]) </h3>

0 commit comments

Comments
 (0)