Преглед изворни кода

spelling fixes and linting

Trevor Baron пре 6 година
родитељ
комит
896f593765

+ 3 - 3
src/Cameras/VR/webVRCamera.ts

@@ -407,7 +407,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
 
 
     private _leftController: Nullable<WebVRController>;
     private _leftController: Nullable<WebVRController>;
     /**
     /**
-     * The controller corrisponding to the users left hand.
+     * The controller corresponding to the users left hand.
      */
      */
     public get leftController(): Nullable<WebVRController> {
     public get leftController(): Nullable<WebVRController> {
         if (!this._leftController) {
         if (!this._leftController) {
@@ -419,7 +419,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
 
 
     private _rightController: Nullable<WebVRController>;
     private _rightController: Nullable<WebVRController>;
     /**
     /**
-     * The controller corrisponding to the users right hand.
+     * The controller corresponding to the users right hand.
      */
      */
     public get rightController(): Nullable<WebVRController> {
     public get rightController(): Nullable<WebVRController> {
         if (!this._rightController) {
         if (!this._rightController) {
@@ -432,7 +432,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
     /**
     /**
      * Casts a ray forward from the vrCamera's gaze.
      * Casts a ray forward from the vrCamera's gaze.
      * @param length Length of the ray (default: 100)
      * @param length Length of the ray (default: 100)
-     * @returns the ray corrisponding to the gaze
+     * @returns the ray corresponding to the gaze
      */
      */
     public getForwardRay(length = 100): Ray {
     public getForwardRay(length = 100): Ray {
         if (this.leftCamera) {
         if (this.leftCamera) {

+ 4 - 4
src/Engines/engine.ts

@@ -4347,7 +4347,7 @@ export class Engine {
 
 
         return texture;
         return texture;
     }
     }
-    
+
     private _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void {
     private _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void {
         let rtt = this.createRenderTargetTexture({
         let rtt = this.createRenderTargetTexture({
             width: destination.width,
             width: destination.width,
@@ -4976,12 +4976,12 @@ export class Engine {
     }
     }
 
 
     /** @hidden */
     /** @hidden */
-    public _uploadDataToTextureAndResize(texture: InternalTexture, imageData: ArrayBufferView, width:number, height:number, babylonInternalFormat?:number){
+    public _uploadDataToTextureAndResize(texture: InternalTexture, imageData: ArrayBufferView, width: number, height: number, babylonInternalFormat?: number) {
         // Get gl type and formats
         // Get gl type and formats
         var textureType = this._getWebGLTextureType(texture.type);
         var textureType = this._getWebGLTextureType(texture.type);
         var format = this._getInternalFormat(texture.format);
         var format = this._getInternalFormat(texture.format);
-        var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type,format) : this._getInternalFormat(babylonInternalFormat);
-        
+        var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type, format) : this._getInternalFormat(babylonInternalFormat);
+
         // Create non power of two texture
         // Create non power of two texture
         var gl = this._gl;
         var gl = this._gl;
         let source = new InternalTexture(this, InternalTexture.DATASOURCE_TEMP);
         let source = new InternalTexture(this, InternalTexture.DATASOURCE_TEMP);

+ 1 - 1
src/Gamepads/Controllers/webVRController.ts

@@ -52,7 +52,7 @@ export abstract class WebVRController extends PoseEnabledController {
     }
     }
 
 
     /**
     /**
-     * X and Y axis corrisponding to the controllers joystick
+     * X and Y axis corresponding to the controllers joystick
      */
      */
     public pad: StickValues = { x: 0, y: 0 };
     public pad: StickValues = { x: 0, y: 0 };
 
 

+ 1 - 1
src/Gamepads/Controllers/windowsMotionController.ts

@@ -26,7 +26,7 @@ class LoadedMeshInfo {
      */
      */
     public rootNode: AbstractMesh;
     public rootNode: AbstractMesh;
     /**
     /**
-     * Node of the mesh corrisponding to the direction the ray should be cast from the controller
+     * Node of the mesh corresponding to the direction the ray should be cast from the controller
      */
      */
     public pointingPoseNode: TransformNode;
     public pointingPoseNode: TransformNode;
     /**
     /**

+ 3 - 3
src/Materials/Textures/Loaders/basisTextureLoader.ts

@@ -11,7 +11,7 @@ import { BasisTools } from "../../../Misc/basis";
  */
  */
 export class _BasisTextureLoader implements IInternalTextureLoader {
 export class _BasisTextureLoader implements IInternalTextureLoader {
     /**
     /**
-     * Defines wether the loader supports cascade loading the different faces.
+     * Defines whether the loader supports cascade loading the different faces.
      */
      */
     public readonly supportCascades = false;
     public readonly supportCascades = false;
 
 
@@ -49,7 +49,7 @@ export class _BasisTextureLoader implements IInternalTextureLoader {
     }
     }
 
 
     /**
     /**
-     * Uploads the cube texture data to the WebGl Texture. It has alreday been bound.
+     * Uploads the cube texture data to the WebGl Texture. It has already been bound.
      * @param data contains the texture data
      * @param data contains the texture data
      * @param texture defines the BabylonJS internal texture
      * @param texture defines the BabylonJS internal texture
      * @param createPolynomials will be true if polynomials have been requested
      * @param createPolynomials will be true if polynomials have been requested
@@ -69,7 +69,7 @@ export class _BasisTextureLoader implements IInternalTextureLoader {
     public loadData(data: ArrayBuffer, texture: InternalTexture,
     public loadData(data: ArrayBuffer, texture: InternalTexture,
         callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void {
         callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void {
         // Verify Basis Module is loaded and detect file info and format
         // Verify Basis Module is loaded and detect file info and format
-        BasisTools.VerifyBasisModuleAsync().then(()=>{
+        BasisTools.VerifyBasisModuleAsync().then(() => {
             var loadedFile = BasisTools.LoadBasisFile(data);
             var loadedFile = BasisTools.LoadBasisFile(data);
             var fileInfo = BasisTools.GetFileInfo(loadedFile);
             var fileInfo = BasisTools.GetFileInfo(loadedFile);
             var format = BasisTools.GetSupportedTranscodeFormat(texture.getEngine(), fileInfo);
             var format = BasisTools.GetSupportedTranscodeFormat(texture.getEngine(), fileInfo);

+ 1 - 1
src/Materials/Textures/Procedurals/proceduralTexture.ts

@@ -143,7 +143,7 @@ export class ProceduralTexture extends Texture {
 
 
     /**
     /**
      * The effect that is created when initializing the post process.
      * The effect that is created when initializing the post process.
-     * @returns The created effect corrisponding the the postprocess.
+     * @returns The created effect corresponding the the postprocess.
      */
      */
     public getEffect(): Effect {
     public getEffect(): Effect {
         return this._effect;
         return this._effect;

+ 10 - 10
src/Misc/basis.ts

@@ -34,7 +34,7 @@ class BasisFileInfo {
  */
  */
 export class BasisTools {
 export class BasisTools {
     private static _IgnoreSupportedFormats = false;
     private static _IgnoreSupportedFormats = false;
-    private static LoadScriptPromise:any = null;
+    private static LoadScriptPromise: any = null;
     // TODO should load from cdn location as fallback once it exists
     // TODO should load from cdn location as fallback once it exists
     private static _FallbackURL = "../dist/preview%20release/basisTranscoder/basis_transcoder.js";
     private static _FallbackURL = "../dist/preview%20release/basisTranscoder/basis_transcoder.js";
     private static _BASIS_FORMAT = {
     private static _BASIS_FORMAT = {
@@ -58,25 +58,25 @@ export class BasisTools {
      */
      */
     public static VerifyBasisModuleAsync() {
     public static VerifyBasisModuleAsync() {
         // Complete if module has been populated
         // Complete if module has been populated
-        if(BasisTools.BasisModule){
+        if (BasisTools.BasisModule) {
             return Promise.resolve();
             return Promise.resolve();
         }
         }
 
 
         // Otherwise load script from fallback url
         // Otherwise load script from fallback url
-        if(!this.LoadScriptPromise){
-            this.LoadScriptPromise = Tools.LoadScriptAsync(BasisTools._FallbackURL, "basis_transcoder").then((success)=>{
-                return new Promise((res, rej)=>{
+        if (!this.LoadScriptPromise) {
+            this.LoadScriptPromise = Tools.LoadScriptAsync(BasisTools._FallbackURL, "basis_transcoder").then((success) => {
+                return new Promise((res, rej) => {
                     if ((window as any).Module) {
                     if ((window as any).Module) {
                         (window as any).Module.onRuntimeInitialized = () => {
                         (window as any).Module.onRuntimeInitialized = () => {
                             BasisTools.BasisModule = (window as any).Module;
                             BasisTools.BasisModule = (window as any).Module;
                             BasisTools.BasisModule.initializeBasis();
                             BasisTools.BasisModule.initializeBasis();
                             res();
                             res();
-                        }
+                        };
                     }else {
                     }else {
                         rej("Unable to load .basis texture, BasisTools.BasisModule should be populated");
                         rej("Unable to load .basis texture, BasisTools.BasisModule should be populated");
                     }
                     }
-                })
-            })
+                });
+            });
         }
         }
         return this.LoadScriptPromise;
         return this.LoadScriptPromise;
     }
     }
@@ -112,9 +112,9 @@ export class BasisTools {
     }
     }
 
 
     /**
     /**
-     * Get the internal format to be passed to texImage2D corrisponding to the .basis format value
+     * Get the internal format to be passed to texImage2D corresponding to the .basis format value
      * @param basisFormat format chosen from GetSupportedTranscodeFormat
      * @param basisFormat format chosen from GetSupportedTranscodeFormat
-     * @returns internal format corrisponding to the Basis format
+     * @returns internal format corresponding to the Basis format
      */
      */
     public static GetInternalFormatFromBasisFormat(basisFormat: number) {
     public static GetInternalFormatFromBasisFormat(basisFormat: number) {
         // TODO more formats need to be added here and validated
         // TODO more formats need to be added here and validated

+ 2 - 2
src/PostProcesses/convolutionPostProcess.ts

@@ -16,7 +16,7 @@ export class ConvolutionPostProcess extends PostProcess {
     /**
     /**
      * Creates a new instance ConvolutionPostProcess
      * Creates a new instance ConvolutionPostProcess
      * @param name The name of the effect.
      * @param name The name of the effect.
-     * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+     * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
      * @param options The required width/height ratio to downsize to before computing the render pass.
      * @param options The required width/height ratio to downsize to before computing the render pass.
      * @param camera The camera to apply the render pass to.
      * @param camera The camera to apply the render pass to.
      * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
      * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -25,7 +25,7 @@ export class ConvolutionPostProcess extends PostProcess {
      * @param textureType Type of textures used when performing the post process. (default: 0)
      * @param textureType Type of textures used when performing the post process. (default: 0)
      */
      */
     constructor(name: string,
     constructor(name: string,
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         public kernel: number[],
         public kernel: number[],
         options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT) {
         options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT) {
         super(name, "convolution", ["kernel", "screenSize"], null, options, camera, samplingMode, engine, reusable, null, textureType);
         super(name, "convolution", ["kernel", "screenSize"], null, options, camera, samplingMode, engine, reusable, null, textureType);

+ 2 - 2
src/PostProcesses/postProcess.ts

@@ -357,7 +357,7 @@ export class PostProcess {
 
 
     /**
     /**
      * The effect that is created when initializing the post process.
      * The effect that is created when initializing the post process.
-     * @returns The created effect corrisponding the the postprocess.
+     * @returns The created effect corresponding the the postprocess.
      */
      */
     public getEffect(): Effect {
     public getEffect(): Effect {
         return this._effect;
         return this._effect;
@@ -576,7 +576,7 @@ export class PostProcess {
 
 
     /**
     /**
      * Binds all textures and uniforms to the shader, this will be run on every pass.
      * Binds all textures and uniforms to the shader, this will be run on every pass.
-     * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+     * @returns the effect corresponding to this post process. Null if not compiled or not ready.
      */
      */
     public apply(): Nullable<Effect> {
     public apply(): Nullable<Effect> {
         // Check
         // Check