Benjamin Guignabert 4 éve
szülő
commit
ac49932be5

+ 1 - 0
dist/preview release/what's new.md

@@ -12,6 +12,7 @@
 - Added support for infinite perspective cameras ([Deltakosh](https://github.com/deltakosh))
 - Added ability to enable/disable ArcRotateCamera zoom on multiTouch event ([NicolasBuecher](https://github.com/NicolasBuecher))
 - Moving button to shared uI folder.([msDestiny14](https://github.com/msDestiny14))
+- Moving additional components to shared UI folder.([msDestiny14](https://github.com/msDestiny14))
 
 ### Loaders
 

+ 10 - 1
src/Materials/Textures/prePassRenderTarget.ts

@@ -15,7 +15,9 @@ import { Nullable } from "../../types";
  * It is more likely that you need a regular `MultiRenderTarget`
  */
 export class PrePassRenderTarget extends MultiRenderTarget {
-
+    /**
+     * @hidden
+     */
     public _beforeCompositionPostProcesses: PostProcess[] = [];
     /**
      * Image processing post process for composition
@@ -25,7 +27,14 @@ export class PrePassRenderTarget extends MultiRenderTarget {
     public _engine: Engine;
     public _scene: Scene;
 
+    /**
+     * @hidden
+     */
     public _outputPostProcess: Nullable<PostProcess>;
+
+    /**
+     * @hidden
+     */
     public _internalTextureDirty = false;
 
     /**

+ 14 - 1
src/Rendering/prePassRenderer.ts

@@ -123,7 +123,7 @@ export class PrePassRenderer {
     private _effectConfigurations: PrePassEffectConfiguration[] = [];
 
     /**
-     * Returns the prepass render target for the rendering pass.
+     * @return the prepass render target for the rendering pass.
      * If we are currently rendering a render target, it returns the PrePassRenderTarget
      * associated with that render target. Otherwise, it returns the scene default PrePassRenderTarget
      */
@@ -131,6 +131,11 @@ export class PrePassRenderer {
         return this._currentTarget;
     }
 
+    /**
+     * @hidden
+     * Managed by the scene component
+     * @param prePassRenderTarget 
+     */
     public _setRenderTarget(prePassRenderTarget: Nullable<PrePassRenderTarget>): void {
         if (prePassRenderTarget) {
             this._currentTarget = prePassRenderTarget;
@@ -215,6 +220,14 @@ export class PrePassRenderer {
         this._setRenderTarget(null);
     }
 
+    /**
+     * Creates a new PrePassRenderTarget
+     * This should be the only way to instanciate a `PrePassRenderTarget`
+     * @param name Name of the `PrePassRenderTarget`
+     * @param renderTargetTexture RenderTarget the `PrePassRenderTarget` will be attached to.
+     * Can be `null` if the created `PrePassRenderTarget` is attached to the scene (default framebuffer).
+     * @hidden
+     */
     public _createRenderTarget(name: string, renderTargetTexture: Nullable<RenderTargetTexture>) : PrePassRenderTarget {
         const rt = new PrePassRenderTarget(name, renderTargetTexture, { width: this._engine.getRenderWidth(), height: this._engine.getRenderHeight() }, 0, this._scene,
             { generateMipMaps: false, generateStencilBuffer: true, defaultType: Constants.TEXTURETYPE_UNSIGNED_INT, types: [], drawOnlyOnFirstAttachmentByDefault: true });

+ 1 - 0
src/Rendering/prePassRendererSceneComponent.ts

@@ -36,6 +36,7 @@ declare module "../abstractScene" {
 
 declare module "../Materials/Textures/renderTargetTexture" {
     export interface RenderTargetTexture {
+        /** @hidden */
         _prePassRenderTarget: PrePassRenderTarget;
     }
 }

+ 1 - 1
src/scene.ts

@@ -3682,7 +3682,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
         this.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix(force));
     }
 
-    public _bindFrameBuffer() {
+    private _bindFrameBuffer() {
         if (this.activeCamera && this.activeCamera._multiviewTexture) {
             this.activeCamera._multiviewTexture._bindFrameBuffer();
         } else if (this.activeCamera && this.activeCamera.outputRenderTarget) {