Skip to content

Commit

Permalink
Doc: fix typos (#30013)
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 Dec 2, 2024
1 parent 09add0e commit 036e03e
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/nodes/code/ScriptableValueNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ScriptableValueNode extends Node {
this._cache = null;

this.inputType = null;
this.outpuType = null;
this.outputType = null;

this.events = new EventDispatcher();

Expand Down
8 changes: 4 additions & 4 deletions src/nodes/core/AssignNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

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

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/core/InputNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/nodes/core/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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() {

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/core/NodeAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/core/NodeFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class NodeFrame {
/**
* A reference to the current 3D object.
*
* @type {Obbject3D?}
* @type {Object3D?}
* @default null
*/
this.object = null;
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/core/TempNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down
6 changes: 3 additions & 3 deletions src/nodes/functions/PhysicalLightingModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
Expand Down Expand Up @@ -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 } ) => {
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/lighting/LightsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/tsl/TSLBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(), ...
Expand Down

0 comments on commit 036e03e

Please sign in to comment.