Browse Source

more imports

sebastien 6 years ago
parent
commit
148f36696c
4 changed files with 18 additions and 8 deletions
  1. 6 7
      src/Tools/videoRecorder.ts
  2. 6 0
      src/Tools/virtualJoystick.ts
  3. 1 1
      src/Tools/workerPool.ts
  4. 5 0
      src/mixins.ts

+ 6 - 7
src/Tools/videoRecorder.ts

@@ -1,9 +1,8 @@
-interface HTMLCanvasElement {
-    /** Track wether a record is in progress */
-    isRecording: boolean;
-    /** Capture Stream method defined by some browsers */
-    captureStream(fps?: number): MediaStream;
-}
+import { Engine } from "index";
+
+import { Nullable } from "types";
+
+import { Tools } from ".";
 
 interface MediaRecorder {
     /** Starts recording */
@@ -82,7 +81,7 @@ declare var MediaRecorder: MediaRecorderConstructor;
          */
         public static IsSupported(engine: Engine): boolean {
             const canvas = engine.getRenderingCanvas();
-            return (!!canvas && typeof canvas.captureStream === "function");
+            return (!!canvas && typeof (<any>canvas).captureStream === "function");
         }
 
         private readonly _options: VideoRecorderOptions;

+ 6 - 0
src/Tools/virtualJoystick.ts

@@ -1,3 +1,9 @@
+import { Vector3, Vector2 } from "Math";
+
+import { Nullable } from "types";
+
+import { StringDictionary } from ".";
+
 // Mainly based on these 2 articles :
 // Creating an universal virtual touch joystick working for all Touch models thanks to Hand.JS : http://blogs.msdn.com/b/davrous/archive/2013/02/22/creating-an-universal-virtual-touch-joystick-working-for-all-touch-models-thanks-to-hand-js.aspx
 // & on Seb Lee-Delisle original work: http://seb.ly/2011/04/multi-touch-game-controller-in-javascripthtml5-for-ipad/

+ 1 - 1
src/Tools/workerPool.ts

@@ -1,4 +1,4 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
+import { IDisposable } from "scene";
 
     interface WorkerInfo {
         worker: Worker;

+ 5 - 0
src/mixins.ts

@@ -113,6 +113,11 @@ interface HTMLCanvasElement {
     msRequestPointerLock?(): void;
     mozRequestPointerLock?(): void;
     webkitRequestPointerLock?(): void;
+
+    /** Track wether a record is in progress */
+    isRecording: boolean;
+    /** Capture Stream method defined by some browsers */
+    captureStream(fps?: number): MediaStream;
 }
 
 interface CanvasRenderingContext2D {