Przeglądaj źródła

Node: typos (#30280)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 1 rok temu
rodzic
commit
b7e371075e

+ 1 - 1
src/loaders/nodes/NodeObjectLoader.js

@@ -35,7 +35,7 @@ class NodeObjectLoader extends ObjectLoader {
 		this.nodeMaterials = {};
 
 		/**
-		 * A reference for holdng the `nodes` JSON property.
+		 * A reference to hold the `nodes` JSON property.
 		 *
 		 * @private
 		 * @type {Object?}

+ 1 - 1
src/materials/nodes/MeshBasicNodeMaterial.js

@@ -85,7 +85,7 @@ class MeshBasicNodeMaterial extends NodeMaterial {
 	}
 
 	/**
-	 * This method must be overwriten since light maps are evaluated
+	 * This method must be overwritten since light maps are evaluated
 	 * with a special scaling factor for basic materials.
 	 *
 	 * @param {NodeBuilder} builder - The current node builder.

+ 1 - 1
src/materials/nodes/MeshPhysicalNodeMaterial.js

@@ -468,7 +468,7 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
 	/**
 	 * Setups the clearcoat normal node.
 	 *
-	 * @return {Node<vec3>} The clearcoat noraml.
+	 * @return {Node<vec3>} The clearcoat normal.
 	 */
 	setupClearcoatNormal() {
 

+ 2 - 2
src/materials/nodes/NodeMaterial.js

@@ -249,7 +249,7 @@ class NodeMaterial extends Material {
 		/**
 		 * This node property is intended for logic which modifies geometry data once or per animation step.
 		 * Apps usually place such logic randomly in initialization routines or in the animation loop.
-		 * `geometryNode` is intended as a dedicated API so there is an intended spot where goemetry modiciations
+		 * `geometryNode` is intended as a dedicated API so there is an intended spot where geometry modifications
 		 * can be implemented.
 		 *
 		 * The idea is to assign a `Fn` definition that holds the geometry modification logic. A typical example
@@ -636,7 +636,7 @@ class NodeMaterial extends Material {
 
 	/**
 	 * Setups the position node in view space. This method exists
-	 * so derived node materials can modifiy the implementation e.g. sprite materials.
+	 * so derived node materials can modify the implementation e.g. sprite materials.
 	 *
 	 * @param {NodeBuilder} builder - The current node builder.
 	 * @return {Node<vec3>} The position in view space.

+ 3 - 3
src/materials/nodes/VolumeNodeMaterial.js

@@ -13,7 +13,7 @@ import { Color } from '../../math/Color.js';
 /** @module VolumeNodeMaterial **/
 
 /**
- * Node material intended for volume rendering. The volumetic data are
+ * Node material intended for volume rendering. The volumetric data are
  * defined with an instance of {@link Data3DTexture}.
  *
  * @augments NodeMaterial
@@ -83,10 +83,10 @@ class VolumeNodeMaterial extends NodeMaterial {
 		 * The volume rendering of this material works by shooting rays
 		 * from the camera position through each fragment of the mesh's
 		 * surface and sample the inner volume in a raymarching fashion
-		 * mutiple times.
+		 * multiple times.
 		 *
 		 * This node can be used to assign a callback function of type `Fn`
-		 * that will be exexuted per sample. The callback receives the
+		 * that will be executed per sample. The callback receives the
 		 * texture, the sampled texture value as well as position on the surface
 		 * where the rays enters the volume. The last parameter is a color
 		 * that allows the callback to determine the final color.

+ 2 - 2
src/nodes/code/ScriptableNode.js

@@ -66,7 +66,7 @@ class Parameters {
 }
 
 /**
- * Defines the resouces (e.g. namespaces) of scriptable nodes.
+ * Defines the resources (e.g. namespaces) of scriptable nodes.
  *
  * @type {Resources}
  */
@@ -287,7 +287,7 @@ class ScriptableNode extends Node {
 	}
 
 	/**
-	 * Returns a paramater for the given name
+	 * Returns a parameter for the given name
 	 *
 	 * @param {String} name - The name of the parameter.
 	 * @return {ScriptableValueNode} The node value.

+ 3 - 3
src/nodes/gpgpu/AtomicFunctionNode.js

@@ -5,10 +5,10 @@ import { nodeProxy } from '../tsl/TSLCore.js';
 
 /**
  * `AtomicFunctionNode` represents any function that can operate on atomic variable types
- * within a shader. In an atomic function, any modifiation to an atomic variable will
- * occur as an indivisble step with a defined order relative to other modifications.
+ * within a shader. In an atomic function, any modification to an atomic variable will
+ * occur as an indivisible step with a defined order relative to other modifications.
  * Accordingly, even if multiple atomic functions are modifying an atomic variable at once
- * atomic operations will not interfer with each other.
+ * atomic operations will not interfere with each other.
  *
  * This node can only be used with a WebGPU backend.
  *

+ 1 - 1
src/nodes/gpgpu/WorkgroupInfoNode.js

@@ -58,7 +58,7 @@ class WorkgroupInfoElementNode extends ArrayElementNode {
 /**
  * A node allowing the user to create a 'workgroup' scoped buffer within the
  * context of a compute shader. Typically, workgroup scoped buffers are
- * created to hold data that is transfered from a global storage scope into
+ * created to hold data that is transferred from a global storage scope into
  * a local workgroup scope. For invocations within a workgroup, data
  * access speeds on 'workgroup' scoped buffers can be significantly faster
  * than similar access operations on globally accessible storage buffers.

+ 1 - 1
src/renderers/common/Animation.js

@@ -45,7 +45,7 @@ class Animation {
 		this._animationLoop = null;
 
 		/**
-		 * The requestId whic is returned from the `requestAnimationFrame()` call.
+		 * The requestId which is returned from the `requestAnimationFrame()` call.
 		 * Can be used to cancel the stop the animation loop.
 		 *
 		 * @type {Number?}

+ 1 - 1
src/renderers/common/BufferUtils.js

@@ -4,7 +4,7 @@ import { GPU_CHUNK_BYTES } from './Constants.js';
 
 /**
  * This function is usually called with the length in bytes of an array buffer.
- * It returns an padded value whic ensure chunk size alignment according to STD140 layout.
+ * It returns an padded value which ensure chunk size alignment according to STD140 layout.
  *
  * @function
  * @param {Number} floatLength - The buffer length.

+ 1 - 1
src/renderers/common/BundleGroup.js

@@ -1,7 +1,7 @@
 import { Group } from '../../objects/Group.js';
 
 /**
- * A specialized group which eanbles applications access to the
+ * A specialized group which enables applications access to the
  * Render Bundle API of WebGPU. The group with all its descendant nodes
  * are considered as one render bundle and processed as such by
  * the renderer.

+ 2 - 2
src/renderers/common/Geometries.js

@@ -9,7 +9,7 @@ import { Uint16BufferAttribute, Uint32BufferAttribute } from '../../core/BufferA
  * @private
  * @function
  * @param {Array<Number>} array - The array to test.
- * @return {Booolean} Whether the given array has values that require an Uint32 array type or not.
+ * @return {Boolean} Whether the given array has values that require an Uint32 array type or not.
  */
 function arrayNeedsUint32( array ) {
 
@@ -31,7 +31,7 @@ function arrayNeedsUint32( array ) {
  * @private
  * @function
  * @param {BufferGeometry} geometry - The geometry.
- * @return {Number} The versio.
+ * @return {Number} The version.
  */
 function getWireframeVersion( geometry ) {
 

+ 2 - 2
src/renderers/common/Pipelines.js

@@ -55,7 +55,7 @@ class Pipelines extends DataMap {
 
 		/**
 		 * This dictionary maintains for each shader stage type (vertex,
-		 * fragment and compute) the progammable stage objects which
+		 * fragment and compute) the programmable stage objects which
 		 * represent the actual shader code.
 		 *
 		 * @type {Object<String,Map>}
@@ -419,7 +419,7 @@ class Pipelines extends DataMap {
 	 * Releases the shader program.
 	 *
 	 * @private
-	 * @param {Object} program - The shdaer program to release.
+	 * @param {Object} program - The shader program to release.
 	 */
 	_releaseProgram( program ) {
 

+ 2 - 2
src/renderers/common/RenderObject.js

@@ -336,7 +336,7 @@ class RenderObject {
 	/**
 	 * Returns the node builder state of this render object.
 	 *
-	 * @return {NodeBuilderState} The node buider state.
+	 * @return {NodeBuilderState} The node builder state.
 	 */
 	getNodeBuilderState() {
 
@@ -696,7 +696,7 @@ class RenderObject {
 	 * `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect
 	 * a need for a refresh due to material, geometry or object related value changes.
 	 *
-	 * TODO: Investigate if it's possible to merge boths steps so there is only a single place
+	 * TODO: Investigate if it's possible to merge both steps so there is only a single place
 	 * that performs the 'needsUpdate' check.
 	 *
 	 * @type {Boolean}

+ 4 - 4
src/renderers/common/Renderer.js

@@ -353,7 +353,7 @@ class Renderer {
 		this._objects = null;
 
 		/**
-		 * A reference to a renderer module for managing render and cmopute pipelines.
+		 * A reference to a renderer module for managing render and compute pipelines.
 		 *
 		 * @private
 		 * @type {Pipelines?}
@@ -546,7 +546,7 @@ class Renderer {
 
 		/**
 		 * Next to `_renderObjectFunction()`, this function provides another hook
-		 * for influening the render process of a render object. It is meant for internal
+		 * for influencing the render process of a render object. It is meant for internal
 		 * use and only relevant for `compileAsync()` right now. Instead of using
 		 * the default logic of `_renderObjectDirect()` which actually draws the render object,
 		 * a different function might be used which performs no draw but just the node
@@ -656,7 +656,7 @@ class Renderer {
 		 * @typedef {Object} DebugConfig
 		 * @property {Boolean} checkShaderErrors - Whether shader errors should be checked or not.
 		 * @property {Function} onShaderError - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now.
-		 * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camerea and 3D object.
+		 * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camera and 3D object.
 		 */
 
 		/**
@@ -1433,7 +1433,7 @@ class Renderer {
 	 *
 	 * @async
 	 * @param {Function} callback - The application's animation loop.
-	 * @return {Promise} A Promise that resolves when the set has been exeucted.
+	 * @return {Promise} A Promise that resolves when the set has been executed.
 	 */
 	async setAnimationLoop( callback ) {
 

+ 1 - 1
src/renderers/common/StorageBufferAttribute.js

@@ -22,7 +22,7 @@ class StorageBufferAttribute extends BufferAttribute {
 	 * @param {Number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument.
 	 * The subsequent parameters are then obsolete.
 	 * @param {Number} itemSize - The item size.
-	 * @param {TypedArray.contructor} [typeClass=Float32Array] - A typed array constructor.
+	 * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor.
 	 */
 	constructor( count, itemSize, typeClass = Float32Array ) {
 

+ 1 - 1
src/renderers/common/StorageInstancedBufferAttribute.js

@@ -22,7 +22,7 @@ class StorageInstancedBufferAttribute extends InstancedBufferAttribute {
 	 * @param {Number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument.
 	 * The subsequent parameters are then obsolete.
 	 * @param {Number} itemSize - The item size.
-	 * @param {TypedArray.contructor} [typeClass=Float32Array] - A typed array constructor.
+	 * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor.
 	 */
 	constructor( count, itemSize, typeClass = Float32Array ) {
 

+ 2 - 2
src/renderers/common/nodes/NodeLibrary.js

@@ -98,7 +98,7 @@ class NodeLibrary {
 	/**
 	 * Returns a node material class definition for a material type.
 	 *
-	 * @param {Sring} materialType - The material type.
+	 * @param {String} materialType - The material type.
 	 * @return {NodeMaterial.constructor?} The node material class definition. Returns `null` if no node material is found.
 	 */
 	getMaterialNodeClass( materialType ) {
@@ -111,7 +111,7 @@ class NodeLibrary {
 	 * Adds a node material class definition for a given material type.
 	 *
 	 * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition.
-	 * @param {Sring} materialClassType - The material type.
+	 * @param {String} materialClassType - The material type.
 	 */
 	addMaterial( materialNodeClass, materialClassType ) {
 

+ 1 - 1
src/renderers/common/nodes/Nodes.js

@@ -791,7 +791,7 @@ class Nodes extends DataMap {
 	}
 
 	/**
-	 * Frees the intenral resources.
+	 * Frees the internal resources.
 	 */
 	dispose() {
 

+ 3 - 3
src/renderers/webgl-fallback/WebGLBackend.js

@@ -2082,11 +2082,11 @@ class WebGLBackend extends Backend {
 	}
 
 	/**
-	 * Creates a tranform feedback from the given transform buffers.
+	 * Creates a transform feedback from the given transform buffers.
 	 *
 	 * @private
-	 * @param {Array<DualAttributeData>} transformBuffers - The tranform buffers.
-	 * @return {WebGLTransformFeedback} The tranform feedback.
+	 * @param {Array<DualAttributeData>} transformBuffers - The transform buffers.
+	 * @return {WebGLTransformFeedback} The transform feedback.
 	 */
 	_getTransformFeedback( transformBuffers ) {
 

+ 6 - 6
src/renderers/webgl-fallback/utils/WebGLState.js

@@ -271,11 +271,11 @@ class WebGLState {
 	 *
 	 * @param {Number} blending - The blending type.
 	 * @param {Number} blendEquation - The blending equation.
-	 * @param {Number} blendSrc - Only relevant for custuom blending. The RGB source blending factor.
-	 * @param {Number} blendDst - Only relevant for custuom blending. The RGB destination blending factor.
-	 * @param {Number} blendEquationAlpha - Only relevant for custuom blending. The blending equation for alpha.
-	 * @param {Number} blendSrcAlpha - Only relevant for custuom blending. The alpha source blending factor.
-	 * @param {Number} blendDstAlpha - Only relevant for custuom blending. The alpha destination blending factor.
+	 * @param {Number} blendSrc - Only relevant for custom blending. The RGB source blending factor.
+	 * @param {Number} blendDst - Only relevant for custom blending. The RGB destination blending factor.
+	 * @param {Number} blendEquationAlpha - Only relevant for custom blending. The blending equation for alpha.
+	 * @param {Number} blendSrcAlpha - Only relevant for custom blending. The alpha source blending factor.
+	 * @param {Number} blendDstAlpha - Only relevant for custom blending. The alpha destination blending factor.
 	 * @param {Boolean} premultipliedAlpha - Whether premultiplied alpha is enabled or not.
 	 */
 	setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha ) {
@@ -565,7 +565,7 @@ class WebGLState {
 	}
 
 	/**
-	 * Specifies whether stencol values can be written when rendering
+	 * Specifies whether stencil values can be written when rendering
 	 * into a framebuffer or not.
 	 *
 	 * This method caches the state so `gl.stencilMask()` is only

+ 2 - 2
src/renderers/webgl-fallback/utils/WebGLTextureUtils.js

@@ -134,7 +134,7 @@ class WebGLTextureUtils {
 	/**
 	 * Returns the native texture type for the given texture.
 	 *
-	 * @param {String?} internalFormatName - The internal format name. When `null`, the intenral format is derived from the subsequent parameters.
+	 * @param {String?} internalFormatName - The internal format name. When `null`, the internal format is derived from the subsequent parameters.
 	 * @param {GLenum} glFormat - The WebGL format.
 	 * @param {GLenum} glType - The WebGL type.
 	 * @param {String} colorSpace - The texture's color space.
@@ -915,7 +915,7 @@ class WebGLTextureUtils {
 	/**
 	 * SetupS storage for internal depth/stencil buffers and bind to correct framebuffer.
 	 *
-	 * @param {WebGLRenderbuffer} renderbuffer - The rendner buffer.
+	 * @param {WebGLRenderbuffer} renderbuffer - The render buffer.
 	 * @param {RenderContext} renderContext - The render context.
 	 */
 	setupRenderBufferStorage( renderbuffer, renderContext ) {

+ 1 - 1
src/renderers/webgpu/WebGPUBackend.js

@@ -37,7 +37,7 @@ class WebGPUBackend extends Backend {
 	 * @param {Boolean} [parameters.trackTimestamp=false] - Whether to track timestamps with a Timestamp Query API or not.
 	 * @param {String} [parameters.powerPreference=undefined] - The power preference.
 	 * @param {Object} [parameters.requiredLimits=undefined] - Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits.
-	 * @param {GPUDevice} [parameters.device=undefined] - If there is an exisitng GPU device on app level, it can be passed to the renderer as a parameter.
+	 * @param {GPUDevice} [parameters.device=undefined] - If there is an existing GPU device on app level, it can be passed to the renderer as a parameter.
 	 */
 	constructor( parameters = {} ) {
 

+ 1 - 1
src/renderers/webgpu/nodes/WGSLNodeBuilder.js

@@ -195,7 +195,7 @@ class WGSLNodeBuilder extends NodeBuilder {
 		this.builtins = {};
 
 		/**
-		 * A dictionary thath holds for each shader stage a Set of directives.
+		 * A dictionary that holds for each shader stage a Set of directives.
 		 *
 		 * @type {Object<String,Set<String>>}
 		 */

粤ICP备19079148号