diff --git a/buildSystem.md b/buildSystem.md index e47eda3ec55..72867c79655 100644 --- a/buildSystem.md +++ b/buildSystem.md @@ -911,7 +911,7 @@ For example: npm run test:visualization -- -i "webgl2" -t "Particle subemitters" ``` -## Changlog +## Changelog The changelog is generated automatically based on a script in the ./scripts/ directory and the `changelog.json` file located in the `.build` directory. It is generated on every npm publish (once a week). @@ -957,7 +957,7 @@ This is an example of the config structure: } ``` -Version definition can either be a complete version (i.e. `5.0.0-rc.6`) or one of the versiuon modifiers of `npm version`: +Version definition can either be a complete version (i.e. `5.0.0-rc.6`) or one of the version modifiers of `npm version`: ` major | minor | patch | prerelease ` diff --git a/packages/dev/core/src/Animations/runtimeAnimation.ts b/packages/dev/core/src/Animations/runtimeAnimation.ts index dcd9f40e81b..78dffcd1c34 100644 --- a/packages/dev/core/src/Animations/runtimeAnimation.ts +++ b/packages/dev/core/src/Animations/runtimeAnimation.ts @@ -424,7 +424,7 @@ export class RuntimeAnimation { } /** - * Gets the loop pmode of the runtime animation + * Gets the loop mode of the runtime animation * @returns Loop Mode */ private _getCorrectLoopMode(): number | undefined { diff --git a/packages/dev/core/src/Audio/audioSceneComponent.ts b/packages/dev/core/src/Audio/audioSceneComponent.ts index 5c0306aeb0b..4c85b3af385 100644 --- a/packages/dev/core/src/Audio/audioSceneComponent.ts +++ b/packages/dev/core/src/Audio/audioSceneComponent.ts @@ -285,7 +285,7 @@ export class AudioSceneComponent implements ISceneSerializableComponent { private static _CameraDirection = new Vector3(0, 0, -1); /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_AUDIO; diff --git a/packages/dev/core/src/Behaviors/Cameras/framingBehavior.ts b/packages/dev/core/src/Behaviors/Cameras/framingBehavior.ts index 39f1ae9e13c..daa02270eb5 100644 --- a/packages/dev/core/src/Behaviors/Cameras/framingBehavior.ts +++ b/packages/dev/core/src/Behaviors/Cameras/framingBehavior.ts @@ -448,7 +448,7 @@ export class FramingBehavior implements Behavior { this._betaTransition = Animation.CreateAnimation("beta", Animation.ANIMATIONTYPE_FLOAT, 60, FramingBehavior.EasingFunction); } - const animatabe = Animation.TransitionTo( + const animatable = Animation.TransitionTo( "beta", defaultBeta, this._attachedCamera, @@ -462,8 +462,8 @@ export class FramingBehavior implements Behavior { } ); - if (animatabe) { - this._animatables.push(animatabe); + if (animatable) { + this._animatables.push(animatable); } } } diff --git a/packages/dev/core/src/Behaviors/Meshes/baseSixDofDragBehavior.ts b/packages/dev/core/src/Behaviors/Meshes/baseSixDofDragBehavior.ts index a62e133fa06..b2ff0954d11 100644 --- a/packages/dev/core/src/Behaviors/Meshes/baseSixDofDragBehavior.ts +++ b/packages/dev/core/src/Behaviors/Meshes/baseSixDofDragBehavior.ts @@ -432,7 +432,7 @@ export class BaseSixDofDragBehavior implements Behavior { this.onDragObservable.notifyObservers({ delta: this._tmpVector, position: virtualMeshesInfo.pivotMesh.position, pickInfo: pointerInfo.pickInfo }); - // Notify herited methods and observables + // Notify inherited methods and observables this._targetDrag(this._tmpVector, this._tmpQuaternion, pointerId); virtualMeshesInfo.lastDragPosition.copyFrom(virtualMeshesInfo.dragMesh.absolutePosition); @@ -452,15 +452,15 @@ export class BaseSixDofDragBehavior implements Behavior { // eslint-disable-next-line @typescript-eslint/no-unused-vars protected _targetDragStart(worldPosition: Vector3, worldRotation: Quaternion, pointerId: number) { - // Herited classes can override that + // Inherited classes can override that } protected _targetDrag(worldDeltaPosition: Vector3, worldDeltaRotation: Quaternion, pointerId: number) { - // Herited classes can override that + // Inherited classes can override that } protected _targetDragEnd(pointerId: number) { - // Herited classes can override that + // Inherited classes can override that } protected _reattachCameraControls() { diff --git a/packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts b/packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts index 0b527e963b4..9fe3ff83145 100644 --- a/packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts +++ b/packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts @@ -37,7 +37,7 @@ export class PointerDragBehavior implements Behavior { */ public maxDragAngle = 0; /** - * Butttons that can be used to initiate a drag + * Buttons that can be used to initiate a drag */ public dragButtons = [0, 1, 2]; /** @@ -412,7 +412,7 @@ export class PointerDragBehavior implements Behavior { this.onDragStartObservable.notifyObservers({ dragPlanePoint: pickedPoint, pointerId: this.currentDraggingPointerId, pointerInfo: this._activePointerInfo }); this._targetPosition.copyFrom(this.attachedNode.getAbsolutePosition()); - // Detatch camera controls + // Detach camera controls if (this.detachCameraControls && this._scene.activeCamera && this._scene.activeCamera.inputs && !this._scene.activeCamera.leftCamera) { if (this._scene.activeCamera.inputs.attachedToElement) { this._scene.activeCamera.detachControl(); @@ -476,7 +476,7 @@ export class PointerDragBehavior implements Behavior { // Calculate angle between plane normal and ray let angle = Math.acos(Vector3.Dot(this._dragPlane.forward, ray.direction)); - // Correct if ray is casted from oposite side + // Correct if ray is casted from opposite side if (angle > Math.PI / 2) { angle = Math.PI - angle; } diff --git a/packages/dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts b/packages/dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts index 830c7225594..54930772ca3 100644 --- a/packages/dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts +++ b/packages/dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts @@ -227,7 +227,7 @@ export class SixDofDragBehavior extends BaseSixDofDragBehavior { protected _targetDragEnd() { if (this.currentDraggingPointerIds.length === 1) { - // We still have 1 active pointer, we must simulate a dragstart with a reseted position/orientation + // We still have 1 active pointer, we must simulate a dragstart with a reset position/orientation this._resetVirtualMeshesPosition(); const previousFaceCameraFlag = this.faceCameraOnDragStart; this.faceCameraOnDragStart = false; diff --git a/packages/dev/core/src/Bones/boneLookController.ts b/packages/dev/core/src/Bones/boneLookController.ts index 4b102e91fa6..c5a9db2700c 100644 --- a/packages/dev/core/src/Bones/boneLookController.ts +++ b/packages/dev/core/src/Bones/boneLookController.ts @@ -78,7 +78,7 @@ export class BoneLookController { private _transformYawPitchInv: Matrix; private _firstFrameSkipped = false; private _yawRange: number; - private _fowardAxis: Vector3 = Vector3.Forward(); + private _forwardAxis: Vector3 = Vector3.Forward(); /** * Gets or sets the minimum yaw angle that the bone can look to @@ -326,7 +326,7 @@ export class BoneLookController { spaceMat.copyFrom(mesh.getWorldMatrix()); } else { let forwardAxis = BoneLookController._TmpVecs[2]; - forwardAxis.copyFrom(this._fowardAxis); + forwardAxis.copyFrom(this._forwardAxis); if (this._transformYawPitch) { Vector3.TransformCoordinatesToRef(forwardAxis, this._transformYawPitchInv, forwardAxis); diff --git a/packages/dev/core/src/Cameras/Inputs/arcRotateCameraGamepadInput.ts b/packages/dev/core/src/Cameras/Inputs/arcRotateCameraGamepadInput.ts index 0b7742b65aa..ad3179db16d 100644 --- a/packages/dev/core/src/Cameras/Inputs/arcRotateCameraGamepadInput.ts +++ b/packages/dev/core/src/Cameras/Inputs/arcRotateCameraGamepadInput.ts @@ -118,7 +118,7 @@ export class ArcRotateCameraGamepadInput implements ICameraInputthis._existingCamera).angularSensibilityX) { this._cachedAngularSensibility.angularSensibilityX = (this._existingCamera).angularSensibilityX; (this._existingCamera).angularSensibilityX = Number.MAX_VALUE; diff --git a/packages/dev/core/src/Cameras/camera.ts b/packages/dev/core/src/Cameras/camera.ts index a08ca334603..e8340137b33 100644 --- a/packages/dev/core/src/Cameras/camera.ts +++ b/packages/dev/core/src/Cameras/camera.ts @@ -86,11 +86,11 @@ export class Camera extends Node { */ public static readonly RIG_MODE_STEREOSCOPIC_INTERLACED = Constants.RIG_MODE_STEREOSCOPIC_INTERLACED; /** - * Defines that both eyes of the camera should be renderered in a VR mode (carbox). + * Defines that both eyes of the camera should be rendered in a VR mode (carbox). */ public static readonly RIG_MODE_VR = Constants.RIG_MODE_VR; /** - * Defines that both eyes of the camera should be renderered in a VR mode (webVR). + * Defines that both eyes of the camera should be rendered in a VR mode (webVR). */ public static readonly RIG_MODE_WEBVR = Constants.RIG_MODE_WEBVR; /** @@ -523,7 +523,7 @@ export class Camera extends Node { /** * Gets the list of active meshes this frame (meshes no culled or excluded by lod s in the frame) - * @returns the active meshe list + * @returns the active mesh list */ public getActiveMeshes(): SmartArray { return this._activeMeshes; @@ -1023,7 +1023,7 @@ export class Camera extends Node { /** * Gets a ray in the forward direction from the camera. * @param length Defines the length of the ray to create - * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a workd space ray + * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a world space ray * @param origin Defines the start point of the ray which defaults to the camera position * @returns the forward ray */ @@ -1036,7 +1036,7 @@ export class Camera extends Node { * Gets a ray in the forward direction from the camera. * @param refRay the ray to (re)use when setting the values * @param length Defines the length of the ray to create - * @param transform Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray + * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a world space ray * @param origin Defines the start point of the ray which defaults to the camera position * @returns the forward ray */ @@ -1192,7 +1192,7 @@ export class Camera extends Node { } this.cameraRigMode = mode; this._cameraRigParams = {}; - //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target, + //we have to implement stereo camera calculating left and right viewpoints from interaxialDistance and target, //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637; this._cameraRigParams.stereoHalfAngle = Tools.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637); @@ -1273,7 +1273,7 @@ export class Camera extends Node { this._cameraRigParams = {}; } this._cameraRigParams[name] = value; - //provisionnally: + //provisionally: if (name === "interaxialDistance") { this._cameraRigParams.stereoHalfAngle = Tools.ToRadians(value / 0.0637); } @@ -1310,7 +1310,7 @@ export class Camera extends Node { public _setupInputs() {} /** - * Serialiaze the camera setup to a json representation + * Serialize the camera setup to a json representation * @returns the JSON representation */ public serialize(): any { @@ -1393,7 +1393,7 @@ export class Camera extends Node { * @param name The name of the camera the result will be able to instantiate * @param scene The scene the result will construct the camera in * @param interaxial_distance In case of stereoscopic setup, the distance between both eyes - * @param isStereoscopicSideBySide In case of stereoscopic setup, should the sereo be side b side + * @param isStereoscopicSideBySide In case of stereoscopic setup, should the stereo be side b side * @returns a factory method to construct the camera */ // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/packages/dev/core/src/Cameras/flyCamera.ts b/packages/dev/core/src/Cameras/flyCamera.ts index 081992cb1ee..0d498165fb3 100644 --- a/packages/dev/core/src/Cameras/flyCamera.ts +++ b/packages/dev/core/src/Cameras/flyCamera.ts @@ -407,9 +407,9 @@ export class FlyCamera extends TargetCamera { const z = this.rotation.z; // Current Roll. const delta = limit - z; // Difference in Roll. - const minRad = 0.001; // Tenth of a radian is a barely noticable difference. + const minRad = 0.001; // Tenth of a radian is a barely noticeable difference. - // If the difference is noticable, restore the Roll. + // If the difference is noticeable, restore the Roll. if (Math.abs(delta) >= minRad) { // Change Z rotation towards the target Roll. this.rotation.z += delta / rate; diff --git a/packages/dev/core/src/Cameras/targetCamera.ts b/packages/dev/core/src/Cameras/targetCamera.ts index 8a4fb6c7f43..8a6ec14b929 100644 --- a/packages/dev/core/src/Cameras/targetCamera.ts +++ b/packages/dev/core/src/Cameras/targetCamera.ts @@ -527,7 +527,7 @@ export class TargetCamera extends Camera { case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: case Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER: case Camera.RIG_MODE_STEREOSCOPIC_INTERLACED: { - //provisionnaly using _cameraRigParams.stereoHalfAngle instead of calculations based on _cameraRigParams.interaxialDistance: + //provisionally using _cameraRigParams.stereoHalfAngle instead of calculations based on _cameraRigParams.interaxialDistance: const leftSign = this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? 1 : -1; const rightSign = this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? -1 : 1; this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle * leftSign, camLeft); diff --git a/packages/dev/core/src/Collisions/collider.ts b/packages/dev/core/src/Collisions/collider.ts index 7b62d6d7554..b60948c5896 100644 --- a/packages/dev/core/src/Collisions/collider.ts +++ b/packages/dev/core/src/Collisions/collider.ts @@ -234,7 +234,7 @@ export class Collider { const signedDistToTrianglePlane = trianglePlane.signedDistanceTo(this._basePoint); const normalDotVelocity = Vector3.Dot(trianglePlane.normal, this._velocity); - // if DoubleSidedCheck is false(default), a double sided face will be consided 2 times. + // if DoubleSidedCheck is false(default), a double sided face will be considered 2 times. // if true, it discard the faces having normal not facing velocity if (Collider.DoubleSidedCheck && normalDotVelocity > 0.0001) { return; diff --git a/packages/dev/core/src/Compute/computeEffect.ts b/packages/dev/core/src/Compute/computeEffect.ts index e6182e9f21c..bf632b13c9c 100644 --- a/packages/dev/core/src/Compute/computeEffect.ts +++ b/packages/dev/core/src/Compute/computeEffect.ts @@ -163,12 +163,12 @@ export class ComputeEffect { ShaderProcessor.PreProcess( computeCode, processorOptions, - (migratedCommputeCode) => { + (migratedComputeCode) => { this._rawComputeSourceCode = computeCode; if (options.processFinalCode) { - migratedCommputeCode = options.processFinalCode(migratedCommputeCode); + migratedComputeCode = options.processFinalCode(migratedComputeCode); } - const finalShaders = ShaderProcessor.Finalize(migratedCommputeCode, "", processorOptions); + const finalShaders = ShaderProcessor.Finalize(migratedComputeCode, "", processorOptions); this._useFinalCode(finalShaders.vertexCode, baseName); }, this._engine @@ -176,13 +176,13 @@ export class ComputeEffect { }); } - private _useFinalCode(migratedCommputeCode: string, baseName: any) { + private _useFinalCode(migratedComputeCode: string, baseName: any) { if (baseName) { const compute = baseName.computeElement || baseName.compute || baseName.spectorName || baseName; - this._computeSourceCode = "//#define SHADER_NAME compute:" + compute + "\n" + migratedCommputeCode; + this._computeSourceCode = "//#define SHADER_NAME compute:" + compute + "\n" + migratedComputeCode; } else { - this._computeSourceCode = migratedCommputeCode; + this._computeSourceCode = migratedComputeCode; } this._prepareEffect(); } diff --git a/packages/dev/core/src/Culling/ray.ts b/packages/dev/core/src/Culling/ray.ts index 6ba779c4550..5ca801f5d0d 100644 --- a/packages/dev/core/src/Culling/ray.ts +++ b/packages/dev/core/src/Culling/ray.ts @@ -51,12 +51,12 @@ export class Ray { * This does not account for the ray length by design to improve perfs. * @param minimum bound of the box * @param maximum bound of the box - * @param intersectionTreshold extra extend to be added to the box in all direction + * @param intersectionThreshold extra extend to be added to the box in all direction * @returns if the box was hit */ - public intersectsBoxMinMax(minimum: DeepImmutable, maximum: DeepImmutable, intersectionTreshold: number = 0): boolean { - const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold); - const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold); + public intersectsBoxMinMax(minimum: DeepImmutable, maximum: DeepImmutable, intersectionThreshold: number = 0): boolean { + const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionThreshold, minimum.y - intersectionThreshold, minimum.z - intersectionThreshold); + const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionThreshold, maximum.y + intersectionThreshold, maximum.z + intersectionThreshold); let d = 0.0; let maxValue = Number.MAX_VALUE; let inv: number; @@ -147,27 +147,27 @@ export class Ray { /** * Checks if the ray intersects a box - * This does not account for the ray lenght by design to improve perfs. + * This does not account for the ray length by design to improve perfs. * @param box the bounding box to check - * @param intersectionTreshold extra extend to be added to the BoundingBox in all direction + * @param intersectionThreshold extra extend to be added to the BoundingBox in all direction * @returns if the box was hit */ - public intersectsBox(box: DeepImmutable, intersectionTreshold: number = 0): boolean { - return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionTreshold); + public intersectsBox(box: DeepImmutable, intersectionThreshold: number = 0): boolean { + return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionThreshold); } /** * If the ray hits a sphere * @param sphere the bounding sphere to check - * @param intersectionTreshold extra extend to be added to the BoundingSphere in all direction + * @param intersectionThreshold extra extend to be added to the BoundingSphere in all direction * @returns true if it hits the sphere */ - public intersectsSphere(sphere: DeepImmutable, intersectionTreshold: number = 0): boolean { + public intersectsSphere(sphere: DeepImmutable, intersectionThreshold: number = 0): boolean { const x = sphere.center.x - this.origin.x; const y = sphere.center.y - this.origin.y; const z = sphere.center.z - this.origin.z; const pyth = x * x + y * y + z * z; - const radius = sphere.radius + intersectionTreshold; + const radius = sphere.radius + intersectionThreshold; const rr = radius * radius; if (pyth <= rr) { @@ -185,7 +185,7 @@ export class Ray { } /** - * If the ray hits a triange + * If the ray hits a triangle * @param vertex0 triangle vertex * @param vertex1 triangle vertex * @param vertex2 triangle vertex diff --git a/packages/dev/core/src/Debug/rayHelper.ts b/packages/dev/core/src/Debug/rayHelper.ts index abd91d50cab..a574c730903 100644 --- a/packages/dev/core/src/Debug/rayHelper.ts +++ b/packages/dev/core/src/Debug/rayHelper.ts @@ -16,7 +16,7 @@ import type { Observer } from "../Misc/observable"; */ export class RayHelper { /** - * Defines the ray we are currently tryin to visualize. + * Defines the ray we are currently trying to visualize. */ public ray: Nullable; @@ -33,7 +33,7 @@ export class RayHelper { /** * Helper function to create a colored helper in a scene in one line. - * @param ray Defines the ray we are currently tryin to visualize + * @param ray Defines the ray we are currently trying to visualize * @param scene Defines the scene the ray is used in * @param color Defines the color we want to see the ray in * @returns The newly created ray helper. @@ -51,7 +51,7 @@ export class RayHelper { * As raycast might be hard to debug, the RayHelper can help rendering the different rays * in order to better appreciate the issue one might have. * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/picking_collisions#debugging - * @param ray Defines the ray we are currently tryin to visualize + * @param ray Defines the ray we are currently trying to visualize */ constructor(ray: Ray) { this.ray = ray; diff --git a/packages/dev/core/src/Engines/Extensions/engine.alpha.ts b/packages/dev/core/src/Engines/Extensions/engine.alpha.ts index d6ae9636407..ad1d5631851 100644 --- a/packages/dev/core/src/Engines/Extensions/engine.alpha.ts +++ b/packages/dev/core/src/Engines/Extensions/engine.alpha.ts @@ -48,7 +48,7 @@ ThinEngine.prototype.setAlphaConstants = function (r: number, g: number, b: numb ThinEngine.prototype.setAlphaMode = function (mode: number, noDepthWriteChange: boolean = false): void { if (this._alphaMode === mode) { if (!noDepthWriteChange) { - // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writting to the depth buffer, for instance) + // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writing to the depth buffer, for instance) const depthMask = mode === Constants.ALPHA_DISABLE; if (this.depthCullingState.depthMask !== depthMask) { this.depthCullingState.depthMask = depthMask; @@ -136,7 +136,7 @@ ThinEngine.prototype.setAlphaMode = function (mode: number, noDepthWriteChange: this._alphaState.alphaBlend = true; break; case Constants.ALPHA_LAYER_ACCUMULATE: - // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independant transparency + // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independent transparency this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA); this._alphaState.alphaBlend = true; break; diff --git a/packages/dev/core/src/Engines/Extensions/engine.rawTexture.ts b/packages/dev/core/src/Engines/Extensions/engine.rawTexture.ts index 830a8ab26d2..8caf3a93a6b 100644 --- a/packages/dev/core/src/Engines/Extensions/engine.rawTexture.ts +++ b/packages/dev/core/src/Engines/Extensions/engine.rawTexture.ts @@ -300,8 +300,8 @@ ThinEngine.prototype.updateRawTexture = function ( if (!texture) { return; } - // Babylon's internalSizedFomat but gl's texImage2D internalFormat - const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer); + // Babylon's internalSizedFormat but gl's texImage2D internalFormat + const internalSizedFormat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer); // Babylon's internalFormat but gl's texImage2D format const internalFormat = this._getInternalFormat(format); @@ -324,7 +324,7 @@ ThinEngine.prototype.updateRawTexture = function ( if (compression && data) { this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, (this.getCaps().s3tc)[compression], texture.width, texture.height, 0, data); } else { - this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, data); + this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFormat, texture.width, texture.height, 0, internalFormat, textureType, data); } if (texture.generateMipMaps) { @@ -447,7 +447,7 @@ ThinEngine.prototype.createRawCubeTexture = function ( if (data) { this.updateRawCubeTexture(texture, data, format, type, invertY, compression); } else { - const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type); + const internalSizedFormat = this._getRGBABufferInternalSizedFormat(type); const level = 0; this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true); @@ -464,7 +464,7 @@ ThinEngine.prototype.createRawCubeTexture = function ( undefined as any ); } else { - gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, null); + gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFormat, texture.width, texture.height, 0, internalFormat, textureType, null); } } @@ -511,7 +511,7 @@ ThinEngine.prototype.updateRawCubeTexture = function ( const gl = this._gl; const textureType = this._getWebGLTextureType(type); let internalFormat = this._getInternalFormat(format); - const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type); + const internalSizedFormat = this._getRGBABufferInternalSizedFormat(type); let needConversion = false; if (internalFormat === gl.RGB) { @@ -544,7 +544,7 @@ ThinEngine.prototype.updateRawCubeTexture = function ( if (needConversion) { faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type); } - gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, faceData); + gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFormat, texture.width, texture.height, 0, internalFormat, textureType, faceData); } } @@ -596,7 +596,7 @@ ThinEngine.prototype.createRawCubeTextureFromUrl = function ( if (mipmapGenerator) { const textureType = this._getWebGLTextureType(type); let internalFormat = this._getInternalFormat(format); - const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type); + const internalSizedFormat = this._getRGBABufferInternalSizedFormat(type); let needConversion = false; if (internalFormat === gl.RGB) { @@ -616,7 +616,7 @@ ThinEngine.prototype.createRawCubeTextureFromUrl = function ( if (needConversion) { mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type); } - gl.texImage2D(faceIndex, level, internalSizedFomat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData); + gl.texImage2D(faceIndex, level, internalSizedFormat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData); } } @@ -779,7 +779,7 @@ function _makeUpdateRawTextureFunction(is3D: boolean) { const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY; const internalType = this._getWebGLTextureType(textureType); const internalFormat = this._getInternalFormat(format); - const internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format); + const internalSizedFormat = this._getRGBABufferInternalSizedFormat(textureType, format); this._bindTextureDirectly(target, texture, true); this._unpackFlipY(invertY === undefined ? true : invertY ? true : false); @@ -798,7 +798,7 @@ function _makeUpdateRawTextureFunction(is3D: boolean) { if (compression && data) { this._gl.compressedTexImage3D(target, 0, (this.getCaps().s3tc)[compression], texture.width, texture.height, texture.depth, 0, data); } else { - this._gl.texImage3D(target, 0, internalSizedFomat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data); + this._gl.texImage3D(target, 0, internalSizedFormat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data); } if (texture.generateMipMaps) { diff --git a/packages/dev/core/src/Engines/Extensions/engine.renderTargetCube.ts b/packages/dev/core/src/Engines/Extensions/engine.renderTargetCube.ts index e0a5125910a..31e3b9497c4 100644 --- a/packages/dev/core/src/Engines/Extensions/engine.renderTargetCube.ts +++ b/packages/dev/core/src/Engines/Extensions/engine.renderTargetCube.ts @@ -48,7 +48,7 @@ ThinEngine.prototype.createRenderTargetCubeTexture = function (size: number, opt if (fullOptions.type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloat) { fullOptions.type = Constants.TEXTURETYPE_UNSIGNED_INT; - Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type"); + Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNSIGNED_BYTE type"); } gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag); diff --git a/packages/dev/core/src/Engines/Extensions/engine.transformFeedback.ts b/packages/dev/core/src/Engines/Extensions/engine.transformFeedback.ts index dc328738b07..079ba15ee99 100644 --- a/packages/dev/core/src/Engines/Extensions/engine.transformFeedback.ts +++ b/packages/dev/core/src/Engines/Extensions/engine.transformFeedback.ts @@ -43,7 +43,7 @@ declare module "../../Engines/engine" { * @param program defines the associated webGL program * @param value defines the list of strings representing the varying names */ - setTranformFeedbackVaryings(program: WebGLProgram, value: string[]): void; + setTransformFeedbackVaryings(program: WebGLProgram, value: string[]): void; /** * Bind a webGL buffer for a transform feedback operation @@ -77,7 +77,7 @@ Engine.prototype.endTransformFeedback = function (): void { this._gl.endTransformFeedback(); }; -Engine.prototype.setTranformFeedbackVaryings = function (program: WebGLProgram, value: string[]): void { +Engine.prototype.setTransformFeedbackVaryings = function (program: WebGLProgram, value: string[]): void { this._gl.transformFeedbackVaryings(program, value, this._gl.INTERLEAVED_ATTRIBS); }; diff --git a/packages/dev/core/src/Engines/Native/nativeInterfaces.ts b/packages/dev/core/src/Engines/Native/nativeInterfaces.ts index 0cd28fa1aea..6826d068338 100644 --- a/packages/dev/core/src/Engines/Native/nativeInterfaces.ts +++ b/packages/dev/core/src/Engines/Native/nativeInterfaces.ts @@ -60,7 +60,7 @@ export interface INativeEngine { loadCubeTextureWithMips(texture: NativeTexture, data: Array>, invertY: boolean, srgb: boolean, onSuccess: () => void, onError: () => void): void; getTextureWidth(texture: NativeTexture): number; getTextureHeight(texture: NativeTexture): number; - copyTexture(desination: NativeTexture, source: NativeTexture): void; + copyTexture(destination: NativeTexture, source: NativeTexture): void; deleteTexture(texture: NativeTexture): void; readTexture( texture: NativeTexture, diff --git a/packages/dev/core/src/Engines/WebGPU/Extensions/engine.alpha.ts b/packages/dev/core/src/Engines/WebGPU/Extensions/engine.alpha.ts index 8e4b10f3324..b58b3112920 100644 --- a/packages/dev/core/src/Engines/WebGPU/Extensions/engine.alpha.ts +++ b/packages/dev/core/src/Engines/WebGPU/Extensions/engine.alpha.ts @@ -5,7 +5,7 @@ import { WebGPUEngine } from "../../webgpuEngine"; WebGPUEngine.prototype.setAlphaMode = function (mode: number, noDepthWriteChange: boolean = false): void { if (this._alphaMode === mode && ((mode === Constants.ALPHA_DISABLE && !this._alphaState.alphaBlend) || (mode !== Constants.ALPHA_DISABLE && this._alphaState.alphaBlend))) { if (!noDepthWriteChange) { - // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writting to the depth buffer, for instance) + // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writing to the depth buffer, for instance) const depthMask = mode === Constants.ALPHA_DISABLE; if (this.depthCullingState.depthMask !== depthMask) { this.setDepthWrite(depthMask); @@ -94,7 +94,7 @@ WebGPUEngine.prototype.setAlphaMode = function (mode: number, noDepthWriteChange this._alphaState.alphaBlend = true; break; case Constants.ALPHA_LAYER_ACCUMULATE: - // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independant transparency + // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independent transparency this._alphaState.setAlphaBlendFunctionParameters( Constants.GL_ALPHA_FUNCTION_SRC_ALPHA, Constants.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA, diff --git a/packages/dev/core/src/Engines/WebGPU/webgpuCacheRenderPipeline.ts b/packages/dev/core/src/Engines/WebGPU/webgpuCacheRenderPipeline.ts index a2ac8a44daf..92e37c75673 100644 --- a/packages/dev/core/src/Engines/WebGPU/webgpuCacheRenderPipeline.ts +++ b/packages/dev/core/src/Engines/WebGPU/webgpuCacheRenderPipeline.ts @@ -492,7 +492,7 @@ export abstract class WebGPUCacheRenderPipeline { } } - private static _GetAphaBlendOperation(operation: Nullable): GPUBlendOperation { + private static _GetAlphaBlendOperation(operation: Nullable): GPUBlendOperation { switch (operation) { case Constants.GL_ALPHA_EQUATION_ADD: return WebGPUConstants.BlendOperation.Add; @@ -509,7 +509,7 @@ export abstract class WebGPUCacheRenderPipeline { } } - private static _GetAphaBlendFactor(factor: Nullable): GPUBlendFactor { + private static _GetAlphaBlendFactor(factor: Nullable): GPUBlendFactor { switch (factor) { case 0: return WebGPUConstants.BlendFactor.Zero; @@ -677,15 +677,15 @@ export abstract class WebGPUCacheRenderPipeline { throw new Error(`Invalid Format '${vertexBuffer.getKind()}' - type=${type}, normalized=${normalized}, size=${size}`); } - private _getAphaBlendState(): Nullable { + private _getAlphaBlendState(): Nullable { if (!this._alphaBlendEnabled) { return null; } return { - srcFactor: WebGPUCacheRenderPipeline._GetAphaBlendFactor(this._alphaBlendFuncParams[2]), - dstFactor: WebGPUCacheRenderPipeline._GetAphaBlendFactor(this._alphaBlendFuncParams[3]), - operation: WebGPUCacheRenderPipeline._GetAphaBlendOperation(this._alphaBlendEqParams[1]), + srcFactor: WebGPUCacheRenderPipeline._GetAlphaBlendFactor(this._alphaBlendFuncParams[2]), + dstFactor: WebGPUCacheRenderPipeline._GetAlphaBlendFactor(this._alphaBlendFuncParams[3]), + operation: WebGPUCacheRenderPipeline._GetAlphaBlendOperation(this._alphaBlendEqParams[1]), }; } @@ -695,9 +695,9 @@ export abstract class WebGPUCacheRenderPipeline { } return { - srcFactor: WebGPUCacheRenderPipeline._GetAphaBlendFactor(this._alphaBlendFuncParams[0]), - dstFactor: WebGPUCacheRenderPipeline._GetAphaBlendFactor(this._alphaBlendFuncParams[1]), - operation: WebGPUCacheRenderPipeline._GetAphaBlendOperation(this._alphaBlendEqParams[0]), + srcFactor: WebGPUCacheRenderPipeline._GetAlphaBlendFactor(this._alphaBlendFuncParams[0]), + dstFactor: WebGPUCacheRenderPipeline._GetAlphaBlendFactor(this._alphaBlendFuncParams[1]), + operation: WebGPUCacheRenderPipeline._GetAlphaBlendOperation(this._alphaBlendEqParams[0]), }; } @@ -951,7 +951,7 @@ export abstract class WebGPUCacheRenderPipeline { const pipelineLayout = this._createPipelineLayout(webgpuPipelineContext); const colorStates: Array = []; - const alphaBlend = this._getAphaBlendState(); + const alphaBlend = this._getAlphaBlendState(); const colorBlend = this._getColorBlendState(); if (this._mrtAttachments1 > 0) { diff --git a/packages/dev/core/src/Engines/constants.ts b/packages/dev/core/src/Engines/constants.ts index 1d06b270845..205a3991538 100644 --- a/packages/dev/core/src/Engines/constants.ts +++ b/packages/dev/core/src/Engines/constants.ts @@ -504,7 +504,7 @@ export class Constants { */ public static readonly PARTICLES_BILLBOARDMODE_ALL = 7; /** - * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction + * Special billboard mode where the particle will be billboard to the camera but rotated to align with direction */ public static readonly PARTICLES_BILLBOARDMODE_STRETCHED = 8; /** @@ -712,11 +712,11 @@ export class Constants { */ public static readonly RIG_MODE_STEREOSCOPIC_INTERLACED = 14; /** - * Defines that both eyes of the camera should be renderered in a VR mode (carbox). + * Defines that both eyes of the camera should be rendered in a VR mode (carbox). */ public static readonly RIG_MODE_VR = 20; /** - * Defines that both eyes of the camera should be renderered in a VR mode (webVR). + * Defines that both eyes of the camera should be rendered in a VR mode (webVR). */ public static readonly RIG_MODE_WEBVR = 21; /** diff --git a/packages/dev/core/src/Engines/engine.ts b/packages/dev/core/src/Engines/engine.ts index 783dbac11e9..89f7336d5ab 100755 --- a/packages/dev/core/src/Engines/engine.ts +++ b/packages/dev/core/src/Engines/engine.ts @@ -95,7 +95,7 @@ export class Engine extends ThinEngine { /** Defines that the resource is delayed and has not started loading */ public static readonly DELAYLOADSTATE_NOTLOADED = Constants.DELAYLOADSTATE_NOTLOADED; - // Depht or Stencil test Constants. + // Depth or Stencil test Constants. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */ public static readonly NEVER = Constants.NEVER; /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */ @@ -1489,7 +1489,7 @@ export class Engine extends ThinEngine { const transformFeedback = this.createTransformFeedback(); this.bindTransformFeedback(transformFeedback); - this.setTranformFeedbackVaryings(shaderProgram, transformFeedbackVaryings); + this.setTransformFeedbackVaryings(shaderProgram, transformFeedbackVaryings); pipelineContext.transformFeedback = transformFeedback; } diff --git a/packages/dev/core/src/Engines/engineFeatures.ts b/packages/dev/core/src/Engines/engineFeatures.ts index 31be9b1744e..cfc80cdca86 100644 --- a/packages/dev/core/src/Engines/engineFeatures.ts +++ b/packages/dev/core/src/Engines/engineFeatures.ts @@ -60,7 +60,7 @@ export interface EngineFeatures { /** Indicates that the inliner should be run over every shader code */ needShaderCodeInlining: boolean; - /** Indicates that even if we don't have to update the properties of a uniform buffer (because of some optimzations in the material) we still need to bind the uniform buffer themselves */ + /** Indicates that even if we don't have to update the properties of a uniform buffer (because of some optimizations in the material) we still need to bind the uniform buffer themselves */ needToAlwaysBindUniformBuffers: boolean; /** Indicates that the engine supports render passes */ diff --git a/packages/dev/core/src/Engines/nativeEngine.ts b/packages/dev/core/src/Engines/nativeEngine.ts index cd90d793e80..53b611b817c 100644 --- a/packages/dev/core/src/Engines/nativeEngine.ts +++ b/packages/dev/core/src/Engines/nativeEngine.ts @@ -650,7 +650,7 @@ export class NativeEngine extends Engine { * @internal */ public _isRenderingStateCompiled(pipelineContext: IPipelineContext): boolean { - // TODO: support async shader compilcation + // TODO: support async shader complication return true; } @@ -658,7 +658,7 @@ export class NativeEngine extends Engine { * @internal */ public _executeWhenRenderingStateIsCompiled(pipelineContext: IPipelineContext, action: () => void) { - // TODO: support async shader compilcation + // TODO: support async shader complication action(); } @@ -2199,9 +2199,9 @@ export class NativeEngine extends Engine { this._engine.updateDynamicIndexBuffer(buffer.nativeIndexBuffer!, data.buffer, data.byteOffset, data.byteLength, offset); } - public updateDynamicVertexBuffer(vertexBuffer: DataBuffer, verticies: DataArray, byteOffset?: number, byteLength?: number): void { + public updateDynamicVertexBuffer(vertexBuffer: DataBuffer, vertices: DataArray, byteOffset?: number, byteLength?: number): void { const buffer = vertexBuffer as NativeDataBuffer; - const data = ArrayBuffer.isView(verticies) ? verticies : new Float32Array(verticies); + const data = ArrayBuffer.isView(vertices) ? vertices : new Float32Array(vertices); this._engine.updateDynamicVertexBuffer(buffer.nativeVertexBuffer!, data.buffer, data.byteOffset + (byteOffset ?? 0), byteLength ?? data.byteLength); } diff --git a/packages/dev/core/src/Engines/nullEngine.ts b/packages/dev/core/src/Engines/nullEngine.ts index e0e9c69011a..c7c23afeca1 100644 --- a/packages/dev/core/src/Engines/nullEngine.ts +++ b/packages/dev/core/src/Engines/nullEngine.ts @@ -282,7 +282,7 @@ export class NullEngine extends Engine { } /** - * Gets the lsit of active attributes for a given webGL program + * Gets the list of active attributes for a given webGL program * @param pipelineContext defines the pipeline context to use * @param attributesNames defines the list of attribute names to get * @returns an array of indices indicating the offset of each attribute @@ -961,7 +961,7 @@ export class NullEngine extends Engine { } /** @internal */ - public _getUnpackAlignement(): number { + public _getUnpackAlignment(): number { return 1; } diff --git a/packages/dev/core/src/Engines/thinEngine.ts b/packages/dev/core/src/Engines/thinEngine.ts index f2c4c22973d..13ba9930ff4 100644 --- a/packages/dev/core/src/Engines/thinEngine.ts +++ b/packages/dev/core/src/Engines/thinEngine.ts @@ -4499,7 +4499,7 @@ export class ThinEngine { } /** @internal */ - public _getUnpackAlignement(): number { + public _getUnpackAlignment(): number { return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT); } @@ -4608,7 +4608,7 @@ export class ThinEngine { gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - // TEXTURE_COMPARE_FUNC/MODE are only availble in WebGL2. + // TEXTURE_COMPARE_FUNC/MODE are only available in WebGL2. if (this.webGLVersion > 1) { if (comparisonFunction === 0) { gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL); diff --git a/packages/dev/core/src/Engines/webgpuEngine.ts b/packages/dev/core/src/Engines/webgpuEngine.ts index bcdabb928de..9219c036a7f 100644 --- a/packages/dev/core/src/Engines/webgpuEngine.ts +++ b/packages/dev/core/src/Engines/webgpuEngine.ts @@ -3385,7 +3385,7 @@ export class WebGPUEngine extends Engine { } /** @internal */ - public _getUnpackAlignement(): number { + public _getUnpackAlignment(): number { return 1; } @@ -3398,7 +3398,7 @@ export class WebGPUEngine extends Engine { * @internal */ public _bindUnboundFramebuffer() { - throw "_bindUnboundFramebuffer is not implementedin WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead"; + throw "_bindUnboundFramebuffer is not implemented in WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead"; } // TODO WEBGPU. All of the below should go once engine split with baseEngine. diff --git a/packages/dev/core/src/Events/pointerEvents.ts b/packages/dev/core/src/Events/pointerEvents.ts index 1c84713b430..6830a64ae6b 100644 --- a/packages/dev/core/src/Events/pointerEvents.ts +++ b/packages/dev/core/src/Events/pointerEvents.ts @@ -95,8 +95,8 @@ export class PointerInfoPre extends PointerInfoBase { * Instantiates a PointerInfoPre to store pointer related info to the onPrePointerObservable event. * @param type Defines the type of event (PointerEventTypes) * @param event Defines the related dom event - * @param localX Defines the local x coordinates of the pointer when the event occured - * @param localY Defines the local y coordinates of the pointer when the event occured + * @param localX Defines the local x coordinates of the pointer when the event occurred + * @param localY Defines the local y coordinates of the pointer when the event occurred */ constructor(type: number, event: IMouseEvent, localX: number, localY: number) { super(type, event); diff --git a/packages/dev/core/src/Gamepads/Controllers/poseEnabledController.ts b/packages/dev/core/src/Gamepads/Controllers/poseEnabledController.ts index d3c541cca09..93b55b34fc1 100644 --- a/packages/dev/core/src/Gamepads/Controllers/poseEnabledController.ts +++ b/packages/dev/core/src/Gamepads/Controllers/poseEnabledController.ts @@ -261,7 +261,7 @@ export class PoseEnabledController extends Gamepad implements PoseControlled { // Find the radian distance away that the headset is from the controllers rotation const distanceAway = Math.atan2(Math.sin(TmpVectors.Vector3[0].y - this._draggedRoomRotation), Math.cos(TmpVectors.Vector3[0].y - this._draggedRoomRotation)); if (Math.abs(distanceAway) > this._maxRotationDistFromHeadset) { - // Only rotate enouph to be within the _maxRotationDistFromHeadset + // Only rotate enough to be within the _maxRotationDistFromHeadset const rotationAmount = distanceAway - (distanceAway < 0 ? -this._maxRotationDistFromHeadset : this._maxRotationDistFromHeadset); this._draggedRoomRotation += rotationAmount; @@ -289,8 +289,8 @@ export class PoseEnabledController extends Gamepad implements PoseControlled { } /** - * Updates the state of the pose enbaled controller based on the raw pose data from the device - * @param poseData raw pose fromthe device + * Updates the state of the pose enabled controller based on the raw pose data from the device + * @param poseData raw pose from the device */ updateFromDevice(poseData: DevicePose) { if (this.isXR) { diff --git a/packages/dev/core/src/Gamepads/Controllers/windowsMotionController.ts b/packages/dev/core/src/Gamepads/Controllers/windowsMotionController.ts index 4722879553c..59daa6573a5 100644 --- a/packages/dev/core/src/Gamepads/Controllers/windowsMotionController.ts +++ b/packages/dev/core/src/Gamepads/Controllers/windowsMotionController.ts @@ -473,7 +473,7 @@ export class WindowsMotionController extends WebVRController { if (axisMeshInfo.value && axisMeshInfo.min && axisMeshInfo.max) { loadedMeshInfo.axisMeshes[i] = axisMeshInfo; } else { - // If we didn't find the mesh, it simply means thit axis won't have transforms applied as mapped axis values change. + // If we didn't find the mesh, it simply means this axis won't have transforms applied as mapped axis values change. Logger.Warn( "Missing axis submesh under mesh with name: " + axisMeshName + diff --git a/packages/dev/core/src/Gamepads/gamepadSceneComponent.ts b/packages/dev/core/src/Gamepads/gamepadSceneComponent.ts index 3fb26ec6f6c..25a5efdfbb2 100644 --- a/packages/dev/core/src/Gamepads/gamepadSceneComponent.ts +++ b/packages/dev/core/src/Gamepads/gamepadSceneComponent.ts @@ -86,7 +86,7 @@ ArcRotateCameraInputsManager.prototype.addGamepad = function (): ArcRotateCamera */ export class GamepadSystemSceneComponent implements ISceneComponent { /** - * The component name helpfull to identify the component in the list of scene components. + * The component name, helpful to identify the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_GAMEPAD; diff --git a/packages/dev/core/src/Gizmos/gizmo.ts b/packages/dev/core/src/Gizmos/gizmo.ts index ab989a7d3b0..94256ae0bcb 100644 --- a/packages/dev/core/src/Gizmos/gizmo.ts +++ b/packages/dev/core/src/Gizmos/gizmo.ts @@ -103,7 +103,7 @@ export class Gizmo implements IGizmo { protected _isHovered = false; /** - * When enabled, any gizmo operation will perserve scaling sign. Default is off. + * When enabled, any gizmo operation will preserve scaling sign. Default is off. * Only valid for TransformNode derived classes (Mesh, AbstractMesh, ...) */ public static PreserveScaling = false; diff --git a/packages/dev/core/src/Gizmos/positionGizmo.ts b/packages/dev/core/src/Gizmos/positionGizmo.ts index fb651a002d5..42bceb13202 100644 --- a/packages/dev/core/src/Gizmos/positionGizmo.ts +++ b/packages/dev/core/src/Gizmos/positionGizmo.ts @@ -173,7 +173,7 @@ export class PositionGizmo extends Gizmo implements IPositionGizmo { if (gizmoManager) { gizmoManager.addToAxisCache(this._gizmoAxisCache); } else { - // Only subscribe to pointer event if gizmoManager isnt + // Only subscribe to pointer event if gizmoManager isn't Gizmo.GizmoAxisPointerObserver(gizmoLayer, this._gizmoAxisCache); } } diff --git a/packages/dev/core/src/Gizmos/rotationGizmo.ts b/packages/dev/core/src/Gizmos/rotationGizmo.ts index ec373cbd8ac..cfe778587be 100644 --- a/packages/dev/core/src/Gizmos/rotationGizmo.ts +++ b/packages/dev/core/src/Gizmos/rotationGizmo.ts @@ -199,7 +199,7 @@ export class RotationGizmo extends Gizmo implements IRotationGizmo { if (gizmoManager) { gizmoManager.addToAxisCache(this._gizmoAxisCache); } else { - // Only subscribe to pointer event if gizmoManager isnt + // Only subscribe to pointer event if gizmoManager isn't Gizmo.GizmoAxisPointerObserver(gizmoLayer, this._gizmoAxisCache); } } diff --git a/packages/dev/core/src/Gizmos/scaleGizmo.ts b/packages/dev/core/src/Gizmos/scaleGizmo.ts index 7dbf3ba5cb5..65a99aa0507 100644 --- a/packages/dev/core/src/Gizmos/scaleGizmo.ts +++ b/packages/dev/core/src/Gizmos/scaleGizmo.ts @@ -187,7 +187,7 @@ export class ScaleGizmo extends Gizmo implements IScaleGizmo { if (gizmoManager) { gizmoManager.addToAxisCache(this._gizmoAxisCache); } else { - // Only subscribe to pointer event if gizmoManager isnt + // Only subscribe to pointer event if gizmoManager isn't Gizmo.GizmoAxisPointerObserver(gizmoLayer, this._gizmoAxisCache); } } diff --git a/packages/dev/core/src/Helpers/environmentHelper.ts b/packages/dev/core/src/Helpers/environmentHelper.ts index 8b48dc22072..ff7d660c214 100644 --- a/packages/dev/core/src/Helpers/environmentHelper.ts +++ b/packages/dev/core/src/Helpers/environmentHelper.ts @@ -513,9 +513,9 @@ export class EnvironmentHelper { skyboxSize = groundSize; } - const sceneDiagonalLenght = sceneDiagonal.length(); - if (sceneDiagonalLenght > groundSize) { - groundSize = sceneDiagonalLenght * 2; + const sceneDiagonalLength = sceneDiagonal.length(); + if (sceneDiagonalLength > groundSize) { + groundSize = sceneDiagonalLength * 2; skyboxSize = groundSize; } diff --git a/packages/dev/core/src/Helpers/photoDome.ts b/packages/dev/core/src/Helpers/photoDome.ts index 5efa9c739c3..099c50e9804 100644 --- a/packages/dev/core/src/Helpers/photoDome.ts +++ b/packages/dev/core/src/Helpers/photoDome.ts @@ -65,7 +65,7 @@ export class PhotoDome extends TextureDome { this.onLoadObservable.notifyObservers(); }, (message, exception) => { - this.onLoadErrorObservable.notifyObservers(message || "Unknown error occured"); + this.onLoadErrorObservable.notifyObservers(message || "Unknown error occurred"); if (this.onError) { this.onError(message, exception); diff --git a/packages/dev/core/src/Helpers/textureDome.ts b/packages/dev/core/src/Helpers/textureDome.ts index 69c171f0cd1..dbc3c20f587 100644 --- a/packages/dev/core/src/Helpers/textureDome.ts +++ b/packages/dev/core/src/Helpers/textureDome.ts @@ -164,7 +164,7 @@ export abstract class TextureDome extends TransformNode { } /** - * Oberserver used in Stereoscopic VR Mode. + * Observer used in Stereoscopic VR Mode. */ private _onBeforeCameraRenderObserver: Nullable> = null; /** diff --git a/packages/dev/core/src/Inputs/scene.inputManager.ts b/packages/dev/core/src/Inputs/scene.inputManager.ts index 3b251e54631..1b131fef986 100644 --- a/packages/dev/core/src/Inputs/scene.inputManager.ts +++ b/packages/dev/core/src/Inputs/scene.inputManager.ts @@ -88,7 +88,7 @@ export class InputManager { private _currentPickResult: Nullable = null; private _previousPickResult: Nullable = null; private _totalPointersPressed = 0; - private _doubleClickOccured = false; + private _doubleClickOccurred = false; private _isSwiping: boolean = false; private _swipeButtonPressed: number = -1; private _skipPointerTap: boolean = false; @@ -585,8 +585,8 @@ export class InputManager { this._delayedSimpleClick = (btn: number, clickInfo: _ClickInfo, cb: (clickInfo: _ClickInfo, pickResult: Nullable) => void) => { // double click delay is over and that no double click has been raised since, or the 2 consecutive keys pressed are different - if ((Date.now() - this._previousStartingPointerTime > InputManager.DoubleClickDelay && !this._doubleClickOccured) || btn !== this._previousButtonPressed) { - this._doubleClickOccured = false; + if ((Date.now() - this._previousStartingPointerTime > InputManager.DoubleClickDelay && !this._doubleClickOccurred) || btn !== this._previousButtonPressed) { + this._doubleClickOccurred = false; clickInfo.singleClick = true; clickInfo.ignore = false; cb(clickInfo, this._currentPickResult); @@ -661,11 +661,11 @@ export class InputManager { } if (checkDoubleClick) { // two successive keys pressed are equal, double click delay is not over and double click has not just occurred - if (btn === this._previousButtonPressed && Date.now() - this._previousStartingPointerTime < InputManager.DoubleClickDelay && !this._doubleClickOccured) { + if (btn === this._previousButtonPressed && Date.now() - this._previousStartingPointerTime < InputManager.DoubleClickDelay && !this._doubleClickOccurred) { // pointer has not moved for 2 clicks, it's a double click if (!clickInfo.hasSwiped && !this._isPointerSwiping()) { this._previousStartingPointerTime = 0; - this._doubleClickOccured = true; + this._doubleClickOccurred = true; clickInfo.doubleClick = true; clickInfo.ignore = false; if (InputManager.ExclusiveDoubleClickMode && this._previousDelayedSimpleClickTimeout) { @@ -676,7 +676,7 @@ export class InputManager { } // if the two successive clicks are too far, it's just two simple clicks else { - this._doubleClickOccured = false; + this._doubleClickOccurred = false; this._previousStartingPointerTime = this._startingPointerTime; this._previousStartingPointerPosition.x = this._startingPointerPosition.x; this._previousStartingPointerPosition.y = this._startingPointerPosition.y; @@ -696,7 +696,7 @@ export class InputManager { } // just the first click of the double has been raised else { - this._doubleClickOccured = false; + this._doubleClickOccurred = false; this._previousStartingPointerTime = this._startingPointerTime; this._previousStartingPointerPosition.x = this._startingPointerPosition.x; this._previousStartingPointerPosition.y = this._startingPointerPosition.y; diff --git a/packages/dev/core/src/Layers/effectLayer.ts b/packages/dev/core/src/Layers/effectLayer.ts index d2a48bca384..3c32107503d 100644 --- a/packages/dev/core/src/Layers/effectLayer.ts +++ b/packages/dev/core/src/Layers/effectLayer.ts @@ -72,7 +72,7 @@ export interface IEffectLayerOptions { * * This can be for instance use to generate glow or highlight effects on the scene. * - * The effect layer class can not be used directly and is intented to inherited from to be + * The effect layer class can not be used directly and is intended to inherited from to be * customized per effects. */ export abstract class EffectLayer { diff --git a/packages/dev/core/src/Layers/effectLayerSceneComponent.ts b/packages/dev/core/src/Layers/effectLayerSceneComponent.ts index 188ebaafa13..b2be03a2c91 100644 --- a/packages/dev/core/src/Layers/effectLayerSceneComponent.ts +++ b/packages/dev/core/src/Layers/effectLayerSceneComponent.ts @@ -66,7 +66,7 @@ AbstractScene.prototype.addEffectLayer = function (newEffectLayer: EffectLayer): */ export class EffectLayerSceneComponent implements ISceneSerializableComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_EFFECTLAYER; diff --git a/packages/dev/core/src/Layers/highlightLayer.ts b/packages/dev/core/src/Layers/highlightLayer.ts index afeeceb7d41..c806fd51ee9 100644 --- a/packages/dev/core/src/Layers/highlightLayer.ts +++ b/packages/dev/core/src/Layers/highlightLayer.ts @@ -879,26 +879,26 @@ export class HighlightLayer extends EffectLayer { /** * Creates a Highlight layer from parsed Highlight layer data - * @param parsedHightlightLayer defines the Highlight layer data + * @param parsedHighlightLayer defines the Highlight layer data * @param scene defines the current scene * @param rootUrl defines the root URL containing the Highlight layer information * @returns a parsed Highlight layer */ - public static Parse(parsedHightlightLayer: any, scene: Scene, rootUrl: string): HighlightLayer { - const hl = SerializationHelper.Parse(() => new HighlightLayer(parsedHightlightLayer.name, scene, parsedHightlightLayer.options), parsedHightlightLayer, scene, rootUrl); + public static Parse(parsedHighlightLayer: any, scene: Scene, rootUrl: string): HighlightLayer { + const hl = SerializationHelper.Parse(() => new HighlightLayer(parsedHighlightLayer.name, scene, parsedHighlightLayer.options), parsedHighlightLayer, scene, rootUrl); let index; // Excluded meshes - for (index = 0; index < parsedHightlightLayer.excludedMeshes.length; index++) { - const mesh = scene.getMeshById(parsedHightlightLayer.excludedMeshes[index]); + for (index = 0; index < parsedHighlightLayer.excludedMeshes.length; index++) { + const mesh = scene.getMeshById(parsedHighlightLayer.excludedMeshes[index]); if (mesh) { hl.addExcludedMesh(mesh); } } // Included meshes - for (index = 0; index < parsedHightlightLayer.meshes.length; index++) { - const highlightedMesh = parsedHightlightLayer.meshes[index]; + for (index = 0; index < parsedHighlightLayer.meshes.length; index++) { + const highlightedMesh = parsedHighlightLayer.meshes[index]; const mesh = scene.getMeshById(highlightedMesh.meshId); if (mesh) { diff --git a/packages/dev/core/src/Layers/layerSceneComponent.ts b/packages/dev/core/src/Layers/layerSceneComponent.ts index b8b3d1846c8..237242837a5 100644 --- a/packages/dev/core/src/Layers/layerSceneComponent.ts +++ b/packages/dev/core/src/Layers/layerSceneComponent.ts @@ -23,7 +23,7 @@ declare module "../abstractScene" { */ export class LayerSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_LAYER; diff --git a/packages/dev/core/src/LensFlares/lensFlareSystemSceneComponent.ts b/packages/dev/core/src/LensFlares/lensFlareSystemSceneComponent.ts index 52b4a9e1c69..f51815feda0 100644 --- a/packages/dev/core/src/LensFlares/lensFlareSystemSceneComponent.ts +++ b/packages/dev/core/src/LensFlares/lensFlareSystemSceneComponent.ts @@ -110,7 +110,7 @@ AbstractScene.prototype.addLensFlareSystem = function (newLensFlareSystem: LensF */ export class LensFlareSystemSceneComponent implements ISceneSerializableComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_LENSFLARESYSTEM; diff --git a/packages/dev/core/src/LibDeclarations/NativeExtensions/FeaturePoints.md b/packages/dev/core/src/LibDeclarations/NativeExtensions/FeaturePoints.md index 4d3fee06be0..8a056b9d1e7 100644 --- a/packages/dev/core/src/LibDeclarations/NativeExtensions/FeaturePoints.md +++ b/packages/dev/core/src/LibDeclarations/NativeExtensions/FeaturePoints.md @@ -45,7 +45,7 @@ class WebXRFeaturePointSystem extends WebXRAbstractFeature { */ public onFeaturePointsUpdatedObservable: Observable = new Observable(); /** - * The currrent feature point cloud maintained across frames. + * The current feature point cloud maintained across frames. */ public featurePointCloud: Array = []; diff --git a/packages/dev/core/src/LibDeclarations/webxr.d.ts b/packages/dev/core/src/LibDeclarations/webxr.d.ts index aa1e81b0a39..8d78c745f1e 100644 --- a/packages/dev/core/src/LibDeclarations/webxr.d.ts +++ b/packages/dev/core/src/LibDeclarations/webxr.d.ts @@ -27,7 +27,7 @@ interface Navigator { } /** - * WebGL Context Compatability + * WebGL Context Compatibility * * ref: https://immersive-web.github.io/webxr/#contextcompatibility */ diff --git a/packages/dev/core/src/Lights/Shadows/cascadedShadowGenerator.ts b/packages/dev/core/src/Lights/Shadows/cascadedShadowGenerator.ts index 18d5b1df7cb..78e9957acf3 100644 --- a/packages/dev/core/src/Lights/Shadows/cascadedShadowGenerator.ts +++ b/packages/dev/core/src/Lights/Shadows/cascadedShadowGenerator.ts @@ -919,7 +919,7 @@ export class CascadedShadowGenerator extends ShadowGenerator { * Binds the shadow related information inside of an effect (information like near, far, darkness... * defined in the generator but impacting the effect). * @param lightIndex Index of the light in the enabled light list of the material owning the effect - * @param effect The effect we are binfing the information for + * @param effect The effect we are binding the information for */ public bindShadowLight(lightIndex: string, effect: Effect): void { const light = this._light; diff --git a/packages/dev/core/src/Lights/Shadows/shadowGenerator.ts b/packages/dev/core/src/Lights/Shadows/shadowGenerator.ts index eb84f81ce0b..a00b528fc99 100644 --- a/packages/dev/core/src/Lights/Shadows/shadowGenerator.ts +++ b/packages/dev/core/src/Lights/Shadows/shadowGenerator.ts @@ -853,10 +853,10 @@ export class ShadowGenerator implements IShadowGenerator { * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows * @param mapSize The size of the texture what stores the shadows. Example : 1024. * @param light The light object generating the shadows. - * @param usefullFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture. + * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture. * @param camera Camera associated with this shadow generator (default: null). If null, takes the scene active camera at the time we need to access it */ - constructor(mapSize: number, light: IShadowLight, usefullFloatFirst?: boolean, camera?: Nullable) { + constructor(mapSize: number, light: IShadowLight, usefulFloatFirst?: boolean, camera?: Nullable) { this._mapSize = mapSize; this._light = light; this._scene = light.getScene(); @@ -880,7 +880,7 @@ export class ShadowGenerator implements IShadowGenerator { // Texture type fallback from float to int if not supported. const caps = this._scene.getEngine().getCaps(); - if (!usefullFloatFirst) { + if (!usefulFloatFirst) { if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) { this._textureType = Constants.TEXTURETYPE_HALF_FLOAT; } else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) { diff --git a/packages/dev/core/src/Lights/Shadows/shadowGeneratorSceneComponent.ts b/packages/dev/core/src/Lights/Shadows/shadowGeneratorSceneComponent.ts index c80e3056e97..0a7eae51c17 100644 --- a/packages/dev/core/src/Lights/Shadows/shadowGeneratorSceneComponent.ts +++ b/packages/dev/core/src/Lights/Shadows/shadowGeneratorSceneComponent.ts @@ -28,7 +28,7 @@ AbstractScene.AddParser(SceneComponentConstants.NAME_SHADOWGENERATOR, (parsedDat */ export class ShadowGeneratorSceneComponent implements ISceneSerializableComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_SHADOWGENERATOR; diff --git a/packages/dev/core/src/Lights/lightConstants.ts b/packages/dev/core/src/Lights/lightConstants.ts index 43d6e8862d7..46fd222a658 100644 --- a/packages/dev/core/src/Lights/lightConstants.ts +++ b/packages/dev/core/src/Lights/lightConstants.ts @@ -1,4 +1,4 @@ -/** Defines the cross module constantsused by lights to avoid circular dependencies */ +/** Defines the cross module constants used by lights to avoid circular dependencies */ export class LightConstants { /** * Falloff Default: light is falling off following the material specification: diff --git a/packages/dev/core/src/Materials/Background/backgroundMaterial.ts b/packages/dev/core/src/Materials/Background/backgroundMaterial.ts index fb438ee7e9a..bda49d2daef 100644 --- a/packages/dev/core/src/Materials/Background/backgroundMaterial.ts +++ b/packages/dev/core/src/Materials/Background/backgroundMaterial.ts @@ -678,7 +678,7 @@ export class BackgroundMaterial extends PushMaterial { * Checks whether the material is ready to be rendered for a given mesh. * @param mesh The mesh to render * @param subMesh The submesh to check against - * @param useInstances Specify wether or not the material is used with instances + * @param useInstances Specify whether or not the material is used with instances * @returns true if all the dependencies are ready (Textures, Effects...) */ public isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances: boolean = false): boolean { @@ -1061,7 +1061,7 @@ export class BackgroundMaterial extends PushMaterial { } /** - * Bind the material for a dedicated submeh (every used meshes will be considered opaque). + * Bind the material for a dedicated submesh (every used meshes will be considered opaque). * @param world The world matrix to bind. * @param mesh * @param subMesh The submesh to bind for. diff --git a/packages/dev/core/src/Materials/Node/Blocks/Fragment/heightToNormalBlock.ts b/packages/dev/core/src/Materials/Node/Blocks/Fragment/heightToNormalBlock.ts index 1ec1755b9fb..7c0befd76c2 100644 --- a/packages/dev/core/src/Materials/Node/Blocks/Fragment/heightToNormalBlock.ts +++ b/packages/dev/core/src/Materials/Node/Blocks/Fragment/heightToNormalBlock.ts @@ -32,7 +32,7 @@ export class HeightToNormalBlock extends NodeMaterialBlock { /** * Defines if the output should be generated in world or tangent space. - * Note that in tangent space the result is also scaled by 0.5 and offsetted by 0.5 so that it can directly be used as a PerturbNormal.normalMapColor input + * Note that in tangent space the result is also scaled by 0.5 and offset by 0.5 so that it can directly be used as a PerturbNormal.normalMapColor input */ @editableInPropertyPage("Generate in world space instead of tangent space", PropertyTypeForEdition.Boolean, "PROPERTIES", { notifiers: { update: true } }) public generateInWorldSpace: boolean = false; diff --git a/packages/dev/core/src/Materials/Node/Blocks/waveBlock.ts b/packages/dev/core/src/Materials/Node/Blocks/waveBlock.ts index 6ebec5feeee..2d8c0f54c45 100644 --- a/packages/dev/core/src/Materials/Node/Blocks/waveBlock.ts +++ b/packages/dev/core/src/Materials/Node/Blocks/waveBlock.ts @@ -23,7 +23,7 @@ export enum WaveBlockKind { */ export class WaveBlock extends NodeMaterialBlock { /** - * Gets or sets the kibnd of wave to be applied by the block + * Gets or sets the kind of wave to be applied by the block */ public kind = WaveBlockKind.SawTooth; diff --git a/packages/dev/core/src/Materials/Node/Blocks/worleyNoise3DBlock.ts b/packages/dev/core/src/Materials/Node/Blocks/worleyNoise3DBlock.ts index 6dd3fb21b7d..627981b09ff 100644 --- a/packages/dev/core/src/Materials/Node/Blocks/worleyNoise3DBlock.ts +++ b/packages/dev/core/src/Materials/Node/Blocks/worleyNoise3DBlock.ts @@ -15,7 +15,7 @@ import { editableInPropertyPage, PropertyTypeForEdition } from "../nodeMaterialD // Converted to BJS by Pryme8 // // Worley Noise 3D -// Return vec2 value range of -1.0->1.0, F1-F2 respectivly +// Return vec2 value range of -1.0->1.0, F1-F2 respectively export class WorleyNoise3DBlock extends NodeMaterialBlock { /** Gets or sets a boolean indicating that normal should be inverted on X axis */ diff --git a/packages/dev/core/src/Materials/Node/nodeMaterial.ts b/packages/dev/core/src/Materials/Node/nodeMaterial.ts index 572825f3a71..037d5b9ffbc 100644 --- a/packages/dev/core/src/Materials/Node/nodeMaterial.ts +++ b/packages/dev/core/src/Materials/Node/nodeMaterial.ts @@ -797,7 +797,7 @@ export class NodeMaterial extends PushMaterial { } /** - * Runs an otpimization phase to try to improve the shader code + * Runs an optimization phase to try to improve the shader code */ public optimize() { for (const optimizer of this._optimizers) { diff --git a/packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts b/packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts index c93bafb23f5..467a9c82e93 100644 --- a/packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts +++ b/packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts @@ -1532,7 +1532,7 @@ export abstract class PBRBaseMaterial extends PushMaterial { const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency; MaterialHelper.PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit); - // Order independant transparency + // Order independent transparency MaterialHelper.PrepareDefinesForOIT(scene, defines, oit); // Textures diff --git a/packages/dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts b/packages/dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts index fdcfca15bdd..20f9928b168 100644 --- a/packages/dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts +++ b/packages/dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts @@ -55,14 +55,14 @@ export abstract class PBRBaseSimpleMaterial extends PBRBaseMaterial { public normalTexture: Nullable; /** - * Emissivie color used to self-illuminate the model. + * Emissive color used to self-illuminate the model. */ @serializeAsColor3("emissive") @expandToProperty("_markAllSubMeshesAsTexturesDirty") public emissiveColor = new Color3(0, 0, 0); /** - * Emissivie texture used to self-illuminate the model. + * Emissive texture used to self-illuminate the model. */ @serializeAsTexture() @expandToProperty("_markAllSubMeshesAsTexturesDirty") diff --git a/packages/dev/core/src/Materials/Textures/Procedurals/customProceduralTexture.ts b/packages/dev/core/src/Materials/Textures/Procedurals/customProceduralTexture.ts index 4e533a4fd6e..b36684c3e35 100644 --- a/packages/dev/core/src/Materials/Textures/Procedurals/customProceduralTexture.ts +++ b/packages/dev/core/src/Materials/Textures/Procedurals/customProceduralTexture.ts @@ -28,7 +28,7 @@ export class CustomProceduralTexture extends ProceduralTexture { * @param scene Define the scene the texture belongs to * @param fallbackTexture Define a fallback texture in case there were issues to create the custom texture * @param generateMipMaps Define if the texture should creates mip maps or not - * @param skipJson Define a boolena indicating that there is no json config file to load + * @param skipJson Define a boolean indicating that there is no json config file to load */ constructor(name: string, texturePath: string, size: TextureSize, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean, skipJson?: boolean) { super(name, size, null, scene, fallbackTexture, generateMipMaps); diff --git a/packages/dev/core/src/Materials/Textures/Procedurals/proceduralTextureSceneComponent.ts b/packages/dev/core/src/Materials/Textures/Procedurals/proceduralTextureSceneComponent.ts index d9591c47bc5..fcfc8070597 100644 --- a/packages/dev/core/src/Materials/Textures/Procedurals/proceduralTextureSceneComponent.ts +++ b/packages/dev/core/src/Materials/Textures/Procedurals/proceduralTextureSceneComponent.ts @@ -20,7 +20,7 @@ declare module "../../../abstractScene" { */ export class ProceduralTextureSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_PROCEDURALTEXTURE; diff --git a/packages/dev/core/src/Materials/Textures/cubeTexture.ts b/packages/dev/core/src/Materials/Textures/cubeTexture.ts index 29a0f8507ca..109245e6846 100644 --- a/packages/dev/core/src/Materials/Textures/cubeTexture.ts +++ b/packages/dev/core/src/Materials/Textures/cubeTexture.ts @@ -132,7 +132,7 @@ export class CubeTexture extends BaseTexture { } /** - * Creates and return a texture created from prefilterd data by tools like IBL Baker or Lys. + * Creates and return a texture created from prefiltered data by tools like IBL Baker or Lys. * @param url defines the url of the prefiltered texture * @param scene defines the scene the texture is attached to * @param forcedExtension defines the extension of the file if different from the url diff --git a/packages/dev/core/src/Materials/Textures/internalTexture.ts b/packages/dev/core/src/Materials/Textures/internalTexture.ts index 04cfc8ad11c..5558189f092 100644 --- a/packages/dev/core/src/Materials/Textures/internalTexture.ts +++ b/packages/dev/core/src/Materials/Textures/internalTexture.ts @@ -480,7 +480,7 @@ export class InternalTexture extends TextureSampler { break; case InternalTextureSource.CubeRawRGBD: - // This case is being handeled by the environment texture tools and is not a part of the rebuild process. + // This case is being handled by the environment texture tools and is not a part of the rebuild process. // To use CubeRawRGBD use updateRGBDAsync on the cube texture. return; diff --git a/packages/dev/core/src/Materials/Textures/prePassRenderTarget.ts b/packages/dev/core/src/Materials/Textures/prePassRenderTarget.ts index e49bad09773..81be9143b57 100644 --- a/packages/dev/core/src/Materials/Textures/prePassRenderTarget.ts +++ b/packages/dev/core/src/Materials/Textures/prePassRenderTarget.ts @@ -111,7 +111,7 @@ export class PrePassRenderTarget extends MultiRenderTarget { } /** - * Diposes this render target + * Disposes this render target */ public dispose() { const scene = this._scene; diff --git a/packages/dev/core/src/Materials/Textures/textureSampler.ts b/packages/dev/core/src/Materials/Textures/textureSampler.ts index 5ccd07e2671..20b6666ddcb 100644 --- a/packages/dev/core/src/Materials/Textures/textureSampler.ts +++ b/packages/dev/core/src/Materials/Textures/textureSampler.ts @@ -143,7 +143,7 @@ export class TextureSampler { /** * Compares this sampler with another one * @param other sampler to compare with - * @returns true if the samplers have the same parametres, else false + * @returns true if the samplers have the same parameters, else false */ public compareSampler(other: TextureSampler): boolean { return ( diff --git a/packages/dev/core/src/Materials/Textures/videoTexture.ts b/packages/dev/core/src/Materials/Textures/videoTexture.ts index be967417639..cd538c74664 100644 --- a/packages/dev/core/src/Materials/Textures/videoTexture.ts +++ b/packages/dev/core/src/Materials/Textures/videoTexture.ts @@ -500,7 +500,7 @@ export class VideoTexture extends Texture { * Creates a video texture straight from your WebCam video feed. * @param scene Define the scene the texture should be created in * @param constraints Define the constraints to use to create the web cam feed from WebRTC - * @param audioConstaints Define the audio constraints to use to create the web cam feed from WebRTC + * @param audioConstraints Define the audio constraints to use to create the web cam feed from WebRTC * @param invertY Defines if the video should be stored with invert Y set to true (true by default) * @returns The created video texture as a promise */ @@ -513,13 +513,13 @@ export class VideoTexture extends Texture { maxHeight: number; deviceId: string; } & MediaTrackConstraints, - audioConstaints: boolean | MediaTrackConstraints = false, + audioConstraints: boolean | MediaTrackConstraints = false, invertY = true ): Promise { if (navigator.mediaDevices) { const stream = await navigator.mediaDevices.getUserMedia({ video: constraints, - audio: audioConstaints, + audio: audioConstraints, }); const videoTexture = await this.CreateFromStreamAsync(scene, stream, constraints, invertY); @@ -540,7 +540,7 @@ export class VideoTexture extends Texture { * @param scene Defines the scene the texture should be created in * @param onReady Defines a callback to triggered once the texture will be ready * @param constraints Defines the constraints to use to create the web cam feed from WebRTC - * @param audioConstaints Defines the audio constraints to use to create the web cam feed from WebRTC + * @param audioConstraints Defines the audio constraints to use to create the web cam feed from WebRTC * @param invertY Defines if the video should be stored with invert Y set to true (true by default) */ public static CreateFromWebCam( @@ -553,10 +553,10 @@ export class VideoTexture extends Texture { maxHeight: number; deviceId: string; } & MediaTrackConstraints, - audioConstaints: boolean | MediaTrackConstraints = false, + audioConstraints: boolean | MediaTrackConstraints = false, invertY = true ): void { - this.CreateFromWebCamAsync(scene, constraints, audioConstaints, invertY) + this.CreateFromWebCamAsync(scene, constraints, audioConstraints, invertY) .then(function (videoTexture) { if (onReady) { onReady(videoTexture); diff --git a/packages/dev/core/src/Materials/effectFallbacks.ts b/packages/dev/core/src/Materials/effectFallbacks.ts index ce1efca749b..b47d6b96527 100644 --- a/packages/dev/core/src/Materials/effectFallbacks.ts +++ b/packages/dev/core/src/Materials/effectFallbacks.ts @@ -25,7 +25,7 @@ export class EffectFallbacks implements IEffectFallbacks { /** * Adds a fallback on the specified property. - * @param rank The rank of the fallback (Lower ranks will be fallbacked to first) + * @param rank The rank of the fallback (Lower ranks will fallback to first) * @param define The name of the define in the shader */ public addFallback(rank: number, define: string): void { @@ -46,7 +46,7 @@ export class EffectFallbacks implements IEffectFallbacks { /** * Sets the mesh to use CPU skinning when needing to fallback. - * @param rank The rank of the fallback (Lower ranks will be fallbacked to first) + * @param rank The rank of the fallback (Lower ranks will fallback to first) * @param mesh The mesh to use the fallbacks. */ public addCPUSkinningFallback(rank: number, mesh: AbstractMesh) { diff --git a/packages/dev/core/src/Materials/material.ts b/packages/dev/core/src/Materials/material.ts index a86900181ad..f0237ca5d37 100644 --- a/packages/dev/core/src/Materials/material.ts +++ b/packages/dev/core/src/Materials/material.ts @@ -1414,7 +1414,7 @@ export class Material implements IAnimatable, IClipPlanesHolder { }; const scene = this.getScene(); - const currentHotSwapingState = this.allowShaderHotSwapping; + const currentHotSwappingState = this.allowShaderHotSwapping; this.allowShaderHotSwapping = false; // Turned off to let us evaluate the real compilation state const checkReady = () => { @@ -1446,7 +1446,7 @@ export class Material implements IAnimatable, IClipPlanesHolder { } } if (allDone) { - this.allowShaderHotSwapping = currentHotSwapingState; + this.allowShaderHotSwapping = currentHotSwappingState; if (lastError) { if (onError) { onError(lastError); @@ -1458,7 +1458,7 @@ export class Material implements IAnimatable, IClipPlanesHolder { } } else { if (this.isReady()) { - this.allowShaderHotSwapping = currentHotSwapingState; + this.allowShaderHotSwapping = currentHotSwappingState; if (onCompiled) { onCompiled(this); } diff --git a/packages/dev/core/src/Materials/materialHelper.ts b/packages/dev/core/src/Materials/materialHelper.ts index e1c4b8b83b2..38dce77ba33 100644 --- a/packages/dev/core/src/Materials/materialHelper.ts +++ b/packages/dev/core/src/Materials/materialHelper.ts @@ -320,7 +320,7 @@ export class MaterialHelper { } /** - * Prepares the defines related to order independant transparency + * Prepares the defines related to order independent transparency * @param scene The scene we are intending to draw * @param defines The defines to update * @param needAlphaBlending Determines if the material needs alpha blending @@ -527,7 +527,7 @@ export class MaterialHelper { * @param mesh The mesh the effect is compiling for * @param defines The defines to update * @param specularSupported Specifies whether specular is supported or not (override lights data) - * @param maxSimultaneousLights Specifies how manuy lights can be added to the effect at max + * @param maxSimultaneousLights Specifies how many lights can be added to the effect at max * @param disableLighting Specifies whether the lighting is disabled (override scene and light) * @returns true if normals will be required for the rest of the effect */ diff --git a/packages/dev/core/src/Materials/shaderMaterial.ts b/packages/dev/core/src/Materials/shaderMaterial.ts index 8d03e76a91c..ce6016ff86f 100644 --- a/packages/dev/core/src/Materials/shaderMaterial.ts +++ b/packages/dev/core/src/Materials/shaderMaterial.ts @@ -1338,7 +1338,7 @@ export class ShaderMaterial extends PushMaterial { result.setTextureSampler(key, this._textureSamplers[key]); } - // Storag buffers + // Storage buffers for (const key in this._storageBuffers) { result.setStorageBuffer(key, this._storageBuffers[key]); } diff --git a/packages/dev/core/src/Materials/standardMaterial.ts b/packages/dev/core/src/Materials/standardMaterial.ts index 37220ef56b0..69fc040ed11 100644 --- a/packages/dev/core/src/Materials/standardMaterial.ts +++ b/packages/dev/core/src/Materials/standardMaterial.ts @@ -376,7 +376,7 @@ export class StandardMaterial extends PushMaterial { private _useSpecularOverAlpha = false; /** * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones). - * A car glass is a good exemple of that. When sun reflects on it you can not see what is behind. + * A car glass is a good example of that. When sun reflects on it you can not see what is behind. */ @expandToProperty("_markAllSubMeshesAsTexturesDirty") public useSpecularOverAlpha: boolean; @@ -385,7 +385,7 @@ export class StandardMaterial extends PushMaterial { private _useReflectionOverAlpha = false; /** * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones). - * A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind. + * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind. */ @expandToProperty("_markAllSubMeshesAsTexturesDirty") public useReflectionOverAlpha: boolean; @@ -420,14 +420,14 @@ export class StandardMaterial extends PushMaterial { private _useParallaxOcclusion = false; /** * Is parallax occlusion enabled or not. - * If true, the outcome is way more realistic than traditional Parallax but you can expect a performance hit that worthes consideration. + * If true, the outcome is way more realistic than traditional Parallax but you can expect a performance hit that is worth considering. * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/parallaxMapping */ @expandToProperty("_markAllSubMeshesAsTexturesDirty") public useParallaxOcclusion: boolean; /** - * Apply a scaling factor that determine which "depth" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion. + * Apply a scaling factor that determine which "depth" the height map should represent. A value between 0.05 and 0.1 is reasonable in Parallax, you can reach 0.2 using Parallax Occlusion. */ @serialize() public parallaxScaleBias = 0.05; @@ -718,7 +718,7 @@ export class StandardMaterial extends PushMaterial { } /** - * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT). + * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT). * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects. * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image; * corresponding to low luminance, medium luminance, and high luminance areas respectively. @@ -922,7 +922,7 @@ export class StandardMaterial extends PushMaterial { const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency; MaterialHelper.PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit); - // Order independant transparency + // Order independent transparency MaterialHelper.PrepareDefinesForOIT(scene, defines, oit); // Textures diff --git a/packages/dev/core/src/Materials/uniformBuffer.ts b/packages/dev/core/src/Materials/uniformBuffer.ts index 30b392b13db..1f047691bfb 100644 --- a/packages/dev/core/src/Materials/uniformBuffer.ts +++ b/packages/dev/core/src/Materials/uniformBuffer.ts @@ -389,7 +389,7 @@ export class UniformBuffer { /** * Adds an uniform in the buffer. - * Warning : the subsequents calls of this function must be in the same order as declared in the shader + * Warning : the subsequent calls of this function must be in the same order as declared in the shader * for the layout to be correct ! The addUniform function only handles types like float, vec2, vec3, vec4, mat4, * meaning size=1,2,3,4 or 16. It does not handle struct types. * @param name Name of the uniform, as used in the uniform block in the shader. @@ -1112,7 +1112,7 @@ export class UniformBuffer { /** * Sets the current state of the class (_bufferIndex, _buffer) to point to the data buffer passed in parameter if this buffer is one of the buffers handled by the class (meaning if it can be found in the _buffers array) - * This method is meant to be able to update a buffer at any time: just call setDataBuffer to set the class in the right state, call some updateXXX methods and then call udpate() => that will update the GPU buffer on the graphic card + * This method is meant to be able to update a buffer at any time: just call setDataBuffer to set the class in the right state, call some updateXXX methods and then call update() => that will update the GPU buffer on the graphic card * @param dataBuffer buffer to look for * @returns true if the buffer has been found and the class internal state points to it, else false */ diff --git a/packages/dev/core/src/Maths/math.path.ts b/packages/dev/core/src/Maths/math.path.ts index 1742026b2c5..0e661cfb6d1 100644 --- a/packages/dev/core/src/Maths/math.path.ts +++ b/packages/dev/core/src/Maths/math.path.ts @@ -290,7 +290,7 @@ export class Path2 { } /** - * Retreives the point at the distance aways from the starting point + * Retrieves the point at the distance aways from the starting point * @param normalizedLengthPosition the length along the path to retrieve the point from * @returns a new Vector2 located at a percentage of the Path2 total length on this path. */ diff --git a/packages/dev/core/src/Maths/math.polar.ts b/packages/dev/core/src/Maths/math.polar.ts index 12bb749901f..07f3fb51e60 100644 --- a/packages/dev/core/src/Maths/math.polar.ts +++ b/packages/dev/core/src/Maths/math.polar.ts @@ -37,7 +37,7 @@ export class Polar { /** * Converts the current polar to an array - * @reutrns the current polar as an array + * @returns the current polar as an array */ public asArray() { return [this.radius, this.theta]; @@ -390,7 +390,7 @@ export class Spherical { /** * Converts the current spherical to an array - * @reutrns the current spherical as an array + * @returns the current spherical as an array */ public asArray() { return [this.radius, this.theta, this.phi]; diff --git a/packages/dev/core/src/Maths/math.vector.ts b/packages/dev/core/src/Maths/math.vector.ts index 6bdbefb13f4..24ee92037cd 100644 --- a/packages/dev/core/src/Maths/math.vector.ts +++ b/packages/dev/core/src/Maths/math.vector.ts @@ -1224,7 +1224,7 @@ export class Vector3 { } else { theta += Math.PI / 2; } - //Calculates resutant normal vector from spherical coordinate of perpendicular vector + //Calculates resultant normal vector from spherical coordinate of perpendicular vector const x = radius * Math.sin(theta) * Math.cos(phi); const y = radius * Math.cos(theta); const z = radius * Math.sin(theta) * Math.sin(phi); @@ -3250,7 +3250,7 @@ export class Vector4 { } /** - * Boolean : True if the current Vector4 coordinates are stricly equal to the given ones. + * Boolean : True if the current Vector4 coordinates are strictly equal to the given ones. * @param otherVector the vector to compare against * @returns true if they are equal */ @@ -3333,7 +3333,7 @@ export class Vector4 { } /** * Returns a new Vector4 set with the division result of the current Vector4 by the given one. - * @param otherVector vector to devide with + * @param otherVector vector to divide with * @returns resulting new vector */ public divide(otherVector: DeepImmutable): this { @@ -3341,7 +3341,7 @@ export class Vector4 { } /** * Updates the given vector "result" with the division result of the current Vector4 by the given one. - * @param otherVector vector to devide with + * @param otherVector vector to divide with * @param result vector to store the result * @returns result input */ @@ -3355,7 +3355,7 @@ export class Vector4 { /** * Divides the current Vector3 coordinates by the given ones. - * @param otherVector vector to devide with + * @param otherVector vector to divide with * @returns the updated Vector3. */ public divideInPlace(otherVector: DeepImmutable): this { @@ -3652,8 +3652,8 @@ export class Vector4 { } /** * Returns the distance (float) between the vectors "value1" and "value2". - * @param value1 value to calulate the distance between - * @param value2 value to calulate the distance between + * @param value1 value to calculate the distance between + * @param value2 value to calculate the distance between * @returns the distance between the two vectors */ public static Distance(value1: DeepImmutable, value2: DeepImmutable): number { @@ -3661,8 +3661,8 @@ export class Vector4 { } /** * Returns the squared distance (float) between the vectors "value1" and "value2". - * @param value1 value to calulate the distance between - * @param value2 value to calulate the distance between + * @param value1 value to calculate the distance between + * @param value2 value to calculate the distance between * @returns the distance between the two vectors squared */ public static DistanceSquared(value1: DeepImmutable, value2: DeepImmutable): number { @@ -3675,8 +3675,8 @@ export class Vector4 { } /** * Returns a new Vector4 located at the center between the vectors "value1" and "value2". - * @param value1 value to calulate the center between - * @param value2 value to calulate the center between + * @param value1 value to calculate the center between + * @param value2 value to calculate the center between * @returns the center between the two vectors */ public static Center(value1: DeepImmutable, value2: DeepImmutable): Vector4 { @@ -3696,7 +3696,7 @@ export class Vector4 { /** * Returns a new Vector4 set with the result of the transformation by the given matrix of the given vector. - * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account) + * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account) * The difference with Vector3.TransformCoordinates is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead * @param vector defines the Vector3 to transform * @param transformation defines the transformation matrix @@ -3710,7 +3710,7 @@ export class Vector4 { /** * Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given vector - * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account) + * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account) * The difference with Vector3.TransformCoordinatesToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead * @param vector defines the Vector3 to transform * @param transformation defines the transformation matrix @@ -3724,7 +3724,7 @@ export class Vector4 { /** * Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z) - * This method computes tranformed coordinates only, not transformed direction vectors + * This method computes transformed coordinates only, not transformed direction vectors * The difference with Vector3.TransformCoordinatesFromFloatsToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead * @param x define the x coordinate of the source vector * @param y define the y coordinate of the source vector @@ -4165,7 +4165,7 @@ export class Quaternion { * Updates the current quaternion with the multiplication of itself with the given one "q1" * Example Playground https://playground.babylonjs.com/#L49EJ7#46 * @param q1 defines the second operand - * @returns the currentupdated quaternion + * @returns the current updated quaternion */ public multiplyInPlace(q1: DeepImmutable): this { this.multiplyToRef(q1, this); @@ -5143,7 +5143,7 @@ export class Matrix { m32 = m[14], m33 = m[15]; // https://en.wikipedia.org/wiki/Laplace_expansion - // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column, + // to compute the determinant of a 4x4 Matrix we compute the cofactors of any row or column, // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant // Cofactor(i, j) = sign(i,j) * det(Minor(i, j)) // where @@ -5366,7 +5366,7 @@ export class Matrix { } /** - * mutiply the specified position in the current Matrix by a value + * multiply the specified position in the current Matrix by a value * @param index the index of the value within the matrix. between 0 and 15. * @param value the value to be added * @returns the current updated matrix @@ -6502,7 +6502,7 @@ export class Matrix { * Example Playground - https://playground.babylonjs.com/#AV9X17#109 * @param x defines the translation on X axis * @param y defines the translation on Y axis - * @param z defines the translationon Z axis + * @param z defines the translation on Z axis * @returns the new matrix */ public static Translation(x: number, y: number, z: number): Matrix { @@ -6516,7 +6516,7 @@ export class Matrix { * Example Playground - https://playground.babylonjs.com/#AV9X17#110 * @param x defines the translation on X axis * @param y defines the translation on Y axis - * @param z defines the translationon Z axis + * @param z defines the translation on Z axis * @param result defines the target matrix * @returns result input */ diff --git a/packages/dev/core/src/Maths/math.vertexFormat.ts b/packages/dev/core/src/Maths/math.vertexFormat.ts index c70968400e0..861d0e84aa5 100644 --- a/packages/dev/core/src/Maths/math.vertexFormat.ts +++ b/packages/dev/core/src/Maths/math.vertexFormat.ts @@ -6,13 +6,13 @@ import { Vector3, Vector2 } from "./math.vector"; export class PositionNormalVertex { /** * Creates a PositionNormalVertex - * @param position the position of the vertex (defaut: 0,0,0) - * @param normal the normal of the vertex (defaut: 0,1,0) + * @param position the position of the vertex (default: 0,0,0) + * @param normal the normal of the vertex (default: 0,1,0) */ constructor( - /** the position of the vertex (defaut: 0,0,0) */ + /** the position of the vertex (default: 0,0,0) */ public position: Vector3 = Vector3.Zero(), - /** the normal of the vertex (defaut: 0,1,0) */ + /** the normal of the vertex (default: 0,1,0) */ public normal: Vector3 = Vector3.Up() ) {} @@ -31,14 +31,14 @@ export class PositionNormalVertex { export class PositionNormalTextureVertex { /** * Creates a PositionNormalTextureVertex - * @param position the position of the vertex (defaut: 0,0,0) - * @param normal the normal of the vertex (defaut: 0,1,0) + * @param position the position of the vertex (default: 0,0,0) + * @param normal the normal of the vertex (default: 0,1,0) * @param uv the uv of the vertex (default: 0,0) */ constructor( - /** the position of the vertex (defaut: 0,0,0) */ + /** the position of the vertex (default: 0,0,0) */ public position: Vector3 = Vector3.Zero(), - /** the normal of the vertex (defaut: 0,1,0) */ + /** the normal of the vertex (default: 0,1,0) */ public normal: Vector3 = Vector3.Up(), /** the uv of the vertex (default: 0,0) */ public uv: Vector2 = Vector2.Zero() diff --git a/packages/dev/core/src/Meshes/Builders/decalBuilder.ts b/packages/dev/core/src/Meshes/Builders/decalBuilder.ts index 10b17d7d10a..f25a13a5df7 100644 --- a/packages/dev/core/src/Meshes/Builders/decalBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/decalBuilder.ts @@ -75,7 +75,7 @@ export function CreateDecal( ): Mesh { const hasSkeleton = !!sourceMesh.skeleton; const useLocalComputation = options.localMode || hasSkeleton; - const meshHasOverridenMaterial = (sourceMesh as Mesh).overrideMaterialSideOrientation !== null && (sourceMesh as Mesh).overrideMaterialSideOrientation !== undefined; + const meshHasOverriddenMaterial = (sourceMesh as Mesh).overrideMaterialSideOrientation !== null && (sourceMesh as Mesh).overrideMaterialSideOrientation !== undefined; const indices = sourceMesh.getIndices(); const positions = hasSkeleton ? sourceMesh.getPositionData(true, true) : sourceMesh.getVerticesData(VertexBuffer.PositionKind); @@ -371,7 +371,7 @@ export function CreateDecal( let faceVertices: Nullable = oneFaceVertices; faceVertices[0] = extractDecalVector3(index); - if (meshHasOverridenMaterial && useLocalComputation) { + if (meshHasOverriddenMaterial && useLocalComputation) { faceVertices[1] = extractDecalVector3(index + 2); faceVertices[2] = extractDecalVector3(index + 1); } else { diff --git a/packages/dev/core/src/Meshes/Builders/icoSphereBuilder.ts b/packages/dev/core/src/Meshes/Builders/icoSphereBuilder.ts index d50d37ed668..575a8e47d49 100644 --- a/packages/dev/core/src/Meshes/Builders/icoSphereBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/icoSphereBuilder.ts @@ -90,7 +90,7 @@ export function CreateIcoSphereVertexData(options: { -1, // v8-11 ]; - // index of 3 vertex makes a face of icopshere + // index of 3 vertex makes a face of icosphere const ico_indices = [ 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 12, 22, 23, 1, 5, 20, 5, 11, 4, 23, 22, 13, 22, 18, 6, 7, 1, 8, 14, 21, 4, 14, 4, 2, 16, 13, 6, 15, 6, 19, 3, 8, 9, 4, 21, 5, 13, 17, 23, 6, 13, 22, 19, 6, 18, 9, 8, 1, diff --git a/packages/dev/core/src/Meshes/Builders/polyhedronBuilder.ts b/packages/dev/core/src/Meshes/Builders/polyhedronBuilder.ts index 37e1490d9a9..3a443f4444b 100644 --- a/packages/dev/core/src/Meshes/Builders/polyhedronBuilder.ts +++ b/packages/dev/core/src/Meshes/Builders/polyhedronBuilder.ts @@ -574,10 +574,10 @@ export function CreatePolyhedronVertexData(options: { /** * Creates a polyhedron mesh - * * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type + * * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embedded types. Please refer to the type sheet in the tutorial to choose the wanted type * * The parameter `size` (positive float, default 1) sets the polygon size * * You can overwrite the `size` on each dimension bu using the parameters `sizeX`, `sizeY` or `sizeZ` (positive floats, default to `size` value) - * * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overrides the parameter `type` + * * You can build other polyhedron types than the 15 embedded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overrides the parameter `type` * * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron * * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`) * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace diff --git a/packages/dev/core/src/Meshes/abstractMesh.ts b/packages/dev/core/src/Meshes/abstractMesh.ts index 05f5ec47ecf..562cd33b00b 100644 --- a/packages/dev/core/src/Meshes/abstractMesh.ts +++ b/packages/dev/core/src/Meshes/abstractMesh.ts @@ -612,7 +612,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl this._markSubMeshesAsMiscDirty(); } - /** When enabled, decompose picking matrices for better precision with large values for mesh position and scling */ + /** When enabled, decompose picking matrices for better precision with large values for mesh position and scaling */ public get enableDistantPicking(): boolean { return this._internalAbstractMeshDataInfo._enableDistantPicking; } @@ -907,7 +907,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl } if (fullDetails) { ret += ", billboard mode: " + ["NONE", "X", "Y", null, "Z", null, null, "ALL"][this.billboardMode]; - ret += ", freeze wrld mat: " + (this._isWorldMatrixFrozen || this._waitingData.freezeWorldMatrix ? "YES" : "NO"); + ret += ", freeze world mat: " + (this._isWorldMatrixFrozen || this._waitingData.freezeWorldMatrix ? "YES" : "NO"); } return ret; } @@ -2290,7 +2290,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl /** * Returns the facetLocalNormals array. - * The normals are expressed in the mesh local spac + * The normals are expressed in the mesh local space * @returns an array of Vector3 * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData */ diff --git a/packages/dev/core/src/Meshes/csg.ts b/packages/dev/core/src/Meshes/csg.ts index 576ffc08842..40f8d01808b 100644 --- a/packages/dev/core/src/Meshes/csg.ts +++ b/packages/dev/core/src/Meshes/csg.ts @@ -144,7 +144,7 @@ class Plane { * @param coplanarFront Will contain polygons coplanar with the plane that are oriented to the front of the plane * @param coplanarBack Will contain polygons coplanar with the plane that are oriented to the back of the plane * @param front Will contain the polygons in front of the plane - * @param back Will contain the polygons begind the plane + * @param back Will contain the polygons behind the plane */ public splitPolygon(polygon: Polygon, coplanarFront: Polygon[], coplanarBack: Polygon[], front: Polygon[], back: Polygon[]): void { const COPLANAR = 0; diff --git a/packages/dev/core/src/Meshes/geodesicMesh.ts b/packages/dev/core/src/Meshes/geodesicMesh.ts index dbbee320d09..3e906b82668 100644 --- a/packages/dev/core/src/Meshes/geodesicMesh.ts +++ b/packages/dev/core/src/Meshes/geodesicMesh.ts @@ -400,7 +400,7 @@ export class _PrimaryIsoTriangle { const B: _IsoVector = new _IsoVector(-n, m + n); vertices.push(O, A, B); - //max internal isoceles triangle vertices + //max internal isosceles triangle vertices for (let y = n; y < m + 1; y++) { for (let x = 0; x < m + 1 - y; x++) { vertices.push(new _IsoVector(x, y)); diff --git a/packages/dev/core/src/Meshes/geometry.ts b/packages/dev/core/src/Meshes/geometry.ts index f56bb300091..8f7c5a70f6f 100644 --- a/packages/dev/core/src/Meshes/geometry.ts +++ b/packages/dev/core/src/Meshes/geometry.ts @@ -1219,8 +1219,8 @@ export class Geometry implements IGetSetVerticesData { mesh.setVerticesData(VertexBuffer.NormalKind, normalsData, false); } - if (binaryInfo.tangetsAttrDesc && binaryInfo.tangetsAttrDesc.count > 0) { - const tangentsData = new Float32Array(parsedGeometry, binaryInfo.tangetsAttrDesc.offset, binaryInfo.tangetsAttrDesc.count); + if (binaryInfo.tangentsAttrDesc && binaryInfo.tangentsAttrDesc.count > 0) { + const tangentsData = new Float32Array(parsedGeometry, binaryInfo.tangentsAttrDesc.offset, binaryInfo.tangentsAttrDesc.count); mesh.setVerticesData(VertexBuffer.TangentKind, tangentsData, false); } diff --git a/packages/dev/core/src/Meshes/instancedMesh.ts b/packages/dev/core/src/Meshes/instancedMesh.ts index dc1edfa988a..ee541021962 100644 --- a/packages/dev/core/src/Meshes/instancedMesh.ts +++ b/packages/dev/core/src/Meshes/instancedMesh.ts @@ -186,7 +186,7 @@ export class InstancedMesh extends AbstractMesh { /** * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices. - * @param kind kind of verticies to retrieve (eg. positions, normals, uvs, etc.) + * @param kind kind of vertices to retrieve (eg. positions, normals, uvs, etc.) * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one. * @returns a float array or a Float32Array of the requested kind of data : positions, normals, uvs, etc. */ diff --git a/packages/dev/core/src/Meshes/mesh.ts b/packages/dev/core/src/Meshes/mesh.ts index 8284dc6b044..1971cb24cee 100644 --- a/packages/dev/core/src/Meshes/mesh.ts +++ b/packages/dev/core/src/Meshes/mesh.ts @@ -74,7 +74,7 @@ class _InstanceDataStorage { public instancesPreviousBuffer: Nullable; public instancesData: Float32Array; public instancesPreviousData: Float32Array; - public overridenInstanceCount: number; + public overriddenInstanceCount: number; public isFrozen: boolean; public forceMatrixUpdates: boolean; public previousBatch: Nullable<_InstancesBatch>; @@ -326,7 +326,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { } /** - * An event triggeredbetween rendering pass when using separateCullingPass = true + * An event triggered between rendering pass when using separateCullingPass = true */ public get onBetweenPassObservable(): Observable { if (!this._internalMeshDataInfo._onBetweenPassObservable) { @@ -378,7 +378,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { /** * Gets the list of instances created from this mesh * it is not supposed to be modified manually. - * Note also that the order of the InstancedMesh wihin the array is not significant and might change. + * Note also that the order of the InstancedMesh within the array is not significant and might change. * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances */ public instances = new Array(); @@ -1145,7 +1145,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { /** * Returns a positive integer : the total number of indices in this mesh geometry. - * @returns the numner of indices or zero if the mesh has no geometry. + * @returns the number of indices or zero if the mesh has no geometry. */ public getTotalIndices(): number { if (!this._geometry) { @@ -1287,10 +1287,10 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { } /** - * Sets a value overriding the instance count. Only applicable when custom instanced InterleavedVertexBuffer are used rather than InstancedMeshs + * Sets a value overriding the instance count. Only applicable when custom instanced InterleavedVertexBuffer are used rather than InstancedMeshes */ - public set overridenInstanceCount(count: number) { - this._instanceDataStorage.overridenInstanceCount = count; + public set overriddenInstanceCount(count: number) { + this._instanceDataStorage.overriddenInstanceCount = count; } // Methods @@ -1618,7 +1618,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { } /** - * Creates a un-shared specific occurence of the geometry for the mesh. + * Creates a un-shared specific occurrence of the geometry for the mesh. * @returns the current mesh */ public makeGeometryUnique(): Mesh { @@ -2076,7 +2076,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { } instanceCount++; - this._draw(subMesh, fillMode, this._instanceDataStorage.overridenInstanceCount); + this._draw(subMesh, fillMode, this._instanceDataStorage.overriddenInstanceCount); } const visibleInstancesForSubMesh = batch.visibleInstances[subMesh._id]; diff --git a/packages/dev/core/src/Meshes/mesh.vertexData.ts b/packages/dev/core/src/Meshes/mesh.vertexData.ts index 0dc8c373f40..e03c67a891f 100644 --- a/packages/dev/core/src/Meshes/mesh.vertexData.ts +++ b/packages/dev/core/src/Meshes/mesh.vertexData.ts @@ -1810,7 +1810,7 @@ export class VertexData { if (computeFacetPartitioning && options) { // store the facet indexes in arrays in the main facetPartitioning array : - // compute each facet vertex (+ facet barycenter) index in the partiniong array + // compute each facet vertex (+ facet barycenter) index in the partitioning array const ox = Math.floor((options.facetPositions[index].x - options.bInfo.minimum.x * ratio) * xSubRatio); const oy = Math.floor((options.facetPositions[index].y - options.bInfo.minimum.y * ratio) * ySubRatio); const oz = Math.floor((options.facetPositions[index].z - options.bInfo.minimum.z * ratio) * zSubRatio); diff --git a/packages/dev/core/src/Meshes/meshSimplification.ts b/packages/dev/core/src/Meshes/meshSimplification.ts index ab6ae68d4a5..503d960228e 100644 --- a/packages/dev/core/src/Meshes/meshSimplification.ts +++ b/packages/dev/core/src/Meshes/meshSimplification.ts @@ -325,7 +325,7 @@ export class QuadraticErrorSimplification implements ISimplifier { /** Gets or sets the number of allowed iterations for decimation */ public decimationIterations: number; - /** Gets or sets the espilon to use for bounding box computation */ + /** Gets or sets the epsilon to use for bounding box computation */ public boundingBoxEpsilon: number; /** diff --git a/packages/dev/core/src/Meshes/meshSimplificationSceneComponent.ts b/packages/dev/core/src/Meshes/meshSimplificationSceneComponent.ts index f377518bb01..1389d3bd1ac 100644 --- a/packages/dev/core/src/Meshes/meshSimplificationSceneComponent.ts +++ b/packages/dev/core/src/Meshes/meshSimplificationSceneComponent.ts @@ -78,7 +78,7 @@ Mesh.prototype.simplify = function ( */ export class SimplicationQueueSceneComponent implements ISceneComponent { /** - * The component name helpfull to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_SIMPLIFICATIONQUEUE; diff --git a/packages/dev/core/src/Meshes/thinInstanceMesh.ts b/packages/dev/core/src/Meshes/thinInstanceMesh.ts index 9d1e7ed869c..6533dc9ce4a 100644 --- a/packages/dev/core/src/Meshes/thinInstanceMesh.ts +++ b/packages/dev/core/src/Meshes/thinInstanceMesh.ts @@ -262,7 +262,7 @@ Mesh.prototype.thinInstanceSetBuffer = function (kind: string, buffer: Nullable< this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer("previousWorld", buffer, staticBuffer); } } else { - // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differenciation + // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differentiation // hot switching kind here to preserve backward compatibility if (kind === VertexBuffer.ColorKind) { kind = VertexBuffer.ColorInstanceKind; diff --git a/packages/dev/core/src/Meshes/transformNode.ts b/packages/dev/core/src/Meshes/transformNode.ts index ca6c2190a99..d07049f5ee9 100644 --- a/packages/dev/core/src/Meshes/transformNode.ts +++ b/packages/dev/core/src/Meshes/transformNode.ts @@ -64,7 +64,7 @@ export class TransformNode extends Node { @serializeAsVector3("scaling") protected _scaling = Vector3.One(); - private _transformToBoneReferal: Nullable = null; + private _transformToBoneReferral: Nullable = null; private _currentParentWhenAttachingToBone: Nullable; private _isAbsoluteSynced = false; @@ -844,7 +844,7 @@ export class TransformNode extends Node { */ public attachToBone(bone: Bone, affectedTransformNode: TransformNode): TransformNode { this._currentParentWhenAttachingToBone = this.parent; - this._transformToBoneReferal = affectedTransformNode; + this._transformToBoneReferral = affectedTransformNode; this.parent = bone; bone.getSkeleton().prepare(); @@ -871,7 +871,7 @@ export class TransformNode extends Node { if (this.parent.getWorldMatrix().determinant() < 0) { this.scalingDeterminant *= -1; } - this._transformToBoneReferal = null; + this._transformToBoneReferral = null; if (resetToPreviousParent) { this.parent = this._currentParentWhenAttachingToBone; } else { @@ -1124,8 +1124,8 @@ export class TransformNode extends Node { parent.computeWorldMatrix(force); } if (cache.useBillboardPath) { - if (this._transformToBoneReferal) { - parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), TmpVectors.Matrix[7]); + if (this._transformToBoneReferral) { + parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferral.getWorldMatrix(), TmpVectors.Matrix[7]); } else { TmpVectors.Matrix[7].copyFrom(parent.getWorldMatrix()); } @@ -1146,9 +1146,9 @@ export class TransformNode extends Node { this._localMatrix.multiplyToRef(TmpVectors.Matrix[7], this._worldMatrix); } else { - if (this._transformToBoneReferal) { + if (this._transformToBoneReferral) { this._localMatrix.multiplyToRef(parent.getWorldMatrix(), TmpVectors.Matrix[6]); - TmpVectors.Matrix[6].multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), this._worldMatrix); + TmpVectors.Matrix[6].multiplyToRef(this._transformToBoneReferral.getWorldMatrix(), this._worldMatrix); } else { this._localMatrix.multiplyToRef(parent.getWorldMatrix(), this._worldMatrix); } diff --git a/packages/dev/core/src/Misc/PerformanceViewer/performanceViewerCollector.ts b/packages/dev/core/src/Misc/PerformanceViewer/performanceViewerCollector.ts index 9a6176b71a5..a2c885ddcf6 100644 --- a/packages/dev/core/src/Misc/PerformanceViewer/performanceViewerCollector.ts +++ b/packages/dev/core/src/Misc/PerformanceViewer/performanceViewerCollector.ts @@ -169,7 +169,7 @@ export class PerformanceViewerCollector { /** * Lets the perf collector handle an event, occurences or event value depending on if the event.value params is set. - * @param event the event to handle an occurence for + * @param event the event to handle an occurrence for */ public sendEvent(event: IPerfCustomEvent) { this._customEventObservable.notifyObservers(event); diff --git a/packages/dev/core/src/Misc/basis.ts b/packages/dev/core/src/Misc/basis.ts index d0e0195bd58..2277b20451c 100644 --- a/packages/dev/core/src/Misc/basis.ts +++ b/packages/dev/core/src/Misc/basis.ts @@ -257,7 +257,7 @@ export const LoadTextureFromTranscodeResult = (texture: InternalTexture, transco const rootImage = transcodeResult.fileInfo.images[i].levels[0]; texture._invertVScale = texture.invertY; if (transcodeResult.format === -1 || transcodeResult.format === BASIS_FORMATS.cTFRGB565) { - // No compatable compressed format found, fallback to RGB + // No compatible compressed format found, fallback to RGB texture.type = Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5; texture.format = Constants.TEXTUREFORMAT_RGB; @@ -467,7 +467,7 @@ function workerFunc(): void { * Detects the supported transcode format for the file * @param config transcode config * @param fileInfo info about the file - * @returns the chosed format or null if none are supported + * @returns the chosen format or null if none are supported */ function GetSupportedTranscodeFormat(config: BasisTranscodeConfiguration, fileInfo: BasisFileInfo): Nullable { let format = null; diff --git a/packages/dev/core/src/Misc/dds.ts b/packages/dev/core/src/Misc/dds.ts index 08d8a2f1de6..330850abb1e 100644 --- a/packages/dev/core/src/Misc/dds.ts +++ b/packages/dev/core/src/Misc/dds.ts @@ -119,7 +119,7 @@ export interface DDSInfo { */ isRGB: boolean; /** - * If the texture is a lumincance format + * If the texture is a luminance format */ isLuminance: boolean; /** @@ -141,7 +141,7 @@ export interface DDSInfo { */ textureType: number; /** - * Sphericle polynomial created for the dds texture + * Spherical polynomial created for the dds texture */ sphericalPolynomial?: SphericalPolynomial; } @@ -492,7 +492,7 @@ export class DDSTools { bpp = 128; break; case FOURCC_DX10: { - // There is an additionnal header so dataOffset need to be changed + // There is an additional header so dataOffset need to be changed dataOffset += 5 * 4; // 5 uints let supported = false; @@ -656,7 +656,7 @@ export class DDSTools { engine._uploadDataToTextureDirectly(texture, byteArray, face, i); } } else if (info.isLuminance) { - const unpackAlignment = engine._getUnpackAlignement(); + const unpackAlignment = engine._getUnpackAlignment(); const unpaddedRowSize = width; const paddedRowSize = Math.floor((width + unpackAlignment - 1) / unpackAlignment) * unpackAlignment; dataLength = paddedRowSize * (height - 1) + unpaddedRowSize; @@ -718,7 +718,7 @@ declare module "../Engines/thinEngine" { * @param onError defines an optional callback raised if there is an issue to load the texture * @param format defines the format of the data * @param forcedExtension defines the extension to use to pick the right loader - * @param createPolynomials defines wheter or not to create polynomails harmonics for the texture + * @param createPolynomials defines whether or not to create polynomials harmonics for the texture * @returns the cube texture as an InternalTexture */ createPrefilteredCubeTexture( @@ -745,7 +745,7 @@ declare module "../Engines/thinEngine" { * @param onError defines an optional callback raised if there is an issue to load the texture * @param format defines the format of the data * @param forcedExtension defines the extension to use to pick the right loader - * @param createPolynomials defines wheter or not to create polynomails harmonics for the texture + * @param createPolynomials defines whether or not to create polynomials harmonics for the texture * @returns the cube texture as an InternalTexture */ ThinEngine.prototype.createPrefilteredCubeTexture = function ( diff --git a/packages/dev/core/src/Misc/decorators.ts b/packages/dev/core/src/Misc/decorators.ts index f66107e7c99..923bbd0ccb3 100644 --- a/packages/dev/core/src/Misc/decorators.ts +++ b/packages/dev/core/src/Misc/decorators.ts @@ -346,7 +346,7 @@ export class SerializationHelper { /** * Creates a new entity from a serialization data object - * @param creationFunction defines a function used to instanciated the new entity + * @param creationFunction defines a function used to instantiated the new entity * @param source defines the source serialization data * @param scene defines the hosting scene * @param rootUrl defines the root url for resources @@ -438,7 +438,7 @@ export class SerializationHelper { } /** - * Instanciates a new object based on a source one (some data will be shared between both object) + * Instantiates a new object based on a source one (some data will be shared between both object) * @param creationFunction defines the function used to instanciate the new object * @param source defines the source object * @returns the new object diff --git a/packages/dev/core/src/Misc/environmentTextureTools.ts b/packages/dev/core/src/Misc/environmentTextureTools.ts index d185193b9b7..e6fbfef245d 100644 --- a/packages/dev/core/src/Misc/environmentTextureTools.ts +++ b/packages/dev/core/src/Misc/environmentTextureTools.ts @@ -371,23 +371,23 @@ export async function CreateEnvTextureAsync(texture: BaseTexture, options: Creat * @returns the JSON representation of the spherical info */ function _CreateEnvTextureIrradiance(texture: BaseTexture): Nullable { - const polynmials = texture.sphericalPolynomial; - if (polynmials == null) { + const polynomials = texture.sphericalPolynomial; + if (polynomials == null) { return null; } return { - x: [polynmials.x.x, polynmials.x.y, polynmials.x.z], - y: [polynmials.y.x, polynmials.y.y, polynmials.y.z], - z: [polynmials.z.x, polynmials.z.y, polynmials.z.z], + x: [polynomials.x.x, polynomials.x.y, polynomials.x.z], + y: [polynomials.y.x, polynomials.y.y, polynomials.y.z], + z: [polynomials.z.x, polynomials.z.y, polynomials.z.z], - xx: [polynmials.xx.x, polynmials.xx.y, polynmials.xx.z], - yy: [polynmials.yy.x, polynmials.yy.y, polynmials.yy.z], - zz: [polynmials.zz.x, polynmials.zz.y, polynmials.zz.z], + xx: [polynomials.xx.x, polynomials.xx.y, polynomials.xx.z], + yy: [polynomials.yy.x, polynomials.yy.y, polynomials.yy.z], + zz: [polynomials.zz.x, polynomials.zz.y, polynomials.zz.z], - yz: [polynmials.yz.x, polynmials.yz.y, polynmials.yz.z], - zx: [polynmials.zx.x, polynmials.zx.y, polynmials.zx.z], - xy: [polynmials.xy.x, polynmials.xy.y, polynmials.xy.z], + yz: [polynomials.yz.x, polynomials.yz.y, polynomials.yz.z], + zx: [polynomials.zx.x, polynomials.zx.y, polynomials.zx.z], + xy: [polynomials.xy.x, polynomials.xy.y, polynomials.xy.z], } as any; } diff --git a/packages/dev/core/src/Misc/smartArray.ts b/packages/dev/core/src/Misc/smartArray.ts index ed6b6c5af50..ab50ad92ef1 100644 --- a/packages/dev/core/src/Misc/smartArray.ts +++ b/packages/dev/core/src/Misc/smartArray.ts @@ -140,7 +140,7 @@ export class SmartArrayNoDuplicate extends SmartArray { /** * Pushes a value at the end of the active data. - * THIS DOES NOT PREVENT DUPPLICATE DATA + * THIS DOES NOT PREVENT DUPLICATE DATA * @param value defines the object to push in the array. */ public push(value: T): void { diff --git a/packages/dev/core/src/Misc/tools.ts b/packages/dev/core/src/Misc/tools.ts index aee10badc75..1ed90dfc80e 100644 --- a/packages/dev/core/src/Misc/tools.ts +++ b/packages/dev/core/src/Misc/tools.ts @@ -425,7 +425,7 @@ export class Tools { /** * Load a script (identified by an url). When the url returns, the * content of this file is added into a new script element, attached to the DOM (body element) - * @param scriptUrl defines the url of the script to laod + * @param scriptUrl defines the url of the script to load * @param onSuccess defines the callback called when the script is loaded * @param onError defines the callback to call if an error occurs * @param scriptId defines the id of the script element @@ -469,7 +469,7 @@ export class Tools { /** * Load an asynchronous script (identified by an url). When the url returns, the * content of this file is added into a new script element, attached to the DOM (body element) - * @param scriptUrl defines the url of the script to laod + * @param scriptUrl defines the url of the script to load * @returns a promise request object */ public static LoadScriptAsync(scriptUrl: string): Promise { diff --git a/packages/dev/core/src/Misc/videoRecorder.ts b/packages/dev/core/src/Misc/videoRecorder.ts index 0f59747108c..2dc32b4781a 100644 --- a/packages/dev/core/src/Misc/videoRecorder.ts +++ b/packages/dev/core/src/Misc/videoRecorder.ts @@ -10,7 +10,7 @@ interface MediaRecorder { /** Stops recording */ stop(): void; - /** Event raised when an error arised. */ + /** Event raised when an error arises. */ onerror: (event: ErrorEvent) => void; /** Event raised when the recording stops. */ onstop: (event: Event) => void; diff --git a/packages/dev/core/src/Navigation/INavigationEngine.ts b/packages/dev/core/src/Navigation/INavigationEngine.ts index 7fc7e014288..5ea0d8534dd 100644 --- a/packages/dev/core/src/Navigation/INavigationEngine.ts +++ b/packages/dev/core/src/Navigation/INavigationEngine.ts @@ -456,7 +456,7 @@ export interface INavMeshParameters { detailSampleMaxError: number; /** - * If using obstacles, the navmesh must be subdivided internaly by tiles. + * If using obstacles, the navmesh must be subdivided internally by tiles. * This member defines the tile cube side length in world units. * If no obstacles are needed, leave it undefined or 0. */ diff --git a/packages/dev/core/src/Navigation/Plugins/recastJSPlugin.ts b/packages/dev/core/src/Navigation/Plugins/recastJSPlugin.ts index a237415c471..a8d7121e7ff 100644 --- a/packages/dev/core/src/Navigation/Plugins/recastJSPlugin.ts +++ b/packages/dev/core/src/Navigation/Plugins/recastJSPlugin.ts @@ -136,9 +136,9 @@ export class RecastJSPlugin implements INavigationEnginePlugin { */ createNavMesh(meshes: Array, parameters: INavMeshParameters, completion?: (navmeshData: Uint8Array) => void): void { if (this._worker && !completion) { - console.warn("A worker is avaible but no completion callback. Defaulting to blocking navmesh creation"); + console.warn("A worker is available but no completion callback. Defaulting to blocking navmesh creation"); } else if (!this._worker && completion) { - console.warn("A completion callback is avaible but no worker. Defaulting to blocking navmesh creation"); + console.warn("A completion callback is available but no worker. Defaulting to blocking navmesh creation"); } this.navMesh = new this.bjsRECAST.NavMesh(); diff --git a/packages/dev/core/src/Offline/database.ts b/packages/dev/core/src/Offline/database.ts index 5180809fe35..0fb829d5f00 100644 --- a/packages/dev/core/src/Offline/database.ts +++ b/packages/dev/core/src/Offline/database.ts @@ -21,7 +21,7 @@ export class Database implements IOfflineProvider { private _enableSceneOffline: boolean; private _enableTexturesOffline: boolean; private _manifestVersionFound: number; - private _mustUpdateRessources: boolean; + private _mustUpdateresources: boolean; private _hasReachedQuota: boolean; private _isSupported: boolean; @@ -62,7 +62,7 @@ export class Database implements IOfflineProvider { this._enableSceneOffline = false; this._enableTexturesOffline = false; this._manifestVersionFound = 0; - this._mustUpdateRessources = false; + this._mustUpdateresources = false; this._hasReachedQuota = false; if (!Database.IDBStorageEnabled) { @@ -268,7 +268,7 @@ export class Database implements IOfflineProvider { } }; - if (!this._mustUpdateRessources) { + if (!this._mustUpdateresources) { this._loadImageFromDBAsync(completeURL, image, saveAndLoadImage); } // First time we're download the images or update requested in the manifest file by a version change @@ -373,7 +373,7 @@ export class Database implements IOfflineProvider { const newTexture = { textureUrl: url, data: blob }; try { - // Put the blob into the dabase + // Put the blob into the database const addRequest = transaction.objectStore("textures").put(newTexture); addRequest.onsuccess = () => {}; addRequest.onerror = () => { @@ -431,7 +431,7 @@ export class Database implements IOfflineProvider { if (version) { // If the version in the JSON file is different from the version in DB if (this._manifestVersionFound !== version.data) { - this._mustUpdateRessources = true; + this._mustUpdateresources = true; updateInDBCallback(); } else { callback(version.data); @@ -439,7 +439,7 @@ export class Database implements IOfflineProvider { } // version was not found in DB else { - this._mustUpdateRessources = true; + this._mustUpdateresources = true; updateInDBCallback(); } }; @@ -524,7 +524,7 @@ export class Database implements IOfflineProvider { this._checkVersionFromDB(completeUrl, (version) => { if (version !== -1) { - if (!this._mustUpdateRessources) { + if (!this._mustUpdateresources) { this._loadFileAsync(completeUrl, sceneLoaded, saveAndLoadFile); } else { this._saveFileAsync(completeUrl, sceneLoaded, progressCallBack, useArrayBuffer, errorCallback); diff --git a/packages/dev/core/src/Particles/baseParticleSystem.ts b/packages/dev/core/src/Particles/baseParticleSystem.ts index 2d64468ee23..4d30c14a835 100644 --- a/packages/dev/core/src/Particles/baseParticleSystem.ts +++ b/packages/dev/core/src/Particles/baseParticleSystem.ts @@ -271,7 +271,7 @@ export class BaseParticleSystem implements IClipPlanesHolder { */ public spriteCellHeight = 0; /** - * If using a spritesheet (isAnimationSheetEnabled), defines wether the sprite animation is looping + * If using a spritesheet (isAnimationSheetEnabled), defines whether the sprite animation is looping */ public spriteCellLoop = true; /** @@ -513,7 +513,7 @@ export class BaseParticleSystem implements IClipPlanesHolder { /** * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. - * This only works when particleEmitterTyps is a BoxParticleEmitter + * This only works when particleEmitterTypes is a BoxParticleEmitter */ public get direction1(): Vector3 { if ((this.particleEmitterType).direction1) { @@ -531,7 +531,7 @@ export class BaseParticleSystem implements IClipPlanesHolder { /** * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. - * This only works when particleEmitterTyps is a BoxParticleEmitter + * This only works when particleEmitterTypes is a BoxParticleEmitter */ public get direction2(): Vector3 { if ((this.particleEmitterType).direction2) { @@ -549,7 +549,7 @@ export class BaseParticleSystem implements IClipPlanesHolder { /** * Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. - * This only works when particleEmitterTyps is a BoxParticleEmitter + * This only works when particleEmitterTypes is a BoxParticleEmitter */ public get minEmitBox(): Vector3 { if ((this.particleEmitterType).minEmitBox) { @@ -567,7 +567,7 @@ export class BaseParticleSystem implements IClipPlanesHolder { /** * Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so. - * This only works when particleEmitterTyps is a BoxParticleEmitter + * This only works when particleEmitterTypes is a BoxParticleEmitter */ public get maxEmitBox(): Vector3 { if ((this.particleEmitterType).maxEmitBox) { diff --git a/packages/dev/core/src/Particles/gpuParticleSystem.ts b/packages/dev/core/src/Particles/gpuParticleSystem.ts index bf9bfcbcf28..0a479b4e530 100644 --- a/packages/dev/core/src/Particles/gpuParticleSystem.ts +++ b/packages/dev/core/src/Particles/gpuParticleSystem.ts @@ -1375,7 +1375,7 @@ export class GPUParticleSystem extends BaseParticleSystem implements IDisposable /** * Animates the particle system for the current frame by emitting new particles and or animating the living ones. - * @param preWarm defines if we are in the pre-warmimg phase + * @param preWarm defines if we are in the pre-warming phase */ public animate(preWarm = false): void { this._timeDelta = this.updateSpeed * (preWarm ? this.preWarmStepOffset : this._scene?.getAnimationRatio() || 1); @@ -1724,7 +1724,7 @@ export class GPUParticleSystem extends BaseParticleSystem implements IDisposable /** * Disposes the particle system and free the associated resources - * @param disposeTexture defines if the particule texture must be disposed as well (true by default) + * @param disposeTexture defines if the particle texture must be disposed as well (true by default) */ public dispose(disposeTexture = true): void { for (const blendMode in this._drawWrappers) { @@ -1878,7 +1878,7 @@ export class GPUParticleSystem extends BaseParticleSystem implements IDisposable * @param sceneOrEngine The scene or the engine to create the particle system in * @param rootUrl The root url to use to load external dependencies like texture * @param doNotStart Ignore the preventAutoStart attribute and does not start - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns the parsed GPU particle system */ public static Parse(parsedParticleSystem: any, sceneOrEngine: Scene | ThinEngine, rootUrl: string, doNotStart = false, capacity?: number): GPUParticleSystem { diff --git a/packages/dev/core/src/Particles/particleHelper.ts b/packages/dev/core/src/Particles/particleHelper.ts index de862c61176..9a0859b97ef 100644 --- a/packages/dev/core/src/Particles/particleHelper.ts +++ b/packages/dev/core/src/Particles/particleHelper.ts @@ -71,7 +71,7 @@ export class ParticleHelper { * @param type This string represents the type to the particle system to create * @param scene The scene where the particle system should live * @param gpu If the system will use gpu - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns the ParticleSystemSet created */ public static CreateAsync(type: string, scene: Nullable, gpu: boolean = false, capacity?: number): Promise { @@ -130,7 +130,7 @@ export class ParticleHelper { * @param scene defines the hosting scene * @param gpu If the system will use gpu * @param rootUrl defines the root URL to use to load textures and relative dependencies - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns a promise that will resolve to the new particle system */ public static ParseFromFileAsync(name: Nullable, url: string, scene: Scene, gpu: boolean = false, rootUrl: string = "", capacity?: number): Promise { @@ -170,7 +170,7 @@ export class ParticleHelper { * @param scene defines the hosting scene * @param gpu If the system will use gpu * @param rootUrl defines the root URL to use to load textures and relative dependencies - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns a promise that will resolve to the new particle system */ public static ParseFromSnippetAsync(snippetId: string, scene: Scene, gpu: boolean = false, rootUrl: string = "", capacity?: number): Promise { @@ -215,7 +215,7 @@ export class ParticleHelper { * @param scene defines the hosting scene * @param gpu If the system will use gpu * @param rootUrl defines the root URL to use to load textures and relative dependencies - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns a promise that will resolve to the new particle system */ public static CreateFromSnippetAsync = ParticleHelper.ParseFromSnippetAsync; diff --git a/packages/dev/core/src/Particles/particleSystem.ts b/packages/dev/core/src/Particles/particleSystem.ts index 72250952039..dc3fa90e167 100644 --- a/packages/dev/core/src/Particles/particleSystem.ts +++ b/packages/dev/core/src/Particles/particleSystem.ts @@ -67,7 +67,7 @@ export class ParticleSystem extends BaseParticleSystem implements IDisposable, I */ public static readonly BILLBOARDMODE_ALL = Constants.PARTICLES_BILLBOARDMODE_ALL; /** - * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction + * Special billboard mode where the particle will be billboard to the camera but rotated to align with direction */ public static readonly BILLBOARDMODE_STRETCHED = Constants.PARTICLES_BILLBOARDMODE_STRETCHED; /** @@ -2921,7 +2921,7 @@ export class ParticleSystem extends BaseParticleSystem implements IDisposable, I * @param sceneOrEngine The scene or the engine to create the particle system in * @param rootUrl The root url to use to load external dependencies like texture * @param doNotStart Ignore the preventAutoStart attribute and does not start - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns the Parsed particle system */ public static Parse(parsedParticleSystem: any, sceneOrEngine: Scene | ThinEngine, rootUrl: string, doNotStart = false, capacity?: number): ParticleSystem { diff --git a/packages/dev/core/src/Particles/particleSystemSet.ts b/packages/dev/core/src/Particles/particleSystemSet.ts index c20abc05c81..06dcf32e338 100644 --- a/packages/dev/core/src/Particles/particleSystemSet.ts +++ b/packages/dev/core/src/Particles/particleSystemSet.ts @@ -151,7 +151,7 @@ export class ParticleSystemSet implements IDisposable { * @param data defines a JSON compatible representation of the set * @param scene defines the hosting scene * @param gpu defines if we want GPU particles or CPU particles - * @param capacity defines the system capacity (if null or undefined the sotred capacity will be used) + * @param capacity defines the system capacity (if null or undefined the stored capacity will be used) * @returns a new ParticleSystemSet */ public static Parse(data: any, scene: Scene, gpu = false, capacity?: number): ParticleSystemSet { diff --git a/packages/dev/core/src/Particles/solidParticleSystem.ts b/packages/dev/core/src/Particles/solidParticleSystem.ts index 38aa3a19c02..2ae6bf5732c 100644 --- a/packages/dev/core/src/Particles/solidParticleSystem.ts +++ b/packages/dev/core/src/Particles/solidParticleSystem.ts @@ -1397,7 +1397,7 @@ export class SolidParticleSystem implements IDisposable { bBox.reConstruct(tempMin, tempMax, mesh._worldMatrix); } - // place and scale the particle bouding sphere in the SPS local system, then update it + // place and scale the particle bounding sphere in the SPS local system, then update it const minBbox = modelBoundingInfo.minimum.multiplyToRef(particleScaling, tempVectors[1]); const maxBbox = modelBoundingInfo.maximum.multiplyToRef(particleScaling, tempVectors[2]); diff --git a/packages/dev/core/src/Physics/joinedPhysicsEngineComponent.ts b/packages/dev/core/src/Physics/joinedPhysicsEngineComponent.ts index 8d249e736ea..555208c5cbc 100644 --- a/packages/dev/core/src/Physics/joinedPhysicsEngineComponent.ts +++ b/packages/dev/core/src/Physics/joinedPhysicsEngineComponent.ts @@ -167,7 +167,7 @@ Scene.prototype._advancePhysicsEngineStep = function (step: number) { */ export class PhysicsEngineSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_PHYSICSENGINE; diff --git a/packages/dev/core/src/Physics/v1/Plugins/ammoJSPlugin.ts b/packages/dev/core/src/Physics/v1/Plugins/ammoJSPlugin.ts index 90b41fa5af7..11c1685a8f1 100644 --- a/packages/dev/core/src/Physics/v1/Plugins/ammoJSPlugin.ts +++ b/packages/dev/core/src/Physics/v1/Plugins/ammoJSPlugin.ts @@ -208,7 +208,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin { // @see http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Stepping_The_World // // When maxSteps is 0 do the entire simulation in one step - // When maxSteps is > 0, run up to maxStep times, if on the last step the (remaining step - fixedTimeStep) is < fixedTimeStep, the remainder will be used for the step. (eg. if remainder is 1.001 and fixedTimeStep is 1 the last step will be 1.001, if instead it did 2 steps (1, 0.001) issues occuered when having a tiny step in ammo) + // When maxSteps is > 0, run up to maxStep times, if on the last step the (remaining step - fixedTimeStep) is < fixedTimeStep, the remainder will be used for the step. (eg. if remainder is 1.001 and fixedTimeStep is 1 the last step will be 1.001, if instead it did 2 steps (1, 0.001) issues occurred when having a tiny step in ammo) // Note: To get deterministic physics, timeStep would always need to be divisible by fixedTimeStep private _stepSimulation(timeStep: number = 1 / 60, maxSteps: number = 10, fixedTimeStep: number = 1 / 60) { if (maxSteps == 0) { @@ -436,7 +436,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin { * @param impostor the imposter to create the physics body on */ public generatePhysicsBody(impostor: PhysicsImpostor) { - // Note: this method will not be called on child imposotrs for compound impostors + // Note: this method will not be called on child impostors for compound impostors impostor._pluginData.toDispose = []; @@ -633,7 +633,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin { } } - // adds all verticies (including child verticies) to the triangle mesh + // adds all vertices (including child vertices) to the triangle mesh private _addMeshVerts(btTriangleMesh: any, topLevelObject: IPhysicsEnabledObject, object: IPhysicsEnabledObject) { let triangleCount = 0; if (object && object.getIndices && object.getWorldMatrix && object.getChildMeshes) { @@ -919,7 +919,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin { return returnValue; } - // adds all verticies (including child verticies) to the convex hull shape + // adds all vertices (including child vertices) to the convex hull shape private _addHullVerts(btConvexHullShape: any, topLevelObject: IPhysicsEnabledObject, object: IPhysicsEnabledObject) { let triangleCount = 0; if (object && object.getIndices && object.getWorldMatrix && object.getChildMeshes) { @@ -1324,8 +1324,8 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin { /** * Sets restitution of the impostor - * @param impostor impostor to set resitution on - * @param restitution resitution value + * @param impostor impostor to set restitution on + * @param restitution restitution value */ public setBodyRestitution(impostor: PhysicsImpostor, restitution: number) { impostor.physicsBody.setRestitution(restitution); diff --git a/packages/dev/core/src/Physics/v1/Plugins/oimoJSPlugin.ts b/packages/dev/core/src/Physics/v1/Plugins/oimoJSPlugin.ts index ff7d39aad07..c701728f0d4 100644 --- a/packages/dev/core/src/Physics/v1/Plugins/oimoJSPlugin.ts +++ b/packages/dev/core/src/Physics/v1/Plugins/oimoJSPlugin.ts @@ -453,7 +453,7 @@ export class OimoJSPlugin implements IPhysicsEnginePlugin { } speed *= -1; - //TODO separate rotational and transational motors. + //TODO separate rotational and transactional motors. const motor = motorIndex ? joint.physicsJoint.rotationalLimitMotor2 : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor; @@ -463,7 +463,7 @@ export class OimoJSPlugin implements IPhysicsEnginePlugin { } public setLimit(joint: IMotorEnabledJoint, upperLimit: number, lowerLimit?: number, motorIndex?: number) { - //TODO separate rotational and transational motors. + //TODO separate rotational and transactional motors. const motor = motorIndex ? joint.physicsJoint.rotationalLimitMotor2 : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor; diff --git a/packages/dev/core/src/Physics/v1/physicsImpostor.ts b/packages/dev/core/src/Physics/v1/physicsImpostor.ts index 0ff97d8f6c8..3a3ed05bd1e 100644 --- a/packages/dev/core/src/Physics/v1/physicsImpostor.ts +++ b/packages/dev/core/src/Physics/v1/physicsImpostor.ts @@ -801,7 +801,7 @@ export class PhysicsImpostor { let index = -1; const found = this._onPhysicsCollideCallbacks.some((cbDef, idx) => { if (cbDef.callback === func && cbDef.otherImpostors.length === collidedAgainstList.length) { - // chcek the arrays match + // check the arrays match const sameList = cbDef.otherImpostors.every((impostor) => { return collidedAgainstList.indexOf(impostor) > -1; }); diff --git a/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.ts b/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.ts index b1658157c0b..c354d8a6b52 100644 --- a/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.ts +++ b/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.ts @@ -363,7 +363,7 @@ export class DefaultRenderingPipeline extends PostProcessRenderPipeline implemen } /** - * If glow layer is enabled. (Adds a glow effect to emmissive materials) + * If glow layer is enabled. (Adds a glow effect to emissive materials) */ public set glowLayerEnabled(enabled: boolean) { if (enabled && !this._glowLayer) { @@ -597,7 +597,7 @@ export class DefaultRenderingPipeline extends PostProcessRenderPipeline implemen this._hasCleared = false; if (this.depthOfFieldEnabled) { - // Multi camera suport + // Multi camera support if (this._cameras.length > 1) { for (const camera of this._cameras) { const depthRenderer = this._scene.enableDepthRenderer(camera); diff --git a/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.ts b/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.ts index e60a422b768..048b0f4ed45 100644 --- a/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.ts +++ b/packages/dev/core/src/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.ts @@ -1252,7 +1252,7 @@ export class StandardRenderingPipeline extends PostProcessRenderPipeline impleme Constants.TEXTURETYPE_UNSIGNED_INT ); - let outputLiminance = 1; + let outputLuminance = 1; let time = 0; let lastTime = 0; @@ -1261,25 +1261,25 @@ export class StandardRenderingPipeline extends PostProcessRenderPipeline impleme time += scene.getEngine().getDeltaTime(); - if (outputLiminance < 0) { - outputLiminance = this._hdrCurrentLuminance; + if (outputLuminance < 0) { + outputLuminance = this._hdrCurrentLuminance; } else { const dt = (lastTime - time) / 1000.0; - if (this._hdrCurrentLuminance < outputLiminance + this.hdrDecreaseRate * dt) { - outputLiminance += this.hdrDecreaseRate * dt; - } else if (this._hdrCurrentLuminance > outputLiminance - this.hdrIncreaseRate * dt) { - outputLiminance -= this.hdrIncreaseRate * dt; + if (this._hdrCurrentLuminance < outputLuminance + this.hdrDecreaseRate * dt) { + outputLuminance += this.hdrDecreaseRate * dt; + } else if (this._hdrCurrentLuminance > outputLuminance - this.hdrIncreaseRate * dt) { + outputLuminance -= this.hdrIncreaseRate * dt; } else { - outputLiminance = this._hdrCurrentLuminance; + outputLuminance = this._hdrCurrentLuminance; } } if (this.hdrAutoExposure) { - this._currentExposure = this._fixedExposure / outputLiminance; + this._currentExposure = this._fixedExposure / outputLuminance; } else { - outputLiminance = Scalar.Clamp(outputLiminance, this.hdrMinimumLuminance, 1e20); - effect.setFloat("averageLuminance", outputLiminance); + outputLuminance = Scalar.Clamp(outputLuminance, this.hdrMinimumLuminance, 1e20); + effect.setFloat("averageLuminance", outputLuminance); } lastTime = time; diff --git a/packages/dev/core/src/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.ts b/packages/dev/core/src/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.ts index b2e2e2e2d80..ed3ca3ce297 100644 --- a/packages/dev/core/src/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.ts +++ b/packages/dev/core/src/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.ts @@ -40,7 +40,7 @@ Object.defineProperty(Scene.prototype, "postProcessRenderPipelineManager", { */ export class PostProcessRenderPipelineManagerSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER; diff --git a/packages/dev/core/src/PostProcesses/depthOfFieldEffect.ts b/packages/dev/core/src/PostProcesses/depthOfFieldEffect.ts index 7ad0d419d66..6d5ebdd4ec2 100644 --- a/packages/dev/core/src/PostProcesses/depthOfFieldEffect.ts +++ b/packages/dev/core/src/PostProcesses/depthOfFieldEffect.ts @@ -124,7 +124,7 @@ export class DepthOfFieldEffect extends PostProcessRenderEffect { blockCompilation ); - // Create a pyramid of blurred images (eg. fullSize 1/4 blur, half size 1/2 blur, quarter size 3/4 blur, eith size 4/4 blur) + // Create a pyramid of blurred images (eg. fullSize 1/4 blur, half size 1/2 blur, quarter size 3/4 blur, eighth size 4/4 blur) // Blur the image but do not blur on sharp far to near distance changes to avoid bleeding artifacts // See section 2.6.2 http://fileadmin.cs.lth.se/cs/education/edan35/lectures/12dof.pdf this._depthOfFieldBlurY = []; diff --git a/packages/dev/core/src/PostProcesses/postProcess.ts b/packages/dev/core/src/PostProcesses/postProcess.ts index 882749fd050..2abd782f4c3 100644 --- a/packages/dev/core/src/PostProcesses/postProcess.ts +++ b/packages/dev/core/src/PostProcesses/postProcess.ts @@ -349,7 +349,7 @@ export class PostProcess { /** * A function that is added to the onAfterRenderObservable */ - public set onAfterRender(callback: (efect: Effect) => void) { + public set onAfterRender(callback: (effect: Effect) => void) { if (this._onAfterRenderObserver) { this.onAfterRenderObservable.remove(this._onAfterRenderObserver); } @@ -418,7 +418,7 @@ export class PostProcess { * @param textureType Type of textures used when performing the post process. (default: 0) * @param vertexUrl The url of the vertex shader to be used. (default: "postprocess") * @param indexParameters The index parameters to be used for babylons include syntax "#include[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx - * @param blockCompilation If the shader should not be compiled immediatly. (default: false) + * @param blockCompilation If the shader should not be compiled immediately. (default: false) * @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA) */ constructor( @@ -675,7 +675,7 @@ export class PostProcess { } /** - * Activates the post process by intializing the textures to be used when executed. Notifies onActivateObservable. + * Activates the post process by initializing the textures to be used when executed. Notifies onActivateObservable. * When this post process is used in a pipeline, this is call will bind the input texture of this post process to the output of the previous. * @param camera The camera that will be used in the post process. This camera will be used when calling onActivateObservable. * @param sourceTexture The source texture to be inspected to get the width and height if not specified in the post process constructor. (default: null) @@ -840,7 +840,7 @@ export class PostProcess { this.getEngine().setAlphaConstants(this.alphaConstants.r, this.alphaConstants.g, this.alphaConstants.b, this.alphaConstants.a); } - // Bind the output texture of the preivous post process as the input to this post process. + // Bind the output texture of the previous post process as the input to this post process. let source: RenderTargetWrapper; if (this._shareOutputWithPostProcess) { source = this._shareOutputWithPostProcess.inputTexture; diff --git a/packages/dev/core/src/PostProcesses/postProcessManager.ts b/packages/dev/core/src/PostProcesses/postProcessManager.ts index c17ad99cfc5..66332ecedce 100644 --- a/packages/dev/core/src/PostProcesses/postProcessManager.ts +++ b/packages/dev/core/src/PostProcesses/postProcessManager.ts @@ -104,7 +104,7 @@ export class PostProcessManager { * @param forceFullscreenViewport force gl.viewport to be full screen eg. 0,0,textureWidth,textureHeight * @param faceIndex defines the face to render to if a cubemap is defined as the target * @param lodLevel defines which lod of the texture to render to - * @param doNotBindFrambuffer If set to true, assumes that the framebuffer has been bound previously + * @param doNotBindFramebuffer If set to true, assumes that the framebuffer has been bound previously */ public directRender( postProcesses: PostProcess[], @@ -112,7 +112,7 @@ export class PostProcessManager { forceFullscreenViewport = false, faceIndex = 0, lodLevel = 0, - doNotBindFrambuffer = false + doNotBindFramebuffer = false ): void { const engine = this._scene.getEngine(); @@ -122,7 +122,7 @@ export class PostProcessManager { } else { if (targetTexture) { engine.bindFramebuffer(targetTexture, faceIndex, undefined, undefined, forceFullscreenViewport, lodLevel); - } else if (!doNotBindFrambuffer) { + } else if (!doNotBindFramebuffer) { engine.restoreDefaultFramebuffer(); } engine._debugInsertMarker?.(`post process ${postProcesses[index].name} output`); diff --git a/packages/dev/core/src/PostProcesses/volumetricLightScatteringPostProcess.ts b/packages/dev/core/src/PostProcesses/volumetricLightScatteringPostProcess.ts index e67816b649e..a61ca8ee063 100644 --- a/packages/dev/core/src/PostProcesses/volumetricLightScatteringPostProcess.ts +++ b/packages/dev/core/src/PostProcesses/volumetricLightScatteringPostProcess.ts @@ -558,7 +558,7 @@ export class VolumetricLightScatteringPostProcess extends PostProcess { // Static methods /** - * Creates a default mesh for the Volumeric Light Scattering post-process + * Creates a default mesh for the Volumetric Light Scattering post-process * @param name The mesh name * @param scene The scene where to create the mesh * @returns the default mesh diff --git a/packages/dev/core/src/Rendering/boundingBoxRenderer.ts b/packages/dev/core/src/Rendering/boundingBoxRenderer.ts index 95b18c7fd39..2928cccd62f 100644 --- a/packages/dev/core/src/Rendering/boundingBoxRenderer.ts +++ b/packages/dev/core/src/Rendering/boundingBoxRenderer.ts @@ -48,7 +48,7 @@ Object.defineProperty(Scene.prototype, "forceShowBoundingBoxes", { }, set: function (this: Scene, value: boolean) { this._forceShowBoundingBoxes = value; - // Lazyly creates a BB renderer if needed. + // Lazily creates a BB renderer if needed. if (value) { this.getBoundingBoxRenderer(); } @@ -83,7 +83,7 @@ Object.defineProperty(AbstractMesh.prototype, "showBoundingBox", { }, set: function (this: AbstractMesh, value: boolean) { this._showBoundingBox = value; - // Lazyly creates a BB renderer if needed. + // Lazily creates a BB renderer if needed. if (value) { this.getScene().getBoundingBoxRenderer(); } @@ -98,7 +98,7 @@ Object.defineProperty(AbstractMesh.prototype, "showBoundingBox", { */ export class BoundingBoxRenderer implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_BOUNDINGBOXRENDERER; diff --git a/packages/dev/core/src/Rendering/depthPeelingRenderer.ts b/packages/dev/core/src/Rendering/depthPeelingRenderer.ts index b3c3e0f3412..6fa0e2f1b2e 100644 --- a/packages/dev/core/src/Rendering/depthPeelingRenderer.ts +++ b/packages/dev/core/src/Rendering/depthPeelingRenderer.ts @@ -45,8 +45,8 @@ class DepthPeelingEffectConfiguration implements PrePassEffectConfiguration { /** * The depth peeling renderer that performs - * Order independant transparency (OIT). - * This should not be instanciated directly, as it is part of a scene component + * Order independent transparency (OIT). + * This should not be instantiated directly, as it is part of a scene component */ export class DepthPeelingRenderer { private _scene: Scene; @@ -137,7 +137,7 @@ export class DepthPeelingRenderer { } /** - * Instanciates the depth peeling renderer + * Instantiates the depth peeling renderer * @param scene Scene to attach to * @param passCount Number of depth layers to peel * @returns The depth peeling renderer @@ -149,7 +149,7 @@ export class DepthPeelingRenderer { // We need a depth texture for opaque if (!scene.enablePrePassRenderer()) { - Logger.Warn("Depth peeling for order independant transparency could not enable PrePass, aborting."); + Logger.Warn("Depth peeling for order independent transparency could not enable PrePass, aborting."); return; } @@ -558,7 +558,7 @@ export class DepthPeelingRenderer { } /** - * Disposes the depth peeling renderer and associated ressources + * Disposes the depth peeling renderer and associated resources */ public dispose() { this._disposeTextures(); diff --git a/packages/dev/core/src/Rendering/depthPeelingSceneComponent.ts b/packages/dev/core/src/Rendering/depthPeelingSceneComponent.ts index 2e0d17f7c6d..968ab886e5b 100644 --- a/packages/dev/core/src/Rendering/depthPeelingSceneComponent.ts +++ b/packages/dev/core/src/Rendering/depthPeelingSceneComponent.ts @@ -63,7 +63,7 @@ Object.defineProperty(Scene.prototype, "useOrderIndependentTransparency", { */ export class DepthPeelingSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_DEPTHPEELINGRENDERER; diff --git a/packages/dev/core/src/Rendering/depthRendererSceneComponent.ts b/packages/dev/core/src/Rendering/depthRendererSceneComponent.ts index 409da5d0c27..8256678f7b8 100644 --- a/packages/dev/core/src/Rendering/depthRendererSceneComponent.ts +++ b/packages/dev/core/src/Rendering/depthRendererSceneComponent.ts @@ -75,7 +75,7 @@ Scene.prototype.disableDepthRenderer = function (camera?: Nullable): voi */ export class DepthRendererSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_DEPTHRENDERER; diff --git a/packages/dev/core/src/Rendering/edgesRenderer.ts b/packages/dev/core/src/Rendering/edgesRenderer.ts index 393ea5a7dd4..7e63e9c7732 100644 --- a/packages/dev/core/src/Rendering/edgesRenderer.ts +++ b/packages/dev/core/src/Rendering/edgesRenderer.ts @@ -287,7 +287,7 @@ export class EdgesRenderer implements IEdgesRenderer { this._drawWrapper = new DrawWrapper(source.getEngine()); } - this._prepareRessources(); + this._prepareresources(); if (generateEdgesLines) { if (options?.useAlternateEdgeFinder ?? true) { this._generateEdgesLinesAlternate(); @@ -305,7 +305,7 @@ export class EdgesRenderer implements IEdgesRenderer { }); } - protected _prepareRessources(): void { + protected _prepareresources(): void { if (this._lineShader) { return; } @@ -543,7 +543,7 @@ export class EdgesRenderer implements IEdgesRenderer { } /** - * Find all vertices that are at the same location (with an epsilon) and remapp them on the same vertex + * Find all vertices that are at the same location (with an epsilon) and remap them on the same vertex */ const useFastVertexMerger = this._options?.useFastVertexMerger ?? true; const epsVertexMerge = useFastVertexMerger ? Math.round(-Math.log(this._options?.epsilonVertexMerge ?? 1e-6) / Math.log(10)) : this._options?.epsilonVertexMerge ?? 1e-6; @@ -616,7 +616,7 @@ export class EdgesRenderer implements IEdgesRenderer { // First step: collect the triangles to tessellate const epsVertexAligned = this._options?.epsilonVertexAligned ?? 1e-6; - const mustTesselate: Array<{ index: number; edgesPoints: Array> }> = []; // liste of triangles that must be tessellated + const mustTesselate: Array<{ index: number; edgesPoints: Array> }> = []; // list of triangles that must be tessellated for (let index = 0; index < indices.length; index += 3) { // loop over all triangles @@ -764,7 +764,7 @@ export class EdgesRenderer implements IEdgesRenderer { } /** - * Generates lines edges from adjacencjes + * Generates lines edges from adjacencies * @private */ _generateEdgesLines(): void { diff --git a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderer.ts b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderer.ts index 96fd342c77b..d55c65ce645 100644 --- a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderer.ts +++ b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderer.ts @@ -85,7 +85,7 @@ function IsParticleSystemObject(obj: FluidRenderingObject): obj is FluidRenderin */ export class FluidRendererSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_FLUIDRENDERER; @@ -528,7 +528,7 @@ export class FluidRenderer { } /** - * Disposes of all the ressources used by the class + * Disposes of all the resources used by the class */ public dispose(): void { this._engine.onResizeObservable.remove(this._onEngineResizeObserver); diff --git a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObject.ts b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObject.ts index 0086244818f..395d5fd05c0 100644 --- a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObject.ts +++ b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObject.ts @@ -234,7 +234,7 @@ export abstract class FluidRenderingObject { } /** - * Releases the ressources used by the class + * Releases the resources used by the class */ public dispose(): void { this._depthEffectWrapper?.dispose(); diff --git a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.ts b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.ts index 34fbafed196..8fc22451b90 100644 --- a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.ts +++ b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.ts @@ -142,7 +142,7 @@ export class FluidRenderingObjectCustomParticles extends FluidRenderingObject { } /** - * Releases the ressources used by the class + * Releases the resources used by the class */ public dispose(): void { super.dispose(); diff --git a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.ts b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.ts index b5566712930..793a589591c 100644 --- a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.ts +++ b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.ts @@ -121,7 +121,7 @@ export class FluidRenderingObjectParticleSystem extends FluidRenderingObject { } /** - * Releases the ressources used by the class + * Releases the resources used by the class */ public dispose() { super.dispose(); diff --git a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingTargetRenderer.ts b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingTargetRenderer.ts index 166e882394d..8d7e7b2d705 100644 --- a/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingTargetRenderer.ts +++ b/packages/dev/core/src/Rendering/fluidRenderer/fluidRenderingTargetRenderer.ts @@ -904,8 +904,8 @@ export class FluidRenderingTargetRenderer { } /** - * Releases all the ressources used by the class - * @param onlyPostProcesses If true, releases only the ressources used by the render post processes + * Releases all the resources used by the class + * @param onlyPostProcesses If true, releases only the resources used by the render post processes */ public dispose(onlyPostProcesses = false): void { if (!onlyPostProcesses) { diff --git a/packages/dev/core/src/Rendering/geometryBufferRendererSceneComponent.ts b/packages/dev/core/src/Rendering/geometryBufferRendererSceneComponent.ts index f782c72a350..41143474ff0 100644 --- a/packages/dev/core/src/Rendering/geometryBufferRendererSceneComponent.ts +++ b/packages/dev/core/src/Rendering/geometryBufferRendererSceneComponent.ts @@ -73,7 +73,7 @@ Scene.prototype.disableGeometryBufferRenderer = function (): void { */ export class GeometryBufferRendererSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_GEOMETRYBUFFERRENDERER; diff --git a/packages/dev/core/src/Rendering/outlineRenderer.ts b/packages/dev/core/src/Rendering/outlineRenderer.ts index 588030e5bb1..eba626cf9e0 100644 --- a/packages/dev/core/src/Rendering/outlineRenderer.ts +++ b/packages/dev/core/src/Rendering/outlineRenderer.ts @@ -162,7 +162,7 @@ export class OutlineRenderer implements ISceneComponent { /** * Renders the outline in the canvas. - * @param subMesh Defines the sumesh to render + * @param subMesh Defines the submesh to render * @param batch Defines the batch of meshes in case of instances * @param useOverlay Defines if the rendering is for the overlay or the outline * @param renderPassId Render pass id to use to render the mesh diff --git a/packages/dev/core/src/Rendering/prePassRenderer.ts b/packages/dev/core/src/Rendering/prePassRenderer.ts index 239920ddf5b..3f7f1a93cf1 100644 --- a/packages/dev/core/src/Rendering/prePassRenderer.ts +++ b/packages/dev/core/src/Rendering/prePassRenderer.ts @@ -677,7 +677,7 @@ export class PrePassRenderer { } /** - * Internal, gets the first post proces. + * Internal, gets the first post process. * @param postProcesses * @returns the first post process to be run on this camera. */ diff --git a/packages/dev/core/src/Rendering/prePassRendererSceneComponent.ts b/packages/dev/core/src/Rendering/prePassRendererSceneComponent.ts index df1636bf1a4..f818703dadd 100644 --- a/packages/dev/core/src/Rendering/prePassRendererSceneComponent.ts +++ b/packages/dev/core/src/Rendering/prePassRendererSceneComponent.ts @@ -89,7 +89,7 @@ Scene.prototype.disablePrePassRenderer = function (): void { */ export class PrePassRendererSceneComponent implements ISceneComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_PREPASSRENDERER; diff --git a/packages/dev/core/src/Rendering/subSurfaceConfiguration.ts b/packages/dev/core/src/Rendering/subSurfaceConfiguration.ts index 6b1cc292b3a..e501ff8cd89 100644 --- a/packages/dev/core/src/Rendering/subSurfaceConfiguration.ts +++ b/packages/dev/core/src/Rendering/subSurfaceConfiguration.ts @@ -110,7 +110,7 @@ export class SubSurfaceConfiguration implements PrePassEffectConfiguration { */ public addDiffusionProfile(color: Color3): number { if (this.ssDiffusionD.length >= 5) { - // We only suppport 5 diffusion profiles + // We only support 5 diffusion profiles Logger.Error("You already reached the maximum number of diffusion profiles."); return 0; // default profile } diff --git a/packages/dev/core/src/Rendering/subSurfaceSceneComponent.ts b/packages/dev/core/src/Rendering/subSurfaceSceneComponent.ts index db0be6024d9..cca9a95e59c 100644 --- a/packages/dev/core/src/Rendering/subSurfaceSceneComponent.ts +++ b/packages/dev/core/src/Rendering/subSurfaceSceneComponent.ts @@ -88,7 +88,7 @@ Scene.prototype.disableSubSurfaceForPrePass = function (): void { */ export class SubSurfaceSceneComponent implements ISceneSerializableComponent { /** - * The component name helpful to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_PREPASSRENDERER; diff --git a/packages/dev/core/src/Sprites/spriteSceneComponent.ts b/packages/dev/core/src/Sprites/spriteSceneComponent.ts index 3d795c0dde9..e6e87211a6f 100644 --- a/packages/dev/core/src/Sprites/spriteSceneComponent.ts +++ b/packages/dev/core/src/Sprites/spriteSceneComponent.ts @@ -257,7 +257,7 @@ Scene.prototype.getPointerOverSprite = function (): Nullable { */ export class SpriteSceneComponent implements ISceneComponent { /** - * The component name helpfull to identify the component in the list of scene components. + * The component name, helpful for identifying the component in the list of scene components. */ public readonly name = SceneComponentConstants.NAME_SPRITE; diff --git a/packages/dev/core/src/XR/features/WebXRControllerMovement.ts b/packages/dev/core/src/XR/features/WebXRControllerMovement.ts index 10b628f3ab8..1942f7514d7 100644 --- a/packages/dev/core/src/XR/features/WebXRControllerMovement.ts +++ b/packages/dev/core/src/XR/features/WebXRControllerMovement.ts @@ -40,7 +40,7 @@ export interface IWebXRControllerMovementOptions { */ rotationEnabled?: boolean; /** - * Minimum threshold the controller's thumstick/touchpad must pass before being recognized for rotation (avoids jitter/unintentional rotation) + * Minimum threshold the controller's thumbstick/touchpad must pass before being recognized for rotation (avoids jitter/unintentional rotation) */ rotationThreshold?: number; /** @@ -142,7 +142,7 @@ export class WebXRControllerMovement extends WebXRAbstractFeature { } = {}; private _currentRegistrationConfigurations: WebXRControllerMovementRegistrationConfiguration[] = []; - // Feature configuration is syncronized - this is passed to all handlers (reduce GC pressure). + // Feature configuration is synchronized - this is passed to all handlers (reduce GC pressure). private _featureContext: WebXRControllerMovementFeatureContext; // forward direction for movement, which may differ from viewer pose. private _movementDirection: Nullable = null; diff --git a/packages/dev/core/src/XR/features/WebXRDOMOverlay.ts b/packages/dev/core/src/XR/features/WebXRDOMOverlay.ts index 6c5828d61a7..cf5f34592ad 100644 --- a/packages/dev/core/src/XR/features/WebXRDOMOverlay.ts +++ b/packages/dev/core/src/XR/features/WebXRDOMOverlay.ts @@ -15,7 +15,7 @@ export interface IWebXRDomOverlayOptions { */ element: Element | string; /** - * Supress XR Select events on container element (DOM blocks interaction to scene). + * Suppress XR Select events on container element (DOM blocks interaction to scene). */ supressXRSelectEvents?: boolean; } @@ -49,7 +49,7 @@ export class WebXRDomOverlay extends WebXRAbstractFeature { private _domOverlayType: Nullable = null; /** - * Event Listener to supress "beforexrselect" events. + * Event Listener to suppress "beforexrselect" events. */ private _beforeXRSelectListener: Nullable = null; diff --git a/packages/dev/core/src/XR/webXRExperienceHelper.ts b/packages/dev/core/src/XR/webXRExperienceHelper.ts index 52683ad6b85..dd70312ba6f 100644 --- a/packages/dev/core/src/XR/webXRExperienceHelper.ts +++ b/packages/dev/core/src/XR/webXRExperienceHelper.ts @@ -237,7 +237,7 @@ export class WebXRExperienceHelper implements IDisposable { * display the first rig camera's view on the desktop canvas. * Please note that this will degrade performance, as it requires another camera render. * It is also not recommended to enable this in devices like the quest, as it brings no benefit there. - * @param options giving WebXRSpectatorModeOption for specutator camera to setup when the spectator mode is enabled. + * @param options giving WebXRSpectatorModeOption for spectator camera to setup when the spectator mode is enabled. */ public enableSpectatorMode(options?: WebXRSpectatorModeOption): void { if (!this._spectatorMode) { diff --git a/packages/dev/core/src/assetContainer.ts b/packages/dev/core/src/assetContainer.ts index 8ad19c311e9..c4e927b8acd 100644 --- a/packages/dev/core/src/assetContainer.ts +++ b/packages/dev/core/src/assetContainer.ts @@ -286,7 +286,7 @@ export class AssetContainer extends AbstractScene { * @param cloneMaterials defines an optional boolean that defines if materials must be cloned as well (false by default) * @param options defines an optional list of options to control how to instantiate / clone models * @param options.doNotInstantiate defines if the model must be instantiated or just cloned - * @param options.predicate defines a predicate used to filter whih mesh to instantiate/clone + * @param options.predicate defines a predicate used to filter which mesh to instantiate/clone * @returns a list of rootNodes, skeletons and animation groups that were duplicated */ public instantiateModelsToScene( diff --git a/packages/dev/core/src/scene.ts b/packages/dev/core/src/scene.ts index f3425800dd5..6192b3fff66 100644 --- a/packages/dev/core/src/scene.ts +++ b/packages/dev/core/src/scene.ts @@ -710,14 +710,14 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold /** * This Observable will be triggered before rendering each renderingGroup of each rendered camera. * The RenderingGroupInfo class contains all the information about the context in which the observable is called - * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3) + * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingGroup1, 4 for 2 and 8 for 3) */ public onBeforeRenderingGroupObservable = new Observable(); /** * This Observable will be triggered after rendering each renderingGroup of each rendered camera. * The RenderingGroupInfo class contains all the information about the context in which the observable is called - * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3) + * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingGroup1, 4 for 2 and 8 for 3) */ public onAfterRenderingGroupObservable = new Observable(); @@ -732,7 +732,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold public onAnimationFileImportedObservable = new Observable(); /** - * Gets or sets a user defined funtion to select LOD from a mesh and a camera. + * Gets or sets a user defined function to select LOD from a mesh and a camera. * By default this function is undefined and Babylon.js will select LOD based on distance to camera */ public customLODSelector: (mesh: AbstractMesh, camera: Camera) => Nullable; @@ -787,7 +787,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold public pointerMoveTrianglePredicate: ((p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean) | undefined; /** - * This observable event is triggered when any ponter event is triggered. It is registered during Scene.attachControl() and it is called BEFORE the 3D engine process anything (mesh/sprite picking for instance). + * This observable event is triggered when any pointer event is triggered. It is registered during Scene.attachControl() and it is called BEFORE the 3D engine process anything (mesh/sprite picking for instance). * You have the possibility to skip the process and the call to onPointerObservable by setting PointerInfoPre.skipOnPointerObservable to true */ public onPrePointerObservable = new Observable(); @@ -1363,7 +1363,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold /** * Gets or sets a boolean indicating if lights must be sorted by priority (off by default) - * This is useful if there are more lights that the maximum simulteanous authorized + * This is useful if there are more lights that the maximum simultaneous authorized */ public requireLightSorting = false; @@ -1408,7 +1408,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold /** * @internal * Add a component to the scene. - * Note that the ccomponent could be registered on th next frame if this is called after + * Note that the component could be registered on th next frame if this is called after * the register component stage. * @param component Defines the component to add to the scene */ @@ -2094,7 +2094,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold /** * The provided function will run before render once and will be disposed afterwards. * A timeout delay can be provided so that the function will be executed in N ms. - * The timeout is using the browser's native setTimeout so time percision cannot be guaranteed. + * The timeout is using the browser's native setTimeout so time precision cannot be guaranteed. * @param func The function to be executed. * @param timeout optional delay in ms */ @@ -5172,7 +5172,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold /** * Overrides the default sort function applied in the rendering group to prepare the meshes. - * This allowed control for front to back rendering or reversly depending of the special needs. + * This allowed control for front to back rendering or reversely depending of the special needs. * * @param renderingGroupId The rendering group id corresponding to its index * @param opaqueSortCompareFn The opaque queue comparison function use to sort. diff --git a/packages/dev/core/src/sceneComponent.ts b/packages/dev/core/src/sceneComponent.ts index 6476486e9b9..67bf50e212c 100644 --- a/packages/dev/core/src/sceneComponent.ts +++ b/packages/dev/core/src/sceneComponent.ts @@ -131,7 +131,7 @@ export interface ISceneComponent { rebuild(): void; /** - * Disposes the component and the associated ressources. + * Disposes the component and the associated resources. */ dispose(): void; } diff --git a/packages/dev/core/test/unit/Cameras/babylon.pointerInput.tests.temp b/packages/dev/core/test/unit/Cameras/babylon.pointerInput.tests.temp index 2722bf39da7..be00f0570d8 100644 --- a/packages/dev/core/test/unit/Cameras/babylon.pointerInput.tests.temp +++ b/packages/dev/core/test/unit/Cameras/babylon.pointerInput.tests.temp @@ -115,7 +115,7 @@ function StubCameraInput() { cameraInput.reset(); /** - * Stub out all mothods we want to test as part of the BaseCameraPointersInput testing. + * Stub out all methods we want to test as part of the BaseCameraPointersInput testing. * These stubs keep track of how many times they were called and */ cameraInput.onTouch = (point: Nullable, offsetX: number, offsetY: number) => { diff --git a/packages/dev/core/test/unit/Collisions/babylon.pickingInfo.test.ts b/packages/dev/core/test/unit/Collisions/babylon.pickingInfo.test.ts index 825d6cefe72..f45b8eb5571 100644 --- a/packages/dev/core/test/unit/Collisions/babylon.pickingInfo.test.ts +++ b/packages/dev/core/test/unit/Collisions/babylon.pickingInfo.test.ts @@ -229,7 +229,7 @@ describe("PickingInfo", () => { expect(pickingInfo.getTextureCoordinates()).toBeNull(); }); - it("should return null when indicies are not present", () => { + it("should return null when indices are not present", () => { const pickingInfo = new PickingInfo(); pickingInfo.pickedMesh = box; diff --git a/packages/dev/gui/src/2D/advancedDynamicTexture.ts b/packages/dev/gui/src/2D/advancedDynamicTexture.ts index 7d3e66a8bfe..004b86838e9 100644 --- a/packages/dev/gui/src/2D/advancedDynamicTexture.ts +++ b/packages/dev/gui/src/2D/advancedDynamicTexture.ts @@ -38,7 +38,7 @@ declare type StandardMaterial = import("core/Materials/standardMaterial").Standa * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui */ export class AdvancedDynamicTexture extends DynamicTexture { - /** Define the Uurl to load snippets */ + /** Define the url to load snippets */ public static SnippetUrl = Constants.SnippetUrl; /** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */ @@ -1076,7 +1076,7 @@ export class AdvancedDynamicTexture extends DynamicTexture { /** * Connect the texture to a hosting mesh to enable interactions * @param mesh defines the mesh to attach to - * @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well + * @param supportPointerMove defines a boolean indicating if pointer move events must be caught as well */ public attachToMesh(mesh: AbstractMesh, supportPointerMove = true): void { const scene = this.getScene(); diff --git a/packages/dev/gui/src/2D/controls/colorpicker.ts b/packages/dev/gui/src/2D/controls/colorpicker.ts index c06e7f816c3..8d7ba9318c8 100644 --- a/packages/dev/gui/src/2D/controls/colorpicker.ts +++ b/packages/dev/gui/src/2D/controls/colorpicker.ts @@ -217,7 +217,7 @@ export class ColorPicker extends Control { } private _createColorWheelCanvas(radius: number, thickness: number): ICanvas { - // Shoudl abstract platform instead of using LastCreatedEngine + // Should abstract platform instead of using LastCreatedEngine const engine = EngineStore.LastCreatedEngine; if (!engine) { throw new Error("Invalid engine. Unable to create a canvas."); @@ -676,7 +676,7 @@ export class ColorPicker extends Control { }); pickerGrid.addControl(picker, 0, 0); - // Picker body right quarant + // Picker body right quadrant const pickerBodyRight: Grid = new Grid(); pickerBodyRight.name = "Dialogue Right Half"; pickerBodyRight.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; @@ -697,11 +697,11 @@ export class ColorPicker extends Control { // Picker Swatches quadrant const pickerSwatches: Grid = new Grid(); pickerSwatches.name = "New and Current Swatches"; - const pickeSwatchesRows: number[] = [0.04, 0.16, 0.64, 0.16]; - pickerSwatches.addRowDefinition(pickeSwatchesRows[0], false); - pickerSwatches.addRowDefinition(pickeSwatchesRows[1], false); - pickerSwatches.addRowDefinition(pickeSwatchesRows[2], false); - pickerSwatches.addRowDefinition(pickeSwatchesRows[3], false); + const pickerSwatchesRows: number[] = [0.04, 0.16, 0.64, 0.16]; + pickerSwatches.addRowDefinition(pickerSwatchesRows[0], false); + pickerSwatches.addRowDefinition(pickerSwatchesRows[1], false); + pickerSwatches.addRowDefinition(pickerSwatchesRows[2], false); + pickerSwatches.addRowDefinition(pickerSwatchesRows[3], false); pickerSwatchesButtons.addControl(pickerSwatches, 0, 0); // Active swatches @@ -713,7 +713,7 @@ export class ColorPicker extends Control { pickerSwatches.addControl(activeSwatches, 2, 0); const labelWidth: number = Math.floor(parseInt(options.pickerWidth) * dialogBodyCols[1] * pickerButtonsCol[0] * 0.11); - const labelHeight: number = Math.floor(parseInt(options.pickerHeight) * pickerPanelRows[1] * pickerBodyRightRows[0] * pickeSwatchesRows[1] * 0.5); + const labelHeight: number = Math.floor(parseInt(options.pickerHeight) * pickerPanelRows[1] * pickerBodyRightRows[0] * pickerSwatchesRows[1] * 0.5); let labelTextSize: number; if (options.pickerWidth > options.pickerHeight) { @@ -1314,10 +1314,10 @@ export class ColorPicker extends Control { const swatch: Button = Button.CreateSimpleButton("Swatch_" + swatchNumber, icon); swatch.fontFamily = "coreglyphs"; const swatchColor: Color3 = Color3.FromHexString(options.savedColors[swatchNumber]); - const swatchLuminence: number = swatchColor.r + swatchColor.g + swatchColor.b; + const swatchLuminance: number = swatchColor.r + swatchColor.g + swatchColor.b; // Set color of outline and textBlock based on luminance of the color swatch so feedback always visible - if (swatchLuminence > luminanceLimit) { + if (swatchLuminance > luminanceLimit) { swatch.color = iconColorDark; } else { swatch.color = iconColorLight; diff --git a/packages/dev/gui/src/2D/controls/control.ts b/packages/dev/gui/src/2D/controls/control.ts index 8f63d9fcfb7..dcb70b5b8a6 100644 --- a/packages/dev/gui/src/2D/controls/control.ts +++ b/packages/dev/gui/src/2D/controls/control.ts @@ -1453,7 +1453,7 @@ export class Control implements IAnimatable { } /** - * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control. + * Shorthand function to set the top, right, bottom, and left padding values in pixels on the control. * @param { number} paddingTop - The value in pixels of the top padding. * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used. * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used. @@ -1562,12 +1562,12 @@ export class Control implements IAnimatable { } /** @internal */ - protected _computeAdditionnalOffsetX() { + protected _computeAdditionalOffsetX() { return 0; } /** @internal */ - protected _computeAdditionnalOffsetY() { + protected _computeAdditionalOffsetY() { return 0; } @@ -1578,7 +1578,7 @@ export class Control implements IAnimatable { if (this.host && this.host.useInvalidateRectOptimization) { // Rotate by transform to get the measure transformed to global space this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA); - // get the boudning box of the current measure and last frames measure in global space and invalidate it + // get the bounding box of the current measure and last frames measure in global space and invalidate it // the previous measure is used to properly clear a control that is scaled down Measure.CombineToRef(this._tmpMeasureA, this._prevCurrentMeasureTransformedIntoGlobalSpace, this._tmpMeasureA); @@ -1592,8 +1592,8 @@ export class Control implements IAnimatable { const topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0); const bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0); - const offsetX = this._computeAdditionnalOffsetX(); - const offsetY = this._computeAdditionnalOffsetY(); + const offsetX = this._computeAdditionalOffsetX(); + const offsetY = this._computeAdditionalOffsetY(); this.host.invalidateRect( Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX), diff --git a/packages/dev/gui/src/2D/controls/displayGrid.ts b/packages/dev/gui/src/2D/controls/displayGrid.ts index 38e932ccf88..fd5dc20dc14 100644 --- a/packages/dev/gui/src/2D/controls/displayGrid.ts +++ b/packages/dev/gui/src/2D/controls/displayGrid.ts @@ -8,10 +8,10 @@ export class DisplayGrid extends Control { private _cellWidth = 20; private _cellHeight = 20; - private _minorLineTickness = 1; + private _minorLineThickness = 1; private _minorLineColor = "DarkGray"; - private _majorLineTickness = 2; + private _majorLineThickness = 2; private _majorLineColor = "White"; private _majorLineFrequency = 5; @@ -90,14 +90,14 @@ export class DisplayGrid extends Control { this._markAsDirty(); } - /** Gets or sets the tickness of minor lines (1 by default) */ + /** Gets or sets the thickness of minor lines (1 by default) */ @serialize() - public get minorLineTickness(): number { - return this._minorLineTickness; + public get minorLineThickness(): number { + return this._minorLineThickness; } - public set minorLineTickness(value: number) { - this._minorLineTickness = value; + public set minorLineThickness(value: number) { + this._minorLineThickness = value; this._markAsDirty(); } @@ -114,14 +114,14 @@ export class DisplayGrid extends Control { this._markAsDirty(); } - /** Gets or sets the tickness of major lines (2 by default) */ + /** Gets or sets the thickness of major lines (2 by default) */ @serialize() - public get majorLineTickness(): number { - return this._majorLineTickness; + public get majorLineThickness(): number { + return this._majorLineThickness; } - public set majorLineTickness(value: number) { - this._majorLineTickness = value; + public set majorLineThickness(value: number) { + this._majorLineThickness = value; this._markAsDirty(); } @@ -178,7 +178,7 @@ export class DisplayGrid extends Control { if (this._displayMinorLines) { context.strokeStyle = this._minorLineColor; - context.lineWidth = this._minorLineTickness; + context.lineWidth = this._minorLineThickness; for (let x = -cellCountX / 2 + 1; x < cellCountX / 2; x++) { const cellX = left + x * this.cellWidth; @@ -203,7 +203,7 @@ export class DisplayGrid extends Control { // Major lines if (this._displayMajorLines) { context.strokeStyle = this._majorLineColor; - context.lineWidth = this._majorLineTickness; + context.lineWidth = this._majorLineThickness; for (let x = -cellCountX / 2 + this._majorLineFrequency; x < cellCountX / 2; x += this._majorLineFrequency) { const cellX = left + x * this.cellWidth; diff --git a/packages/dev/gui/src/2D/controls/focusableButton.ts b/packages/dev/gui/src/2D/controls/focusableButton.ts index c34931c65d2..3b255aff0ac 100644 --- a/packages/dev/gui/src/2D/controls/focusableButton.ts +++ b/packages/dev/gui/src/2D/controls/focusableButton.ts @@ -99,7 +99,7 @@ export class FocusableButton extends Button implements IFocusableControl { } /** @internal */ - public displose() { + public dispose() { super.dispose(); this.onBlurObservable.clear(); diff --git a/packages/dev/gui/src/2D/controls/inputText.ts b/packages/dev/gui/src/2D/controls/inputText.ts index c788564c413..a50e765ffc9 100644 --- a/packages/dev/gui/src/2D/controls/inputText.ts +++ b/packages/dev/gui/src/2D/controls/inputText.ts @@ -45,7 +45,7 @@ export class InputText extends Control implements IFocusableControl { protected _currentKey = ""; protected _isTextHighlightOn = false; protected _textHighlightColor = "#d5e0ff"; - protected _highligherOpacity = 0.4; + protected _highlighterOpacity = 0.4; protected _highlightedText = ""; private _startHighlightIndex = 0; private _endHighlightIndex = 0; @@ -107,15 +107,15 @@ export class InputText extends Control implements IFocusableControl { /** Gets or sets the text highlighter transparency; default: 0.4 */ @serialize() - public get highligherOpacity(): number { - return this._highligherOpacity; + public get highlighterOpacity(): number { + return this._highlighterOpacity; } - public set highligherOpacity(value: number) { - if (this._highligherOpacity === value) { + public set highlighterOpacity(value: number) { + if (this._highlighterOpacity === value) { return; } - this._highligherOpacity = value; + this._highlighterOpacity = value; this._markAsDirty(); } /** Gets or sets a boolean indicating whether to select complete text by default on input focus */ @@ -133,7 +133,7 @@ export class InputText extends Control implements IFocusableControl { this._markAsDirty(); } - /** Gets or sets the text hightlight color */ + /** Gets or sets the text highlight color */ @serialize() public get textHighlightColor(): string { return this._textHighlightColor; @@ -319,7 +319,7 @@ export class InputText extends Control implements IFocusableControl { } public set text(value: string) { - const valueAsString = value.toString(); // Forcing convertion + const valueAsString = value.toString(); // Forcing conversion if (!this._textWrapper) { this._textWrapper = new TextWrapper(); @@ -812,7 +812,7 @@ export class InputText extends Control implements IFocusableControl { */ protected _onCopyText(ev: ClipboardEvent): void { this.isTextHighlightOn = false; - //when write permission to clipbaord data is denied + //when write permission to clipboard data is denied try { ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText); } catch {} //pass @@ -829,7 +829,7 @@ export class InputText extends Control implements IFocusableControl { this._textHasChanged(); this.isTextHighlightOn = false; this._cursorOffset = this._textWrapper.length - this._startHighlightIndex; - //when write permission to clipbaord data is denied + //when write permission to clipboard data is denied try { ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText); } catch {} //pass @@ -998,8 +998,8 @@ export class InputText extends Control implements IFocusableControl { } highlightCursorLeft = clipTextLeft; } - //for transparancy - context.globalAlpha = this._highligherOpacity; + //for transparency + context.globalAlpha = this._highlighterOpacity; context.fillStyle = this._textHighlightColor; context.fillRect(highlightCursorLeft, this._currentMeasure.top + (this._currentMeasure.height - this._fontOffset.height) / 2, width, this._fontOffset.height); context.globalAlpha = 1.0; diff --git a/packages/dev/gui/src/2D/controls/inputTextArea.ts b/packages/dev/gui/src/2D/controls/inputTextArea.ts index d77c764a8e3..7aeec9ea943 100644 --- a/packages/dev/gui/src/2D/controls/inputTextArea.ts +++ b/packages/dev/gui/src/2D/controls/inputTextArea.ts @@ -737,7 +737,7 @@ export class InputTextArea extends InputText { */ protected _onCopyText(ev: ClipboardEvent): void { this._isTextHighlightOn = false; - //when write permission to clipbaord data is denied + //when write permission to clipboard data is denied try { ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText); } catch {} //pass @@ -754,7 +754,7 @@ export class InputTextArea extends InputText { if (!this._highlightedText) { return; } - //when write permission to clipbaord data is denied + //when write permission to clipboard data is denied try { ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText); } catch {} //pass @@ -853,7 +853,7 @@ export class InputTextArea extends InputText { context.beginPath(); context.fillStyle = this.fontStyle; - // here we define the visible reactangle to clip it in next line + // here we define the visible rectangle to clip it in next line context.rect(this._clipTextLeft, this._clipTextTop, this._availableWidth + 2, this._availableHeight + 2); context.clip(); @@ -918,7 +918,7 @@ export class InputTextArea extends InputText { this._highlightedText = this.text.substring(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex); - context.globalAlpha = this._highligherOpacity; + context.globalAlpha = this._highlighterOpacity; context.fillStyle = this._textHighlightColor; const startLineIndex = Math.min(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex); @@ -947,9 +947,9 @@ export class InputTextArea extends InputText { const leftOffsetWidth = context.measureText(line.text.substr(0, begin)).width; const selectedText = line.text.substring(begin, end); - const hightlightWidth = context.measureText(selectedText).width; + const highlightWidth = context.measureText(selectedText).width; - context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, hightlightWidth, this._fontOffset.height); + context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, highlightWidth, this._fontOffset.height); highlightRootY += this._fontOffset.height; } @@ -1029,7 +1029,7 @@ export class InputTextArea extends InputText { // for textselection public _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void { - // Avoid Chromium-like beahavior when this event is fired right after onPointerDown + // Avoid Chromium-like behavior when this event is fired right after onPointerDown if (pi.event.movementX === 0 && pi.event.movementY === 0) { return; } @@ -1175,7 +1175,7 @@ export class InputTextArea extends InputText { } /** - * Select the word immediatly under the cursor on double click + * Select the word immediately under the cursor on double click * * @param _evt Pointer informations of double click * @internal diff --git a/packages/dev/gui/src/2D/controls/radioButton.ts b/packages/dev/gui/src/2D/controls/radioButton.ts index 9be80985626..81ed7be0c00 100644 --- a/packages/dev/gui/src/2D/controls/radioButton.ts +++ b/packages/dev/gui/src/2D/controls/radioButton.ts @@ -161,13 +161,13 @@ export class RadioButton extends Control { if (this._isChecked) { context.fillStyle = this._isEnabled ? this.color : this._disabledColor; const offsetWidth = actualWidth * this._checkSizeRatio; - const offseHeight = actualHeight * this._checkSizeRatio; + const offsetHeight = actualHeight * this._checkSizeRatio; Control.drawEllipse( this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, - offseHeight / 2 - this._thickness / 2, + offsetHeight / 2 - this._thickness / 2, context ); diff --git a/packages/dev/gui/src/2D/controls/rectangle.ts b/packages/dev/gui/src/2D/controls/rectangle.ts index 16fecde243f..44b3b3f277a 100644 --- a/packages/dev/gui/src/2D/controls/rectangle.ts +++ b/packages/dev/gui/src/2D/controls/rectangle.ts @@ -56,7 +56,7 @@ export class Rectangle extends Container { } /** @internal */ - protected _computeAdditionnalOffsetX() { + protected _computeAdditionalOffsetX() { if (this._cornerRadius) { // Take in account the aliasing return 1; @@ -65,7 +65,7 @@ export class Rectangle extends Container { } /** @internal */ - protected _computeAdditionnalOffsetY() { + protected _computeAdditionalOffsetY() { if (this._cornerRadius) { // Take in account the aliasing return 1; diff --git a/packages/dev/gui/src/2D/controls/selector.ts b/packages/dev/gui/src/2D/controls/selector.ts index 6df54a4c3fc..46095ae2bb1 100644 --- a/packages/dev/gui/src/2D/controls/selector.ts +++ b/packages/dev/gui/src/2D/controls/selector.ts @@ -582,7 +582,7 @@ export class SelectionPanel extends Rectangle { /** Change selector label to the one given * @param label is the new selector label - * @param groupNb is the number of the groupcontaining the selector + * @param groupNb is the number of the group containing the selector * @param selectorNb is the number of the selector within a group to relabel * */ public relabel(label: string, groupNb: number, selectorNb: number): void { diff --git a/packages/dev/gui/src/3D/controls/container3D.ts b/packages/dev/gui/src/3D/controls/container3D.ts index b753278eb61..15d2fbc9249 100644 --- a/packages/dev/gui/src/3D/controls/container3D.ts +++ b/packages/dev/gui/src/3D/controls/container3D.ts @@ -100,7 +100,7 @@ export class Container3D extends Control3D { } /** - * This function will be called everytime a new control is added + * This function will be called every time a new control is added */ protected _arrangeChildren() {} diff --git a/packages/dev/gui/src/3D/controls/control3D.ts b/packages/dev/gui/src/3D/controls/control3D.ts index a8b0c438e8e..9ae4125f997 100644 --- a/packages/dev/gui/src/3D/controls/control3D.ts +++ b/packages/dev/gui/src/3D/controls/control3D.ts @@ -287,7 +287,7 @@ export class Control3D implements IDisposable, IBehaviorAware { /** * Node creation. - * Can be overriden by children + * Can be overridden by children * @param scene defines the scene where the node must be attached * @returns the attached node or null if none. Must return a Mesh or AbstractMesh if there is an attached visible object */ diff --git a/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderBarMaterial.ts b/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderBarMaterial.ts index d252c672ad3..a54870ceb11 100644 --- a/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderBarMaterial.ts +++ b/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderBarMaterial.ts @@ -390,7 +390,7 @@ export class MRDLSliderBarMaterial extends PushMaterial { public rightIndexMiddlePosition = new Vector3(0, 0, 0); /** - * Gets or sets the Decal Scle for XY. + * Gets or sets the Decal Scale for XY. */ @serialize() public decalScaleXY = new Vector2(1.5, 1.5); @@ -460,7 +460,7 @@ export class MRDLSliderBarMaterial extends PushMaterial { /** * @internal */ - public globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0); + public globalRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0); /** * @internal @@ -831,7 +831,7 @@ export class MRDLSliderBarMaterial extends PushMaterial { this._activeEffect.setFloat("Use_Global_Right_Index", this.useGlobalRightIndex); this._activeEffect.setVector4("Global_Left_Index_Tip_Position", this.globalLeftIndexTipPosition); - this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globaRightIndexTipPosition); + this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globalRightIndexTipPosition); this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position", this.globalLeftThumbTipPosition); this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position", this.globalRightThumbTipPosition); diff --git a/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderThumbMaterial.ts b/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderThumbMaterial.ts index fd94426130e..b83f153ceff 100644 --- a/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderThumbMaterial.ts +++ b/packages/dev/gui/src/3D/materials/mrdl/mrdlSliderThumbMaterial.ts @@ -461,7 +461,7 @@ export class MRDLSliderThumbMaterial extends PushMaterial { /** * @internal */ - public globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0); + public globalRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0); /** * @internal @@ -831,7 +831,7 @@ export class MRDLSliderThumbMaterial extends PushMaterial { this._activeEffect.setFloat("Use_Global_Right_Index", this.useGlobalRightIndex); this._activeEffect.setVector4("Global_Left_Index_Tip_Position", this.globalLeftIndexTipPosition); - this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globaRightIndexTipPosition); + this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globalRightIndexTipPosition); this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position", this.globalLeftThumbTipPosition); this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position", this.globalRightThumbTipPosition); diff --git a/packages/dev/inspector/src/components/actionTabs/tabs/performanceViewer/performanceViewerComponent.tsx b/packages/dev/inspector/src/components/actionTabs/tabs/performanceViewer/performanceViewerComponent.tsx index 8387eaffa60..69db0f2d3ed 100644 --- a/packages/dev/inspector/src/components/actionTabs/tabs/performanceViewer/performanceViewerComponent.tsx +++ b/packages/dev/inspector/src/components/actionTabs/tabs/performanceViewer/performanceViewerComponent.tsx @@ -122,7 +122,7 @@ export const PerformanceViewerComponent: React.FC; private _property: React.RefObject; private _typeElement: React.RefObject; - private _propertylement: React.RefObject; + private _propertyElement: React.RefObject; private _loopModeElement: React.RefObject; constructor(props: IAddAnimationComponentProps) { @@ -34,14 +34,14 @@ export class AddAnimationComponent extends React.Component { this.forceUpdate(); }} diff --git a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/materials/nodeMaterialPropertyGridComponent.tsx b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/materials/nodeMaterialPropertyGridComponent.tsx index 896a91fdccd..70de7b83aa8 100644 --- a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/materials/nodeMaterialPropertyGridComponent.tsx +++ b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/materials/nodeMaterialPropertyGridComponent.tsx @@ -193,7 +193,7 @@ export class NodeMaterialPropertyGridComponent extends React.Component { return block.visibleInInspector && block.getClassName() === "GradientBlock"; }) @@ -227,7 +227,7 @@ export class NodeMaterialPropertyGridComponent extends React.Component ); })} - {gradiantNodeMaterialBlocks.map((block, i) => { + {gradientNodeMaterialBlocks.map((block, i) => { return ( {} diff --git a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx index a508c7556da..78fa4b50cf3 100644 --- a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx +++ b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx @@ -180,7 +180,7 @@ export class ParticleSystemPropertyGridComponent extends React.Component )} - {system.isStopping() && } + {system.isStopping() && } ); } @@ -768,7 +768,7 @@ export class ParticleSystemPropertyGridComponent extends React.Component {system instanceof ParticleSystem && ( <> - + {system.useRampGradients && ( <> idOffset diff --git a/packages/dev/inspector/src/components/sceneExplorer/entities/effectLayerPipelineTreeItemComponent.tsx b/packages/dev/inspector/src/components/sceneExplorer/entities/effectLayerPipelineTreeItemComponent.tsx index b80c1ae52ee..749811db594 100644 --- a/packages/dev/inspector/src/components/sceneExplorer/entities/effectLayerPipelineTreeItemComponent.tsx +++ b/packages/dev/inspector/src/components/sceneExplorer/entities/effectLayerPipelineTreeItemComponent.tsx @@ -5,14 +5,14 @@ import { ExtensionsComponent } from "../extensionsComponent"; import * as React from "react"; import type { EffectLayer } from "core/Layers/effectLayer"; -interface IEffectLayerItemComponenttProps { +interface IEffectLayerItemComponentProps { layer: EffectLayer; extensibilityGroups?: IExplorerExtensibilityGroup[]; onClick: () => void; } -export class EffectLayerItemComponent extends React.Component { - constructor(props: IEffectLayerItemComponenttProps) { +export class EffectLayerItemComponent extends React.Component { + constructor(props: IEffectLayerItemComponentProps) { super(props); } diff --git a/packages/dev/inspector/src/components/sceneExplorer/entities/lightTreeItemComponent.tsx b/packages/dev/inspector/src/components/sceneExplorer/entities/lightTreeItemComponent.tsx index 001d08ce1ff..bc922880651 100644 --- a/packages/dev/inspector/src/components/sceneExplorer/entities/lightTreeItemComponent.tsx +++ b/packages/dev/inspector/src/components/sceneExplorer/entities/lightTreeItemComponent.tsx @@ -3,7 +3,7 @@ import type { Light } from "core/Lights/light"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faLightbulb, faEye } from "@fortawesome/free-solid-svg-icons"; -import { faLightbulb as faLightbubRegular } from "@fortawesome/free-regular-svg-icons"; +import { faLightbulb as faLightbulbRegular } from "@fortawesome/free-regular-svg-icons"; import { TreeItemLabelComponent } from "../treeItemLabelComponent"; import { ExtensionsComponent } from "../extensionsComponent"; import * as React from "react"; @@ -48,7 +48,7 @@ export class LightTreeItemComponent extends React.Component : ; + const isEnabledElement = this.state.isEnabled ? : ; const isGizmoEnabled = this.state.isGizmoEnabled || (this.props.light && this.props.light.reservedDataStore && this.props.light.reservedDataStore.lightGizmo) ? ( diff --git a/packages/dev/inspector/src/components/sceneExplorer/entities/renderingPipelineTreeItemComponent.tsx b/packages/dev/inspector/src/components/sceneExplorer/entities/renderingPipelineTreeItemComponent.tsx index ae57510e5b0..1fad32ef6db 100644 --- a/packages/dev/inspector/src/components/sceneExplorer/entities/renderingPipelineTreeItemComponent.tsx +++ b/packages/dev/inspector/src/components/sceneExplorer/entities/renderingPipelineTreeItemComponent.tsx @@ -6,14 +6,14 @@ import { TreeItemLabelComponent } from "../treeItemLabelComponent"; import { ExtensionsComponent } from "../extensionsComponent"; import * as React from "react"; -interface IRenderPipelineItemComponenttProps { +interface IRenderPipelineItemComponentProps { renderPipeline: PostProcessRenderPipeline; extensibilityGroups?: IExplorerExtensibilityGroup[]; onClick: () => void; } -export class RenderingPipelineItemComponent extends React.Component { - constructor(props: IRenderPipelineItemComponenttProps) { +export class RenderingPipelineItemComponent extends React.Component { + constructor(props: IRenderPipelineItemComponentProps) { super(props); } diff --git a/packages/dev/inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx b/packages/dev/inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx index 06500ff98d0..1bd2061e6b6 100644 --- a/packages/dev/inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx +++ b/packages/dev/inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx @@ -283,7 +283,7 @@ export class SceneExplorerComponent extends React.Component t.getClassName() === "AdvancedDynamicTexture"); const textures = scene.textures.filter((t) => t.getClassName() !== "AdvancedDynamicTexture"); - const postProcessses = scene.postProcesses; + const postProcesses = scene.postProcesses; const pipelines = scene.postProcessRenderPipelineManager.supportedPipelines; // Context menus @@ -490,12 +490,12 @@ export class SceneExplorerComponent extends React.Component - {postProcessses.length > 0 && ( + {postProcesses.length > 0 && ( value.split(delimiter_pattern, 3).map(parseFloat); //color = [r,g,b] - //Set tghe color into the material + //Set the color into the material material.diffuseColor = Color3.FromArray(color); } else if (key === "ka" && material) { // Ambient color (color under shadow) using RGB values @@ -90,7 +90,7 @@ export class MTLFileLoader { //value = "r g b" color = value.split(delimiter_pattern, 3).map(parseFloat); //color = [r,g,b] - //Set tghe color into the material + //Set the color into the material material.ambientColor = Color3.FromArray(color); } else if (key === "ks" && material) { // Specular color (color when light is reflected from shiny surface) using RGB values diff --git a/packages/dev/loaders/src/OBJ/objFileLoader.ts b/packages/dev/loaders/src/OBJ/objFileLoader.ts index c35d13e6ffd..9cfb8cbb4db 100644 --- a/packages/dev/loaders/src/OBJ/objFileLoader.ts +++ b/packages/dev/loaders/src/OBJ/objFileLoader.ts @@ -46,7 +46,7 @@ export class OBJFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlugi public static COMPUTE_NORMALS = false; /** * Optimize the normals for the model. Lighting can be uneven if you use OptimizeWithUV = true because new vertices can be created for the same location if they pertain to different faces. - * Using OptimizehNormals = true will help smoothing the lighting by averaging the normals of those vertices. + * Using OptimizeNormals = true will help smoothing the lighting by averaging the normals of those vertices. */ public static OPTIMIZE_NORMALS = false; /** diff --git a/packages/dev/loaders/src/OBJ/objLoadingOptions.ts b/packages/dev/loaders/src/OBJ/objLoadingOptions.ts index e9f2767d81f..34594215286 100644 --- a/packages/dev/loaders/src/OBJ/objLoadingOptions.ts +++ b/packages/dev/loaders/src/OBJ/objLoadingOptions.ts @@ -31,7 +31,7 @@ export type OBJLoadingOptions = { computeNormals: boolean; /** * Optimize the normals for the model. Lighting can be uneven if you use OptimizeWithUV = true because new vertices can be created for the same location if they pertain to different faces. - * Using OptimizehNormals = true will help smoothing the lighting by averaging the normals of those vertices. + * Using OptimizeNormals = true will help smoothing the lighting by averaging the normals of those vertices. */ optimizeNormals: boolean; /** diff --git a/packages/dev/loaders/src/glTF/1.0/glTFLoader.ts b/packages/dev/loaders/src/glTF/1.0/glTFLoader.ts index 99f4c18c35f..e1b86c0a85a 100644 --- a/packages/dev/loaders/src/glTF/1.0/glTFLoader.ts +++ b/packages/dev/loaders/src/glTF/1.0/glTFLoader.ts @@ -11,7 +11,7 @@ import type { IGLTFMesh, IGLTFAccessor, IGLTFLight, - IGLTFAmbienLight, + IGLTFAmbientLight, IGLTFDirectionalLight, IGLTFPointLight, IGLTFSpotLight, @@ -920,12 +920,12 @@ const importNode = (gltfRuntime: IGLTFRuntime, node: IGLTFNode, id: string): Nul if (light) { if (light.type === "ambient") { - const ambienLight: IGLTFAmbienLight = (light)[light.type]; + const ambientLight: IGLTFAmbientLight = (light)[light.type]; const hemiLight = new HemisphericLight(node.light, Vector3.Zero(), gltfRuntime.scene); hemiLight.name = node.name || ""; - if (ambienLight.color) { - hemiLight.diffuse = Color3.FromArray(ambienLight.color); + if (ambientLight.color) { + hemiLight.diffuse = Color3.FromArray(ambientLight.color); } lastNode = hemiLight; @@ -1110,7 +1110,7 @@ const postLoad = (gltfRuntime: IGLTFRuntime) => { }; /** - * onBind shaderrs callback to set uniforms and matrices + * onBind shaders callback to set uniforms and matrices * @param mesh * @param gltfRuntime * @param unTreatedUniforms @@ -1844,8 +1844,8 @@ export class GLTFLoader implements IGLTFLoader { * @param assetContainer defines the asset container to use (can be null) * @param data gltf data containing information of the meshes in a loaded file * @param rootUrl root url to load from - * @param onProgress event that fires when loading progress has occured - * @returns a promise containg the loaded meshes, particles, skeletons and animations + * @param onProgress event that fires when loading progress has occurred + * @returns a promise containing the loaded meshes, particles, skeletons and animations */ public importMeshAsync( meshesNames: any, @@ -1896,7 +1896,7 @@ export class GLTFLoader implements IGLTFLoader { data, rootUrl, (gltfRuntime) => { - // Load runtime extensios + // Load runtime extensions GLTFLoaderExtension.LoadRuntimeExtensionsAsync( gltfRuntime, () => { @@ -1931,7 +1931,7 @@ export class GLTFLoader implements IGLTFLoader { * @param scene the scene the objects should be added to * @param data gltf data containing information of the meshes in a loaded file * @param rootUrl root url to load from - * @param onProgress event that fires when loading progress has occured + * @param onProgress event that fires when loading progress has occurred * @returns a promise which completes when objects have been loaded to the scene */ public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void): Promise { @@ -2086,7 +2086,7 @@ export abstract class GLTFLoaderExtension { } /** - * Defines an onverride for creating gltf runtime + * Defines an override for creating gltf runtime * Return true to stop further extensions from creating the runtime * @param gltfRuntime * @param onSuccess diff --git a/packages/dev/loaders/src/glTF/1.0/glTFLoaderInterfaces.ts b/packages/dev/loaders/src/glTF/1.0/glTFLoaderInterfaces.ts index 93efc40a748..76bbd303f2f 100644 --- a/packages/dev/loaders/src/glTF/1.0/glTFLoaderInterfaces.ts +++ b/packages/dev/loaders/src/glTF/1.0/glTFLoaderInterfaces.ts @@ -251,7 +251,7 @@ export interface IGLTFTexture extends IGLTFChildRootProperty { } /** @internal */ -export interface IGLTFAmbienLight { +export interface IGLTFAmbientLight { color?: number[]; } diff --git a/packages/dev/loaders/src/glTF/1.0/glTFLoaderUtils.ts b/packages/dev/loaders/src/glTF/1.0/glTFLoaderUtils.ts index 680aac60acd..c4d60ed8d7c 100644 --- a/packages/dev/loaders/src/glTF/1.0/glTFLoaderUtils.ts +++ b/packages/dev/loaders/src/glTF/1.0/glTFLoaderUtils.ts @@ -118,7 +118,7 @@ export class GLTFUtils { * @param accessor the GLTF accessor objet */ public static GetByteStrideFromType(accessor: IGLTFAccessor): number { - // Needs this function since "byteStride" isn't requiered in glTF format + // Needs this function since "byteStride" isn't required in glTF format const type = accessor.type; switch (type) { diff --git a/packages/dev/loaders/src/glTF/2.0/Extensions/KHR_materials_variants.ts b/packages/dev/loaders/src/glTF/2.0/Extensions/KHR_materials_variants.ts index 269b650238c..39eccdef6c9 100644 --- a/packages/dev/loaders/src/glTF/2.0/Extensions/KHR_materials_variants.ts +++ b/packages/dev/loaders/src/glTF/2.0/Extensions/KHR_materials_variants.ts @@ -226,7 +226,7 @@ export class KHR_materials_variants implements IGLTFLoaderExtension { let metadata: Nullable = null; let newRoot: Nullable = newMesh; - // Find root to get medata + // Find root to get metadata do { newRoot = newRoot!.parent; if (!newRoot) { diff --git a/packages/dev/loaders/src/glTF/2.0/glTFLoaderExtension.ts b/packages/dev/loaders/src/glTF/2.0/glTFLoaderExtension.ts index 72ae55dce23..20c60256e3e 100644 --- a/packages/dev/loaders/src/glTF/2.0/glTFLoaderExtension.ts +++ b/packages/dev/loaders/src/glTF/2.0/glTFLoaderExtension.ts @@ -160,7 +160,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa /** * @internal - * Define this method to modify the default behvaior when loading animation channels. + * Define this method to modify the default behavior when loading animation channels. * @param context The context when loading the asset * @param animationContext The context of the animation when loading the asset * @param animation The glTF animation property diff --git a/packages/dev/materials/readme.md b/packages/dev/materials/readme.md index 58a4ca3beb0..acaed41add9 100644 --- a/packages/dev/materials/readme.md +++ b/packages/dev/materials/readme.md @@ -2,7 +2,7 @@ To get a detailed tutorial, please read the [documentation](https://doc.babylonjs.com/divingDeeper/developWithBjs/matForMatLibrary) -For every material, you can find a detailled documentation [here](https://doc.babylonjs.com/extensions) under **materials library** tag. +For every material, you can find a detailed documentation [here](https://doc.babylonjs.com/extensions) under **materials library** tag. ## Using a material from the library diff --git a/packages/dev/materials/src/custom/readme.md b/packages/dev/materials/src/custom/readme.md index 60e9bc19eb1..38d5ff409ba 100644 --- a/packages/dev/materials/src/custom/readme.md +++ b/packages/dev/materials/src/custom/readme.md @@ -11,9 +11,9 @@ > > [ Begin ] > -> . // includes extensions varyng uniforms attributes special functions +> . // includes extensions varying uniforms attributes special functions > -> [ Definations ] +> [ Definitions ] > > void main(){ > @@ -35,7 +35,7 @@ method : SelectVersion(ver:string) method : AddUniform(name:string,kind:string,param:any):CustomMaterial > for append dynamic setting and manage
-> this method Add Unforn in bouth of shaders(Fragment and Vertex)
+> this method Add Uniform in both of shaders(Fragment and Vertex)
> usage : new CustomMaterial(...).AddUniform('time','float')
> : new CustomMaterial(...).AddUniform('direction','vec3',new BABYLON.Vector3(0.,0.,0.))
> : new CustomMaterial(...).AddUniform('txt1','sampler2D', new BABYLON.Texture("path",scene)) @@ -45,11 +45,11 @@ method : Fragment_Begin(shaderPart:string):CustomMaterial > shaderPart is Shader Structure append in start of main function in fragment shader
> usage : new CustomMaterial(...).Fragment_Begin('vec3 direction = vec3(0.);') -method : Fragment_Definations(shaderPart:string):CustomMaterial +method : Fragment_Definitions(shaderPart:string):CustomMaterial -> shaderPart is Shader Structure append in befor of the main function in fragment shader
-> you can define your varyng and functions from this
-> usage : new CustomMaterial(...).Fragment_Definations('float func1(vec4 param1){ return param1.x;}')
+> shaderPart is Shader Structure append in before of the main function in fragment shader
+> you can define your varying and functions from this
+> usage : new CustomMaterial(...).Fragment_Definitions('float func1(vec4 param1){ return param1.x;}')
> > - dont try use uniform with this function because uniforms need to add buffers @@ -94,11 +94,11 @@ method : Vertex_Begin(shaderPart:string):CustomMaterial > shaderPart is Shader Structure append in start of main function in vertex shader
> usage : new CustomMaterial(...).Vertex_Begin('vec3 direction = vec3(0.);') -method : Vertex_Definations(shaderPart:string):CustomMaterial +method : Vertex_Definitions(shaderPart:string):CustomMaterial -> shaderPart is Shader Structure append in befor of the main function in vertex shader
-> you can define your varyng and functions from this
-> usage : new CustomMaterial(...).Vertex_Definations('float func1(vec4 param1){ return param1.x;}')
+> shaderPart is Shader Structure append in before of the main function in vertex shader
+> you can define your varying and functions from this
+> usage : new CustomMaterial(...).Vertex_Definitions('float func1(vec4 param1){ return param1.x;}')
> > - dont try use uniform with this function because uniforms need to add buffers
> - for connect any information between vertex and fragment part in shader you can define varying you need make that in both of definition part @@ -107,21 +107,21 @@ method : Vertex_MainBegin(shaderPart:string):CustomMaterial > shaderPart is Shader Structure append in start place of the main function in vertex shader -method : Vertex_Befor_PositionUpdated(shaderPart:string):CustomMaterial{ +method : Vertex_Before_PositionUpdated(shaderPart:string):CustomMaterial{ > shaderPart is Shader Structure append after positionUpdated is defined of the main function in vertex shader
-> usage : new CustomMaterial(...).Vertex_Befor_PositionUpdated('positionUpdated = positionUpdated;')
-> : new CustomMaterial(...).Vertex_Befor_PositionUpdated('result = positionUpdated \* 1.5 ;')
+> usage : new CustomMaterial(...).Vertex_Before_PositionUpdated('positionUpdated = positionUpdated;')
+> : new CustomMaterial(...).Vertex_Before_PositionUpdated('result = positionUpdated \* 1.5 ;')
> > - positionUpdated is vec3 variable
> - you can use result (vec3) too that replaced by positionUpdated > - you can use 'normal' attribute in this part too -method : Vertex_Befor_NormalUpdated(shaderPart:string):CustomMaterial +method : Vertex_Before_NormalUpdated(shaderPart:string):CustomMaterial > shaderPart is Shader Structure append after normalUpdated is defined of the main function in vertex shader
-> usage : new CustomMaterial(...).Vertex_Befor_NormalUpdated('normalUpdated = normalUpdated;')
-> : new CustomMaterial(...).Vertex_Befor_NormalUpdated('result = normalUpdated ;')
+> usage : new CustomMaterial(...).Vertex_Before_NormalUpdated('normalUpdated = normalUpdated;')
+> : new CustomMaterial(...).Vertex_Before_NormalUpdated('result = normalUpdated ;')
> > - normalUpdated is vec3 variable
> - you can use result (vec3) too that replaced by normalUpdated diff --git a/packages/dev/materials/src/shadowOnly/shadowOnlyMaterial.ts b/packages/dev/materials/src/shadowOnly/shadowOnlyMaterial.ts index bd42157a253..e19a81864db 100644 --- a/packages/dev/materials/src/shadowOnly/shadowOnlyMaterial.ts +++ b/packages/dev/materials/src/shadowOnly/shadowOnlyMaterial.ts @@ -264,7 +264,7 @@ export class ShadowOnlyMaterial extends PushMaterial { if (light) { // Make sure the uniforms for this light will be rebound for other materials using this light when rendering the current frame. // Indeed, there is an optimization in Light that binds the light uniforms only once per frame for a given light (if using ubo). - // Doing this way assumes that all uses of this light are the same, meaning all parameters passed to Light._bindLlight + // Doing this way assumes that all uses of this light are the same, meaning all parameters passed to Light._bindLight // are the same, notably useSpecular. However, isReadyForSubMesh (see above) is passing false for this parameter, which may not be // the value the other materials may pass. light._renderId = -1; diff --git a/packages/dev/materials/src/water/readme.md b/packages/dev/materials/src/water/readme.md index 8cff808bb96..00a34b1264b 100644 --- a/packages/dev/materials/src/water/readme.md +++ b/packages/dev/materials/src/water/readme.md @@ -41,9 +41,9 @@ You can customize special properties of the material: ```javascript waterMaterial.windForce = 45; // Represents the wind force applied on the water surface waterMaterial.waveHeight = 1.3; // Represents the height of the waves -waterMaterial.bumpHeight = 0.3; // According to the bump map, represents the pertubation of reflection and refraction +waterMaterial.bumpHeight = 0.3; // According to the bump map, represents the perturbation of reflection and refraction waterMaterial.windDirection = new BABYLON.Vector2(1.0, 1.0); // The wind direction on the water surface (on width and height) waterMaterial.waterColor = new BABYLON.Color3(0.1, 0.1, 0.6); // Represents the water color mixed with the reflected and refracted world waterMaterial.colorBlendFactor = 2.0; // Factor to determine how the water color is blended with the reflected and refracted world -waterMaterial.waveLength = 0.1; // The lenght of waves. With smaller values, more waves are generated +waterMaterial.waveLength = 0.1; // The length of waves. With smaller values, more waves are generated ``` diff --git a/packages/dev/materials/src/water/waterMaterial.ts b/packages/dev/materials/src/water/waterMaterial.ts index 1a24ba1bb98..d9f6354fd64 100644 --- a/packages/dev/materials/src/water/waterMaterial.ts +++ b/packages/dev/materials/src/water/waterMaterial.ts @@ -132,7 +132,7 @@ export class WaterMaterial extends PushMaterial { @serialize() public bumpHeight: number = 0.4; /** - * Defines wether or not: to add a smaller moving bump to less steady waves. + * Defines whether or not: to add a smaller moving bump to less steady waves. */ @serialize("bumpSuperimpose") private _bumpSuperimpose = false; @@ -140,7 +140,7 @@ export class WaterMaterial extends PushMaterial { public bumpSuperimpose: boolean; /** - * Defines wether or not color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel. + * Defines whether or not color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel. */ @serialize("fresnelSeparate") private _fresnelSeparate = false; @@ -148,7 +148,7 @@ export class WaterMaterial extends PushMaterial { public fresnelSeparate: boolean; /** - * Defines wether or not bump Wwves modify the reflection. + * Defines whether or not bump Wwves modify the reflection. */ @serialize("bumpAffectsReflection") private _bumpAffectsReflection = false; diff --git a/packages/dev/postProcesses/readme.md b/packages/dev/postProcesses/readme.md index 0cbffc1134d..5f46c793f1e 100644 --- a/packages/dev/postProcesses/readme.md +++ b/packages/dev/postProcesses/readme.md @@ -18,10 +18,10 @@ To add a new post process, you have to create your own folder in *postProcesses/ To build all post processes and generate the *dist* folder, just run from the tools/gulp folder: ``` -gulp postProcesLibrary +gulp postProcessLibrary ``` -To integrate your new post process to the build process, you have to edit the config.json file in the tools/config folder and add an entry in the "postProcessLibray/libraries" section of the file: +To integrate your new post process to the build process, you have to edit the config.json file in the tools/config folder and add an entry in the "postProcessLibrary/libraries" section of the file: ``` "libraries": [ diff --git a/packages/dev/postProcesses/src/asciiArt/asciiArtPostProcess.ts b/packages/dev/postProcesses/src/asciiArt/asciiArtPostProcess.ts index 5d33a149df4..09bb4261152 100644 --- a/packages/dev/postProcesses/src/asciiArt/asciiArtPostProcess.ts +++ b/packages/dev/postProcesses/src/asciiArt/asciiArtPostProcess.ts @@ -35,7 +35,7 @@ export class AsciiArtFontTexture extends BaseTexture { * Create a new instance of the Ascii Art FontTexture class * @param name the name of the texture * @param font the font to use, use the W3C CSS notation - * @param text the caracter set to use in the rendering. + * @param text the character set to use in the rendering. * @param scene the scene that owns the texture */ constructor(name: string, font: string, text: string, scene: Nullable = null) { @@ -178,7 +178,7 @@ export interface IAsciiArtPostProcessOptions { characterSet?: string; /** - * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art. + * This defines the amount you want to mix the "tile" or character space colored in the ascii art. * This number is defined between 0 and 1; */ mixToTile?: number; @@ -191,9 +191,9 @@ export interface IAsciiArtPostProcessOptions { } /** - * AsciiArtPostProcess helps rendering everithing in Ascii Art. + * AsciiArtPostProcess helps rendering everything in Ascii Art. * - * Simmply add it to your scene and let the nerd that lives in you have fun. + * Simply add it to your scene and let the nerd that lives in you have fun. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera); */ export class AsciiArtPostProcess extends PostProcess { @@ -203,7 +203,7 @@ export class AsciiArtPostProcess extends PostProcess { private _asciiArtFontTexture: AsciiArtFontTexture; /** - * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art. + * This defines the amount you want to mix the "tile" or character space colored in the ascii art. * This number is defined between 0 and 1; */ public mixToTile: number = 0; diff --git a/packages/dev/postProcesses/src/digitalRain/digitalRainPostProcess.ts b/packages/dev/postProcesses/src/digitalRain/digitalRainPostProcess.ts index 91d1db36452..bc0f6695bb7 100644 --- a/packages/dev/postProcesses/src/digitalRain/digitalRainPostProcess.ts +++ b/packages/dev/postProcesses/src/digitalRain/digitalRainPostProcess.ts @@ -36,7 +36,7 @@ export class DigitalRainFontTexture extends BaseTexture { * Create a new instance of the Digital Rain FontTexture class * @param name the name of the texture * @param font the font to use, use the W3C CSS notation - * @param text the caracter set to use in the rendering. + * @param text the character set to use in the rendering. * @param scene the scene that owns the texture */ constructor(name: string, font: string, text: string, scene: Nullable = null) { @@ -172,7 +172,7 @@ export interface IDigitalRainPostProcessOptions { font?: string; /** - * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain. + * This defines the amount you want to mix the "tile" or character space colored in the digital rain. * This number is defined between 0 and 1; */ mixToTile?: number; @@ -185,9 +185,9 @@ export interface IDigitalRainPostProcessOptions { } /** - * DigitalRainPostProcess helps rendering everithing in digital rain. + * DigitalRainPostProcess helps rendering everything in digital rain. * - * Simmply add it to your scene and let the nerd that lives in you have fun. + * Simply add it to your scene and let the nerd that lives in you have fun. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera); */ export class DigitalRainPostProcess extends PostProcess { @@ -197,7 +197,7 @@ export class DigitalRainPostProcess extends PostProcess { private _digitalRainFontTexture: DigitalRainFontTexture; /** - * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain. + * This defines the amount you want to mix the "tile" or character space colored in the digital rain. * This number is defined between 0 and 1; */ public mixToTile: number = 0; diff --git a/packages/dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts b/packages/dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts index a67b48215e9..845ea1c34d3 100644 --- a/packages/dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts +++ b/packages/dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts @@ -57,7 +57,7 @@ export class EXT_mesh_gpu_instancing implements IGLTFExporterExtensionV2 { const noRotation = Quaternion.Identity(); const noScale = Vector3.One(); - // retreive all the instance world matrix + // retrieve all the instance world matrix const matrix = babylonNode.thinInstanceGetWorldMatrices(); const iwt = TmpVectors.Vector3[2]; diff --git a/packages/dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts b/packages/dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts index fe4c7819aae..46f3f2c0a48 100644 --- a/packages/dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts +++ b/packages/dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts @@ -24,7 +24,7 @@ export class KHR_materials_emissive_strength implements IGLTFExporterExtensionV2 public dispose() {} - /** @interal */ + /** @internal */ public get wasUsed() { return this._wasUsed; } diff --git a/packages/dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts b/packages/dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts index aa684dddfe9..5ad6bb2b775 100644 --- a/packages/dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts +++ b/packages/dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts @@ -242,7 +242,7 @@ export class _GLTFMaterialExporter { /** * Evaluates a specified specular power value to determine the appropriate roughness value, * based on a pre-defined cubic bezier curve with specular on the abscissa axis (x-axis) - * and roughness on the ordinant axis (y-axis) + * and roughness on the ordinate axis (y-axis) * @param specularPower specular power of standard material * @returns Number representing the roughness value */ diff --git a/packages/dev/serializers/src/glTF/2.0/glTFSerializer.ts b/packages/dev/serializers/src/glTF/2.0/glTFSerializer.ts index 839dd9aa736..7c56a7350fd 100644 --- a/packages/dev/serializers/src/glTF/2.0/glTFSerializer.ts +++ b/packages/dev/serializers/src/glTF/2.0/glTFSerializer.ts @@ -83,7 +83,7 @@ export class GLTF2Export { } /** - * Exports the geometry of the scene to .glb file format asychronously + * Exports the geometry of the scene to .glb file format asynchronously * @param scene Babylon scene with scene hierarchy information * @param filePrefix File prefix to use when generating glb file * @param options Exporter options diff --git a/packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts b/packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts index 7e068a7b3ae..255dfb0de0e 100644 --- a/packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts +++ b/packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts @@ -14,7 +14,7 @@ export class _GLTFUtilities { * @param bufferIndex index value of the specified buffer * @param byteOffset byte offset value * @param byteLength byte length of the bufferView - * @param byteStride byte distance between conequential elements + * @param byteStride byte distance between consequential elements * @param name name of the buffer view * @returns bufferView for glTF */ diff --git a/packages/dev/sharedUiComponents/src/imgs/conerRadiusIcon.svg b/packages/dev/sharedUiComponents/src/imgs/cornerRadiusIcon.svg similarity index 100% rename from packages/dev/sharedUiComponents/src/imgs/conerRadiusIcon.svg rename to packages/dev/sharedUiComponents/src/imgs/cornerRadiusIcon.svg diff --git a/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphFrame.ts b/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphFrame.ts index 91c428f91b5..8da75f035f7 100644 --- a/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphFrame.ts +++ b/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphFrame.ts @@ -854,7 +854,7 @@ export class GraphFrame { [this._exposedInPorts[indexInContainer - 1], this._exposedInPorts[indexInContainer]] = [ this._exposedInPorts[indexInContainer], this._exposedInPorts[indexInContainer - 1], - ]; // swap idicies + ]; // swap indices this._movePortUp(elementsArray, nodePort, this._frameInPorts); } else { if (this._outputPortContainer.children.length < 2) { @@ -865,7 +865,7 @@ export class GraphFrame { [this._exposedOutPorts[indexInContainer - 1], this._exposedOutPorts[indexInContainer]] = [ this._exposedOutPorts[indexInContainer], this._exposedOutPorts[indexInContainer - 1], - ]; // swap idicies + ]; // swap indices this._movePortUp(elementsArray, nodePort, this._frameOutPorts); } this.ports.forEach((framePort: FrameNodePort) => framePort.node._refreshLinks()); @@ -883,7 +883,7 @@ export class GraphFrame { // update Frame Port Container const indexInContainer = framePortList.findIndex((framePort) => framePort === nodePort); - [framePortList[indexInContainer - 1], framePortList[indexInContainer]] = [framePortList[indexInContainer], framePortList[indexInContainer - 1]]; // swap idicies + [framePortList[indexInContainer - 1], framePortList[indexInContainer]] = [framePortList[indexInContainer], framePortList[indexInContainer - 1]]; // swap indices //special case framePortList.length == 2 if (framePortList.length == 2) { @@ -914,7 +914,7 @@ export class GraphFrame { [this._exposedInPorts[indexInContainer], this._exposedInPorts[indexInContainer + 1]] = [ this._exposedInPorts[indexInContainer + 1], this._exposedInPorts[indexInContainer], - ]; // swap idicies + ]; // swap indices this._movePortDown(elementsArray, nodePort, this._frameInPorts); } else { if (this._outputPortContainer.children.length < 2) { @@ -925,7 +925,7 @@ export class GraphFrame { [this._exposedOutPorts[indexInContainer], this._exposedOutPorts[indexInContainer + 1]] = [ this._exposedOutPorts[indexInContainer + 1], this._exposedOutPorts[indexInContainer], - ]; // swap idicies + ]; // swap indices this._movePortDown(elementsArray, nodePort, this._frameOutPorts); } @@ -944,7 +944,7 @@ export class GraphFrame { // update Frame Port Container const indexInContainer = framePortList.findIndex((framePort) => framePort === nodePort); - [framePortList[indexInContainer], framePortList[indexInContainer + 1]] = [framePortList[indexInContainer + 1], framePortList[indexInContainer]]; // swap idicies + [framePortList[indexInContainer], framePortList[indexInContainer + 1]] = [framePortList[indexInContainer + 1], framePortList[indexInContainer]]; // swap indices // notify nodePort if it is now at bottom (indexInContainer === elementsArray.length-2) if (framePortList.length == 2) { diff --git a/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.ts b/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.ts index fc81f1b1dab..90844cfd8f7 100644 --- a/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.ts +++ b/packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.ts @@ -66,7 +66,7 @@ export class GraphNode { this._visual.classList.add(commonStyles["hidden"]); } else { this._visual.classList.remove(commonStyles["hidden"]); - this._upateNodePortNames(); + this._updateNodePortNames(); } for (const link of this._links) { @@ -76,7 +76,7 @@ export class GraphNode { this._refreshLinks(); } - private _upateNodePortNames() { + private _updateNodePortNames() { for (const port of this._inputPorts.concat(this._outputPorts)) { if (port.hasLabel()) { port.portName = port.portData.name; diff --git a/packages/dev/sharedUiComponents/src/tabs/propertyGrids/gui/inputTextPropertyGridComponent.tsx b/packages/dev/sharedUiComponents/src/tabs/propertyGrids/gui/inputTextPropertyGridComponent.tsx index c2ace8ec20d..0385159e0d4 100644 --- a/packages/dev/sharedUiComponents/src/tabs/propertyGrids/gui/inputTextPropertyGridComponent.tsx +++ b/packages/dev/sharedUiComponents/src/tabs/propertyGrids/gui/inputTextPropertyGridComponent.tsx @@ -58,12 +58,12 @@ export class InputTextPropertyGridComponent extends React.Component ` HTML element right after the Babylon.js scene's canvas element. Inside this div element, the renderer generates HTML twin elementss for each of your accessible contents in the scene. These HTML twin elements are internally connected with Babylon.js objects, so the screen reader user can also interact with the Babylon.js objects through their HTML twin. +This will generate a `
` HTML element right after the Babylon.js scene's canvas element. Inside this div element, the renderer generates HTML twin elements for each of your accessible contents in the scene. These HTML twin elements are internally connected with Babylon.js objects, so the screen reader user can also interact with the Babylon.js objects through their HTML twin. ### Interaction diff --git a/packages/tools/accessibility/src/HtmlTwin/htmlTwinGUIItem.ts b/packages/tools/accessibility/src/HtmlTwin/htmlTwinGUIItem.ts index a97cbccc9b5..a60768c1eb2 100644 --- a/packages/tools/accessibility/src/HtmlTwin/htmlTwinGUIItem.ts +++ b/packages/tools/accessibility/src/HtmlTwin/htmlTwinGUIItem.ts @@ -98,7 +98,7 @@ export class HTMLTwinGUIItem extends HTMLTwinItem { } /** - * Callback when the HTML element is blured. Dismiss visual indication on BabylonJS entity. + * Callback when the HTML element is blurred. Dismiss visual indication on BabylonJS entity. */ public override blur(): void { // If defined eventHandler, override default. diff --git a/packages/tools/accessibility/src/HtmlTwin/htmlTwinItem.ts b/packages/tools/accessibility/src/HtmlTwin/htmlTwinItem.ts index 2b8ebf9a87a..da49a735ca6 100644 --- a/packages/tools/accessibility/src/HtmlTwin/htmlTwinItem.ts +++ b/packages/tools/accessibility/src/HtmlTwin/htmlTwinItem.ts @@ -60,7 +60,7 @@ export class HTMLTwinItem { public focus(): void {} /** - * Callback when the HTML element is blured. Dismiss visual indication on BabylonJS entity. + * Callback when the HTML element is blurred. Dismiss visual indication on BabylonJS entity. * Implemented by child classes */ public blur(): void {} diff --git a/packages/tools/accessibility/src/HtmlTwin/htmlTwinNodeItem.ts b/packages/tools/accessibility/src/HtmlTwin/htmlTwinNodeItem.ts index c41ac1b709e..fa326afb235 100644 --- a/packages/tools/accessibility/src/HtmlTwin/htmlTwinNodeItem.ts +++ b/packages/tools/accessibility/src/HtmlTwin/htmlTwinNodeItem.ts @@ -75,7 +75,7 @@ export class HTMLTwinNodeItem extends HTMLTwinItem { } /** - * Callback when the HTML element is blured. Dismiss visual indication on BabylonJS entity. + * Callback when the HTML element is blurred. Dismiss visual indication on BabylonJS entity. */ public override blur(): void { // If defined eventHandler, override default. diff --git a/packages/tools/babylonServer/webpack.config.js b/packages/tools/babylonServer/webpack.config.js index 605339b4bf6..6b13369d0d2 100644 --- a/packages/tools/babylonServer/webpack.config.js +++ b/packages/tools/babylonServer/webpack.config.js @@ -107,7 +107,7 @@ module.exports = (env) => { "procedural-textures": path.resolve(basePathForSources, "proceduralTextures", outputDirectoryForAliases), "node-editor": path.resolve(basePathForTools, "nodeEditor", outputDirectoryForAliases), "gui-editor": path.resolve(basePathForTools, "guiEditor", outputDirectoryForAliases), - "accesibility": path.resolve(basePathForTools, "accessibility", outputDirectoryForAliases), + "accessibility": path.resolve(basePathForTools, "accessibility", outputDirectoryForAliases), }, symlinks: false, // modules: [path.resolve(__dirname, "../../dev/"), 'node_modules'], diff --git a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/buttonPropertyGridComponent.tsx b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/buttonPropertyGridComponent.tsx index 5292c44eaf0..9aa3047b07f 100644 --- a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/buttonPropertyGridComponent.tsx +++ b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/buttonPropertyGridComponent.tsx @@ -11,7 +11,7 @@ import { CommandButtonComponent } from "../../../commandButtonComponent"; import { makeTargetsProxy } from "shared-ui-components/lines/targetsProxy"; import { ContainerPropertyGridComponent } from "./containerPropertyGridComponent"; -import cornerRadiusIcon from "shared-ui-components/imgs/conerRadiusIcon.svg"; +import cornerRadiusIcon from "shared-ui-components/imgs/cornerRadiusIcon.svg"; import strokeWeightIcon from "shared-ui-components/imgs/strokeWeightIcon.svg"; import addImageButtonIcon from "shared-ui-components/imgs/addImageButtonIcon.svg"; import addTextButtonIcon from "shared-ui-components/imgs/addTextButtonIcon.svg"; diff --git a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/displayGridPropertyGridComponent.tsx b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/displayGridPropertyGridComponent.tsx index a4d8bcfaab4..09fd9d5eef8 100644 --- a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/displayGridPropertyGridComponent.tsx +++ b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/displayGridPropertyGridComponent.tsx @@ -80,14 +80,14 @@ export class DisplayGridPropertyGridComponent extends React.Component
- + } arrows @@ -112,14 +112,14 @@ export class DisplayGridPropertyGridComponent extends React.Component
- + } arrows diff --git a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/inputTextPropertyGridComponent.tsx b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/inputTextPropertyGridComponent.tsx index 77e109b1a74..009c439a455 100644 --- a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/inputTextPropertyGridComponent.tsx +++ b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/inputTextPropertyGridComponent.tsx @@ -90,7 +90,7 @@ export class InputTextPropertyGridComponent extends React.Component
- +
diff --git a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/rectanglePropertyGridComponent.tsx b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/rectanglePropertyGridComponent.tsx index 41758f13aae..eb6adc7b8a7 100644 --- a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/rectanglePropertyGridComponent.tsx +++ b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/rectanglePropertyGridComponent.tsx @@ -9,7 +9,7 @@ import { TextLineComponent } from "shared-ui-components/lines/textLineComponent" import { makeTargetsProxy } from "shared-ui-components/lines/targetsProxy"; import { ContainerPropertyGridComponent } from "./containerPropertyGridComponent"; -import cornerRadiusIcon from "shared-ui-components/imgs/conerRadiusIcon.svg"; +import cornerRadiusIcon from "shared-ui-components/imgs/cornerRadiusIcon.svg"; import strokeWeightIcon from "shared-ui-components/imgs/strokeWeightIcon.svg"; import { IconComponent } from "shared-ui-components/lines/iconComponent"; import { UnitButton } from "shared-ui-components/lines/unitButton"; diff --git a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/scrollViewerPropertyGridComponent.tsx b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/scrollViewerPropertyGridComponent.tsx index 196559ae555..a5ca2bd9aa6 100644 --- a/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/scrollViewerPropertyGridComponent.tsx +++ b/packages/tools/guiEditor/src/components/propertyTab/propertyGrids/gui/scrollViewerPropertyGridComponent.tsx @@ -12,7 +12,7 @@ import { makeTargetsProxy } from "shared-ui-components/lines/targetsProxy"; import colorIcon from "shared-ui-components/imgs/colorIcon.svg"; import fillColorIcon from "shared-ui-components/imgs/fillColorIcon.svg"; import widthIcon from "shared-ui-components/imgs/widthIcon.svg"; // TODO: replace -import cornerRadiusIcon from "shared-ui-components/imgs/conerRadiusIcon.svg"; +import cornerRadiusIcon from "shared-ui-components/imgs/cornerRadiusIcon.svg"; import strokeWeightIcon from "shared-ui-components/imgs/strokeWeightIcon.svg"; import scrollViewerPrecisionIcon from "shared-ui-components/imgs/scrollViewerPrecisionIcon.svg"; // TODO: replace import { IconComponent } from "shared-ui-components/lines/iconComponent"; diff --git a/packages/tools/guiEditor/src/components/sceneExplorer/sceneExplorerComponent.tsx b/packages/tools/guiEditor/src/components/sceneExplorer/sceneExplorerComponent.tsx index a1bcdb22c3d..8ecb1d74a72 100644 --- a/packages/tools/guiEditor/src/components/sceneExplorer/sceneExplorerComponent.tsx +++ b/packages/tools/guiEditor/src/components/sceneExplorer/sceneExplorerComponent.tsx @@ -44,7 +44,7 @@ interface ISceneExplorerComponentProps { export class SceneExplorerComponent extends React.Component; selectedEntity: any; scene: Nullable }> { private _onSelectionChangeObserver: Nullable>; - private _onParrentingChangeObserver: Nullable>; + private _onParentingChangeObserver: Nullable>; private _onNewSceneObserver: Nullable>>; private _onPropertyChangedObservable: Nullable>; private _onUpdateRequiredObserver: Nullable>; @@ -79,7 +79,7 @@ export class SceneExplorerComponent extends React.Component { + this._onParentingChangeObserver = this.props.globalState.onParentingChangeObservable.add(() => { this.forceUpdate(); }); } @@ -93,8 +93,8 @@ export class SceneExplorerComponent extends React.Component { // We have to compute the difference in movement in the local node - // coordintes, so that it accounts for zoom + // coordinates, so that it accounts for zoom const rttClientCoords = CoordinateHelper.MousePointerToRTTSpace(control, currentPointer.x, currentPointer.y); const localClientCoords = CoordinateHelper.RttToLocalNodeSpace(control, rttClientCoords.x, rttClientCoords.y); diff --git a/packages/tools/guiEditor/src/diagram/gizmoScalePoint.tsx b/packages/tools/guiEditor/src/diagram/gizmoScalePoint.tsx index 1dd07816340..b2f6a8c75f3 100644 --- a/packages/tools/guiEditor/src/diagram/gizmoScalePoint.tsx +++ b/packages/tools/guiEditor/src/diagram/gizmoScalePoint.tsx @@ -51,7 +51,7 @@ import cursor_rotate6 from "../imgs/cursor_rotate6.svg"; import cursor_rotate7 from "../imgs/cursor_rotate7.svg"; // load in custom cursor icons -const cursorScaleDiagonaLeft: string = `url("${cursor_scaleDiagonalLeft}") 12 12, nwse-resize`; +const cursorScaleDiagonalLeft: string = `url("${cursor_scaleDiagonalLeft}") 12 12, nwse-resize`; const cursorScaleDiagonalRight: string = `url("${cursor_scaleDiagonalRight}") 12 12, nesw-resize`; const cursorScaleHorizontal: string = `url("${cursor_scaleHorizontal}") 12 12, pointer`; const cursorScaleVertical: string = `url("${cursor_scaleVertical}") 12 12, ns-resize`; @@ -59,11 +59,11 @@ const scalePointCursors = [ cursorScaleVertical, cursorScaleDiagonalRight, cursorScaleHorizontal, - cursorScaleDiagonaLeft, + cursorScaleDiagonalLeft, cursorScaleVertical, cursorScaleDiagonalRight, cursorScaleHorizontal, - cursorScaleDiagonaLeft, + cursorScaleDiagonalLeft, ]; const rotateCursors = [cursor_rotate0, cursor_rotate1, cursor_rotate2, cursor_rotate3, cursor_rotate4, cursor_rotate5, cursor_rotate6, cursor_rotate7].map( (cursor) => `url("${cursor}") 12 12, pointer` diff --git a/packages/tools/nodeEditor/src/components/nodeList/nodeListComponent.tsx b/packages/tools/nodeEditor/src/components/nodeList/nodeListComponent.tsx index de8bea93862..6a74e2505ba 100644 --- a/packages/tools/nodeEditor/src/components/nodeList/nodeListComponent.tsx +++ b/packages/tools/nodeEditor/src/components/nodeList/nodeListComponent.tsx @@ -82,8 +82,8 @@ export class NodeListComponent extends React.Component = null, isImportingAFrame = false) { this.showWaitScreen(); - this._graphCanvas._isLoading = true; // Will help loading large graphes + this._graphCanvas._isLoading = true; // Will help loading large graphs setTimeout(() => { this._graphCanvas.reOrganize(editorData, isImportingAFrame); diff --git a/packages/tools/playground/src/tools/monacoManager.ts b/packages/tools/playground/src/tools/monacoManager.ts index d22dff32754..539a512c6c2 100644 --- a/packages/tools/playground/src/tools/monacoManager.ts +++ b/packages/tools/playground/src/tools/monacoManager.ts @@ -624,7 +624,7 @@ declare var canvas: HTMLCanvasElement; return ""; } - // This is our hook in the Monaco suggest adapter, we are called everytime a completion UI is displayed + // This is our hook in the Monaco suggest adapter, we are called every time a completion UI is displayed // So we need to be super fast. private async _hookMonacoCompletionProvider() { const oldProvideCompletionItems = languageFeatures.SuggestAdapter.prototype.provideCompletionItems; diff --git a/packages/tools/testTools/src/seleniumTestUtils.ts b/packages/tools/testTools/src/seleniumTestUtils.ts index 269d150d3a0..0e6737078eb 100644 --- a/packages/tools/testTools/src/seleniumTestUtils.ts +++ b/packages/tools/testTools/src/seleniumTestUtils.ts @@ -16,7 +16,7 @@ export const macOSSafariCapabilities = { browserVersion: "latest", }; -// Take Playgorund Id and Selenium webdriver and load snippet info into test page +// Take Playground Id and Selenium webdriver and load snippet info into test page export const LoadPlayground = async ( driver: ThenableWebDriver, pgId: string, diff --git a/packages/tools/tests/test/visualization/visualization.utils.ts b/packages/tools/tests/test/visualization/visualization.utils.ts index faba20cb4b9..429f8bb29d7 100644 --- a/packages/tools/tests/test/visualization/visualization.utils.ts +++ b/packages/tools/tests/test/visualization/visualization.utils.ts @@ -15,7 +15,7 @@ import { * @param testFileName name of the .json file (without the .json extension) containing the tests */ export const evaluateTests = async (engineType = "webgl2", testFileName = "config", debug = false, debugWait = false, logToConsole = true, logToFile = false) => { - // jest doesn't support cutstom CLI variables + // jest doesn't support custom CLI variables // const engineType = buildTools.checkArgs("--engine", false, true) || "webgl2"; // const debug = buildTools.checkArgs("--debug", true); // const configPath = buildTools.checkArgs("--config", false, true) || "../config.json"; diff --git a/packages/tools/viewer/src/configuration/renderOnlyLoader.ts b/packages/tools/viewer/src/configuration/renderOnlyLoader.ts index a2e1330536e..619989de150 100644 --- a/packages/tools/viewer/src/configuration/renderOnlyLoader.ts +++ b/packages/tools/viewer/src/configuration/renderOnlyLoader.ts @@ -56,7 +56,7 @@ export class RenderOnlyConfigurationLoader { * The viewer configuration can extend different types of configuration objects and have an extra configuration defined. * * @param initConfig the initial configuration that has the definitions of further configuration to load. - * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only + * @param callback an optional callback that will be called sync, if no configuration needs to be loaded or configuration is payload-only * @returns A promise that delivers the extended viewer configuration, when done. */ public loadConfiguration(initConfig: ViewerConfiguration = {}, callback?: (config: ViewerConfiguration) => void): Promise { diff --git a/packages/tools/viewer/src/index.ts b/packages/tools/viewer/src/index.ts index b72be563e79..63c6ff305e5 100644 --- a/packages/tools/viewer/src/index.ts +++ b/packages/tools/viewer/src/index.ts @@ -70,6 +70,6 @@ export { }; // eslint-disable-next-line import/no-internal-modules export { GLTF2 } from "loaders/glTF/index"; -// export publicliy all configuration interfaces +// export publicly all configuration interfaces // eslint-disable-next-line import/no-internal-modules export * from "./configuration/index"; diff --git a/packages/tools/viewer/src/labs/environmentSerializer.ts b/packages/tools/viewer/src/labs/environmentSerializer.ts index a3eb8bd7b39..df19b58a9e7 100644 --- a/packages/tools/viewer/src/labs/environmentSerializer.ts +++ b/packages/tools/viewer/src/labs/environmentSerializer.ts @@ -249,49 +249,49 @@ export class EnvironmentDeserializer { /** * Convert spherical harmonics to spherical polynomial coefficients * @param harmonics Spherical harmonic coefficients (9) - * @param outPolynomialCoefficents Polynomial coefficients (9) object to store result + * @param outPolynomialCoefficients Polynomial coefficients (9) object to store result */ - private static _ConvertSHToSP(harmonics: any, outPolynomialCoefficents: SphericalPolynomalCoefficients) { + private static _ConvertSHToSP(harmonics: any, outPolynomialCoefficients: SphericalPolynomalCoefficients) { const rPi = 1 / Math.PI; //x - outPolynomialCoefficents.x.x = 1.02333 * harmonics.l11[0] * rPi; - outPolynomialCoefficents.x.y = 1.02333 * harmonics.l11[1] * rPi; - outPolynomialCoefficents.x.z = 1.02333 * harmonics.l11[2] * rPi; + outPolynomialCoefficients.x.x = 1.02333 * harmonics.l11[0] * rPi; + outPolynomialCoefficients.x.y = 1.02333 * harmonics.l11[1] * rPi; + outPolynomialCoefficients.x.z = 1.02333 * harmonics.l11[2] * rPi; - outPolynomialCoefficents.y.x = 1.02333 * harmonics.l1_1[0] * rPi; - outPolynomialCoefficents.y.y = 1.02333 * harmonics.l1_1[1] * rPi; - outPolynomialCoefficents.y.z = 1.02333 * harmonics.l1_1[2] * rPi; + outPolynomialCoefficients.y.x = 1.02333 * harmonics.l1_1[0] * rPi; + outPolynomialCoefficients.y.y = 1.02333 * harmonics.l1_1[1] * rPi; + outPolynomialCoefficients.y.z = 1.02333 * harmonics.l1_1[2] * rPi; - outPolynomialCoefficents.z.x = 1.02333 * harmonics.l10[0] * rPi; - outPolynomialCoefficents.z.y = 1.02333 * harmonics.l10[1] * rPi; - outPolynomialCoefficents.z.z = 1.02333 * harmonics.l10[2] * rPi; + outPolynomialCoefficients.z.x = 1.02333 * harmonics.l10[0] * rPi; + outPolynomialCoefficients.z.y = 1.02333 * harmonics.l10[1] * rPi; + outPolynomialCoefficients.z.z = 1.02333 * harmonics.l10[2] * rPi; //xx - outPolynomialCoefficents.xx.x = (0.886277 * harmonics.l00[0] - 0.247708 * harmonics.l20[0] + 0.429043 * harmonics.l22[0]) * rPi; - outPolynomialCoefficents.xx.y = (0.886277 * harmonics.l00[1] - 0.247708 * harmonics.l20[1] + 0.429043 * harmonics.l22[1]) * rPi; - outPolynomialCoefficents.xx.z = (0.886277 * harmonics.l00[2] - 0.247708 * harmonics.l20[2] + 0.429043 * harmonics.l22[2]) * rPi; + outPolynomialCoefficients.xx.x = (0.886277 * harmonics.l00[0] - 0.247708 * harmonics.l20[0] + 0.429043 * harmonics.l22[0]) * rPi; + outPolynomialCoefficients.xx.y = (0.886277 * harmonics.l00[1] - 0.247708 * harmonics.l20[1] + 0.429043 * harmonics.l22[1]) * rPi; + outPolynomialCoefficients.xx.z = (0.886277 * harmonics.l00[2] - 0.247708 * harmonics.l20[2] + 0.429043 * harmonics.l22[2]) * rPi; - outPolynomialCoefficents.yy.x = (0.886277 * harmonics.l00[0] - 0.247708 * harmonics.l20[0] - 0.429043 * harmonics.l22[0]) * rPi; - outPolynomialCoefficents.yy.y = (0.886277 * harmonics.l00[1] - 0.247708 * harmonics.l20[1] - 0.429043 * harmonics.l22[1]) * rPi; - outPolynomialCoefficents.yy.z = (0.886277 * harmonics.l00[2] - 0.247708 * harmonics.l20[2] - 0.429043 * harmonics.l22[2]) * rPi; + outPolynomialCoefficients.yy.x = (0.886277 * harmonics.l00[0] - 0.247708 * harmonics.l20[0] - 0.429043 * harmonics.l22[0]) * rPi; + outPolynomialCoefficients.yy.y = (0.886277 * harmonics.l00[1] - 0.247708 * harmonics.l20[1] - 0.429043 * harmonics.l22[1]) * rPi; + outPolynomialCoefficients.yy.z = (0.886277 * harmonics.l00[2] - 0.247708 * harmonics.l20[2] - 0.429043 * harmonics.l22[2]) * rPi; - outPolynomialCoefficents.zz.x = (0.886277 * harmonics.l00[0] + 0.495417 * harmonics.l20[0]) * rPi; - outPolynomialCoefficents.zz.y = (0.886277 * harmonics.l00[1] + 0.495417 * harmonics.l20[1]) * rPi; - outPolynomialCoefficents.zz.z = (0.886277 * harmonics.l00[2] + 0.495417 * harmonics.l20[2]) * rPi; + outPolynomialCoefficients.zz.x = (0.886277 * harmonics.l00[0] + 0.495417 * harmonics.l20[0]) * rPi; + outPolynomialCoefficients.zz.y = (0.886277 * harmonics.l00[1] + 0.495417 * harmonics.l20[1]) * rPi; + outPolynomialCoefficients.zz.z = (0.886277 * harmonics.l00[2] + 0.495417 * harmonics.l20[2]) * rPi; //yz - outPolynomialCoefficents.yz.x = 0.858086 * harmonics.l2_1[0] * rPi; - outPolynomialCoefficents.yz.y = 0.858086 * harmonics.l2_1[1] * rPi; - outPolynomialCoefficents.yz.z = 0.858086 * harmonics.l2_1[2] * rPi; + outPolynomialCoefficients.yz.x = 0.858086 * harmonics.l2_1[0] * rPi; + outPolynomialCoefficients.yz.y = 0.858086 * harmonics.l2_1[1] * rPi; + outPolynomialCoefficients.yz.z = 0.858086 * harmonics.l2_1[2] * rPi; - outPolynomialCoefficents.zx.x = 0.858086 * harmonics.l21[0] * rPi; - outPolynomialCoefficents.zx.y = 0.858086 * harmonics.l21[1] * rPi; - outPolynomialCoefficents.zx.z = 0.858086 * harmonics.l21[2] * rPi; + outPolynomialCoefficients.zx.x = 0.858086 * harmonics.l21[0] * rPi; + outPolynomialCoefficients.zx.y = 0.858086 * harmonics.l21[1] * rPi; + outPolynomialCoefficients.zx.z = 0.858086 * harmonics.l21[2] * rPi; - outPolynomialCoefficents.xy.x = 0.858086 * harmonics.l2_2[0] * rPi; - outPolynomialCoefficents.xy.y = 0.858086 * harmonics.l2_2[1] * rPi; - outPolynomialCoefficents.xy.z = 0.858086 * harmonics.l2_2[2] * rPi; + outPolynomialCoefficients.xy.x = 0.858086 * harmonics.l2_2[0] * rPi; + outPolynomialCoefficients.xy.y = 0.858086 * harmonics.l2_2[1] * rPi; + outPolynomialCoefficients.xy.z = 0.858086 * harmonics.l2_2[2] * rPi; } /** diff --git a/packages/tools/viewer/src/labs/texture.ts b/packages/tools/viewer/src/labs/texture.ts index feb3dc0ee98..97cc3bee9bc 100644 --- a/packages/tools/viewer/src/labs/texture.ts +++ b/packages/tools/viewer/src/labs/texture.ts @@ -163,7 +163,7 @@ export class TextureCube { } /** - * A static class providing methods to aid working with Bablyon textures. + * A static class providing methods to aid working with Babylon textures. */ export class TextureUtils { /** diff --git a/packages/tools/viewer/src/labs/viewerLabs.ts b/packages/tools/viewer/src/labs/viewerLabs.ts index f0fe790b36b..b0a1f241bb2 100644 --- a/packages/tools/viewer/src/labs/viewerLabs.ts +++ b/packages/tools/viewer/src/labs/viewerLabs.ts @@ -10,7 +10,7 @@ import { Axis } from "core/Maths/math.axis"; /** * The ViewerLabs class will hold functions that are not (!) backwards compatible. * The APIs in all labs-related classes and configuration might change. - * Once stable, lab features will be moved to the publis API and configuration object. + * Once stable, lab features will be moved to the public API and configuration object. */ export class ViewerLabs { constructor(private _scene: Scene) {} @@ -126,7 +126,7 @@ export class ViewerLabs { } //set orientation - const rotatquatRotationionY = Quaternion.RotationAxis(Axis.Y, rotationY || 0); + const rotatquatRotationY = Quaternion.RotationAxis(Axis.Y, rotationY || 0); // Add env texture to the scene. if (this.environment.specularTexture) { @@ -152,7 +152,7 @@ export class ViewerLabs { this._scene.environmentTexture.sphericalPolynomial = poly; //set orientation - Matrix.FromQuaternionToRef(rotatquatRotationionY, this._scene.environmentTexture.getReflectionTextureMatrix()); + Matrix.FromQuaternionToRef(rotatquatRotationY, this._scene.environmentTexture.getReflectionTextureMatrix()); } } } diff --git a/packages/tools/viewer/src/managers/sceneManager.ts b/packages/tools/viewer/src/managers/sceneManager.ts index 1ace61614b8..fe4c5bb0c38 100644 --- a/packages/tools/viewer/src/managers/sceneManager.ts +++ b/packages/tools/viewer/src/managers/sceneManager.ts @@ -292,7 +292,7 @@ export class SceneManager { * Should shadows be rendered every frame, or only once and stop. * This can be used to optimize a scene. * - * Not that the shadows will NOT disapear but will remain in place. + * Not that the shadows will NOT disappear but will remain in place. * @param process if true shadows will be updated once every frame. if false they will stop being updated. */ public set processShadows(process: boolean) { @@ -871,8 +871,8 @@ export class SceneManager { //sanity check if (this.scene.environmentTexture) { - const rotatquatRotationionY = Quaternion.RotationAxis(Axis.Y, environmentMapConfiguration.rotationY || 0); - Matrix.FromQuaternionToRef(rotatquatRotationionY, this.scene.environmentTexture.getReflectionTextureMatrix()); + const rotatquatRotationY = Quaternion.RotationAxis(Axis.Y, environmentMapConfiguration.rotationY || 0); + Matrix.FromQuaternionToRef(rotatquatRotationY, this.scene.environmentTexture.getReflectionTextureMatrix()); } // process mainColor changes: @@ -1019,9 +1019,9 @@ export class SceneManager { this.camera.beta = (this._globalConfiguration.camera && this._globalConfiguration.camera.beta) || this.camera.beta; this.camera.radius = (this._globalConfiguration.camera && this._globalConfiguration.camera.radius) || this.camera.radius; - const sceneDiagonalLenght = sizeVec.length(); - if (isFinite(sceneDiagonalLenght)) { - this.camera.upperRadiusLimit = sceneDiagonalLenght * 4; + const sceneDiagonalLength = sizeVec.length(); + if (isFinite(sceneDiagonalLength)) { + this.camera.upperRadiusLimit = sceneDiagonalLength * 4; } if (this._configurationContainer.configuration) { @@ -1033,8 +1033,8 @@ export class SceneManager { });*/ }; - protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean) { - if (!skyboxConifguration && !groundConfiguration) { + protected _configureEnvironment(skyboxConfiguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean) { + if (!skyboxConfiguration && !groundConfiguration) { if (this.environmentHelper) { this.environmentHelper.dispose(); this.environmentHelper = undefined; @@ -1042,7 +1042,7 @@ export class SceneManager { } else { const options: Partial = { createGround: !!groundConfiguration && this._groundEnabled, - createSkybox: !!skyboxConifguration, + createSkybox: !!skyboxConfiguration, setupImageProcessing: false, // will be done at the scene level!, }; @@ -1058,7 +1058,7 @@ export class SceneManager { if (groundConfiguration) { const groundConfig = typeof groundConfiguration === "boolean" ? {} : groundConfiguration; - const groundSize = groundConfig.size || (typeof skyboxConifguration === "object" && skyboxConifguration.scale); + const groundSize = groundConfig.size || (typeof skyboxConfiguration === "object" && skyboxConfiguration.scale); if (groundSize) { options.groundSize = groundSize; } @@ -1106,8 +1106,8 @@ export class SceneManager { } let postInitSkyboxMaterial = false; - if (skyboxConifguration) { - const conf = skyboxConifguration === true ? {} : skyboxConifguration; + if (skyboxConfiguration) { + const conf = skyboxConfiguration === true ? {} : skyboxConfiguration; if (conf.material && conf.material.imageProcessingConfiguration) { options.setupImageProcessing = false; // will be configured later manually. } @@ -1196,8 +1196,8 @@ export class SceneManager { skyboxMaterial._perceptualColor = this.mainColor; if (postInitSkyboxMaterial) { - if (typeof skyboxConifguration === "object" && skyboxConifguration.material) { - extendClassWithConfig(skyboxMaterial, skyboxConifguration.material); + if (typeof skyboxConfiguration === "object" && skyboxConfiguration.material) { + extendClassWithConfig(skyboxMaterial, skyboxConfiguration.material); } } } @@ -1212,7 +1212,7 @@ export class SceneManager { sceneManager: this, object: this.environmentHelper!, newConfiguration: { - skybox: skyboxConifguration, + skybox: skyboxConfiguration, ground: groundConfiguration, }, }); diff --git a/packages/tools/viewer/src/model/modelAnimation.ts b/packages/tools/viewer/src/model/modelAnimation.ts index 81522bcc1b5..3e020de2c6a 100644 --- a/packages/tools/viewer/src/model/modelAnimation.ts +++ b/packages/tools/viewer/src/model/modelAnimation.ts @@ -100,7 +100,7 @@ export interface IModelAnimation { */ speedRatio: number; /** - * Gets or sets the aimation's play mode. + * Gets or sets the animation's play mode. */ playMode: AnimationPlayMode; /** diff --git a/packages/tools/viewer/src/model/viewerModel.ts b/packages/tools/viewer/src/model/viewerModel.ts index 2e232045b62..08ef7992173 100644 --- a/packages/tools/viewer/src/model/viewerModel.ts +++ b/packages/tools/viewer/src/model/viewerModel.ts @@ -54,7 +54,7 @@ export enum ModelState { } /** - * The viewer model is a container for all assets representing a sngle loaded model. + * The viewer model is a container for all assets representing a single loaded model. */ export class ViewerModel implements IDisposable { /** @@ -403,7 +403,7 @@ export class ViewerModel implements IDisposable { /** * Choose an initialized animation using its name and start playing it * @param name the name of the animation to play - * @returns The model aniamtion to be played. + * @returns The model animation to be played. */ public playAnimation(name: string): IModelAnimation { const animation = this.setCurrentAnimationByName(name); @@ -702,8 +702,8 @@ export class ViewerModel implements IDisposable { } /** - * Creates and returns a Babylon easing funtion object based on a string representing the Easing function - * @param easingFunctionID The enum of the easing funtion to create + * Creates and returns a Babylon easing function object based on a string representing the Easing function + * @param easingFunctionID The enum of the easing function to create * @returns The newly created Babylon easing function object */ private _createEasingFunction(easingFunctionID?: number): any { diff --git a/packages/tools/viewer/src/templating/eventManager.ts b/packages/tools/viewer/src/templating/eventManager.ts index 3c2e12570df..e0fedaafc90 100644 --- a/packages/tools/viewer/src/templating/eventManager.ts +++ b/packages/tools/viewer/src/templating/eventManager.ts @@ -1,7 +1,7 @@ import type { EventCallback, TemplateManager } from "./templateManager"; /** - * The EventManager is in charge of registering user interctions with the viewer. + * The EventManager is in charge of registering user interactions with the viewer. * It is used in the TemplateManager */ export class EventManager { diff --git a/packages/tools/viewer/src/templating/templateManager.ts b/packages/tools/viewer/src/templating/templateManager.ts index 47485468482..d3a7929da31 100644 --- a/packages/tools/viewer/src/templating/templateManager.ts +++ b/packages/tools/viewer/src/templating/templateManager.ts @@ -158,7 +158,7 @@ export class TemplateManager { /** * Get the canvas in the template tree. - * There must be one and only one canvas inthe template. + * There must be one and only one canvas in the template. */ public getCanvas(): HTMLCanvasElement | null { return this.containerElement.querySelector("canvas"); @@ -424,7 +424,7 @@ export class Template { * Appending the template to a parent HTML element. * If a parent is already set and you wish to replace the old HTML with new one, forceRemove should be true. * @param parent the parent to which the template is added - * @param forceRemove if the parent already exists, shoud the template be removed from it? + * @param forceRemove if the parent already exists, should the template be removed from it? */ public appendTo(parent: HTMLElement, forceRemove?: boolean) { if (this.parent) { diff --git a/packages/tools/viewer/src/viewer/defaultViewer.ts b/packages/tools/viewer/src/viewer/defaultViewer.ts index 60076d28abc..e32e4572a29 100644 --- a/packages/tools/viewer/src/viewer/defaultViewer.ts +++ b/packages/tools/viewer/src/viewer/defaultViewer.ts @@ -28,7 +28,7 @@ import "core/Lights/Shadows/shadowGeneratorSceneComponent"; */ export class DefaultViewer extends AbstractViewerWithTemplate { /** - * The corresponsing template manager of this viewer. + * The corresponding template manager of this viewer. */ public templateManager: TemplateManager; @@ -159,7 +159,7 @@ export class DefaultViewer extends AbstractViewerWithTemplate { if (navbar) { this.onFrameRenderedObservable.add(this._updateProgressBar); this.templateManager.eventManager.registerCallback("navBar", this._handlePointerClick, "click"); - // an example how to trigger the help button. publiclly available + // an example how to trigger the help button. Publicly available this.templateManager.eventManager.registerCallback( "navBar", () => { @@ -420,7 +420,7 @@ export class DefaultViewer extends AbstractViewerWithTemplate { } }); if (this.sceneManager.vrHelper) { - // due to the way the experience helper is exisintg VR, this must be added. + // due to the way the experience helper is existing VR, this must be added. this.sceneManager.vrHelper.onExitingVR.add(() => { const viewerTemplate = this.templateManager.getTemplate("viewer"); const viewerElement = viewerTemplate && viewerTemplate.parent; diff --git a/packages/tools/viewer/src/viewer/viewer.ts b/packages/tools/viewer/src/viewer/viewer.ts index 51c3ed4f572..3db918f9194 100644 --- a/packages/tools/viewer/src/viewer/viewer.ts +++ b/packages/tools/viewer/src/viewer/viewer.ts @@ -783,7 +783,7 @@ export abstract class AbstractViewer { public loadModel(modelConfig: string | File | IModelConfiguration, clearScene: boolean = true): Promise { if (this._isLoading) { // We can decide here whether or not to cancel the lst load, but the developer can do that. - return Promise.reject("another model is curently being loaded."); + return Promise.reject("another model is currently being loaded."); } return Promise.resolve(this.sceneManager.scene) diff --git a/packages/tools/vsm/src/actions/actions/BaseAction.ts b/packages/tools/vsm/src/actions/actions/BaseAction.ts index 3a6d5a28ced..d50d048d77e 100644 --- a/packages/tools/vsm/src/actions/actions/BaseAction.ts +++ b/packages/tools/vsm/src/actions/actions/BaseAction.ts @@ -5,11 +5,11 @@ export class BaseAction { public constructor() {} public execute() { - /** Overriden in child classes */ + /** Overridden in child classes */ } public actionName(): string { - /** Overriden in child classes */ + /** Overridden in child classes */ return "BaseAction"; } } diff --git a/packages/tools/vsm/src/actions/triggers/BaseTrigger.ts b/packages/tools/vsm/src/actions/triggers/BaseTrigger.ts index 0c7f8b1b65a..8497adc67ac 100644 --- a/packages/tools/vsm/src/actions/triggers/BaseTrigger.ts +++ b/packages/tools/vsm/src/actions/triggers/BaseTrigger.ts @@ -15,7 +15,7 @@ export class BaseTrigger { } public condition(scene: Scene) { - /** Overriden in child classes */ + /** Overridden in child classes */ return false; } diff --git a/readme-es6.md b/readme-es6.md index bcfe56b20d8..103648fd468 100644 --- a/readme-es6.md +++ b/readme-es6.md @@ -105,7 +105,7 @@ Please see the [Contributing Guidelines](./contributing.md) ## Useful links - Official web site: [www.babylonjs.com](https://www.babylonjs.com/) -- Online [playground](https://playground.babylonjs.com/) to learn by experimentating +- Online [playground](https://playground.babylonjs.com/) to learn by experimenting - Online [sandbox](https://www.babylonjs.com/sandbox) where you can test your .babylon and glTF scenes with a simple drag'n'drop - Online [shader creation tool](https://www.babylonjs.com/cyos/) where you can learn how to create GLSL shaders - 3DS Max [exporter](https://github.com/BabylonJS/Exporters/tree/master/3ds%20Max) can be used to generate a .babylon file from 3DS Max diff --git a/readme.md b/readme.md index a4e8b9152f3..62a62035426 100644 --- a/readme.md +++ b/readme.md @@ -117,7 +117,7 @@ Please see the [Contributing Guidelines](./contributing.md). ## Useful links - Official web site: [www.babylonjs.com](https://www.babylonjs.com/) -- Online [playground](https://playground.babylonjs.com/) to learn by experimentating +- Online [playground](https://playground.babylonjs.com/) to learn by experimenting - Online [sandbox](https://www.babylonjs.com/sandbox) where you can test your .babylon and glTF scenes with a simple drag'n'drop - Online [shader creation tool](https://cyos.babylonjs.com/) where you can learn how to create GLSL shaders - 3DS Max [exporter](https://github.com/BabylonJS/Exporters/tree/master/3ds%20Max) can be used to generate a .babylon file from 3DS Max