Procházet zdrojové kódy

Merge pull request #5141 from sebavan/master

Doc
sebavan před 7 roky
rodič
revize
e7488a1e40
2 změnil soubory, kde provedl 11 přidání a 7 odebrání
  1. 3 2
      src/Audio/babylon.audioEngine.ts
  2. 8 5
      src/Tools/babylon.tools.ts

+ 3 - 2
src/Audio/babylon.audioEngine.ts

@@ -1,7 +1,8 @@
 module BABYLON {
     /**
      * This represents an audio engine and it is responsible
-     * to play, synchronize and analyse sounds throughout the  application.
+     * to play, synchronize and analyse sounds throughout the application.
+     * @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
      */
     export interface IAudioEngine extends IDisposable {
         /**
@@ -211,7 +212,7 @@
 
         /**
          * Sets the global volume of your experience (sets on the master gain).
-         * @param newVloume Defines the new global volume of the application
+         * @param newVolume Defines the new global volume of the application
          */
         public setGlobalVolume(newVolume: number): void {
             if (this.canUseWebAudio && this._audioContextInitialized) {

+ 8 - 5
src/Tools/babylon.tools.ts

@@ -1951,14 +1951,15 @@
          * Defines the current index of the loop.
          */
         public index: number;
-
         private _done: boolean;
+        private _fn: (asyncLoop: AsyncLoop) => void;
+        private _successCallback: () => void;
 
         /**
          * Constructor.
          * @param iterations the number of iterations.
-         * @param _fn the function to run each iteration
-         * @param _successCallback the callback that will be called upon succesful execution
+         * @param func the function to run each iteration
+         * @param successCallback the callback that will be called upon succesful execution
          * @param offset starting offset.
          */
         constructor(
@@ -1966,12 +1967,14 @@
              * Defines the number of iterations for the loop
              */
             public iterations: number, 
-            private _fn: (asyncLoop: AsyncLoop) => void, 
-            private _successCallback: () => void, 
+            func: (asyncLoop: AsyncLoop) => void, 
+            successCallback: () => void, 
             offset: number = 0) {
 
             this.index = offset - 1;
             this._done = false;
+            this._fn = func;
+            this._successCallback = successCallback;
         }
 
         /**