Browse Source

Fix inspector + DOF

David Catuhe 6 years ago
parent
commit
51096b8082

+ 1 - 0
src/Meshes/index.ts

@@ -14,5 +14,6 @@ export * from "./meshSimplification";
 export * from "./meshSimplificationSceneComponent";
 export * from "./polygonMesh";
 export * from "./subMesh";
+export * from "./meshLODLevel";
 export * from "./transformNode";
 export * from "./Builders/index";

+ 1 - 18
src/Meshes/mesh.ts

@@ -28,6 +28,7 @@ import { Logger } from "../Misc/logger";
 import { _TypeStore } from '../Misc/typeStore';
 import { _DevTools } from '../Misc/devTools';
 import { SceneComponentConstants } from "../sceneComponent";
+import { MeshLODLevel } from './meshLODLevel';
 
 declare type LinesMesh = import("./linesMesh").LinesMesh;
 declare type InstancedMesh = import("./instancedMesh").InstancedMesh;
@@ -38,24 +39,6 @@ declare type PhysicsImpostor = import("../Physics/physicsImpostor").PhysicsImpos
 declare var earcut: any;
 
 /**
- * Class used to represent a specific level of detail of a mesh
- * @see http://doc.babylonjs.com/how_to/how_to_use_lod
- */
-export class MeshLODLevel {
-    /**
-     * Creates a new LOD level
-     * @param distance defines the distance where this level should star being displayed
-     * @param mesh defines the mesh to use to render this level
-     */
-    constructor(
-        /** Defines the distance where this level should star being displayed */
-        public distance: number,
-        /** Defines the mesh to use to render this level */
-        public mesh: Nullable<Mesh>) {
-    }
-}
-
-/**
  * @hidden
  **/
 export class _CreationDataStorage {

+ 20 - 0
src/Meshes/meshLODLevel.ts

@@ -0,0 +1,20 @@
+import { Mesh } from './mesh';
+import { Nullable } from '../types';
+
+/**
+ * Class used to represent a specific level of detail of a mesh
+ * @see http://doc.babylonjs.com/how_to/how_to_use_lod
+ */
+export class MeshLODLevel {
+    /**
+     * Creates a new LOD level
+     * @param distance defines the distance where this level should star being displayed
+     * @param mesh defines the mesh to use to render this level
+     */
+    constructor(
+        /** Defines the distance where this level should star being displayed */
+        public distance: number,
+        /** Defines the mesh to use to render this level */
+        public mesh: Nullable<Mesh>) {
+    }
+}

+ 1 - 1
src/PostProcesses/RenderPipeline/postProcessRenderEffect.ts

@@ -129,7 +129,7 @@ export class PostProcessRenderEffect {
     }
 
     /**
-     * Detatches the effect on cameras
+     * Detaches the effect on cameras
      * @param cameras The camera to detatch from.
      * @hidden
      */

+ 8 - 0
src/PostProcesses/depthOfFieldEffect.ts

@@ -145,6 +145,14 @@ export class DepthOfFieldEffect extends PostProcessRenderEffect {
     }
 
     /**
+    * Get the current class name of the current effet
+    * @returns "DepthOfFieldEffect"
+    */
+    public getClassName(): string {
+        return "DepthOfFieldEffect";
+    }
+
+    /**
      * Depth texture to be used to compute the circle of confusion. This must be set here or in the constructor in order for the post process to function.
      */
     public set depthTexture(value: RenderTargetTexture) {

+ 1 - 1
src/scene.ts

@@ -3959,7 +3959,7 @@ export class Scene extends AbstractScene implements IAnimatable {
                 }
 
                 if (mesh._activate(this._renderId)) {
-                    mesh._isActive = true;
+                    meshLOD._isActive = true;
                     this._activeMesh(mesh, meshLOD);
                 }
             }