From bbe471084c35c65491e6f0c251ade8c2271802d9 Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Sun, 16 Oct 2022 17:06:39 +0100 Subject: [PATCH] [FIX] Various spelling mistakes --- src/core/preprocessor.js | 4 ++-- src/core/tracing.js | 2 +- src/platform/graphics/shader-processor.js | 4 ++-- src/platform/graphics/webgpu/webgpu-graphics-device.js | 2 +- src/platform/graphics/webgpu/webgpu-texture.js | 2 +- src/scene/frame-graph.js | 2 +- src/scene/renderer/forward-renderer.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/preprocessor.js b/src/core/preprocessor.js index 0b59e6acb10..d067e12d521 100644 --- a/src/core/preprocessor.js +++ b/src/core/preprocessor.js @@ -38,7 +38,7 @@ const INVALID = /[><=|&+-]/g; */ class Preprocessor { /** - * Run c-like proprocessor on the source code, and resolves the code based on the defines and ifdefs + * Run c-like preprocessor on the source code, and resolves the code based on the defines and ifdefs * * @param {string} source - The source code to work on. * @returns {string|null} Returns preprocessed source code, or null in case of error. @@ -53,7 +53,7 @@ class Preprocessor { .map(line => line.trimEnd()) .join('\n'); - // proprocess defines / ifdefs .. + // preprocess defines / ifdefs .. source = this._preprocess(source); if (source !== null) { diff --git a/src/core/tracing.js b/src/core/tracing.js index d0a7bcbb450..ac567da78b6 100644 --- a/src/core/tracing.js +++ b/src/core/tracing.js @@ -45,7 +45,7 @@ class Tracing { /** * Test if the trace channel is enabled. * - * @param {string} channel - Name of the trace channnel. + * @param {string} channel - Name of the trace channel. * @returns {boolean} - True if the trace channel is enabled. */ static get(channel) { diff --git a/src/platform/graphics/shader-processor.js b/src/platform/graphics/shader-processor.js index 80e78b3cdb3..736fef3562e 100644 --- a/src/platform/graphics/shader-processor.js +++ b/src/platform/graphics/shader-processor.js @@ -218,7 +218,7 @@ class ShaderProcessor { // add textures uniforms const textureFormats = []; uniformLinesSamplers.forEach((uniform) => { - // unmached texture uniforms go to mesh block + // unmatched texture uniforms go to mesh block if (!processingOptions.hasTexture(uniform.name)) { // TODO: we could optimize visibility to only stages that use any of the data @@ -302,7 +302,7 @@ class ShaderProcessor { const location = semanticToLocation[semantic]; Debug.assert(!usedLocations.hasOwnProperty(location), - `WARNING: Two vertex attribues are mapped to the same location in a shader: ${usedLocations[location]} and ${semantic}`); + `WARNING: Two vertex attributes are mapped to the same location in a shader: ${usedLocations[location]} and ${semantic}`); usedLocations[location] = semantic; // generates: 'layout(location = 0) in vec4 position;' diff --git a/src/platform/graphics/webgpu/webgpu-graphics-device.js b/src/platform/graphics/webgpu/webgpu-graphics-device.js index 9fc8a38cf2d..9af5bd78f56 100644 --- a/src/platform/graphics/webgpu/webgpu-graphics-device.js +++ b/src/platform/graphics/webgpu/webgpu-graphics-device.js @@ -22,7 +22,7 @@ import { WebgpuRenderState } from './webgpu-render-state.js'; class WebgpuGraphicsDevice extends GraphicsDevice { /** - * The render target represenging the main framebuffer. + * The render target representing the main framebuffer. * * @type {RenderTarget} */ diff --git a/src/platform/graphics/webgpu/webgpu-texture.js b/src/platform/graphics/webgpu/webgpu-texture.js index 2022eb8df1d..0ee95febd1a 100644 --- a/src/platform/graphics/webgpu/webgpu-texture.js +++ b/src/platform/graphics/webgpu/webgpu-texture.js @@ -150,7 +150,7 @@ class WebgpuTexture { } else { - Debug.error('Unsuported texture soruce data', mipObject); + Debug.error('Unsupported texture source data', mipObject); } } } diff --git a/src/scene/frame-graph.js b/src/scene/frame-graph.js index e1201027f7d..2fc881dfa84 100644 --- a/src/scene/frame-graph.js +++ b/src/scene/frame-graph.js @@ -82,7 +82,7 @@ class FrameGraph { if (thisTexture?.cubemap) { - // if previous pass used the same cubemap texture, it does not need mimaps generated + // if previous pass used the same cubemap texture, it does not need mipmaps generated if (lastCubeTexture === thisTexture) { lastCubeRenderPass.colorOps.mipmaps = false; } diff --git a/src/scene/renderer/forward-renderer.js b/src/scene/renderer/forward-renderer.js index 18159f5912b..b74a0a26a12 100644 --- a/src/scene/renderer/forward-renderer.js +++ b/src/scene/renderer/forward-renderer.js @@ -471,7 +471,7 @@ class ForwardRenderer { /** * Set up the viewport and the scissor for camera rendering. * - * @param {Camera} camera - The camera containing the viewport infomation. + * @param {Camera} camera - The camera containing the viewport information. * @param {RenderTarget} [renderTarget] - The render target. NULL for the default one. */ setupViewport(camera, renderTarget) {