Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/jsm/animation/CCDIKSolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CCDIKSolver {
/**
* The IK objects.
*
* @type {SkinnedMesh}
* @type {Array<CCDIKSolver~IK>}
*/
this.iks = iks;

Expand Down Expand Up @@ -357,7 +357,7 @@ class CCDIKHelper extends Object3D {
/**
* The helpers sphere geometry.
*
* @type {SkinnedMesh}
* @type {SphereGeometry}
*/
this.sphereGeometry = new SphereGeometry( sphereSize, 16, 8 );

Expand Down
6 changes: 3 additions & 3 deletions examples/jsm/controls/ArcballControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ const _EPS = 0.000001;
* consistent camera movements. Dragging cursor/fingers will cause camera to orbit around the center of the trackball in a conservative
* way (returning to the starting point will make the camera return to its starting orientation).
*
* In addition to supporting pan, zoom and pinch gestures, Arcball controls provide focus< functionality with a double click/tap for intuitively
* moving the object's point of interest in the center of the virtual trackball. Focus allows a much better inspection and navigation in complex
* environment. Moreover Arcball controls allow FOV manipulation (in a vertigo-style method) and z-rotation. Saving and restoring of Camera State
* In addition to supporting pan, zoom and pinch gestures, double clicking/tapping focuses on a point, intuitively moving the object's
* point of interest to the center of the virtual trackball. Focus allows a much better inspection and navigation in complex environment.
* Moreover Arcball controls allow FOV manipulation (in a vertigo-style method) and z-rotation. Saving and restoring of Camera State
* is supported also through clipboard (use ctrl+c and ctrl+v shortcuts for copy and paste the state).
*
* Unlike {@link OrbitControls} and {@link TrackballControls}, `ArcballControls` doesn't require `update()` to be called externally in an
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import { clone } from '../utils/SkeletonUtils.js';
/**
* A loader for the glTF 2.0 format.
*
* [glTF](https://www.khronos.org/gltf/} (GL Transmission Format) is an [open format specification]{@link https://github.com/KhronosGroup/glTF/tree/main/specification/2.0)
* [glTF](https://www.khronos.org/gltf/) (GL Transmission Format) is an [open format specification]{@link https://github.com/KhronosGroup/glTF/tree/main/specification/2.0)
* for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb)
* format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver
* one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights,
Expand Down Expand Up @@ -408,7 +408,7 @@ class GLTFLoader extends Loader {
}

/**
* Parses the given FBX data and returns the resulting group.
* Parses the given glTF data and returns the resulting group.
*
* @param {string|ArrayBuffer} data - The raw glTF data.
* @param {string} path - The URL base path.
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/postprocessing/RenderTransitionPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class RenderTransitionPass extends Pass {
}

/**
* Sets the texture threshold. This value defined how strong the texture effects
* Sets the texture threshold. This value defines how strong the texture effects
* the transition. Must be in the range `[0,1]` (0 means full effect, 1 means no effect).
*
* @param {boolean|number} value - The threshold value.
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/renderers/CSS3DRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const _matrix2 = new Matrix4();
* This renderer can be used to apply hierarchical 3D transformations to DOM elements
* via the CSS3 [transform](https://www.w3schools.com/cssref/css3_pr_transform.asp) property.
* `CSS3DRenderer` is particularly interesting if you want to apply 3D effects to a website without
* canvas based rendering. It can also be used in order to combine DOM elements with WebGLcontent.
* canvas based rendering. It can also be used in order to combine DOM elements with WebGL content.
*
* There are, however, some important limitations:
*
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/renderers/SVGRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class SVGRenderer {
};

/**
* Sets the render quality. Setting to `high` means This value indicates that the browser
* tries to improve the SVG quality over rendering speed and geometric precision.
* Sets the render quality. Setting to `high` makes the browser improve SVG quality
* over rendering speed and geometric precision.
*
* @param {('low'|'high')} quality - The quality.
*/
Expand Down
14 changes: 7 additions & 7 deletions manual/en/creating-a-scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h2>Rendering the scene</h2>
<p>If you copied the code from above into the main.js file we created earlier, you wouldn't be able to see anything. This is because we're not actually rendering anything yet. For that, we need what's called a render or animation loop.</p>

<pre class="prettyprint notranslate lang-js" translate="no">
function animate() {
function animate( time ) {
renderer.render( scene, camera );
}
renderer.setAnimationLoop( animate );
Expand All @@ -107,16 +107,16 @@ <h2>Animating the cube</h2>
<p>Add the following code right above the `renderer.render` call in your `animate` function:</p>

<pre class="prettyprint notranslate lang-js" translate="no">
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
cube.rotation.x = time / 2000;
cube.rotation.y = time / 1000;
</pre>

<p>This will be run every frame (normally 60 times per second), and give the cube a nice rotation animation. Basically, anything you want to move or change while the app is running has to go through the animation loop. You can of course call other functions from there, so that you don't end up with an `animate` function that's hundreds of lines.</p>

<h2>The result</h2>
<p>Congratulations! You have now completed your first three.js application. It's simple, but you have to start somewhere.</p>

<p>The full code is available below and as an editable [link:https://jsfiddle.net/tswh48fL/ live example]. Play around with it to get a better understanding of how it works.</p>
<p>The full code is available below and as an editable [link:https://jsfiddle.net/zycqb61k/ live example]. Play around with it to get a better understanding of how it works.</p>

<p><i>index.html —</i></p>

Expand Down Expand Up @@ -156,10 +156,10 @@ <h2>The result</h2>

camera.position.z = 5;

function animate() {
function animate( time ) {

cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
cube.rotation.x = time / 2000;
cube.rotation.y = time / 1000;

renderer.render( scene, camera );

Expand Down
16 changes: 8 additions & 8 deletions manual/fr/creating-a-scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h2>Afficher la scène</h2>
<p>Si vous copiez le code ci-dessus dans le fichier main.js que nous avons créé précédemment, vous ne pourrez rien voir. C'est parce que nous n'affichons encore rien. Pour cela, nous avons besoin de ce qu'on appelle une boucle de rendu ou d'animation.</p>

<pre class="prettyprint notranslate lang-js" translate="no">
function animate() {
function animate( time ) {
renderer.render( scene, camera );
}
renderer.setAnimationLoop( animate );
Expand All @@ -107,16 +107,16 @@ <h2>Animer le cube</h2>
<p>Ajoutez le code suivant juste au-dessus de l'appel `renderer.render` dans votre fonction `animate` :</p>

<pre class="prettyprint notranslate lang-js" translate="no">
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
cube.rotation.x = time / 2000;
cube.rotation.y = time / 1000;
</pre>

<p>Cela sera exécuté à chaque image (normalement 60 fois par seconde) et donnera au cube une belle animation de rotation. En gros, tout ce que vous voulez déplacer ou modifier pendant que l'application est en cours d'exécution doit passer par la boucle d'animation. Vous pouvez bien sûr appeler d'autres fonctions à partir de là, afin de ne pas vous retrouver avec une fonction `animate` de plusieurs centaines de lignes.</p>

<h2>Le résultat</h2>
<p>Félicitations ! Vous avez maintenant terminé votre première application three.js. C'est simple, mais il faut bien commencer quelque part.</p>

<p>Le code complet est disponible ci-dessous et sous forme d'un [link:https://jsfiddle.net/tswh48fL/ exemple live] modifiable. Jouez avec pour mieux comprendre comment cela fonctionne.</p>
<p>Le code complet est disponible ci-dessous et sous forme d'un [link:https://jsfiddle.net/zycqb61k/ exemple live] modifiable. Jouez avec pour mieux comprendre comment cela fonctionne.</p>

<p><i>index.html —</i></p>

Expand Down Expand Up @@ -156,10 +156,10 @@ <h2>Le résultat</h2>

camera.position.z = 5;

function animate() {
function animate( time ) {

cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
cube.rotation.x = time / 2000;
cube.rotation.y = time / 1000;

renderer.render( scene, camera );

Expand All @@ -176,4 +176,4 @@ <h2>Le résultat</h2>



</body></html>
</body></html>
2 changes: 1 addition & 1 deletion src/animation/AnimationAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class AnimationAction {

}

// Interna
// Internal

_update( time, deltaTime, timeDirection, accuIndex ) {

Expand Down
2 changes: 1 addition & 1 deletion src/animation/AnimationClip.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class AnimationClip {
* @static
* @deprecated since r175.
* @param {Object} animation - A serialized animation clip as JSON.
* @param {Array<Bones>} bones - An array of bones.
* @param {Array<Bone>} bones - An array of bones.
* @return {?AnimationClip} The new animation clip.
*/
static parseAnimation( animation, bones ) {
Expand Down
2 changes: 1 addition & 1 deletion src/animation/KeyframeTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class KeyframeTrack {
* Optimizes this keyframe track by removing equivalent sequential keys (which are
* common in morph target sequences).
*
* @return {AnimationClip} A reference to this animation clip.
* @return {KeyframeTrack} A reference to this keyframe track.
*/
optimize() {

Expand Down
6 changes: 3 additions & 3 deletions src/math/Vector3.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Vector3 {
}

/**
* Sets the vector's x component to the given value
* Sets the vector's x component to the given value.
*
* @param {number} x - The value to set.
* @return {Vector3} A reference to this vector.
Expand All @@ -120,7 +120,7 @@ class Vector3 {
}

/**
* Sets the vector's y component to the given value
* Sets the vector's y component to the given value.
*
* @param {number} y - The value to set.
* @return {Vector3} A reference to this vector.
Expand All @@ -134,7 +134,7 @@ class Vector3 {
}

/**
* Sets the vector's z component to the given value
* Sets the vector's z component to the given value.
*
* @param {number} z - The value to set.
* @return {Vector3} A reference to this vector.
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/core/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Node extends EventDispatcher {
this._cacheKey = null;

/**
* The cache key 's version.
* The cache key's version.
*
* @private
* @type {number}
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class WebGLRenderer {
// public properties

/**
* A canvas where the renderer draws its output.This is automatically created by the renderer
* A canvas where the renderer draws its output. This is automatically created by the renderer
* in the constructor (if not provided already); you just need to add it to your page like so:
* ```js
* document.body.appendChild( renderer.domElement );
Expand All @@ -165,7 +165,7 @@ class WebGLRenderer {
* - `checkShaderErrors`: If it is `true`, defines whether material shader programs are
* checked for errors during compilation and linkage process. It may be useful to disable
* this check in production for performance gain. It is strongly recommended to keep these
* checks enabled during development. If the shader does not compile and link - it will not
* checks enabled during development. If the shader does not compile and link, it will not
* work and associated material will not render.
* - `onShaderError(gl, program, glVertexShader,glFragmentShader)`: A callback function that
* can be used for custom error reporting. The callback receives the WebGL context, an instance
Expand Down
4 changes: 2 additions & 2 deletions src/textures/Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class Texture extends EventDispatcher {
Object.defineProperty( this, 'id', { value: _textureId ++ } );

/**
* The UUID of the material.
* The UUID of the texture.
*
* @type {string}
* @readonly
*/
this.uuid = generateUUID();

/**
* The name of the material.
* The name of the texture.
*
* @type {string}
*/
Expand Down