瀏覽代碼

Merge branch 'master' into transformNodeDocs

Trevor Baron 7 年之前
父節點
當前提交
401d3afec6

文件差異過大導致無法顯示
+ 1793 - 1615
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 0 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


+ 4 - 1
src/Actions/babylon.condition.ts

@@ -288,13 +288,16 @@
          * @param target of the condition
          * @param value to compare with target state 
          */
-        constructor(actionManager: ActionManager, target: any, public value: string) {
+        constructor(actionManager: ActionManager, target: any, 
+                /** Value to compare with target state  */
+                public value: string) {
             super(actionManager);
 
             this._target = target;
         }
 
         /**
+         * Gets a boolean indicating if the current condition is met
          * @returns the validity of the state
          */
         public isValid(): boolean {

+ 4 - 1
src/Sprites/babylon.spriteSceneComponent.ts

@@ -173,7 +173,10 @@
             this.scene.onBeforeSpritesRenderingObservable = new Observable<Scene>();
             this.scene.onAfterSpritesRenderingObservable = new Observable<Scene>();
             this._spritePredicate = (sprite: Sprite): boolean => {
-                return sprite.isPickable && sprite.actionManager && sprite.actionManager.hasPointerTriggers;
+                if (!sprite.actionManager) {
+                    return false;
+                }
+                return sprite.isPickable && sprite.actionManager.hasPointerTriggers;
             };
         }
 

+ 12 - 2
src/Tools/babylon.stringDictionary.ts

@@ -91,7 +91,12 @@
             return true;
         }
 
-
+        /**
+         * Update a specific value associated to a key
+         * @param key defines the key to use
+         * @param value defines the value to store
+         * @returns true if the value was updated (or false if the key was not found)
+         */
         public set(key: string, value: T): boolean {
             if (this._data[key] === undefined) {
                 return false;
@@ -102,7 +107,8 @@
 
         /**
          * Get the element of the given key and remove it from the dictionary
-         * @param key
+         * @param key defines the key to search
+         * @returns the value associated with the key or null if not found
          */
         public getAndRemove(key: string): Nullable<T> {
             let val = this.get(key);
@@ -136,6 +142,9 @@
             this._count = 0;
         }
 
+        /**
+         * Gets the current count
+         */
         public get count() {
             return this._count;
         }
@@ -157,6 +166,7 @@
          * If the callback returns null or undefined the method will iterate to the next key/value pair
          * Note that you can remove any element in this dictionary in the callback implementation
          * @param callback the callback to execute, if it return a valid T instanced object the enumeration will stop and the object will be returned
+         * @returns the first item
          */
         public first<TRes>(callback: (key: string, val: T) => TRes) {
             for (let cur in this._data) {