Sfoglia il codice sorgente

Doc: fix typos (#30013)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 1 anno fa
parent
commit
036e03e72a

+ 1 - 1
src/nodes/code/ScriptableValueNode.js

@@ -20,7 +20,7 @@ class ScriptableValueNode extends Node {
 		this._cache = null;
 
 		this.inputType = null;
-		this.outpuType = null;
+		this.outputType = null;
 
 		this.events = new EventDispatcher();
 

+ 4 - 4
src/nodes/core/AssignNode.js

@@ -43,10 +43,10 @@ class AssignNode extends TempNode {
 	}
 
 	/**
-	 * Whether this node is used more than once in contextx of other nodes. This method
+	 * Whether this node is used more than once in context of other nodes. This method
 	 * is overwritten since it always returns `false` (assigns are unique).
 	 *
-	 * @return {Boolean} A flag that inidiactes if there is more than one dependency to other nodes. Always `false`.
+	 * @return {Boolean} A flag that indicates if there is more than one dependency to other nodes. Always `false`.
 	 */
 	hasDependencies() {
 
@@ -61,11 +61,11 @@ class AssignNode extends TempNode {
 	}
 
 	/**
-	 * Whehter a split is required when assigning source to target. This can happen when the component length of
+	 * Whether a split is required when assigning source to target. This can happen when the component length of
 	 * target and source data type does not match.
 	 *
 	 * @param {NodeBuilder} builder - The current node builder.
-	 * @return {Boolean} Whehter a split is required when assigning source to target.
+	 * @return {Boolean} Whether a split is required when assigning source to target.
 	 */
 	needsSplitAssign( builder ) {
 

+ 1 - 1
src/nodes/core/InputNode.js

@@ -66,7 +66,7 @@ class InputNode extends Node {
 	 * Returns the input type of the node which is by default the node type. Derived modules
 	 * might overwrite this method and use a fixed type or compute one analytically.
 	 *
-	 * A typical example for differnt input and node types are textures. The input type of a
+	 * A typical example for different input and node types are textures. The input type of a
 	 * normal RGBA texture is `texture` whereas its node type is `vec4`.
 	 *
 	 * @param {NodeBuilder} builder - The current node builder.

+ 6 - 6
src/nodes/core/Node.js

@@ -231,7 +231,7 @@ class Node extends EventDispatcher {
 
 	/**
 	 * By default this method returns the value of the {@link Node#global} flag. This method
-	 * can be overwritten in dervied classes if an analytical way is required to determine the
+	 * can be overwritten in derived classes if an analytical way is required to determine the
 	 * global status.
 	 *
 	 * @param {NodeBuilder} builder - The current node builder.
@@ -295,7 +295,7 @@ class Node extends EventDispatcher {
 	/**
 	 * Returns the cache key for this node.
 	 *
-	 * @param {Boolean} [force=false] - When set to `true`, a recompuatation of the cache key is forced.
+	 * @param {Boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced.
 	 * @return {Number} The cache key of the node.
 	 */
 	getCacheKey( force = false ) {
@@ -410,7 +410,7 @@ class Node extends EventDispatcher {
 
 	/**
 	 * This method is used during the build process of a node and ensures
-	 * equal nodes are not built multiple times but just once. For exmaple if
+	 * equal nodes are not built multiple times but just once. For example if
 	 * `attribute( 'uv' )` is used multiple times by the user, the build
 	 * process makes sure to process just the first node.
 	 *
@@ -646,7 +646,7 @@ class Node extends EventDispatcher {
 	/**
 	 * Returns the child nodes as a JSON object.
 	 *
-	 * @return {Object} The serialiezed child objects as JSON.
+	 * @return {Object} The serialized child objects as JSON.
 	 */
 	getSerializeChildren() {
 
@@ -694,7 +694,7 @@ class Node extends EventDispatcher {
 	}
 
 	/**
-	 * Deerializes the node from the given JSON.
+	 * Deserializes the node from the given JSON.
 	 *
 	 * @param {Object} json - The JSON object.
 	 */
@@ -747,7 +747,7 @@ class Node extends EventDispatcher {
 	}
 
 	/**
-	 * Seralizes the node into the three.js JSON Object/Scene format.
+	 * Serializes the node into the three.js JSON Object/Scene format.
 	 *
 	 * @param {Object?} meta - An optional JSON object that already holds serialized data from other scene objects.
 	 * @return {Object} The serialized node.

+ 2 - 2
src/nodes/core/NodeAttribute.js

@@ -11,7 +11,7 @@ class NodeAttribute {
 	 *
 	 * @param {String} name - The name of the attribute.
 	 * @param {String} type - The type of the attribute.
-	 * @param {Node?} node - An optinal reference to the node.
+	 * @param {Node?} node - An optional reference to the node.
 	 */
 	constructor( name, type, node = null ) {
 
@@ -39,7 +39,7 @@ class NodeAttribute {
 		this.type = type;
 
 		/**
-		 * An optinal reference to the node.
+		 * An optional reference to the node.
 		 *
 		 * @type {Node?}
 		 * @default null

+ 1 - 1
src/nodes/core/NodeFrame.js

@@ -93,7 +93,7 @@ class NodeFrame {
 		/**
 		 * A reference to the current 3D object.
 		 *
-		 * @type {Obbject3D?}
+		 * @type {Object3D?}
 		 * @default null
 		 */
 		this.object = null;

+ 1 - 1
src/nodes/core/TempNode.js

@@ -39,7 +39,7 @@ class TempNode extends Node {
 	/**
 	 * Whether this node is used more than once in context of other nodes.
 	 *
-	 * @return {Boolean} A flag that inidiactes if there is more than one dependency to other nodes.
+	 * @return {Boolean} A flag that indicates if there is more than one dependency to other nodes.
 	 */
 	hasDependencies( builder ) {
 

+ 3 - 3
src/nodes/functions/PhysicalLightingModel.js

@@ -31,7 +31,7 @@ const getVolumeTransmissionRay = /*@__PURE__*/ Fn( ( [ n, v, thickness, ior, mod
 	// Direction of refracted light.
 	const refractionVector = vec3( refract( v.negate(), normalize( n ), div( 1.0, ior ) ) );
 
-	// Compute rotation-independant scaling of the model matrix.
+	// Compute rotation-independent scaling of the model matrix.
 	const modelScale = vec3(
 		length( modelMatrix[ 0 ].xyz ),
 		length( modelMatrix[ 1 ].xyz ),
@@ -311,7 +311,7 @@ const evalIridescence = /*@__PURE__*/ Fn( ( { outsideIOR, eta2, cosTheta1, thinF
 //	Sheen
 //
 
-// This is a curve-fit approxmation to the "Charlie sheen" BRDF integrated over the hemisphere from
+// This is a curve-fit approximation to the "Charlie sheen" BRDF integrated over the hemisphere from
 // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF". The analysis can be found
 // in the Sheen section of https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing
 const IBLSheenBRDF = /*@__PURE__*/ Fn( ( { normal, viewDir, roughness } ) => {
@@ -432,7 +432,7 @@ class PhysicalLightingModel extends LightingModel {
 	}
 
 	// Fdez-Agüera's "Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting"
-	// Approximates multiscattering in order to preserve energy.
+	// Approximates multi-scattering in order to preserve energy.
 	// http://www.jcgt.org/published/0008/01/03/
 
 	computeMultiscattering( singleScatter, multiScatter, specularF90 ) {

+ 1 - 1
src/nodes/lighting/LightsNode.js

@@ -106,7 +106,7 @@ class LightsNode extends Node {
 
 				if ( previousLightNodes !== null ) {
 
-					lightNode = getLightNodeById( light.id, previousLightNodes ); // resuse existing light node
+					lightNode = getLightNodeById( light.id, previousLightNodes ); // reuse existing light node
 
 				}
 

+ 1 - 1
src/nodes/tsl/TSLBase.js

@@ -3,7 +3,7 @@
 
 export * from './TSLCore.js'; // float(), vec2(), vec3(), vec4(), mat3(), mat4(), Fn(), If(), element(), nodeObject(), nodeProxy(), ...
 export * from '../core/UniformNode.js'; // uniform()
-export * from '../core/PropertyNode.js'; // property()  <-> TODO: Seperate Material Properties in other file
+export * from '../core/PropertyNode.js'; // property()  <-> TODO: Separate Material Properties in other file
 export * from '../core/AssignNode.js'; // .assign()
 export * from '../code/FunctionCallNode.js'; // .call()
 export * from '../math/OperatorNode.js'; // .add(), .sub(), ...

粤ICP备19079148号