浏览代码

Docs: fix typos (#30721)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 11 月之前
父节点
当前提交
d630eb8c0b

+ 2 - 2
examples/jsm/loaders/GLTFLoader.js

@@ -72,7 +72,7 @@ import { toTrianglesDrawMode } from '../utils/BufferGeometryUtils.js';
  *
  * [glTF]{@link 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 filesstore textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver
+ * 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,
  * and/or cameras.
  *
@@ -352,7 +352,7 @@ class GLTFLoader extends Loader {
 	}
 
 	/**
-	 * Sets the given meshop decoder. Required for decoding assets
+	 * Sets the given meshopt decoder. Required for decoding assets
 	 * compressed with the `EXT_meshopt_compression` extension.
 	 *
 	 * @param {Object} meshoptDecoder - The meshopt decoder to set.

+ 1 - 1
examples/jsm/loaders/IESLoader.js

@@ -168,7 +168,7 @@ class IESLoader extends Loader {
 	 * Parses the given IES data.
 	 *
 	 * @param {string} text - The raw IES data.
-	 * @return {DataTexture} THE IES data as a texutre.
+	 * @return {DataTexture} THE IES data as a texture.
 	 */
 	parse( text ) {
 

+ 2 - 2
examples/jsm/loaders/MTLLoader.js

@@ -87,7 +87,7 @@ class MTLLoader extends Loader {
 	 * Sets the material options.
 	 *
 	 * @param {MTLLoader~MaterialOptions} value - The material options.
-	 * @return {MTLLoader} A referene to this loader.
+	 * @return {MTLLoader} A reference to this loader.
 	 */
 	setMaterialOptions( value ) {
 
@@ -170,7 +170,7 @@ class MTLLoader extends Loader {
  * @typedef {Object} MTLLoader~MaterialOptions
  * @property {(FrontSide|BackSide|DoubleSide)} [side=FrontSide] - Which side to apply the material.
  * @property {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} [wrap=RepeatWrapping] - What type of wrapping to apply for textures.
- * @property {boolean} [normalizeRGB=false] - Whether RGB clors should be normalized to `0-1` from `0-255`.
+ * @property {boolean} [normalizeRGB=false] - Whether RGB colors should be normalized to `0-1` from `0-255`.
  * @property {boolean} [ignoreZeroRGBs=false] - Ignore values of RGBs (Ka,Kd,Ks) that are all 0's.
  */
 

+ 1 - 1
examples/jsm/loaders/PDBLoader.js

@@ -82,7 +82,7 @@ class PDBLoader extends Loader {
 
 	/**
 	 * Parses the given PDB data and returns an object holding the atoms and
-	 * bond gometries as well as the raw atom data as JSON.
+	 * bond geometries as well as the raw atom data as JSON.
 	 *
 	 * @param {string} text - The raw PDB data as a string.
 	 * @return {Object} The result object.

+ 1 - 1
examples/jsm/loaders/PLYLoader.js

@@ -18,7 +18,7 @@ const _color = new Color();
  *
  * ```js
  * const loader = new PLYLoader();
- * const goemetry = await loader.loadAsync( './models/ply/ascii/dolphins.ply' );
+ * const geometry = await loader.loadAsync( './models/ply/ascii/dolphins.ply' );
  * scene.add( new THREE.Mesh( geometry ) );
  * ```
  *

+ 1 - 1
examples/jsm/loaders/TDSLoader.js

@@ -107,7 +107,7 @@ class TDSLoader extends Loader {
 	 *
 	 * @param {ArrayBuffer} arraybuffer - The raw 3DS data as an array buffer.
 	 * @param {string} path - The asset path.
-	 * @return {Group} The parsed assset represented as a group.
+	 * @return {Group} The parsed asset represented as a group.
 	 */
 	parse( arraybuffer, path ) {
 

+ 1 - 1
examples/jsm/loaders/UltraHDRLoader.js

@@ -39,7 +39,7 @@ const SRGB_TO_LINEAR = Array( 1024 )
 /**
  * A loader for the Ultra HDR Image Format.
  *
- * Exisitng HDR or EXR textures can be converted to Ultra HDR with this [tool]{@link https://gainmap-creator.monogrid.com/}.
+ * Existing HDR or EXR textures can be converted to Ultra HDR with this [tool]{@link https://gainmap-creator.monogrid.com/}.
  *
  * Current feature set:
  * - JPEG headers (required)

+ 1 - 1
examples/jsm/misc/ConvexObjectBreaker.js

@@ -68,7 +68,7 @@ class ConvexObjectBreaker {
 	 * @param {Object3D} object - The 3D object. It must have a convex geometry.
 	 * @param {number} mass - The 3D object's mass in kg. Must be greater than `0`.
 	 * @param {Vector3} velocity - The 3D object's velocity.
-	 * @param {Vector3} angularVelocity - The 3D object's angualar velocity.
+	 * @param {Vector3} angularVelocity - The 3D object's angular velocity.
 	 * @param {boolean} breakable - Whether the 3D object is breakable or not.
 	 */
 	prepareBreakableObject( object, mass, velocity, angularVelocity, breakable ) {

+ 2 - 2
examples/jsm/misc/GPUComputationRenderer.js

@@ -171,7 +171,7 @@ class GPUComputationRenderer {
 		 * Sets variable dependencies.
 		 *
 		 * @param {Object} variable - The compute variable.
-		 * @param {Array<Object>} dependencies - Ohter compute variables that represents the dependencies.
+		 * @param {Array<Object>} dependencies - Other compute variables that represents the dependencies.
 		 */
 		this.setVariableDependencies = function ( variable, dependencies ) {
 
@@ -377,7 +377,7 @@ class GPUComputationRenderer {
 		this.createShaderMaterial = createShaderMaterial;
 
 		/**
-		 * Creates a new render target from the given paramters.
+		 * Creates a new render target from the given parameters.
 		 *
 		 * @param {number} sizeXTexture - The width of the render target.
 		 * @param {number} sizeYTexture - The height of the render target.

+ 1 - 1
examples/jsm/misc/MD2CharacterComplex.js

@@ -117,7 +117,7 @@ class MD2CharacterComplex {
 		this.meshWeapon = null;
 
 		/**
-		 * The movement contorls.
+		 * The movement controls.
 		 *
 		 * @type {Object}
 		 * @default null

+ 1 - 1
examples/jsm/misc/MorphAnimMesh.js

@@ -52,7 +52,7 @@ class MorphAnimMesh extends Mesh {
 	}
 
 	/**
-	 * Sets the animation playback directio to "backward".
+	 * Sets the animation playback direction to "backward".
 	 */
 	setDirectionBackward() {
 

+ 1 - 1
examples/jsm/misc/MorphBlendMesh.js

@@ -339,7 +339,7 @@ class MorphBlendMesh extends Mesh {
 	}
 
 	/**
-	 * Updates the animations of thie mesh.
+	 * Updates the animations of the mesh.
 	 *
 	 * @param {number} delta - The delta time in seconds.
 	 */

+ 3 - 3
examples/jsm/misc/RollerCoaster.js

@@ -18,7 +18,7 @@ class RollerCoasterGeometry extends BufferGeometry {
 	/**
 	 * Constructs a new geometry.
 	 *
-	 * @param {Curve} curve - The curve to genereate the geometry along.
+	 * @param {Curve} curve - The curve to generate the geometry along.
  	 * @param {number} divisions - The number of divisions which defines the detail of the geometry.
 	 */
 	constructor( curve, divisions ) {
@@ -243,7 +243,7 @@ class RollerCoasterLiftersGeometry extends BufferGeometry {
 	/**
 	 * Constructs a new geometry.
 	 *
-	 * @param {Curve} curve - The curve to genereate the geometry along.
+	 * @param {Curve} curve - The curve to generate the geometry along.
  	 * @param {number} divisions - The number of divisions which defines the detail of the geometry.
 	 */
 	constructor( curve, divisions ) {
@@ -430,7 +430,7 @@ class RollerCoasterShadowGeometry extends BufferGeometry {
 	/**
 	 * Constructs a new geometry.
 	 *
-	 * @param {Curve} curve - The curve to genereate the geometry along.
+	 * @param {Curve} curve - The curve to generate the geometry along.
  	 * @param {number} divisions - The number of divisions which defines the detail of the geometry.
 	 */
 	constructor( curve, divisions ) {

+ 1 - 1
examples/jsm/misc/TubePainter.js

@@ -241,7 +241,7 @@ function TubePainter() {
 		setSize: setSize,
 
 		/**
-		 * Updates the internal goemetry buffers so the new painted
+		 * Updates the internal geometry buffers so the new painted
 		 * segments are rendered.
 		 *
 		 * @method

+ 1 - 1
examples/jsm/objects/GroundedSkybox.js

@@ -25,7 +25,7 @@ class GroundedSkybox extends Mesh {
 	 * @param {number} height - The height is how far the camera that took the photo was above the ground.
 	 * A larger value will magnify the downward part of the image.
 	 * @param {number} radius - The radius of the skybox. Must be large enough to ensure the scene's camera stays inside.
-	 * @param {number} [resolution=128] - The geometrix resolution of the skybox.
+	 * @param {number} [resolution=128] - The geometry resolution of the skybox.
 	 */
 	constructor( map, height, radius, resolution = 128 ) {
 

+ 1 - 1
examples/jsm/objects/ShadowMesh.js

@@ -27,7 +27,7 @@ const _shadowMatrix = new Matrix4();
 class ShadowMesh extends Mesh {
 
 	/**
-	 * Constructs a new shadw mesh.
+	 * Constructs a new shadow mesh.
 	 *
 	 * @param {Mesh} mesh - The shadow-casting reference mesh.
 	 */

+ 1 - 1
examples/jsm/physics/AmmoPhysics.js

@@ -305,7 +305,7 @@ async function AmmoPhysics() {
 		addMesh: addMesh,
 
 		/**
-		 * Set the position of the given mesh which is part of the pyhsics simulation. Calling this
+		 * Set the position of the given mesh which is part of the physics simulation. Calling this
 		 * method will reset the current simulated velocity of the mesh.
 		 *
 		 * @method

+ 1 - 1
examples/jsm/physics/JoltPhysics.js

@@ -309,7 +309,7 @@ async function JoltPhysics() {
 		addMesh: addMesh,
 
 		/**
-		 * Set the position of the given mesh which is part of the pyhsics simulation. Calling this
+		 * Set the position of the given mesh which is part of the physics simulation. Calling this
 		 * method will reset the current simulated velocity of the mesh.
 		 *
 		 * @method

+ 2 - 2
examples/jsm/physics/RapierPhysics.js

@@ -268,7 +268,7 @@ async function RapierPhysics() {
 		addMesh: addMesh,
 
 		/**
-		 * Set the position of the given mesh which is part of the pyhsics simulation. Calling this
+		 * Set the position of the given mesh which is part of the physics simulation. Calling this
 		 * method will reset the current simulated velocity of the mesh.
 		 *
 		 * @method
@@ -280,7 +280,7 @@ async function RapierPhysics() {
 		setMeshPosition: setMeshPosition,
 
 		/**
-		 * Set the velocity of the given mesh which is part of the pyhsics simulation.
+		 * Set the velocity of the given mesh which is part of the physics simulation.
 		 *
 		 * @method
 		 * @name RapierPhysics#setMeshVelocity

+ 2 - 2
examples/jsm/utils/BufferGeometryUtils.js

@@ -27,7 +27,7 @@ import {
  *
  * @param {BufferGeometry} geometry - The geometry to compute tangents for.
  * @param {Object} MikkTSpace - Instance of `examples/jsm/libs/mikktspace.module.js`, or `mikktspace` npm package.
- * Aawait `MikkTSpace.ready` before use.
+ * Await `MikkTSpace.ready` before use.
  * @param {boolean} [negateSign=true] - Whether to negate the sign component (.w) of each tangent.
  * Required for normal map conventions in some formats, including glTF.
  * @return {BufferGeometry} The updated geometry.
@@ -916,7 +916,7 @@ function toTrianglesDrawMode( geometry, drawMode ) {
  * will use the original `BufferGeometry`, not the morphed/skinned one, generating an incorrect result.
  * Using this function to create a shadow `Object3`D the `DecalGeometry` can be correctly generated).
  *
- * @param {Mesh|Line|Points} object - The 3D object tocompute morph attributes for.
+ * @param {Mesh|Line|Points} object - The 3D object to compute morph attributes for.
  * @return {Object} An object with original position/normal attributes and morphed ones.
  */
 function computeMorphedAttributes( object ) {

+ 1 - 1
examples/jsm/utils/SceneOptimizer.js

@@ -3,7 +3,7 @@ import * as THREE from 'three';
 /**
  * This class can be used to optimized scenes by converting
  * individual meshes into {@link BatchedMesh}. This component
- * is an experimental attempt to implment auto-batching in three.js.
+ * is an experimental attempt to implement auto-batching in three.js.
  */
 class SceneOptimizer {
 

+ 2 - 2
examples/jsm/utils/SceneUtils.js

@@ -50,7 +50,7 @@ function createMeshesFromInstancedMesh( instancedMesh ) {
 }
 
 /**
- * This function creates a mesh for each geoemtry-group of the given multi-material mesh and
+ * This function creates a mesh for each geometry-group of the given multi-material mesh and
  * adds it to a group.
  *
  * @param {Mesh} mesh - The multi-material mesh.
@@ -129,7 +129,7 @@ function createMeshesFromMultiMaterialMesh( mesh ) {
 
 /**
  * This function represents an alternative way to create 3D objects with multiple materials.
- * Normally, {@link BufferGeometry#groups} are used which might introdues issues e.g. when
+ * Normally, {@link BufferGeometry#groups} are used which might introduce issues e.g. when
  * exporting the object to a 3D format. This function accepts a geometry and an array of
  * materials and creates for each material a mesh that is added to a group.
  *

+ 1 - 1
examples/jsm/utils/SkeletonUtils.js

@@ -469,7 +469,7 @@ function parallelTraverse( a, b, callback ) {
  * @typedef {Object} module:SkeletonUtils~RetargetOptions
  * @property {boolean} [useFirstFramePosition=false] - Whether to use the position of the first frame or not.
  * @property {number} [fps] - The FPS of the clip.
- * @property {Object<string,string>} [names] - A dicionary for mapping target to source bone names.
+ * @property {Object<string,string>} [names] - A dictionary for mapping target to source bone names.
  * @property {function(string):string} [getBoneName] - A function for mapping bone names. Alternative to `names`.
  * @property {Array<number>} [trim] - Whether to trim the clip or not. If set the array should hold two values for the start and end.
  * @property {boolean} [preserveBoneMatrix=true] - Whether to preserve bone matrices or not.

+ 1 - 1
examples/jsm/webxr/ARButton.js

@@ -1,5 +1,5 @@
 /**
- * A utility class for creating a button that allows to initinate
+ * A utility class for creating a button that allows to initiate
  * immersive AR sessions based on WebXR. The button can be created
  * with a factory method and then appended ot the website's DOM.
  *

+ 1 - 1
examples/jsm/webxr/OculusHandModel.js

@@ -119,7 +119,7 @@ class OculusHandModel extends Object3D {
 	}
 
 	/**
-	 * Returns the pointer posiiton which is the position of the index finger tip.
+	 * Returns the pointer position which is the position of the index finger tip.
 	 *
 	 * @return {Vector3|null} The pointer position. Returns `null` if not index finger tip joint was found.
 	 */

+ 2 - 2
examples/jsm/webxr/OculusHandPointerModel.js

@@ -440,7 +440,7 @@ class OculusHandPointerModel extends Object3D {
 	}
 
 	/**
-	 * Perfoms an intersection test with the model's raycaster and the given object.
+	 * Performs an intersection test with the model's raycaster and the given object.
 	 *
 	 * @param {Object3D} object - The 3D object to check for intersection with the ray.
 	 * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants.
@@ -458,7 +458,7 @@ class OculusHandPointerModel extends Object3D {
 	}
 
 	/**
-	 * Perfoms an intersection test with the model's raycaster and the given objects.
+	 * Performs an intersection test with the model's raycaster and the given objects.
 	 *
 	 * @param {Array<Object3D>} objects - The 3D objects to check for intersection with the ray.
 	 * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants.

+ 2 - 2
examples/jsm/webxr/VRButton.js

@@ -1,5 +1,5 @@
 /**
- * A utility class for creating a button that allows to initinate
+ * A utility class for creating a button that allows to initiate
  * immersive VR sessions based on WebXR. The button can be created
  * with a factory method and then appended ot the website's DOM.
  *
@@ -227,7 +227,7 @@ class VRButton {
 
 	/**
 	 * Registers a `sessiongranted` event listener. When a session is granted, the {@link VRButton#xrSessionIsGranted}
-	 * flag will evaluate to `true`. This method is automtically called by the module itself so there
+	 * flag will evaluate to `true`. This method is automatically called by the module itself so there
 	 * should be no need to use it on app level.
 	 */
 	static registerSessionGrantedListener() {

+ 1 - 1
examples/jsm/webxr/XRButton.js

@@ -1,5 +1,5 @@
 /**
- * A utility class for creating a button that allows to initinate
+ * A utility class for creating a button that allows to initiate
  * immersive XR sessions based on WebXR. The button can be created
  * with a factory method and then appended ot the website's DOM.
  *

+ 1 - 1
examples/jsm/webxr/XRControllerModelFactory.js

@@ -239,7 +239,7 @@ function addAssetSceneToControllerModel( controllerModel, scene ) {
 }
 
 /**
- * Allows to create controller models for WebXR controllersthat can be added as a visual
+ * Allows to create controller models for WebXR controllers that can be added as a visual
  * representation to your scene. `XRControllerModelFactory` will automatically fetch controller
  * models that match what the user is holding as closely as possible. The models should be
  * attached to the object returned from getControllerGrip in order to match the orientation of

+ 1 - 1
examples/jsm/webxr/XREstimatedLight.js

@@ -161,7 +161,7 @@ export class XREstimatedLight extends Group {
 		this.add( this.lightProbe );
 
 		/**
-		 * Represents the primariy light from the XR environment.
+		 * Represents the primary light from the XR environment.
 		 *
 		 * @type {DirectionalLight}
 		 */

粤ICP备19079148号