Selaa lähdekoodia

Merge pull request #9704 from jasonsturges/doc/behaviors

Behaviors documentation
sebavan 4 vuotta sitten
vanhempi
commit
f853501eef

+ 1 - 1
src/Behaviors/Cameras/autoRotationBehavior.ts

@@ -99,7 +99,7 @@ export class AutoRotationBehavior implements Behavior<ArcRotateCamera> {
      * Initializes the behavior.
      */
     public init(): void {
-        // Do notihng
+        // Do nothing
     }
 
     /**

+ 1 - 1
src/Behaviors/Cameras/bouncingBehavior.ts

@@ -96,7 +96,7 @@ export class BouncingBehavior implements Behavior<ArcRotateCamera> {
      * Initializes the behavior.
      */
     public init(): void {
-        // Do notihng
+        // Do nothing
     }
 
     /**

+ 1 - 1
src/Behaviors/Cameras/framingBehavior.ts

@@ -176,7 +176,7 @@ export class FramingBehavior implements Behavior<ArcRotateCamera> {
      * Initializes the behavior.
      */
     public init(): void {
-        // Do notihng
+        // Do nothing
     }
 
     /**

+ 3 - 3
src/Behaviors/Meshes/attachToBoxBehavior.ts

@@ -38,7 +38,7 @@ export class AttachToBoxBehavior implements Behavior<Mesh> {
 
     /**
      * Creates the AttachToBoxBehavior, used to attach UI to the closest face of the box to a camera
-     * @param ui The transform node that should be attched to the mesh
+     * @param ui The transform node that should be attached to the mesh
      */
     constructor(private ui: TransformNode) {
         /* Does nothing */
@@ -61,7 +61,7 @@ export class AttachToBoxBehavior implements Behavior<Mesh> {
             Vector3.TransformCoordinatesToRef(v.direction, this._tmpMatrix, v.rotatedDirection);
             v.diff = Vector3.GetAngleBetweenVectors(v.rotatedDirection, targetDirection, Vector3.Cross(v.rotatedDirection, targetDirection));
         });
-        // Return the face information of the one with the normal closeset to target direction
+        // Return the face information of the one with the normal closest to target direction
         return this._faceVectors.reduce((min, p) => {
             if (min.ignore) {
                 return p;
@@ -109,7 +109,7 @@ export class AttachToBoxBehavior implements Behavior<Mesh> {
 
             // Get camera up direction
             Vector3.TransformCoordinatesToRef(Vector3.Up(), this._tmpMatrix, this._tmpVector);
-            // Ignore faces to not select a parrelel face for the up vector of the UI
+            // Ignore faces to not select a parallel face for the up vector of the UI
             this._faceVectors.forEach((v) => {
                 if (facing.direction.x && v.direction.x) {
                     v.ignore = true;

+ 1 - 1
src/Behaviors/Meshes/fadeInOutBehavior.ts

@@ -22,7 +22,7 @@ export class FadeInOutBehavior implements Behavior<Mesh> {
     private _ownerNode: Nullable<Mesh> = null;
 
     /**
-     * Instatiates the FadeInOutBehavior
+     * Instantiates the FadeInOutBehavior
      */
     constructor() {
     }

+ 2 - 2
src/Behaviors/Meshes/pointerDragBehavior.ts

@@ -246,7 +246,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
     }
 
     /**
-     * Force relase the drag action by code.
+     * Force release the drag action by code.
      */
     public releaseDrag() {
         if (this.dragging) {
@@ -427,7 +427,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
                 }
             } else {
                 Vector3.CrossToRef(this._localAxis, this._pointC, this._lookAt);
-                // Get perpendicular line from previous result and drag axis to adjust lineB to be perpendiculat to camera
+                // Get perpendicular line from previous result and drag axis to adjust lineB to be perpendicular to camera
                 Vector3.CrossToRef(this._localAxis, this._lookAt, this._lookAt);
                 this._lookAt.normalize();
             }

+ 1 - 1
src/Behaviors/Meshes/sixDofDragBehavior.ts

@@ -80,7 +80,7 @@ export class SixDofDragBehavior implements Behavior<Mesh> {
     public init() { }
 
     /**
-     * In the case of multiplea active cameras, the cameraToUseForPointers should be used if set instead of active camera
+     * In the case of multiple active cameras, the cameraToUseForPointers should be used if set instead of active camera
      */
     private get _pointerCamera() {
         if (this._scene.cameraToUseForPointers) {