sebastien 6 年之前
父節點
當前提交
08d6f1838d
共有 6 個文件被更改,包括 49 次插入21 次删除
  1. 6 7
      src/Debug/axesViewer.ts
  2. 9 5
      src/Debug/boneAxesViewer.ts
  3. 3 0
      src/Debug/debugLayer.ts
  4. 7 4
      src/Debug/physicsViewer.ts
  5. 8 1
      src/Debug/rayHelper.ts
  6. 16 4
      src/Debug/skeletonViewer.ts

+ 6 - 7
src/Debug/axesViewer.ts

@@ -1,9 +1,9 @@
-/**
- * Module Debug contains the (visual) components to debug a scene correctly
- */
-module BABYLON.Debug {
+import { Vector3, Color3 } from "Math";
+import { Nullable } from "types";
+import { Scene } from "scene";
+import { LinesMesh, Mesh } from "Mesh";
 
-    /**
+/**
      * The Axes viewer will show 3 axes in a specific point in space
      */
     export class AxesViewer {
@@ -116,5 +116,4 @@ module BABYLON.Debug {
             this.scene = null;
         }
 
-    }
-}
+    }

+ 9 - 5
src/Debug/boneAxesViewer.ts

@@ -1,6 +1,11 @@
-module BABYLON.Debug {
-
-    /**
+import { AxesViewer } from "Debug";
+import { Nullable } from "types";
+import { Mesh } from "Particles";
+import { Bone } from "Bones";
+import { Vector3, Axis } from "Math";
+import { Scene } from "scene";
+
+/**
      * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
      * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
      */
@@ -71,5 +76,4 @@ module BABYLON.Debug {
             }
         }
 
-    }
-}
+    }

+ 3 - 0
src/Debug/debugLayer.ts

@@ -1,3 +1,6 @@
+import { Tools } from "Tools";
+import { Scene } from "scene";
+
     // declare INSPECTOR namespace for compilation issue
     declare var INSPECTOR: any;
     // load the inspector using require, if not present in the global namespace.

+ 7 - 4
src/Debug/physicsViewer.ts

@@ -1,6 +1,10 @@
-module BABYLON.Debug {
+import { Nullable } from "types";
+import { PhysicsImpostor, IPhysicsEnginePlugin, StandardMaterial, Engine, Material } from "index";
+import { Scene } from "scene";
+import { Mesh, MeshBuilder, AbstractMesh } from "Mesh";
+import { Quaternion } from "Math";
 
-    /**
+/**
      * Used to show the physics impostor around the specific mesh
      */
     export class PhysicsViewer {
@@ -204,5 +208,4 @@ module BABYLON.Debug {
             this._scene = null;
             this._physicsEnginePlugin = null;
         }
-    }
-}
+    }

+ 8 - 1
src/Debug/rayHelper.ts

@@ -1,3 +1,10 @@
+import { Nullable } from "types";
+import { Ray } from "index";
+import { Vector3, Color3 } from "Math";
+import { LinesMesh } from "Rendering";
+import { Scene } from "scene";
+import { AbstractMesh, Mesh } from "Mesh";
+
     /**
      * As raycast might be hard to debug, the RayHelper can help rendering the different rays
      * in order to better appreciate the issue one might have.
@@ -206,4 +213,4 @@
             this.detachFromMesh();
             this.ray = null;
         }
-    }
+    }

+ 16 - 4
src/Debug/skeletonViewer.ts

@@ -1,5 +1,18 @@
-module BABYLON.Debug {
-    /**
+import { Color3, Vector3, Matrix, Tmp } from "Math";
+
+import { Scene } from "scene";
+
+import { Nullable } from "types";
+
+import { LinesMesh } from "Mesh";
+
+import { Skeleton, Bone } from "Bones";
+
+import { AbstractMesh } from "Mesh";
+
+import { UtilityLayerRenderer } from "index";
+
+/**
      * Class used to render a debug view of a given skeleton
      * @see http://www.babylonjs-playground.com/#1BZJVJ#8
      */
@@ -159,5 +172,4 @@ module BABYLON.Debug {
                 this._debugMesh = null;
             }
         }
-    }
-}
+    }