Skip to content

Commit

Permalink
Docs: typos (#30602)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Rigaud <[email protected]>
  • Loading branch information
s-rigaud and Samuel Rigaud authored Feb 24, 2025
1 parent 1e395f5 commit 5323b5e
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions examples/webgpu_volume_lighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
//sunLight.add( new THREE.Mesh( new THREE.SphereGeometry( 0.1, 16, 16 ), new THREE.MeshBasicMaterial( { color: 0xffffff } ) ) );
scene.add( spotLight );

// Post-Proccessing
// Post-Processing

postProcessing = new THREE.PostProcessing( renderer );

Expand All @@ -213,7 +213,7 @@
const scenePass = pass( scene, camera );
const sceneLinearDepth = scenePass.getTextureNode( 'depth' );

// Material - Apply oclussion depth of volumetric lighting based on the scene depth
// Material - Apply occlusion depth of volumetric lighting based on the scene depth

volumetricMaterial.depthNode = sceneLinearDepth.sample( screenUV );

Expand Down
4 changes: 2 additions & 2 deletions examples/webgpu_volume_lighting_rectarea.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
controls.target.copy( meshKnot.position );
controls.update();

// Post-Proccessing
// Post-Processing

postProcessing = new THREE.PostProcessing( renderer );

Expand All @@ -234,7 +234,7 @@
const scenePass = pass( scene, camera );
const sceneLinearDepth = scenePass.getTextureNode( 'depth' );

// Material - Apply oclussion depth of volumetric lighting based on the scene depth
// Material - Apply occlusion depth of volumetric lighting based on the scene depth

volumetricMaterial.depthNode = sceneLinearDepth.sample( screenUV );

Expand Down
2 changes: 1 addition & 1 deletion src/audio/AudioListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const _scale = /*@__PURE__*/ new Vector3();
const _orientation = /*@__PURE__*/ new Vector3();

/**
* The class represents a virtual listern of the all positional and non-positional audio effects
* The class represents a virtual listener of the all positional and non-positional audio effects
* in the scene. A three.js application usually creates a single listener. It is a mandatory
* constructor parameter for audios entities like {@link Audio} and {@link PositionalAudio}.
*
Expand Down
4 changes: 2 additions & 2 deletions src/cameras/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class Camera extends Object3D {
this.projectionMatrix = new Matrix4();

/**
* The inverse of the camera's prjection matrix.
* The inverse of the camera's projection matrix.
*
* @type {Matrix4}
*/
this.projectionMatrixInverse = new Matrix4();

/**
* The coordinate system in which the camrea is used.
* The coordinate system in which the camera is used.
*
* @type {(WebGLCoordinateSystem|WebGPUCoordinateSystem)}
*/
Expand Down
10 changes: 5 additions & 5 deletions src/core/Object3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Object3D extends EventDispatcher {
value: rotation
},
/**
* Represents the object's local rotation as Quaterions.
* Represents the object's local rotation as Quaternions.
*
* @name Object3D#quaternion
* @type {Quaternion}
Expand Down Expand Up @@ -409,7 +409,7 @@ class Object3D extends EventDispatcher {
/**
* Applies a rotation represented by given the quaternion to the 3D object.
*
* @param {Quaternion} q - The quaterion.
* @param {Quaternion} q - The quaternion.
* @return {Object3D} A reference to this instance.
*/
applyQuaternion( q ) {
Expand Down Expand Up @@ -460,9 +460,9 @@ class Object3D extends EventDispatcher {
}

/**
* Sets the given rotation represented as a Quanterion to the 3D object.
* Sets the given rotation represented as a Quaternion to the 3D object.
*
* @param {Quaternion} q - The Quanterion
* @param {Quaternion} q - The Quaternion
*/
setRotationFromQuaternion( q ) {

Expand Down Expand Up @@ -1079,7 +1079,7 @@ class Object3D extends EventDispatcher {

/**
* Updates the transformation matrix in local space by computing it from the current
* positon, rotation and scale values.
* position, rotation and scale values.
*/
updateMatrix() {

Expand Down
4 changes: 2 additions & 2 deletions src/extras/ShapeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ShapeUtils {
/**
* Returns `true` if the given contour uses a clockwise winding order.
*
* @param {Array<Vector2>} pts - An array of 2D points defining a polyong.
* @param {Array<Vector2>} pts - An array of 2D points defining a polygon.
* @return {boolean} Whether the given contour uses a clockwise winding order or not.
*/
static isClockWise( pts ) {
Expand All @@ -41,7 +41,7 @@ class ShapeUtils {
}

/**
* Triangluates the given shape definition.
* Triangulates the given shape definition.
*
* @param {Array<Vector2>} contour - An array of 2D points defining the contour.
* @param {Array<Array<Vector2>>} holes - An array that holds arrays of 2D points defining the holes.
Expand Down
4 changes: 2 additions & 2 deletions src/extras/core/Curve.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class Curve {
*
* @param {number} t - The interpolation factor.
* @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to.
* @return {(Vector2|Vector3)} The tagent vector.
* @return {(Vector2|Vector3)} The tangent vector.
*/
getTangent( t, optionalTarget ) {

Expand Down Expand Up @@ -316,7 +316,7 @@ class Curve {
*
* @param {number} u - The interpolation factor.
* @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to.
* @return {(Vector2|Vector3)} The tagent vector.
* @return {(Vector2|Vector3)} The tangent vector.
* @see {@link Curve#getPointAt}
*/
getTangentAt( u, optionalTarget ) {
Expand Down
4 changes: 2 additions & 2 deletions src/extras/core/Interpolations.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve

/**
* Computes a point on a Camtull-Rom spline.
* Computes a point on a Catmull-Rom spline.
*
* @param {number} t - The interpolation factor.
* @param {number} p0 - The first control point.
* @param {number} p1 - The second control point.
* @param {number} p2 - The third control point.
* @param {number} p3 - The fourth control point.
* @return {number} The calculated point on a Camtull-Rom spline.
* @return {number} The calculated point on a Catmull-Rom spline.
*/
function CatmullRom( t, p0, p1, p2, p3 ) {

Expand Down
2 changes: 1 addition & 1 deletion src/extras/core/Shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Shape extends Path {
this.type = 'Shape';

/**
* Defines the holes in the shape. Hole defnitions must use the
* Defines the holes in the shape. Hole definitions must use the
* opposite winding order (CW/CCW) than the outer shape.
*
* @type {Array<Path>}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/ArrowHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let _lineGeometry, _coneGeometry;
class ArrowHelper extends Object3D {

/**
* Constructs a new arror helper.
* Constructs a new arrow helper.
*
* @param {Vector3} [dir=(0, 0, 1)] - The (normalized) direction vector.
* @param {Vector3} [origin=(0, 0, 0)] - Point at which the arrow starts.
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/CameraHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const _camera = /*@__PURE__*/ new Camera();
class CameraHelper extends LineSegments {

/**
* Constructs a new arror helper.
* Constructs a new arrow helper.
*
* @param {Camera} camera - The camera to visualize.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class Loader {
*
*
* @callback onErrorCallback
* @param {Error} error - The error which occured during the loading process.
* @param {Error} error - The error which occurred during the loading process.
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/math/Euler.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class Euler {

/**
* Sets this Euler instance's components to values from the given array. The first three
* entries of the array are assign to the x,y and z components. An optinal fourth entry
* entries of the array are assign to the x,y and z components. An optional fourth entry
* defines the Euler order.
*
* @param {Array<number,number,number,?string>} array - An array holding the Euler component values.
Expand Down
4 changes: 2 additions & 2 deletions src/math/Frustum.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Frustum {
}

/**
* Sets the frustum planens by copying the given planes.
* Sets the frustum planes by copying the given planes.
*
* @param {Plane} [p0] - The first plane that encloses the frustum.
* @param {Plane} [p1] - The second plane that encloses the frustum.
Expand Down Expand Up @@ -232,7 +232,7 @@ class Frustum {
* Returns `true` if the given point lies within the frustum.
*
* @param {Vector3} point - The point to test.
* @return {boolean} Whether the point liest within this frustum or not.
* @return {boolean} Whether the point lies within this frustum or not.
*/
containsPoint( point ) {

Expand Down
2 changes: 1 addition & 1 deletion src/math/Matrix3.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class Matrix3 {
/**
* Transposes this matrix into the supplied array, and returns itself unchanged.
*
* @param {Array<number>} r - An arry to store the transposed matrix elements.
* @param {Array<number>} r - An array to store the transposed matrix elements.
* @return {Matrix3} A reference to this matrix.
*/
transposeIntoArray( r ) {
Expand Down
6 changes: 3 additions & 3 deletions src/math/Matrix4.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ class Matrix4 {
* Sets the position component for this matrix from the given vector,
* without affecting the rest of the matrix.
*
* @param {number|Vector3} x - The x component of the vector or alternativley the vector object.
* @param {number|Vector3} x - The x component of the vector or alternatively the vector object.
* @param {number} y - The y component of the vector.
* @param {number} z - The z component of the vector.
* @return {Matrix4} A reference to this matrix.
Expand Down Expand Up @@ -782,7 +782,7 @@ class Matrix4 {
/**
* Gets the maximum scale value of the three axes.
*
* @return {number} The maxium scale.
* @return {number} The maximum scale.
*/
getMaxScaleOnAxis() {

Expand Down Expand Up @@ -1035,7 +1035,7 @@ class Matrix4 {
}

/**
* Decomposes this matrix into its positon, rotation and scale components
* Decomposes this matrix into its position, rotation and scale components
* and provides the result in the given objects.
*
* Note: Not all matrices are decomposable in this way. For example, if an
Expand Down
2 changes: 1 addition & 1 deletion src/math/Quaternion.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ class Quaternion {
}

/**
* Rotates this quaternion by a given angular step to the given quaterion.
* Rotates this quaternion by a given angular step to the given quaternion.
* The method ensures that the final quaternion will not overshoot `q`.
*
* @param {Quaternion} q - The target quaternion.
Expand Down
4 changes: 2 additions & 2 deletions src/math/Triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Triangle {
}

/**
* Copmutes a barycentric coordinates from the given vector.
* Computes a barycentric coordinates from the given vector.
* Returns `null` if the triangle is degenerate.
*
* @param {Vector3} point - A point in 3D space.
Expand Down Expand Up @@ -366,7 +366,7 @@ class Triangle {
}

/**
* Copmutes a barycentric coordinates from the given vector.
* Computes a barycentric coordinates from the given vector.
* Returns `null` if the triangle is degenerate.
*
* @param {Vector3} point - A point in 3D space.
Expand Down
8 changes: 4 additions & 4 deletions src/nodes/functions/VolumetricLightingModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class VolumetricLightingModel extends LightingModel {

}

scaterringLight( lightColor, builder ) {
scatteringLight( lightColor, builder ) {

const sceneDepthNode = builder.context.sceneDepthNode;

Expand All @@ -148,12 +148,12 @@ class VolumetricLightingModel extends LightingModel {

if ( lightNode.light.distance === undefined ) return;

// TODO: We need a viewportOpaque*() ( output, depth ) to fit with modern rendering approches
// TODO: We need a viewportOpaque*() ( output, depth ) to fit with modern rendering approaches

const directLight = lightColor.xyz.toVar();
directLight.mulAssign( lightNode.shadowNode ); // it no should be necessary if used in the same render pass

this.scaterringLight( directLight, builder );
this.scatteringLight( directLight, builder );

}

Expand All @@ -168,7 +168,7 @@ class VolumetricLightingModel extends LightingModel {

const directLight = lightColor.xyz.mul( LTC_Evaluate_Volume( { P, p0, p1, p2, p3 } ) ).pow( 1.5 );

this.scaterringLight( directLight, builder );
this.scatteringLight( directLight, builder );

}

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/pmrem/PMREMNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function _getPMREMFromTexture( texture, renderer, generator ) {

/**
* Returns a cache that stores generated PMREMs for the respective textures.
* A cache must be maintaned per renderer since PMREMs are render target textures
* A cache must be maintained per renderer since PMREMs are render target textures
* which can't be shared across render contexts.
*
* @private
Expand Down
2 changes: 1 addition & 1 deletion src/textures/Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Texture extends EventDispatcher {
* @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value.
* @param {number} [magFilter=LinearFilter] - The mag filter value.
* @param {number} [minFilter=LinearFilter] - The min filter value.
* @param {number} [format=RGABFormat] - The min filter value.
* @param {number} [format=RGBAFormat] - The min filter value.
* @param {number} [type=UnsignedByteType] - The min filter value.
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The min filter value.
* @param {string} [colorSpace=NoColorSpace] - The min filter value.
Expand Down

0 comments on commit 5323b5e

Please sign in to comment.