فهرست منبع

RenderTargetCreationOption Dependency

sebavan 6 سال پیش
والد
کامیت
5fa98482a1

+ 1 - 7
Tools/Config/tempCircularValidation/core.json

@@ -1,7 +1,4 @@
 {
-    "../../src/Engines/engine.ts": [
-        "../../src/Materials/Textures/internalTexture.ts"
-    ],
     "../../src/Layers/effectLayer.ts": [
         "../../src/Layers/effectLayerSceneComponent.ts"
     ],
@@ -20,9 +17,6 @@
     "../../src/Lights/Shadows/shadowGeneratorSceneComponent.ts": [
         "../../src/Lights/Shadows/shadowGenerator.ts"
     ],
-    "../../src/Materials/Textures/internalTexture.ts": [
-        "../../src/Engines/engine.ts"
-    ],
     "../../src/Particles/particleHelper.ts": [
         "../../src/Particles/particleSystemSet.ts"
     ],
@@ -53,5 +47,5 @@
     "../../src/Rendering/geometryBufferRendererSceneComponent.ts": [
         "../../src/Rendering/geometryBufferRenderer.ts"
     ],
-    "errorCount": 18
+    "errorCount": 16
 }

+ 1 - 20
src/Engines/engine.ts

@@ -31,6 +31,7 @@ import { Constants } from "./constants";
 import { DomManagement } from "../Misc/domManagement";
 import { Logger } from "../Misc/logger";
 import { EngineStore } from "./engineStore";
+import { RenderTargetCreationOptions } from "../Materials/Textures/renderTargetCreationOptions";
 
 declare type Texture = import("../Materials/Textures/texture").Texture;
 declare type VideoTexture = import("../Materials/Textures/videoTexture").VideoTexture;
@@ -87,26 +88,6 @@ declare type RenderTargetTexture = import("../Materials/Textures/renderTargetTex
     }
 
     /**
-     * Define options used to create a render target texture
-     */
-    export class RenderTargetCreationOptions {
-        /**
-         * Specifies is mipmaps must be generated
-         */
-        generateMipMaps?: boolean;
-        /** Specifies whether or not a depth should be allocated in the texture (true by default) */
-        generateDepthBuffer?: boolean;
-        /** Specifies whether or not a stencil should be allocated in the texture (false by default)*/
-        generateStencilBuffer?: boolean;
-        /** Defines texture type (int by default) */
-        type?: number;
-        /** Defines sampling mode (trilinear by default) */
-        samplingMode?: number;
-        /** Defines format (RGBA by default) */
-        format?: number;
-    }
-
-    /**
      * Define options used to create a depth texture
      */
     export class DepthTextureCreationOptions {

+ 2 - 1
src/Materials/Textures/internalTexture.ts

@@ -1,12 +1,13 @@
 import { Observable } from "../../Misc/observable";
 import { Nullable, int } from "../../types";
 import { SphericalPolynomial } from "../../Maths/sphericalPolynomial";
-import { Engine, RenderTargetCreationOptions } from "../../Engines/engine";
+import { RenderTargetCreationOptions } from "../../Materials/Textures/renderTargetCreationOptions";
 import { IInternalTextureTracker } from "../../Materials/Textures/internalTextureTracker";
 import { _TimeToken } from "../../Instrumentation/timeToken";
 import { _DepthCullingState, _StencilState, _AlphaState } from "../../States/index";
 import { Constants } from "../../Engines/constants";
 
+declare type Engine = import("../../Engines/engine").Engine;
 declare type BaseTexture = import("../../Materials/Textures/baseTexture").BaseTexture;
 
     /**

+ 20 - 0
src/Materials/Textures/renderTargetCreationOptions.ts

@@ -0,0 +1,20 @@
+
+/**
+ * Define options used to create a render target texture
+ */
+export class RenderTargetCreationOptions {
+    /**
+     * Specifies is mipmaps must be generated
+     */
+    generateMipMaps?: boolean;
+    /** Specifies whether or not a depth should be allocated in the texture (true by default) */
+    generateDepthBuffer?: boolean;
+    /** Specifies whether or not a stencil should be allocated in the texture (false by default)*/
+    generateStencilBuffer?: boolean;
+    /** Defines texture type (int by default) */
+    type?: number;
+    /** Defines sampling mode (trilinear by default) */
+    samplingMode?: number;
+    /** Defines format (RGBA by default) */
+    format?: number;
+}

+ 4 - 1
src/Materials/Textures/renderTargetTexture.ts

@@ -5,7 +5,7 @@ import { Nullable } from "../../types";
 import { Camera } from "../../Cameras/camera";
 import { Scene } from "../../scene";
 import { Matrix, Vector3, Color4 } from "../../Maths/math";
-import { Engine, RenderTargetCreationOptions } from "../../Engines/engine";
+import { RenderTargetCreationOptions } from "../../Materials/Textures/renderTargetCreationOptions";
 import { AbstractMesh } from "../../Meshes/abstractMesh";
 import { SubMesh } from "../../Meshes/subMesh";
 import { InternalTexture } from "../../Materials/Textures/internalTexture";
@@ -14,6 +14,9 @@ import { PostProcessManager } from "../../PostProcesses/postProcessManager";
 import { PostProcess } from "../../PostProcesses/postProcess";
 import { RenderingManager } from "../../Rendering/renderingManager";
 import { Constants } from "../../Engines/constants";
+
+declare type Engine = import("../../Engines/engine").Engine;
+
     /**
      * This Helps creating a texture that will be created from a camera in your scene.
      * It is basically a dynamic texture that could be used to create special effects for instance.