Procházet zdrojové kódy

linting corrections

Trevor Baron před 6 roky
rodič
revize
e1d3ff8762

+ 8 - 8
src/Engines/engine.ts

@@ -5553,9 +5553,9 @@ export class Engine {
      * @param width defines the width of the texture
      * @param height defines the height of the texture
      */
-    public createMultiviewRenderTargetTexture(width:number, height:number){
+    public createMultiviewRenderTargetTexture(width: number, height: number) {
         var gl = this._gl;
-        
+
         if (!this.getCaps().multiview) {
             throw "Multiview is not supported";
         }
@@ -5576,16 +5576,16 @@ export class Engine {
         return internalTexture;
     }
 
-    public bindMultiviewFramebuffer(multiviewTexture: InternalTexture){
+    public bindMultiviewFramebuffer(multiviewTexture: InternalTexture) {
         var gl: any = this._gl;
         var ext = this.getCaps().multiview;
 
         this.bindFramebuffer(multiviewTexture, undefined, undefined, undefined, true);
         gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, multiviewTexture._framebuffer);
-        if(multiviewTexture._colorTextureArray && multiviewTexture._depthStencilTextureArray){
+        if (multiviewTexture._colorTextureArray && multiviewTexture._depthStencilTextureArray) {
             ext.framebufferTextureMultiviewWEBGL(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, multiviewTexture._colorTextureArray, 0, 0, 2);
             ext.framebufferTextureMultiviewWEBGL(gl.DRAW_FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, multiviewTexture._depthStencilTextureArray, 0, 0, 2);
-        }else{
+        }else {
             throw "Invalid multiview frame buffer";
         }
     }
@@ -6446,12 +6446,12 @@ export class Engine {
 
             this._activateCurrentTexture();
 
-            if(texture && texture.isMultiview){
+            if (texture && texture.isMultiview) {
                 this._gl.bindTexture(target, texture ? texture._colorTextureArray : null);
-            }else{
+            }else {
                 this._gl.bindTexture(target, texture ? texture._webGLTexture : null);
             }
-            
+
             this._boundTexturesCache[this._activeChannel] = texture;
 
             if (texture) {

+ 0 - 3
src/Materials/Textures/renderTargetTexture.ts

@@ -1003,9 +1003,6 @@ Texture._CreateRenderTargetTexture = (name: string, renderTargetSize: number, sc
  * @see https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/
  */
 export class MultiviewRenderTarget extends RenderTargetTexture {
-    private _multiviewColorTexture: Nullable<WebGLTexture>;
-    private _multivewDepthStencilTexture: Nullable<WebGLTexture>;
-
     /**
      * Creates a multiview render target
      * @param scene scene used with the render target

+ 2 - 2
src/scene.ts

@@ -2568,7 +2568,7 @@ export class Scene extends AbstractScene implements IAnimatable {
             let otherCamera = this.activeCamera._alternateCamera;
             otherCamera.getViewMatrix().multiplyToRef(otherCamera.getProjectionMatrix(), Tmp.Matrix[0]);
             Frustum.GetRightPlaneToRef(Tmp.Matrix[0], this._frustumPlanes[3]); // Replace right plane by second camera right plane
-        } else if(viewR && projectionR){
+        } else if (viewR && projectionR) {
             viewR.multiplyToRef(projectionR, Tmp.Matrix[0]);
             Frustum.GetRightPlaneToRef(Tmp.Matrix[0], this._frustumPlanes[3]); // Replace right plane by second camera right plane
         }
@@ -4355,7 +4355,7 @@ export class Scene extends AbstractScene implements IAnimatable {
         this.activeCamera = currentActiveCamera;
         this._bindFrameBuffer();
         this.onAfterRenderTargetsRenderObservable.notifyObservers(this);
-        
+
         for (let step of this._beforeClearStage) {
             step.action();
         }