Jason Sturges 4 лет назад
Родитель
Сommit
e78e8c825a

+ 1 - 1
src/Physics/IPhysicsEngine.ts

@@ -189,7 +189,7 @@ export interface IPhysicsEngine {
 
     /**
      * Called by the scene. No need to call it.
-     * @param delta defines the timespam between frames
+     * @param delta defines the timespan between frames
      */
     _step(delta: number): void;
 }

+ 4 - 4
src/Physics/Plugins/ammoJSPlugin.ts

@@ -937,7 +937,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
 
         switch (impostor.type) {
             case PhysicsImpostor.SphereImpostor:
-                // Is there a better way to compare floats number? With an epsylon or with a Math function
+                // Is there a better way to compare floats number? With an epsilon or with a Math function
                 if (Scalar.WithinEpsilon(extendSize.x, extendSize.y, 0.0001) && Scalar.WithinEpsilon(extendSize.x, extendSize.z, 0.0001)) {
                     returnValue = new this.bjsAMMO.btSphereShape(extendSize.x / 2);
                 } else {
@@ -1206,7 +1206,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
     }
 
     /**
-     * Sets resitution of the impostor
+     * Sets restitution of the impostor
      * @param impostor impostor to set resitution on
      * @param restitution resitution value
      */
@@ -1344,7 +1344,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
     * @param otherImpostor is the rigid impostor to anchor to
     * @param width ratio across width from 0 to 1
     * @param height ratio up height from 0 to 1
-    * @param influence the elasticity between cloth impostor and anchor from 0, very stretchy to 1, little strech
+    * @param influence the elasticity between cloth impostor and anchor from 0, very stretchy to 1, little stretch
     * @param noCollisionBetweenLinkedBodies when true collisions between soft impostor and anchor are ignored; default false
     */
     public appendAnchor(impostor: PhysicsImpostor, otherImpostor: PhysicsImpostor, width: number, height: number, influence: number = 1, noCollisionBetweenLinkedBodies: boolean = false) {
@@ -1361,7 +1361,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
      * @param impostor is the rope impostor to add hook to
      * @param otherImpostor is the rigid impostor to hook to
      * @param length ratio along the rope from 0 to 1
-     * @param influence the elasticity between soft impostor and anchor from 0, very stretchy to 1, little strech
+     * @param influence the elasticity between soft impostor and anchor from 0, very stretchy to 1, little stretch
      * @param noCollisionBetweenLinkedBodies when true collisions between soft impostor and anchor are ignored; default false
      */
     public appendHook(impostor: PhysicsImpostor, otherImpostor: PhysicsImpostor, length: number, influence: number = 1, noCollisionBetweenLinkedBodies: boolean = false) {

+ 1 - 1
src/Physics/physicsEngine.ts

@@ -179,7 +179,7 @@ export class PhysicsEngine implements IPhysicsEngine {
 
     /**
      * Called by the scene. No need to call it.
-     * @param delta defines the timespam between frames
+     * @param delta defines the timespan between frames
      */
     public _step(delta: number) {
         //check if any mesh has no body / requires an update

+ 1 - 1
src/Physics/physicsEngineComponent.ts

@@ -315,7 +315,7 @@ export class PhysicsEngineSceneComponent implements ISceneComponent {
     }
 
     /**
-     * Disposes the component and the associated ressources
+     * Disposes the component and the associated resources
      */
     public dispose(): void {
         this.scene.onBeforePhysicsObservable.clear();

+ 10 - 10
src/Physics/physicsHelper.ts

@@ -244,7 +244,7 @@ class PhysicsRadialExplosionEvent {
     private _dataFetched: boolean = false; // check if the data has been fetched. If not, do cleanup
 
     /**
-     * Initializes a radial explosioin event
+     * Initializes a radial explosion event
      * @param _scene BabylonJS scene
      * @param _options The options for the vortex event
      */
@@ -310,7 +310,7 @@ class PhysicsRadialExplosionEvent {
     }
 
     /**
-     * Triggers affecterd impostors callbacks
+     * Triggers affected impostors callbacks
      * @param affectedImpostorsWithData defines the list of affected impostors (including associated data)
      */
     public triggerAffectedImpostorsCallback(affectedImpostorsWithData: Array<PhysicsAffectedImpostorWithData>) {
@@ -745,12 +745,12 @@ export class PhysicsRadialExplosionEventOptions {
     radius: number = 5;
 
     /**
-     * The strenth of the explosion.
+     * The strength of the explosion.
      */
     strength: number = 10;
 
     /**
-     * The strenght of the force in correspondence to the distance of the affected object
+     * The strength of the force in correspondence to the distance of the affected object
      */
     falloff: PhysicsRadialImpulseFalloff = PhysicsRadialImpulseFalloff.Constant;
 
@@ -776,7 +776,7 @@ export class PhysicsUpdraftEventOptions {
     radius: number = 5;
 
     /**
-     * The strenth of the updraft.
+     * The strength of the updraft.
      */
     strength: number = 10;
 
@@ -802,7 +802,7 @@ export class PhysicsVortexEventOptions {
     radius: number = 5;
 
     /**
-     * The strenth of the vortex.
+     * The strength of the vortex.
      */
     strength: number = 10;
 
@@ -817,12 +817,12 @@ export class PhysicsVortexEventOptions {
     centripetalForceThreshold: number = 0.7;
 
     /**
-     * This multiplier determines with how much force the objects will be pushed sideways/around the vortex, when below the treshold.
+     * This multiplier determines with how much force the objects will be pushed sideways/around the vortex, when below the threshold.
      */
     centripetalForceMultiplier: number = 5;
 
     /**
-     * This multiplier determines with how much force the objects will be pushed sideways/around the vortex, when above the treshold.
+     * This multiplier determines with how much force the objects will be pushed sideways/around the vortex, when above the threshold.
      */
     centrifugalForceMultiplier: number = 0.5;
 
@@ -833,7 +833,7 @@ export class PhysicsVortexEventOptions {
 }
 
 /**
-* The strenght of the force in correspondence to the distance of the affected object
+* The strength of the force in correspondence to the distance of the affected object
 * @see https://doc.babylonjs.com/how_to/using_the_physics_engine#further-functionality-of-the-impostor-class
 */
 export enum PhysicsRadialImpulseFalloff {
@@ -928,7 +928,7 @@ export interface PhysicsAffectedImpostorWithData {
     impostor: PhysicsImpostor;
 
     /**
-     * The data about the hit/horce from the explosion
+     * The data about the hit/force from the explosion
      */
     hitData: PhysicsHitData;
 }

+ 3 - 3
src/Physics/physicsImpostor.ts

@@ -505,7 +505,7 @@ export class PhysicsImpostor {
     }
 
     /**
-     * This function will completly initialize this impostor.
+     * This function will completely initialize this impostor.
      * It will create a new body - but only if this mesh has no parent.
      * If it has, this impostor will not be used other than to define the impostor
      * of the child mesh.
@@ -979,7 +979,7 @@ export class PhysicsImpostor {
      * @param otherImpostor rigid impostor to anchor to
      * @param width ratio across width from 0 to 1
      * @param height ratio up height from 0 to 1
-     * @param influence the elasticity between cloth impostor and anchor from 0, very stretchy to 1, little strech
+     * @param influence the elasticity between cloth impostor and anchor from 0, very stretchy to 1, little stretch
      * @param noCollisionBetweenLinkedBodies when true collisions between cloth impostor and anchor are ignored; default false
      * @returns impostor the soft imposter
      */
@@ -1001,7 +1001,7 @@ export class PhysicsImpostor {
      * Add a hook to a rope impostor
      * @param otherImpostor rigid impostor to anchor to
      * @param length ratio across rope from 0 to 1
-     * @param influence the elasticity between rope impostor and anchor from 0, very stretchy to 1, little strech
+     * @param influence the elasticity between rope impostor and anchor from 0, very stretchy to 1, little stretch
      * @param noCollisionBetweenLinkedBodies when true collisions between soft impostor and anchor are ignored; default false
      * @returns impostor the rope imposter
      */

+ 2 - 2
src/Physics/physicsJoint.ts

@@ -72,7 +72,7 @@ export class PhysicsJoint {
     public set physicsJoint(newJoint: any) {
 
         if (this._physicsJoint) {
-            //remove from the wolrd
+            //remove from the world
         }
 
         this._physicsJoint = newJoint;
@@ -180,7 +180,7 @@ export class MotorEnabledJoint extends PhysicsJoint implements IMotorEnabledJoin
     /**
      * Initializes the Motor-Enabled Joint
      * @param type The type of the joint
-     * @param jointData The physica joint data for the joint
+     * @param jointData The physical joint data for the joint
      */
     constructor(type: number, jointData: PhysicsJointData) {
         super(type, jointData);