Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #13571

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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 `

Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Animations/runtimeAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Audio/audioSceneComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions packages/dev/core/src/Behaviors/Cameras/framingBehavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export class FramingBehavior implements Behavior<ArcRotateCamera> {
this._betaTransition = Animation.CreateAnimation("beta", Animation.ANIMATIONTYPE_FLOAT, 60, FramingBehavior.EasingFunction);
}

const animatabe = Animation.TransitionTo(
const animatable = Animation.TransitionTo(
"beta",
defaultBeta,
this._attachedCamera,
Expand All @@ -462,8 +462,8 @@ export class FramingBehavior implements Behavior<ArcRotateCamera> {
}
);

if (animatabe) {
this._animatables.push(animatabe);
if (animatable) {
this._animatables.push(animatable);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class BaseSixDofDragBehavior implements Behavior<Mesh> {

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);

Expand All @@ -452,15 +452,15 @@ export class BaseSixDofDragBehavior implements Behavior<Mesh> {

// 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() {
Expand Down
6 changes: 3 additions & 3 deletions packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
*/
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];
/**
Expand Down Expand Up @@ -412,7 +412,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
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();
Expand Down Expand Up @@ -476,7 +476,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {

// 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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/core/src/Bones/boneLookController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera
}

/**
* Gets the class name of the current intput.
* Gets the class name of the current input.
* @returns the class name
*/
public getClassName(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera

private _screenOrientationAngle: number = 0;

private _constantTranform: Quaternion;
private _constantTransform: Quaternion;
private _screenQuaternion: Quaternion = new Quaternion();

private _alpha: number = 0;
Expand Down Expand Up @@ -112,7 +112,7 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera
* @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs
*/
constructor() {
this._constantTranform = new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));
this._constantTransform = new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));
this._orientationChanged();
}

Expand Down Expand Up @@ -210,13 +210,13 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera
*/
public checkInputs(): void {
//if no device orientation provided, don't update the rotation.
//Only testing against alpha under the assumption thatnorientation will never be so exact when set.
//Only testing against alpha under the assumption that orientation will never be so exact when set.
if (!this._alpha) {
return;
}
Quaternion.RotationYawPitchRollToRef(Tools.ToRadians(this._alpha), Tools.ToRadians(this._beta), -Tools.ToRadians(this._gamma), this.camera.rotationQuaternion);
this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion);
this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform);
this._camera.rotationQuaternion.multiplyInPlace(this._constantTransform);
//Mirror on XY Plane
this._camera.rotationQuaternion.z *= -1;
this._camera.rotationQuaternion.w *= -1;
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Cameras/VR/vrExperienceHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ export class VRExperienceHelper {
// make sure that we return to the last active camera
this._existingCamera = this._scene.activeCamera;

// Remove and cache angular sensability to avoid camera rotation when in VR
// Remove and cache angular sensibility to avoid camera rotation when in VR
if ((<any>this._existingCamera).angularSensibilityX) {
this._cachedAngularSensibility.angularSensibilityX = (<any>this._existingCamera).angularSensibilityX;
(<any>this._existingCamera).angularSensibilityX = Number.MAX_VALUE;
Expand Down
18 changes: 9 additions & 9 deletions packages/dev/core/src/Cameras/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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<AbstractMesh> {
return this._activeMeshes;
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/core/src/Cameras/flyCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Cameras/targetCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Collisions/collider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions packages/dev/core/src/Compute/computeEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,26 @@ 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
);
});
}

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();
}
Expand Down
Loading