Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/loaders/nodes/NodeObjectLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?}
Expand Down
2 changes: 1 addition & 1 deletion src/materials/nodes/MeshBasicNodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/materials/nodes/MeshPhysicalNodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
4 changes: 2 additions & 2 deletions src/materials/nodes/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/materials/nodes/VolumeNodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/code/ScriptableNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/nodes/gpgpu/AtomicFunctionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/gpgpu/WorkgroupInfoNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?}
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/BufferUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/BundleGroup.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/common/Geometries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

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

Expand Down
4 changes: 2 additions & 2 deletions src/renderers/common/Pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>}
Expand Down Expand Up @@ -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 ) {

Expand Down
4 changes: 2 additions & 2 deletions src/renderers/common/RenderObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down Expand Up @@ -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}
Expand Down
8 changes: 4 additions & 4 deletions src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/

/**
Expand Down Expand Up @@ -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 ) {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/StorageBufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/StorageInstancedBufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

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

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/nodes/Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ class Nodes extends DataMap {
}

/**
* Frees the intenral resources.
* Frees the internal resources.
*/
dispose() {

Expand Down
6 changes: 3 additions & 3 deletions src/renderers/webgl-fallback/WebGLBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down
12 changes: 6 additions & 6 deletions src/renderers/webgl-fallback/utils/WebGLState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/webgl-fallback/utils/WebGLTextureUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgpu/WebGPUBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {} ) {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgpu/nodes/WGSLNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>>}
*/
Expand Down
Loading