Przeglądaj źródła

Doc Check and cleanup a bit

sebastien 7 lat temu
rodzic
commit
fa5cd712ed

+ 28 - 0
src/Sprites/babylon.spriteManager.ts

@@ -1,15 +1,43 @@
 module BABYLON {
+    /**
+     * Defines the minimum interface to full fill in order to be a sprite manager.
+     */
     export interface ISpriteManager extends IDisposable {
+        /**
+         * Restricts the camera to viewing objects with the same layerMask.
+         * A camera with a layerMask of 1 will render spriteManager.layerMask & camera.layerMask!== 0
+         */
         layerMask: number;
 
+        /**
+         * Gets or sets a boolean indicating if the mesh can be picked (by scene.pick for instance or through actions). Default is true
+         */
         isPickable: boolean;
 
+        /** 
+         * Specifies the rendering group id for this mesh (0 by default) 
+         * @see http://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered#rendering-groups
+         */
         renderingGroupId: number;
 
+        /**
+         * Defines the list of sprites managed by the manager.
+         */
         sprites: Array<Sprite>;
 
+        /**
+         * Tests the intersection of a sprite with a specific ray.
+         * @param ray The ray we are sending to test the collision
+         * @param camera The camera space we are sending rays in
+         * @param predicate A predicate allowing excluding sprites from the list of object to test
+         * @param fastCheck Is the hit test done in a OOBB or AOBB fashion the faster, the less precise
+         * @returns picking info or null.
+         */
         intersects(ray: Ray, camera:Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): Nullable<PickingInfo>;
 
+        /**
+         * Renders the list of sprites on screen.
+         */
         render(): void;
     }
 

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

@@ -1,8 +1,4 @@
 module BABYLON {
-    export interface ActionManager {
-
-    }
-
     export interface Scene {
         /** @hidden */
         _pointerOverSprite: Nullable<Sprite>;
@@ -129,10 +125,6 @@
         return this._internalPickSprites(this._tempSpritePickingRay, predicate, fastCheck, camera);
     }
 
-    /**
-     * Force the sprite under the pointer
-     * @param sprite defines the sprite to use
-     */
     Scene.prototype.setPointerOverSprite = function(sprite: Nullable<Sprite>): void {
         if (this._pointerOverSprite === sprite) {
             return;
@@ -148,16 +140,12 @@
         }
     }
 
-    /** 
-     * Gets the sprite under the pointer
-     * @returns a Sprite or null if no sprite is under the pointer
-     */
     Scene.prototype.getPointerOverSprite = function(): Nullable<Sprite> {
         return this._pointerOverSprite;
     }
 
     /**
-     * Defines the layer scene component responsible to manage sprites
+     * Defines the sprite scene component responsible to manage sprites
      * in a given scene.
      */
     export class SpriteSceneComponent implements ISceneComponent {