Browse Source

Merge pull request #6020 from TrevorDev/multiviewTypedocFix

add missing typedocs to fix build
sebavan 6 years ago
parent
commit
75376183d5
2 changed files with 9 additions and 2 deletions
  1. 1 0
      src/Engines/engine.ts
  2. 8 2
      src/Materials/Textures/renderTargetTexture.ts

+ 1 - 0
src/Engines/engine.ts

@@ -5605,6 +5605,7 @@ export class Engine {
      * Creates a new multiview render target
      * @param width defines the width of the texture
      * @param height defines the height of the texture
+     * @returns the created multiview texture
      */
     public createMultiviewRenderTargetTexture(width: number, height: number) {
         var gl = this._gl;

+ 8 - 2
src/Materials/Textures/renderTargetTexture.ts

@@ -727,6 +727,10 @@ export class RenderTargetTexture extends Texture {
         return Math.min(Tools.FloorPOT(renderDimension), curved);
     }
 
+    /**
+     * @hidden
+     * @param faceIndex face index to bind to if this is a cubetexture
+     */
     public _bindFrameBuffer(faceIndex: number = 0) {
         var scene = this.getScene();
         if (!scene) {
@@ -988,6 +992,7 @@ export class RenderTargetTexture extends Texture {
 
     /**
      * Gets the number of views the corresponding to the texture (eg. a MultiviewRenderTarget will have > 1)
+     * @returns the view count
      */
     public getViewCount() {
         return 1;
@@ -1008,7 +1013,7 @@ export class MultiviewRenderTarget extends RenderTargetTexture {
      * @param scene scene used with the render target
      * @param size the size of the render target (used for each view)
      */
-    constructor(public scene: Scene, size: number | { width: number, height: number } | { ratio: number } = 512) {
+    constructor(scene: Scene, size: number | { width: number, height: number } | { ratio: number } = 512) {
         super("multiview rtt", size, scene, false, true, InternalTexture.DATASOURCE_UNKNOWN, false, undefined, false, false, true, undefined, true);
         var internalTexture = scene.getEngine().createMultiviewRenderTargetTexture(this.getRenderWidth(), this.getRenderHeight());
         internalTexture.isMultiview = true;
@@ -1023,11 +1028,12 @@ export class MultiviewRenderTarget extends RenderTargetTexture {
         if (!this._texture) {
             return;
         }
-        this.scene.getEngine().bindMultiviewFramebuffer(this._texture);
+        this.getScene()!.getEngine().bindMultiviewFramebuffer(this._texture);
     }
 
     /**
      * Gets the number of views the corresponding to the texture (eg. a MultiviewRenderTarget will have > 1)
+     * @returns the view count
      */
     public getViewCount() {
         return 2;