ソースを参照

Docs: typos (#30602)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 1 年間 前
コミット
5323b5e78c

+ 2 - 2
examples/webgpu_volume_lighting.html

@@ -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 );
 
@@ -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 );
 

+ 2 - 2
examples/webgpu_volume_lighting_rectarea.html

@@ -217,7 +217,7 @@
 				controls.target.copy( meshKnot.position );
 				controls.update();
 
-				// Post-Proccessing
+				// Post-Processing
 
 				postProcessing = new THREE.PostProcessing( renderer );
 
@@ -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 );
 

+ 1 - 1
src/audio/AudioListener.js

@@ -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}.
  *

+ 2 - 2
src/cameras/Camera.js

@@ -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)}
 		 */

+ 5 - 5
src/core/Object3D.js

@@ -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}
@@ -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 ) {
@@ -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 ) {
 
@@ -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() {
 

+ 2 - 2
src/extras/ShapeUtils.js

@@ -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 ) {
@@ -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.

+ 2 - 2
src/extras/core/Curve.js

@@ -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 ) {
 
@@ -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 ) {

+ 2 - 2
src/extras/core/Interpolations.js

@@ -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 ) {
 

+ 1 - 1
src/extras/core/Shape.js

@@ -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>}

+ 1 - 1
src/helpers/ArrowHelper.js

@@ -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.

+ 1 - 1
src/helpers/CameraHelper.js

@@ -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.
 	 */

+ 1 - 1
src/loaders/Loader.js

@@ -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.
  */
 
 /**

+ 1 - 1
src/math/Euler.js

@@ -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.

+ 2 - 2
src/math/Frustum.js

@@ -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.
@@ -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 ) {
 

+ 1 - 1
src/math/Matrix3.js

@@ -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 ) {

+ 3 - 3
src/math/Matrix4.js

@@ -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.
@@ -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() {
 
@@ -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

+ 1 - 1
src/math/Quaternion.js

@@ -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.

+ 2 - 2
src/math/Triangle.js

@@ -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.
@@ -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.

+ 4 - 4
src/nodes/functions/VolumetricLightingModel.js

@@ -122,7 +122,7 @@ class VolumetricLightingModel extends LightingModel {
 
 	}
 
-	scaterringLight( lightColor, builder ) {
+	scatteringLight( lightColor, builder ) {
 
 		const sceneDepthNode = builder.context.sceneDepthNode;
 
@@ -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 );
 
 	}
 
@@ -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 );
 
 	}
 

+ 1 - 1
src/nodes/pmrem/PMREMNode.js

@@ -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

+ 1 - 1
src/textures/Texture.js

@@ -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.

粤ICP备19079148号